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

Contents of /eclass/virtuoso.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.15 - (show annotations) (download)
Fri Mar 7 03:27:47 2014 UTC (9 months, 1 week ago) by creffett
Branch: MAIN
CVS Tags: HEAD
Changes since 1.14: +9 -22 lines
Remove base inherit from virtuoso.eclass

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

  ViewVC Help
Powered by ViewVC 1.1.20