# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils SLOT="3" LICENSE="mixed" KEYWORDS="~x86 ~ppc" DESCRIPTION="The Globus Toolkit - grid middleware package" IUSE="" SRC_URI="ftp://ftp.globus.org/pub/gt3/3.2/3.2.1/installers/src/gt3.2.1-all-source-installer.tar.gz \ ftp://ftp.globus.org/pub/gt3/3.2/3.2.1/updates/src/globus_xio-0.11.tar.gz \ ftp://ftp.globus.org/pub/gt3/3.2/3.2.1/updates/src/globus_io-5.5.tar.gz \ ftp://ftp.globus.org/pub/gt3/3.2/3.2.1/updates/src/globus_nexus-6.5.tar.gz \ ftp://ftp.globus.org/pub/gt3/3.2/3.2.1/updates/src/globus_ftp_client-2.9.tar.gz \ ftp://ftp.globus.org/pub/gt3/3.2/3.2.1/updates/src/globus_gram_client_tools-4.3.tar.gz" HOMEPAGE="http://www.globus.org/" DEPEND=">=dev-java/ant-1.6.2 >=virtual/jdk-1.4 >=dev-lang/perl-5.6.2" src_unpack() { tar xzf ${DISTDIR}/gt3.2.1-all-source-installer.tar.gz cd gt3.2.1-all-source-installer tar xzf gpt-3.0.1-src.tar.gz epatch ${FILESDIR}/globus-fix.diff } src_compile() { # Globus gets compilled and installed in a single step - nothing # can be done here : } src_install() { # globus build dies when you set CFLAGS - don't ask why ;) # seriously: there's some internal problem in the gpt causing it to parse # CXXFLAGS wrongly and botching the entire build... export CFLAGS="" export CXXFLAGS="" # later on could be fixed for 64bit archs or taken from the gpt-flavor-configuration # or ripped from the install-gt3 auto-decision making part - probably the best solution after all # the dbg should stay - seems to be "default" globus flavor # so we won't argue with that ;) export MY_FLAVOR="gcc32dbg" export MY_FLAVOR_THREADS="${MY_FLAVOR}pthr" # This can be taken from the environment instead # of having "the only right path" export REAL_GPT_LOCATION="/usr/local/globus" export REAL_GLOBUS_LOCATION="/usr/local/globus" # a hack to make globus install itself into the # ordered directory and later on to be placed # in a single GLOBUS_LOCATION - it's better this way # because of globus-modified versions of many popular libraries/utilities # it might cause havoc with the regular system-installed versions export GPT_LOCATION=${D}${REAL_GPT_LOCATION} export GLOBUS_LOCATION=${D}${REAL_GLOBUS_LOCATION} cd ${WORKDIR}/gt3.2.1-all-source-installer cd gpt-3.0.1 LANG="" ./build_gpt || die "build_gpt failed" cd .. ./install-gt3 -flavor ${MY_FLAVOR} $GLOBUS_LOCATION || die "install-gt3 failed" ./install-gt3-mmjfs -flavor ${MY_FLAVOR} $GLOBUS_LOCATION || die "install-gt3-mmjfs failed" export GPT_BUILD="${GPT_LOCATION}/sbin/gpt-build" ${GPT_BUILD} ${DISTDIR}/globus_ftp_client-2.9.tar.gz ${MY_FLAVOR} ${MY_FLAVOR_THREAD} || die "ftp_client failed" ${GPT_BUILD} ${DISTDIR}/globus_gram_client_tools-4.3.tar.gz ${MY_FLAVOR} || die "gram_client_tools failed" ${GPT_BUILD} ${DISTDIR}/globus_nexus-6.5.tar.gz ${MY_FLAVOR} || die "nexus failed" ${GPT_BUILD} ${DISTDIR}/globus_io-5.5.tar.gz ${MY_FLAVOR} ${MY_FLAVOR_THREAD} || die "io failed" ${GPT_BUILD} ${DISTDIR}/globus_xio-0.11.tar.gz ${MY_FLAVOR} ${MY_FLAVOR_THREAD} || die "xio failed" dodir /etc/env.d || die "dodir /etc/env.d failed" echo -e "GLOBUS_LOCATION=${REAL_GLOBUS_LOCATION}" > \ ${D}/etc/env.d/90gt3 echo -e "GPT_LOCATION=${REAL_GPT_LOCATION}" >> \ ${D}/etc/env.d/90gt3 if [ ${GPT_LOCATION} = ${GLOBUS_LOCATION} ]; then echo "PATH=${REAL_GLOBUS_LOCATION}/bin" >> \ ${D}/etc/env.d/90gt3 echo "ROOTPATH=${REAL_GLOBUS_LOCATION}/bin:${REAL_GLOBUS_LOCATION}/sbin" >> \ ${D}/etc/env.d/90gt3 echo "LDPATH=${REAL_GLOBUS_LOCATION}/lib" >> \ ${D}/etc/env.d/90gt3 echo "MANPATH=${REAL_GLOBUS_LOCATION}/man" >> \ ${D}/etc/env.d/90gt3 else echo "PATH=${REAL_GLOBUS_LOCATION}/bin:${REAL_GPT_LOCATION}/bin" >> \ ${D}/etc/env.d/90gt3 echo -n "ROOTPATH=${REAL_GLOBUS_LOCATION}/bin:${REAL_GLOBUS_LOCATION}/sbin" >> \ ${D}/etc/env.d/90gt3 echo ":${REAL_GPT_LOCATION}/bin:${REAL_GPT_LOCATION}/sbin" >> \ ${D}/etc/env.d/90gt3 echo "LDPATH=${REAL_GLOBUS_LOCATION}/lib:${REAL_GPT_LOCATION}/lib" >> \ ${D}/etc/env.d/90gt3 echo "MANPATH=${REAL_GLOBUS_LOCATION}/man:${REAL_GPT_LOCATION}/man" >> \ ${D}/etc/env.d/90gt3 fi } pkg_postinst(){ export GPT_LOCATION=${REAL_GPT_LOCATION} export GLOBUS_LOCATION=${REAL_GLOBUS_LOCATION} ${GPT_LOCATION}/sbin/gpt-postinstall } # There should be something cleaning the GLOBUS_LOCATION # from the system - because gpt-postinstall is run after # the files are moved to the real dir (and it has to be # this way) the files created by it are left over after # unmerging which may prove disastrous when re-emerging. # But rm -rf $GLOBUS_LOCATION seems a bit overboard, cause # the directory may contain user modifications and will contain # Globus services logs which may be of value as well. #pkg_postrm() { # #}