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

Contents of /eclass/virtuoso.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Mon Feb 8 20:30:19 2010 UTC (4 years, 8 months ago) by alexxy
Branch: MAIN
Initial import

1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
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) : ;;
15 *) DEPEND="EAPI-TOO-OLD" ;;
16 esac
17
18 inherit base autotools flag-o-matic 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 SRC_URI=""
26 inherit cvs
27 ;;
28 *)
29 # Use this variable to determine distribution method (live or tarball)
30 TARBALL="${MY_P}.tar.gz"
31 SRC_URI="mirror://sourceforge/virtuoso/${TARBALL}"
32 ;;
33 esac
34
35 EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install
36
37 # Set some defaults
38 HOMEPAGE="http://virtuoso.openlinksw.com/wiki/main/Main/"
39 LICENSE="GPL-2"
40 SLOT="0"
41
42 DEPEND=">=sys-devel/libtool-2.2.6a"
43 RDEPEND=""
44
45 S="${WORKDIR}/${MY_P}"
46
47 # @FUNCTION: virtuoso_src_prepare
48 # @DESCRIPTION:
49 # 1. Applies common release patches (from ${FILESDIR}/${PV}/ dir)
50 # 2. Applies package-specific patches (from ${FILESDIR}/, PATCHES can be used)
51 # 3. Modifies makefiles for split build. Uses VOS_EXTRACT
52 # 4. eautoreconf
53 virtuoso_src_prepare() {
54 debug-print-function ${FUNCNAME} "$@"
55
56 for file in "${FILESDIR}/${PV}"/*; do
57 epatch "${file}"
58 done
59
60 base_src_prepare
61
62 # @ECLASS-VARIABLE: VOS_EXTRACT
63 # @DESCRIPTION:
64 # Lists any subdirectories that are required to be extracted
65 # and enabled in Makefile.am's for current package.
66 if [[ -n ${VOS_EXTRACT} ]]; then
67 # Comment out everything
68 find . -name Makefile.am -exec \
69 sed -e '/SUBDIRS\s*=/s/^/# DISABLED /g' -i {} + \
70 || die "failed to disable subdirs"
71
72 # Uncomment specified
73 local path
74 for path in ${VOS_EXTRACT}; do
75 if [[ -d "${path}" ]]; then
76 # Uncomment leaf
77 if [[ -f "${path}"/Makefile.am ]]; then
78 sed -e '/^# DISABLED \s*SUBDIRS\s*=/s/# DISABLED //g' \
79 -i "${path}"/Makefile.am || die "failed to uncomment leaf in ${path}/Makefile.am"
80 fi
81 # Process remaining path elements
82 while true; do
83 local subdir=`basename "${path}"`
84 path=`dirname "${path}"`
85 if [[ -f "${path}"/Makefile.am ]]; then
86 # Uncomment if necessary
87 sed -e '/^# DISABLED \s*SUBDIRS\s*=/s/.*/SUBDIRS =/g' \
88 -i "${path}"/Makefile.am
89 # Append subdirs if not there already
90 if [[ -z `grep --color=never -P "SUBDIRS\s*=.*${subdir}\b" "${path}"/Makefile.am` ]]; then
91 sed -e "/^SUBDIRS\s*=/s|$| ${subdir}|" \
92 -i "${path}"/Makefile.am || die "failed to append ${subdir}"
93 fi
94 fi
95 [[ "${path}" = . ]] && break
96 done
97 fi
98 done
99 fi
100
101 eautoreconf
102 }
103
104 # @FUNCTION: virtuoso_src_configure
105 # @DESCRIPTION:
106 # Runs ./configure with common and user options specified via myconf variable
107 virtuoso_src_configure() {
108 debug-print-function ${FUNCNAME} "$@"
109
110 use amd64 && append-flags "-m64"
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