]> Pileus Git - ~andy/sunrise/blob - sys-cluster/globus-build/globus-build-4.2.1.ebuild
cb56950eed1af2ba98060e429c7ecf637e303c74
[~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 java-pkg-2 java-utils-2
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="
26         dev-java/ant
27         sys-libs/zlib
28         dev-lang/perl
29         app-admin/sudo
30         dev-libs/openssl
31         dev-db/postgresql
32         dev-perl/XML-Parser
33         virtual/mpi
34         iodbc? ( dev-db/libiodbc )
35         odbc? ( !iodbc? ( dev-db/unixODBC ) )"
36
37 DEPEND=">=virtual/jdk-1.5
38         ${RDEPEND}"
39
40 S="${WORKDIR}/${MY_P}"
41
42 GLOBUS="/opt/globus${PV:0:1}"
43
44 pkg_setup() {
45         enewgroup globus
46         enewuser  globus -1 -1 /var/globus globus
47 }
48
49 src_prepare() {
50         mkdir "${S}"/build || die "making build directory failed"
51
52         sed -e "s|%%GLOBUS%%|${GLOBUS}|" \
53                 "${FILESDIR}"/21globus-build > "${T}"/21globus-build \
54                         || die "sed envfile failed"
55 }
56
57 src_configure() {
58         local myconfig
59
60         # should we use odbc with iodbc or unixodbc
61         if use iodbc ; then
62                 myconfig="--with-iodbc-libs=$(iodbc-config --prefix)/lib"
63                 myconfig="${myconfig} --with-iodbc-includes=$(iodbc-config --prefix)/include/iodbc"
64         elif use odbc ; then
65                 myconfig="--with-unixodbc-libs=/usr/lib"
66                 myconfig="${myconfig} --with-unixodbc-includes=/usr/include/unixodbc"
67         fi
68
69         # even though globus does not use java we still need all the junk to
70         # make configure happy...
71         java-pkg_switch-vm
72
73         econf --prefix="${S}/build/${GLOBUS}" \
74                   --with-gptlocation="${S}/build/${GLOBUS}" \
75                   $(use_enable condor wsgram-condor) \
76                   $(use_enable lsf wsgram-lsf) \
77                   $(use_enable pbs wsgram-pbs) ${myconfig}
78 }
79
80 src_compile() {
81         emake gpt || die "compile failed"
82 }
83
84 src_install() {
85         einfo "Hand installing..."
86         # The supplied Makefile install violates standard practices.  The
87         # following simulates a "make DESTDIR=${D}" and moves the built
88         # programs/files into ${D}
89         mv "${S}"/build/* "${D}/" || die "mv failed"
90
91         doenvd "${T}"/21globus-build || die "install env.d/globus-build died"
92
93         einfo "Updating ownership and permissions..."
94         fowners -R globus:globus * || die "fowners failed"
95 }