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

Contents of /eclass/virtuoso.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Wed Apr 20 09:45:16 2011 UTC (3 years, 4 months ago) by scarabeus
Branch: MAIN
Changes since 1.8: +2 -2 lines
Add eapi4 to supported list.

1 # Copyright 1999-2010 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.8 2011/01/26 18:25:46 reavertm Exp $
4
5 # @ECLASS: virtuoso.eclass
6 # @MAINTAINER:
7 # Maciej Mrozowski <reavertm@gentoo.org>
8 #
9 # @BLURB: Provides splitting functionality for Virtuoso
10 # @DESCRIPTION:
11 # This eclass provides common code for splitting Virtuoso OpenSource database
12
13 case ${EAPI:-0} in
14 2|3|4) : ;;
15 *) die "EAPI=${EAPI} is not supported" ;;
16 esac
17
18 inherit base autotools multilib
19
20 MY_P="virtuoso-opensource-${PV}"
21
22 case ${PV} in
23 *9999*)
24 ECVS_SERVER="virtuoso.cvs.sourceforge.net:/cvsroot/virtuoso"
25 ECVS_PROJECT='virtuoso'
26 SRC_URI=""
27 inherit cvs
28 ;;
29 *)
30 # Use this variable to determine distribution method (live or tarball)
31 TARBALL="${MY_P}.tar.gz"
32 SRC_URI="mirror://sourceforge/virtuoso/${TARBALL} mirror://gentoo/VOS-genpatches-${PV}.tar.bz2"
33 ;;
34 esac
35
36 EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install
37
38 # Set some defaults
39 HOMEPAGE='http://virtuoso.openlinksw.com/wiki/main/Main/'
40 LICENSE='GPL-2'
41 SLOT='0'
42
43 DEPEND='
44 >=sys-devel/libtool-2.2.6a
45 '
46 RDEPEND=''
47
48 S="${WORKDIR}/${MY_P}"
49
50 # @FUNCTION: virtuoso_src_prepare
51 # @DESCRIPTION:
52 # 1. Applies common release patches
53 # 2. Applies package-specific patches (from ${FILESDIR}/, PATCHES can be used)
54 # 3. Applies user patches from /etc/portage/patches/${CATEGORY}/${PN}/
55 # 4. Modifies makefiles for split build. Uses VOS_EXTRACT
56 # 5. eautoreconf
57 virtuoso_src_prepare() {
58 debug-print-function ${FUNCNAME} "$@"
59
60 EPATCH_SUFFIX='patch' EPATCH_FORCE='yes' epatch
61 base_src_prepare
62 epatch_user
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