From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RRuw8-0001rN-6d for garchives@archives.gentoo.org; Sun, 20 Nov 2011 00:07:08 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CAFC021C098 for ; Sun, 20 Nov 2011 00:07:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id CBCBC21C049 for ; Sat, 19 Nov 2011 23:29:23 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3C52B1B4025 for ; Sat, 19 Nov 2011 23:29:23 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 5776980042 for ; Sat, 19 Nov 2011 23:29:22 +0000 (UTC) From: "Alexey Shvetsov" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alexey Shvetsov" Message-ID: <27c20e1b4509c3f3a596bf0530f98b6f078c7c5f.alexxy@gentoo> Subject: [gentoo-commits] proj/kde:master commit in: eclass/ X-VCS-Repository: proj/kde X-VCS-Files: eclass/virtuoso.eclass X-VCS-Directories: eclass/ X-VCS-Committer: alexxy X-VCS-Committer-Name: Alexey Shvetsov X-VCS-Revision: 27c20e1b4509c3f3a596bf0530f98b6f078c7c5f Date: Sat, 19 Nov 2011 23:29:22 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: c1e0ca57-2ead-4e6a-bbba-2253bee60456 X-Archives-Hash: b603dee837b31d43c4c353d1629e872e commit: 27c20e1b4509c3f3a596bf0530f98b6f078c7c5f Author: Alexey Shvetsov gentoo org> AuthorDate: Sat Nov 19 23:26:02 2011 +0000 Commit: Alexey Shvetsov gentoo org> CommitDate: Sat Nov 19 23:28:47 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/kde.git;a=3Dc= ommit;h=3D27c20e1b [eclass] Add virtuoso one Signed-off-by: Alexey Shvetsov gentoo.org> --- eclass/virtuoso.eclass | 144 ++++++++++++++++++++++++++++++++++++++++++= ++++++ 1 files changed, 144 insertions(+), 0 deletions(-) diff --git a/eclass/virtuoso.eclass b/eclass/virtuoso.eclass new file mode 100644 index 0000000..b4c7677 --- /dev/null +++ b/eclass/virtuoso.eclass @@ -0,0 +1,144 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/eclass/virtuoso.eclass,v 1.11 2011/07= /07 23:00:06 reavertm Exp $ + +# @ECLASS: virtuoso.eclass +# @MAINTAINER: +# Maciej Mrozowski +# +# @BLURB: Provides splitting functionality for Virtuoso +# @DESCRIPTION: +# This eclass provides common code for splitting Virtuoso OpenSource dat= abase + +case ${EAPI:-0} in + 2|3|4) : ;; + *) die "EAPI=3D${EAPI} is not supported" ;; +esac + +inherit base autotools multilib + +MY_P=3D"virtuoso-opensource-${PV}" + +case ${PV} in + *9999*) + ECVS_SERVER=3D"virtuoso.cvs.sourceforge.net:/cvsroot/virtuoso" + ECVS_PROJECT=3D'virtuoso' + SRC_URI=3D"" + inherit cvs + ;; + *) + # Use this variable to determine distribution method (live or tarball) + TARBALL=3D"${MY_P}.tar.gz" + SRC_URI=3D"mirror://sourceforge/virtuoso/${TARBALL} mirror://gentoo/VO= S-genpatches-${PV}.tar.bz2" + ;; +esac + +EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install + +# Set some defaults +HOMEPAGE=3D'http://virtuoso.openlinksw.com/wiki/main/Main/' +LICENSE=3D'GPL-2' +SLOT=3D'0' + +# Restrict incompatible gawk, bug 374315 +DEPEND=3D' + >=3Dsys-devel/libtool-2.2.6a +' +RDEPEND=3D'' + +S=3D"${WORKDIR}/${MY_P}" + +# @FUNCTION: virtuoso_src_prepare +# @DESCRIPTION: +# 1. Applies common release patches +# 2. Applies package-specific patches (from ${FILESDIR}/, PATCHES can be= used) +# 3. Applies user patches from /etc/portage/patches/${CATEGORY}/${PN}/ +# 4. Modifies makefiles for split build. Uses VOS_EXTRACT +# 5. eautoreconf +virtuoso_src_prepare() { + debug-print-function ${FUNCNAME} "$@" + + EPATCH_SUFFIX=3D'patch' EPATCH_FORCE=3D'yes' epatch + base_src_prepare + + # @ECLASS-VARIABLE: VOS_EXTRACT + # @DESCRIPTION: + # Lists any subdirectories that are required to be extracted + # and enabled in Makefile.am's for current package. + if [[ -n ${VOS_EXTRACT} ]]; then + # Comment out everything + find . -name Makefile.am -exec \ + sed -e '/SUBDIRS\s*=3D/s/^/# DISABLED /g' -i {} + \ + || die 'failed to disable subdirs' + + # Uncomment specified + local path + for path in ${VOS_EXTRACT}; do + if [[ -d "${path}" ]]; then + # Uncomment leaf + if [[ -f "${path}"/Makefile.am ]]; then + sed -e '/^# DISABLED \s*SUBDIRS\s*=3D/s/# DISABLED //g' \ + -i "${path}"/Makefile.am || die "failed to uncomment leaf in ${pat= h}/Makefile.am" + fi + # Process remaining path elements + while true; do + local subdir=3D`basename "${path}"` + path=3D`dirname "${path}"` + if [[ -f "${path}"/Makefile.am ]]; then + # Uncomment if necessary + sed -e '/^# DISABLED \s*SUBDIRS\s*=3D/s/.*/SUBDIRS =3D/g' \ + -i "${path}"/Makefile.am + # Append subdirs if not there already + if [[ -z `sed -ne "/SUBDIRS\s*=3D.*${subdir}\b/p" "${path}"/Makefi= le.am` ]]; then + sed -e "/^SUBDIRS\s*=3D/s|$| ${subdir}|" \ + -i "${path}"/Makefile.am || die "failed to append ${subdir}" + fi + fi + [[ "${path}" =3D . ]] && break + done + fi + done + fi + + eautoreconf +} + +# @FUNCTION: virtuoso_src_configure +# @DESCRIPTION: +# Runs ./configure with common and user options specified via myconf var= iable +virtuoso_src_configure() { + debug-print-function ${FUNCNAME} "$@" + + # Override some variables to make tests work + if [[ ${PN} !=3D virtuoso-server ]]; then + [[ ${EAPI} =3D=3D 2 ]] && ! use prefix && EPREFIX=3D + export ISQL=3D"${EPREFIX}"/usr/bin/isql-v + export SERVER=3D"${EPREFIX}"/usr/bin/virtuoso-t + fi + + econf \ + --with-layout=3Dgentoo \ + --localstatedir=3D"${EPREFIX}"/var \ + --enable-shared \ + --with-pthreads \ + --without-internal-zlib \ + ${myconf} +} + +# @FUNCTION: virtuoso_src_compile +# @DESCRIPTION: +# Runs make for specified subdirs +virtuoso_src_compile() { + debug-print-function ${FUNCNAME} "$@" + + base_src_compile +} + +# @FUNCTION: virtuoso_src_install +# @DESCRIPTION: +# Default src_install +virtuoso_src_install() { + debug-print-function ${FUNCNAME} "$@" + + base_src_install +}