--- /usr/portage/local/layman/science/sci-physics/geant/geant-4.9.1_p01.ebuild 2008-04-16 10:23:02.000000000 -0400 +++ geant-4.9.1_p01.ebuild 2008-05-30 14:29:32.000000000 -0400 @@ -14,7 +14,7 @@ DESCRIPTION="CERN's detector description and simulation Tool" HOMEPAGE="http://www.geant4.org/" -SRC_COM="http://geant4.web.cern.ch/geant4/support/source/" +SRC_COM="http://geant4.web.cern.ch/geant4/support/source" SRC_URI="${SRC_COM}/${MY_P}.tar.gz" GEANT4_DATA="G4NDL.3.12 G4EMLOW.5.1 @@ -68,6 +68,14 @@ sed -i \ -e '/$(G4LIB)\/$(G4SYSTEM)/d' \ config/architecture.gmk || die "sed architecture.gmk failed" + sed -i \ + -e 's:$(G4LIB)/$(G4SYSTEM):$(G4TMP):g' \ + config/common.gmk || die "sed common.gmk failed" + sed -i \ + -e 's:$(G4LIB)/$(G4SYSTEM):$(G4TMP):g' \ + -e 's:$(G4BIN)/$(G4SYSTEM):$(G4TMP):g' \ + -e 's:$(G4TMP)/$(G4SYSTEM):$(G4TMP):g' \ + source/GNUmakefile || die "sed GNUmakefile failed" } src_compile() { @@ -141,6 +149,15 @@ LDPATH=${G4LIB} CLHEP_BASE_DIR=${CLHEP_BASE_DIR} EOF + + # detailed data file locations + if $(use data); then + export G4LEVELGAMMADATA="${G4DATA}/PhotonEvaporation2.0" + export G4RADIOACTIVEDATA="${G4DATA}/RadioactiveDecay3.2" + export G4LEDATA="${G4DATA}/G4EMLOW5.1" + export G4NEUTRONHPCROSSSECTIONS="${G4DATA}/G4NDL3.12" + fi + # read env variables defined upto now printenv | grep ^G4 | uniq >> ${g4env} @@ -159,9 +176,13 @@ # but install libraries and Geant library tool manually insinto ${GEANT4_LIBDIR} - doins -r lib/${G4SYSTEM}/* || die + doins -r ${HOME}/geant4/tmp/*.so || die + doins -r ${HOME}/geant4/tmp/libname.map || die + if use static; then + doins -r ${HOME}/geant4/tmp/*.a || die + fi exeinto ${GEANT4_LIBDIR} - doexe lib/${G4SYSTEM}/liblist || die + doexe ${HOME}/geant4/tmp/liblist || die g4_create_env_script @@ -195,8 +216,8 @@ } pkg_postinst() { - elog "Geant4 projects are by default expected in each user's " - elog "If you want to change, set \$G4WORKDIR to another directory" + elog "Geant4 projects are by default build in $G4WORKDIR." + elog "If you want to change, set \$G4WORKDIR to another directory." elog elog "Help us to improve the ebuild and dependencies in" elog "http://bugs.gentoo.org/show_bug.cgi?id=212221"