/[gentoo-x86]/eclass/virtuoso.eclass
Gentoo

Diff of /eclass/virtuoso.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.2 Revision 1.3
1# Copyright 1999-2010 Gentoo Foundation 1# Copyright 1999-2010 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/virtuoso.eclass,v 1.2 2010/03/26 12:24:12 scarabeus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/virtuoso.eclass,v 1.3 2010/04/06 17:28:31 reavertm Exp $
4 4
5# @ECLASS: virtuoso.eclass 5# @ECLASS: virtuoso.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Maciej Mrozowski <reavertm@gentoo.org> 7# Maciej Mrozowski <reavertm@gentoo.org>
8# 8#
10# @DESCRIPTION: 10# @DESCRIPTION:
11# This eclass provides common code for splitting Virtuoso OpenSource database 11# This eclass provides common code for splitting Virtuoso OpenSource database
12 12
13case ${EAPI:-0} in 13case ${EAPI:-0} in
14 2|3) : ;; 14 2|3) : ;;
15 *) DEPEND="EAPI-TOO-OLD" ;; 15 *) DEPEND='EAPI-TOO-OLD' ;;
16esac 16esac
17 17
18inherit base autotools flag-o-matic multilib 18inherit base autotools flag-o-matic multilib
19 19
20MY_P="virtuoso-opensource-${PV}" 20MY_P="virtuoso-opensource-${PV}"
21 21
22case ${PV} in 22case ${PV} in
23 *9999*) 23 *9999*)
24 ECVS_SERVER="virtuoso.cvs.sourceforge.net:/cvsroot/virtuoso" 24 ECVS_SERVER="virtuoso.cvs.sourceforge.net:/cvsroot/virtuoso"
25 ECVS_PROJECT='virtuoso'
25 SRC_URI="" 26 SRC_URI=""
26 inherit cvs 27 inherit cvs
27 ;; 28 ;;
28 *) 29 *)
29 # Use this variable to determine distribution method (live or tarball) 30 # Use this variable to determine distribution method (live or tarball)
30 TARBALL="${MY_P}.tar.gz" 31 TARBALL="${MY_P}.tar.gz"
31 SRC_URI="mirror://sourceforge/virtuoso/${TARBALL}" 32 SRC_URI="mirror://sourceforge/virtuoso/${TARBALL} mirror://gentoo/VOS-genpatches-${PV}.tar.bz2"
32 ;; 33 ;;
33esac 34esac
34 35
35EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install 36EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install
36 37
37# Set some defaults 38# Set some defaults
38HOMEPAGE="http://virtuoso.openlinksw.com/wiki/main/Main/" 39HOMEPAGE='http://virtuoso.openlinksw.com/wiki/main/Main/'
39LICENSE="GPL-2" 40LICENSE='GPL-2'
40SLOT="0" 41SLOT='0'
41 42
43DEPEND='
42DEPEND=">=sys-devel/libtool-2.2.6a" 44 >=sys-devel/libtool-2.2.6a
45'
43RDEPEND="" 46RDEPEND=''
44 47
45S="${WORKDIR}/${MY_P}" 48S="${WORKDIR}/${MY_P}"
46 49
47# @FUNCTION: virtuoso_src_prepare 50# @FUNCTION: virtuoso_src_prepare
48# @DESCRIPTION: 51# @DESCRIPTION:
49# 1. Applies common release patches (from ${FILESDIR}/${PV}/ dir) 52# 1. Applies common release patches
50# 2. Applies package-specific patches (from ${FILESDIR}/, PATCHES can be used) 53# 2. Applies package-specific patches (from ${FILESDIR}/, PATCHES can be used)
54# 3. Applies user patches from /etc/portage/patches/${CATEGORY}/${PN}/
51# 3. Modifies makefiles for split build. Uses VOS_EXTRACT 55# 4. Modifies makefiles for split build. Uses VOS_EXTRACT
52# 4. eautoreconf 56# 5. eautoreconf
53virtuoso_src_prepare() { 57virtuoso_src_prepare() {
54 debug-print-function ${FUNCNAME} "$@" 58 debug-print-function ${FUNCNAME} "$@"
55 59
56 for file in "${FILESDIR}/${PV}"/*; do 60 EPATCH_SUFFIX='patch' EPATCH_FORCE='yes' epatch
57 epatch "${file}"
58 done
59
60 base_src_prepare 61 base_src_prepare
62 epatch_user
61 63
62 # @ECLASS-VARIABLE: VOS_EXTRACT 64 # @ECLASS-VARIABLE: VOS_EXTRACT
63 # @DESCRIPTION: 65 # @DESCRIPTION:
64 # Lists any subdirectories that are required to be extracted 66 # Lists any subdirectories that are required to be extracted
65 # and enabled in Makefile.am's for current package. 67 # and enabled in Makefile.am's for current package.
66 if [[ -n ${VOS_EXTRACT} ]]; then 68 if [[ -n ${VOS_EXTRACT} ]]; then
67 # Comment out everything 69 # Comment out everything
68 find . -name Makefile.am -exec \ 70 find . -name Makefile.am -exec \
69 sed -e '/SUBDIRS\s*=/s/^/# DISABLED /g' -i {} + \ 71 sed -e '/SUBDIRS\s*=/s/^/# DISABLED /g' -i {} + \
70 || die "failed to disable subdirs" 72 || die 'failed to disable subdirs'
71 73
72 # Uncomment specified 74 # Uncomment specified
73 local path 75 local path
74 for path in ${VOS_EXTRACT}; do 76 for path in ${VOS_EXTRACT}; do
75 if [[ -d "${path}" ]]; then 77 if [[ -d "${path}" ]]; then
105# @DESCRIPTION: 107# @DESCRIPTION:
106# Runs ./configure with common and user options specified via myconf variable 108# Runs ./configure with common and user options specified via myconf variable
107virtuoso_src_configure() { 109virtuoso_src_configure() {
108 debug-print-function ${FUNCNAME} "$@" 110 debug-print-function ${FUNCNAME} "$@"
109 111
110 use amd64 && append-flags "-m64" 112 use amd64 && append-flags '-m64'
111 113
112 # Override some variables to make tests work 114 # Override some variables to make tests work
113 if [[ ${PN} != virtuoso-server ]]; then 115 if [[ ${PN} != virtuoso-server ]]; then
114 [[ ${EAPI} == 2 ]] && ! use prefix && EPREFIX= 116 [[ ${EAPI} == 2 ]] && ! use prefix && EPREFIX=
115 export ISQL=${EPREFIX}/usr/bin/isql-v 117 export ISQL="${EPREFIX}"/usr/bin/isql-v
116 export SERVER=${EPREFIX}/usr/bin/virtuoso-t 118 export SERVER="${EPREFIX}"/usr/bin/virtuoso-t
117 fi 119 fi
118 120
119 econf \ 121 econf \
120 --with-layout=gentoo \ 122 --with-layout=gentoo \
121 --localstatedir=${EPREFIX}/var \ 123 --localstatedir="${EPREFIX}"/var \
122 --enable-shared \ 124 --enable-shared \
123 --with-pthreads \ 125 --with-pthreads \
124 --without-internal-zlib \ 126 --without-internal-zlib \
125 ${myconf} 127 ${myconf}
126} 128}
127 129
128# @FUNCTION: virtuoso_src_compile 130# @FUNCTION: virtuoso_src_compile
129# @DESCRIPTION: 131# @DESCRIPTION
130# Runs make for specified subdirs 132# Runs make for specified subdirs
131virtuoso_src_compile() { 133virtuoso_src_compile() {
132 debug-print-function ${FUNCNAME} "$@" 134 debug-print-function ${FUNCNAME} "$@"
133 135
134 base_src_compile 136 base_src_compile

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.20