1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
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
11 MY_P="gt${PV}-all-source-installer"
13 DESCRIPTION="The Globus Toolkit Build Tools"
14 HOMEPAGE="http://www.globus.org/toolkit/"
16 SRC_URI="http://www-unix.globus.org/ftppub/gt${PV:0:1}/${PV}/installers/src/${MY_P}.tar.bz2"
23 IUSE="condor iodbc lsf odbc pbs"
34 iodbc? ( dev-db/libiodbc )
35 odbc? ( !iodbc? ( dev-db/unixODBC ) )"
37 DEPEND=">=virtual/jdk-1.5
40 S="${WORKDIR}/${MY_P}"
42 GLOBUS="/opt/globus${PV:0:1}"
46 enewuser globus -1 -1 /var/globus globus
50 mkdir "${S}"/build || die "making build directory failed"
52 sed -e "s|%%GLOBUS%%|${GLOBUS}|" \
53 "${FILESDIR}"/21globus-build > "${T}"/21globus-build \
54 || die "sed envfile failed"
60 # should we use odbc with iodbc or unixodbc
62 myconfig="--with-iodbc-libs=$(iodbc-config --prefix)/lib"
63 myconfig="${myconfig} --with-iodbc-includes=$(iodbc-config --prefix)/include/iodbc"
65 myconfig="--with-unixodbc-libs=/usr/lib"
66 myconfig="${myconfig} --with-unixodbc-includes=/usr/include/unixodbc"
69 # even though globus does not use java we still need all the junk to
70 # make configure happy...
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}
81 emake gpt || die "compile failed"
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"
91 doenvd "${T}"/21globus-build || die "install env.d/globus-build died"
93 einfo "Updating ownership and permissions..."
94 fowners -R globus:globus * || die "fowners failed"