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

Contents of /eclass/virtuoso.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (hide annotations) (download)
Thu Jul 7 23:00:06 2011 UTC (3 years ago) by reavertm
Branch: MAIN
Changes since 1.10: +3 -1 lines
Restrict gawk4, bug 374315

1 alexxy 1.1 # Copyright 1999-2010 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 reavertm 1.11 # $Header: /var/cvsroot/gentoo-x86/eclass/virtuoso.eclass,v 1.10 2011/04/20 09:53:29 scarabeus Exp $
4 alexxy 1.1
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 scarabeus 1.9 2|3|4) : ;;
15 reavertm 1.5 *) die "EAPI=${EAPI} is not supported" ;;
16 alexxy 1.1 esac
17    
18 reavertm 1.8 inherit base autotools multilib
19 alexxy 1.1
20     MY_P="virtuoso-opensource-${PV}"
21    
22     case ${PV} in
23     *9999*)
24     ECVS_SERVER="virtuoso.cvs.sourceforge.net:/cvsroot/virtuoso"
25 reavertm 1.3 ECVS_PROJECT='virtuoso'
26 alexxy 1.1 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 reavertm 1.3 SRC_URI="mirror://sourceforge/virtuoso/${TARBALL} mirror://gentoo/VOS-genpatches-${PV}.tar.bz2"
33 alexxy 1.1 ;;
34     esac
35    
36     EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install
37    
38     # Set some defaults
39 reavertm 1.3 HOMEPAGE='http://virtuoso.openlinksw.com/wiki/main/Main/'
40     LICENSE='GPL-2'
41     SLOT='0'
42    
43 reavertm 1.11 # Restrict incompatible gawk, bug 374315
44 reavertm 1.3 DEPEND='
45 reavertm 1.11 <sys-apps/gawk-4.0.0
46 reavertm 1.3 >=sys-devel/libtool-2.2.6a
47     '
48     RDEPEND=''
49 alexxy 1.1
50     S="${WORKDIR}/${MY_P}"
51    
52     # @FUNCTION: virtuoso_src_prepare
53     # @DESCRIPTION:
54 reavertm 1.3 # 1. Applies common release patches
55 alexxy 1.1 # 2. Applies package-specific patches (from ${FILESDIR}/, PATCHES can be used)
56 reavertm 1.3 # 3. Applies user patches from /etc/portage/patches/${CATEGORY}/${PN}/
57     # 4. Modifies makefiles for split build. Uses VOS_EXTRACT
58     # 5. eautoreconf
59 alexxy 1.1 virtuoso_src_prepare() {
60     debug-print-function ${FUNCNAME} "$@"
61    
62 reavertm 1.3 EPATCH_SUFFIX='patch' EPATCH_FORCE='yes' epatch
63 alexxy 1.1 base_src_prepare
64    
65     # @ECLASS-VARIABLE: VOS_EXTRACT
66     # @DESCRIPTION:
67     # Lists any subdirectories that are required to be extracted
68     # and enabled in Makefile.am's for current package.
69     if [[ -n ${VOS_EXTRACT} ]]; then
70     # Comment out everything
71     find . -name Makefile.am -exec \
72     sed -e '/SUBDIRS\s*=/s/^/# DISABLED /g' -i {} + \
73 reavertm 1.3 || die 'failed to disable subdirs'
74 alexxy 1.1
75     # Uncomment specified
76     local path
77     for path in ${VOS_EXTRACT}; do
78     if [[ -d "${path}" ]]; then
79     # Uncomment leaf
80     if [[ -f "${path}"/Makefile.am ]]; then
81     sed -e '/^# DISABLED \s*SUBDIRS\s*=/s/# DISABLED //g' \
82     -i "${path}"/Makefile.am || die "failed to uncomment leaf in ${path}/Makefile.am"
83     fi
84     # Process remaining path elements
85     while true; do
86     local subdir=`basename "${path}"`
87     path=`dirname "${path}"`
88     if [[ -f "${path}"/Makefile.am ]]; then
89     # Uncomment if necessary
90     sed -e '/^# DISABLED \s*SUBDIRS\s*=/s/.*/SUBDIRS =/g' \
91     -i "${path}"/Makefile.am
92     # Append subdirs if not there already
93 reavertm 1.4 if [[ -z `sed -ne "/SUBDIRS\s*=.*${subdir}\b/p" "${path}"/Makefile.am` ]]; then
94 alexxy 1.1 sed -e "/^SUBDIRS\s*=/s|$| ${subdir}|" \
95     -i "${path}"/Makefile.am || die "failed to append ${subdir}"
96     fi
97     fi
98     [[ "${path}" = . ]] && break
99     done
100     fi
101     done
102     fi
103    
104     eautoreconf
105     }
106    
107     # @FUNCTION: virtuoso_src_configure
108     # @DESCRIPTION:
109     # Runs ./configure with common and user options specified via myconf variable
110     virtuoso_src_configure() {
111     debug-print-function ${FUNCNAME} "$@"
112    
113     # Override some variables to make tests work
114     if [[ ${PN} != virtuoso-server ]]; then
115     [[ ${EAPI} == 2 ]] && ! use prefix && EPREFIX=
116 reavertm 1.3 export ISQL="${EPREFIX}"/usr/bin/isql-v
117     export SERVER="${EPREFIX}"/usr/bin/virtuoso-t
118 alexxy 1.1 fi
119    
120     econf \
121     --with-layout=gentoo \
122 reavertm 1.3 --localstatedir="${EPREFIX}"/var \
123 alexxy 1.1 --enable-shared \
124     --with-pthreads \
125     --without-internal-zlib \
126     ${myconf}
127     }
128    
129     # @FUNCTION: virtuoso_src_compile
130 scarabeus 1.6 # @DESCRIPTION:
131 alexxy 1.1 # Runs make for specified subdirs
132     virtuoso_src_compile() {
133     debug-print-function ${FUNCNAME} "$@"
134    
135     base_src_compile
136     }
137    
138     # @FUNCTION: virtuoso_src_install
139     # @DESCRIPTION:
140     # Default src_install
141     virtuoso_src_install() {
142     debug-print-function ${FUNCNAME} "$@"
143    
144     base_src_install
145     }

  ViewVC Help
Powered by ViewVC 1.1.20