]> Pileus Git - ~andy/sunrise/blob - sys-cluster/globus-build/globus-build-4.2.1.ebuild
sys-cluster/globus-build: Drop java eclasses, drop most unneeded dependencies, use...
[~andy/sunrise] / sys-cluster / globus-build / globus-build-4.2.1.ebuild
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="2"
6
7 # The globus-build tools do not require java to be installed, BUT
8 # configure still expects it...
9 inherit eutils
10
11 MY_P="gt${PV}-all-source-installer"
12
13 DESCRIPTION="The Globus Toolkit Build Tools"
14 HOMEPAGE="http://www.globus.org/toolkit/"
15
16 SRC_URI="http://www-unix.globus.org/ftppub/gt${PV:0:1}/${PV}/installers/src/${MY_P}.tar.bz2"
17
18 LICENSE="GTPL"
19
20 SLOT="4"
21 KEYWORDS="~x86"
22
23 IUSE="condor iodbc lsf odbc pbs"
24
25 RDEPEND="dev-lang/perl"
26
27 DEPEND=${RDEPEND}
28
29 S="${WORKDIR}/${MY_P}"
30
31 GLOBUS="/opt/globus${PV:0:1}"
32
33 pkg_setup() {
34         enewgroup globus
35         enewuser  globus -1 -1 /var/globus globus
36 }
37
38 src_prepare() {
39         mkdir "${S}"/build || die "making build directory failed"
40
41         sed -e "s|%%GLOBUS%%|${GLOBUS}|" \
42                 "${FILESDIR}"/21globus-build > "${T}"/21globus-build \
43                         || die "sed envfile failed"
44 }
45
46 src_configure() {
47         local myconfig
48
49         # should we use odbc with iodbc or unixodbc
50         if use iodbc ; then
51                 myconfig="--with-iodbc-libs=$(iodbc-config --prefix)/lib"
52                 myconfig="${myconfig} --with-iodbc-includes=$(iodbc-config --prefix)/include/iodbc"
53         elif use odbc ; then
54                 myconfig="--with-unixodbc-libs=/usr/lib"
55                 myconfig="${myconfig} --with-unixodbc-includes=/usr/include/unixodbc"
56         fi
57
58         # even though globus does not use java we still need all the junk to
59         # make configure happy...
60         java-pkg_switch-vm
61
62         econf --prefix="${S}/build/${GLOBUS}" \
63                   --with-gptlocation="${S}/build/${GLOBUS}" \
64                   $(use_enable condor wsgram-condor) \
65                   $(use_enable lsf wsgram-lsf) \
66                   $(use_enable pbs wsgram-pbs) ${myconfig}
67 }
68
69 src_compile() {
70         emake gpt || die "compile failed"
71 }
72
73 src_install() {
74         einfo "Hand installing..."
75         # The supplied Makefile install violates standard practices.  The
76         # following simulates a "make DESTDIR=${D}" and moves the built
77         # programs/files into ${D}
78         cp -dpR "${S}"/build/* "${D}/" || die "mv failed"
79
80         doenvd "${T}"/21globus-build || die "install env.d/globus-build died"
81
82         einfo "Updating ownership and permissions..."
83         fowners -R globus:globus * || die "fowners failed"
84 }