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

Contents of /eclass/virtuoso.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (show annotations) (download)
Thu Sep 27 16:35:42 2012 UTC (22 months ago) by axs
Branch: MAIN
Changes since 1.13: +3 -3 lines
naive bump of all EAPI-specific checks in eclasses to permit EAPI=5 where EAPI=4 was previously allowed

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/eclass/virtuoso.eclass,v 1.13 2012/05/13 18:53:58 creffett Exp $
4
5 # @ECLASS: virtuoso.eclass
6 # @MAINTAINER:
7 # Maciej Mrozowski <reavertm@gentoo.org>
8 # Chris Reffett <creffett@gentoo.org>
9 #
10 # @BLURB: Provides splitting functionality for Virtuoso
11 # @DESCRIPTION:
12 # This eclass provides common code for splitting Virtuoso OpenSource database
13
14 case ${EAPI:-0} in
15 2|3|4|5) : ;;
16 *) die "EAPI=${EAPI} is not supported" ;;
17 esac
18
19 inherit base autotools multilib
20
21 MY_P="virtuoso-opensource-${PV}"
22
23 case ${PV} in
24 *9999*)
25 ECVS_SERVER="virtuoso.cvs.sourceforge.net:/cvsroot/virtuoso"
26 ECVS_PROJECT='virtuoso'
27 SRC_URI=""
28 inherit cvs
29 ;;
30 *)
31 # Use this variable to determine distribution method (live or tarball)
32 TARBALL="${MY_P}.tar.gz"
33 SRC_URI="mirror://sourceforge/virtuoso/${TARBALL} mirror://gentoo/VOS-genpatches-${PV}.tar.bz2"
34 ;;
35 esac
36
37 EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install
38
39 # Set some defaults
40 HOMEPAGE='http://virtuoso.openlinksw.com/wiki/main/Main/'
41 LICENSE='GPL-2'
42 SLOT='0'
43
44 DEPEND='
45 >=sys-devel/libtool-2.2.6a
46 '
47 RDEPEND=''
48
49 S="${WORKDIR}/${MY_P}"
50
51 # @FUNCTION: virtuoso_src_prepare
52 # @DESCRIPTION:
53 # 1. Applies common release patches
54 # 2. Applies package-specific patches (from ${FILESDIR}/, PATCHES can be used)
55 # 3. Applies user patches from /etc/portage/patches/${CATEGORY}/${PN}/
56 # 4. Modifies makefiles for split build. Uses VOS_EXTRACT
57 # 5. eautoreconf
58 virtuoso_src_prepare() {
59 debug-print-function ${FUNCNAME} "$@"
60
61 EPATCH_SUFFIX='patch' EPATCH_FORCE='yes' epatch
62 base_src_prepare
63
64 # @ECLASS-VARIABLE: VOS_EXTRACT
65 # @DESCRIPTION:
66 # Lists any subdirectories that are required to be extracted
67 # and enabled in Makefile.am's for current package.
68 if [[ -n ${VOS_EXTRACT} ]]; then
69 # Comment out everything
70 find . -name Makefile.am -exec \
71 sed -e '/SUBDIRS\s*=/s/^/# DISABLED /g' -i {} + \
72 || die 'failed to disable subdirs'
73
74 # Uncomment specified
75 local path
76 for path in ${VOS_EXTRACT}; do
77 if [[ -d "${path}" ]]; then
78 # Uncomment leaf
79 if [[ -f "${path}"/Makefile.am ]]; then
80 sed -e '/^# DISABLED \s*SUBDIRS\s*=/s/# DISABLED //g' \
81 -i "${path}"/Makefile.am || die "failed to uncomment leaf in ${path}/Makefile.am"
82 fi
83 # Process remaining path elements
84 while true; do
85 local subdir=`basename "${path}"`
86 path=`dirname "${path}"`
87 if [[ -f "${path}"/Makefile.am ]]; then
88 # Uncomment if necessary
89 sed -e '/^# DISABLED \s*SUBDIRS\s*=/s/.*/SUBDIRS =/g' \
90 -i "${path}"/Makefile.am
91 # Append subdirs if not there already
92 if [[ -z `sed -ne "/SUBDIRS\s*=.*${subdir}\b/p" "${path}"/Makefile.am` ]]; then
93 sed -e "/^SUBDIRS\s*=/s|$| ${subdir}|" \
94 -i "${path}"/Makefile.am || die "failed to append ${subdir}"
95 fi
96 fi
97 [[ "${path}" = . ]] && break
98 done
99 fi
100 done
101 fi
102
103 eautoreconf
104 }
105
106 # @FUNCTION: virtuoso_src_configure
107 # @DESCRIPTION:
108 # Runs ./configure with common and user options specified via myconf variable
109 virtuoso_src_configure() {
110 debug-print-function ${FUNCNAME} "$@"
111
112 # Override some variables to make tests work
113 if [[ ${PN} != virtuoso-server ]]; then
114 [[ ${EAPI} == 2 ]] && ! use prefix && EPREFIX=
115 export ISQL="${EPREFIX}"/usr/bin/isql-v
116 export SERVER="${EPREFIX}"/usr/bin/virtuoso-t
117 fi
118
119 econf \
120 --with-layout=gentoo \
121 --localstatedir="${EPREFIX}"/var \
122 --enable-shared \
123 --with-pthreads \
124 --without-internal-zlib \
125 ${myconf}
126 }
127
128 # @FUNCTION: virtuoso_src_compile
129 # @DESCRIPTION:
130 # Runs make for specified subdirs
131 virtuoso_src_compile() {
132 debug-print-function ${FUNCNAME} "$@"
133
134 base_src_compile
135 }
136
137 # @FUNCTION: virtuoso_src_install
138 # @DESCRIPTION:
139 # Default src_install
140 virtuoso_src_install() {
141 debug-print-function ${FUNCNAME} "$@"
142
143 base_src_install
144 }

  ViewVC Help
Powered by ViewVC 1.1.20