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

Contents of /eclass/virtuoso.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.13 - (hide annotations) (download)
Sun May 13 18:53:58 2012 UTC (2 years, 6 months ago) by creffett
Branch: MAIN
Changes since 1.12: +2 -1 lines
Added myself as co-maintainer to virtuoso.eclass

1 reavertm 1.12 # Copyright 1999-2011 Gentoo Foundation
2 alexxy 1.1 # Distributed under the terms of the GNU General Public License v2
3 creffett 1.13 # $Header: /var/cvsroot/gentoo-x86/eclass/virtuoso.eclass,v 1.12 2011/11/24 00:57:00 reavertm Exp $
4 alexxy 1.1
5     # @ECLASS: virtuoso.eclass
6     # @MAINTAINER:
7     # Maciej Mrozowski <reavertm@gentoo.org>
8 creffett 1.13 # Chris Reffett <creffett@gentoo.org>
9 alexxy 1.1 #
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 scarabeus 1.9 2|3|4) : ;;
16 reavertm 1.5 *) die "EAPI=${EAPI} is not supported" ;;
17 alexxy 1.1 esac
18    
19 reavertm 1.8 inherit base autotools multilib
20 alexxy 1.1
21     MY_P="virtuoso-opensource-${PV}"
22    
23     case ${PV} in
24     *9999*)
25     ECVS_SERVER="virtuoso.cvs.sourceforge.net:/cvsroot/virtuoso"
26 reavertm 1.3 ECVS_PROJECT='virtuoso'
27 alexxy 1.1 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 reavertm 1.3 SRC_URI="mirror://sourceforge/virtuoso/${TARBALL} mirror://gentoo/VOS-genpatches-${PV}.tar.bz2"
34 alexxy 1.1 ;;
35     esac
36    
37     EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install
38    
39     # Set some defaults
40 reavertm 1.3 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 alexxy 1.1
49     S="${WORKDIR}/${MY_P}"
50    
51     # @FUNCTION: virtuoso_src_prepare
52     # @DESCRIPTION:
53 reavertm 1.3 # 1. Applies common release patches
54 alexxy 1.1 # 2. Applies package-specific patches (from ${FILESDIR}/, PATCHES can be used)
55 reavertm 1.3 # 3. Applies user patches from /etc/portage/patches/${CATEGORY}/${PN}/
56     # 4. Modifies makefiles for split build. Uses VOS_EXTRACT
57     # 5. eautoreconf
58 alexxy 1.1 virtuoso_src_prepare() {
59     debug-print-function ${FUNCNAME} "$@"
60    
61 reavertm 1.3 EPATCH_SUFFIX='patch' EPATCH_FORCE='yes' epatch
62 alexxy 1.1 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 reavertm 1.3 || die 'failed to disable subdirs'
73 alexxy 1.1
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 reavertm 1.4 if [[ -z `sed -ne "/SUBDIRS\s*=.*${subdir}\b/p" "${path}"/Makefile.am` ]]; then
93 alexxy 1.1 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 reavertm 1.3 export ISQL="${EPREFIX}"/usr/bin/isql-v
116     export SERVER="${EPREFIX}"/usr/bin/virtuoso-t
117 alexxy 1.1 fi
118    
119     econf \
120     --with-layout=gentoo \
121 reavertm 1.3 --localstatedir="${EPREFIX}"/var \
122 alexxy 1.1 --enable-shared \
123     --with-pthreads \
124     --without-internal-zlib \
125     ${myconf}
126     }
127    
128     # @FUNCTION: virtuoso_src_compile
129 scarabeus 1.6 # @DESCRIPTION:
130 alexxy 1.1 # 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