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

Contents of /eclass/virtuoso.eclass

Parent Directory Parent Directory | Revision Log Revision Log


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

1 axs 1.14 # Copyright 1999-2012 Gentoo Foundation
2 alexxy 1.1 # Distributed under the terms of the GNU General Public License v2
3 creffett 1.15 # $Header: /var/cvsroot/gentoo-x86/eclass/virtuoso.eclass,v 1.14 2012/09/27 16:35:42 axs 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 axs 1.14 2|3|4|5) : ;;
16 reavertm 1.5 *) die "EAPI=${EAPI} is not supported" ;;
17 alexxy 1.1 esac
18    
19 creffett 1.15 inherit autotools multilib eutils
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 creffett 1.15 EXPORT_FUNCTIONS src_prepare src_configure
38 alexxy 1.1
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 creffett 1.15 pushd "${S}" >/dev/null
63     [[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}"
64    
65     debug-print "$FUNCNAME: applying user patches"
66     epatch_user
67    
68 alexxy 1.1
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 reavertm 1.3 || die 'failed to disable subdirs'
78 alexxy 1.1
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 reavertm 1.4 if [[ -z `sed -ne "/SUBDIRS\s*=.*${subdir}\b/p" "${path}"/Makefile.am` ]]; then
98 alexxy 1.1 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 reavertm 1.3 export ISQL="${EPREFIX}"/usr/bin/isql-v
121     export SERVER="${EPREFIX}"/usr/bin/virtuoso-t
122 alexxy 1.1 fi
123    
124     econf \
125     --with-layout=gentoo \
126 reavertm 1.3 --localstatedir="${EPREFIX}"/var \
127 alexxy 1.1 --enable-shared \
128     --with-pthreads \
129     --without-internal-zlib \
130     ${myconf}
131     }

  ViewVC Help
Powered by ViewVC 1.1.20