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

Contents of /eclass/virtuoso.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download)
Thu Nov 24 00:57:00 2011 UTC (3 years, 1 month ago) by reavertm
Branch: MAIN
Changes since 1.11: +2 -4 lines
Dependency on <gawk-4 moved to virtuoso-server-6.1.{2,3}.

1 # Copyright 1999-2011 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.11 2011/07/07 23:00:06 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
63 # @ECLASS-VARIABLE: VOS_EXTRACT
64 # @DESCRIPTION:
65 # Lists any subdirectories that are required to be extracted
66 # and enabled in Makefile.am's for current package.
67 if [[ -n ${VOS_EXTRACT} ]]; then
68 # Comment out everything
69 find . -name Makefile.am -exec \
70 sed -e '/SUBDIRS\s*=/s/^/# DISABLED /g' -i {} + \
71 || die 'failed to disable subdirs'
72
73 # Uncomment specified
74 local path
75 for path in ${VOS_EXTRACT}; do
76 if [[ -d "${path}" ]]; then
77 # Uncomment leaf
78 if [[ -f "${path}"/Makefile.am ]]; then
79 sed -e '/^# DISABLED \s*SUBDIRS\s*=/s/# DISABLED //g' \
80 -i "${path}"/Makefile.am || die "failed to uncomment leaf in ${path}/Makefile.am"
81 fi
82 # Process remaining path elements
83 while true; do
84 local subdir=`basename "${path}"`
85 path=`dirname "${path}"`
86 if [[ -f "${path}"/Makefile.am ]]; then
87 # Uncomment if necessary
88 sed -e '/^# DISABLED \s*SUBDIRS\s*=/s/.*/SUBDIRS =/g' \
89 -i "${path}"/Makefile.am
90 # Append subdirs if not there already
91 if [[ -z `sed -ne "/SUBDIRS\s*=.*${subdir}\b/p" "${path}"/Makefile.am` ]]; then
92 sed -e "/^SUBDIRS\s*=/s|$| ${subdir}|" \
93 -i "${path}"/Makefile.am || die "failed to append ${subdir}"
94 fi
95 fi
96 [[ "${path}" = . ]] && break
97 done
98 fi
99 done
100 fi
101
102 eautoreconf
103 }
104
105 # @FUNCTION: virtuoso_src_configure
106 # @DESCRIPTION:
107 # Runs ./configure with common and user options specified via myconf variable
108 virtuoso_src_configure() {
109 debug-print-function ${FUNCNAME} "$@"
110
111 # Override some variables to make tests work
112 if [[ ${PN} != virtuoso-server ]]; then
113 [[ ${EAPI} == 2 ]] && ! use prefix && EPREFIX=
114 export ISQL="${EPREFIX}"/usr/bin/isql-v
115 export SERVER="${EPREFIX}"/usr/bin/virtuoso-t
116 fi
117
118 econf \
119 --with-layout=gentoo \
120 --localstatedir="${EPREFIX}"/var \
121 --enable-shared \
122 --with-pthreads \
123 --without-internal-zlib \
124 ${myconf}
125 }
126
127 # @FUNCTION: virtuoso_src_compile
128 # @DESCRIPTION:
129 # Runs make for specified subdirs
130 virtuoso_src_compile() {
131 debug-print-function ${FUNCNAME} "$@"
132
133 base_src_compile
134 }
135
136 # @FUNCTION: virtuoso_src_install
137 # @DESCRIPTION:
138 # Default src_install
139 virtuoso_src_install() {
140 debug-print-function ${FUNCNAME} "$@"
141
142 base_src_install
143 }

  ViewVC Help
Powered by ViewVC 1.1.20