diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2009-01-10 12:13:07 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2009-01-10 12:13:07 +0000 |
commit | 21298bab5ec28bb724745d04f703b8724c8ea130 (patch) | |
tree | a64a96211eed3f6dd4d7b394c2f0636c1f4f9361 /sci-physics/geant | |
parent | Add in vmware-modules-1.0.0.15-r2. Should compile on kernels up to and inclu... (diff) | |
download | historical-21298bab5ec28bb724745d04f703b8724c8ea130.tar.gz historical-21298bab5ec28bb724745d04f703b8724c8ea130.tar.bz2 historical-21298bab5ec28bb724745d04f703b8724c8ea130.zip |
Version bump. Switched to EAPI=2, added qt4 support, updated data files, updated minimum dependencies, and now propagate LDFLAGS. Closing bug #253769.
Package-Manager: portage-2.2_rc20/cvs/Linux 2.6.25-gentoo-r7 x86_64
Diffstat (limited to 'sci-physics/geant')
-rw-r--r-- | sci-physics/geant/ChangeLog | 10 | ||||
-rw-r--r-- | sci-physics/geant/Manifest | 12 | ||||
-rw-r--r-- | sci-physics/geant/geant-4.9.2.ebuild | 233 |
3 files changed, 249 insertions, 6 deletions
diff --git a/sci-physics/geant/ChangeLog b/sci-physics/geant/ChangeLog index 3ee0033a2fd0..bfdbec818d18 100644 --- a/sci-physics/geant/ChangeLog +++ b/sci-physics/geant/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sci-physics/geant -# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-physics/geant/ChangeLog,v 1.17 2008/11/24 16:54:16 bicatali Exp $ +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-physics/geant/ChangeLog,v 1.18 2009/01/10 12:13:07 bicatali Exp $ + +*geant-4.9.2 (10 Jan 2009) + + 10 Jan 2009; Sébastien Fabbro <bicatali@gentoo.org> +geant-4.9.2.ebuild: + Version bump. Switched to EAPI=2, added qt4 support, updated data files, + updated minimum dependencies, and now propagate LDFLAGS. Closing bug #253769. 24 Nov 2008; Sébastien Fabbro <bicatali@gentoo.org> -geant-4.9.1_p02.ebuild, geant-4.9.1_p03.ebuild: diff --git a/sci-physics/geant/Manifest b/sci-physics/geant/Manifest index ae3d4f80adb0..9448da904b94 100644 --- a/sci-physics/geant/Manifest +++ b/sci-physics/geant/Manifest @@ -3,20 +3,24 @@ Hash: SHA1 DIST G4ABLA.3.0.tar.gz 54909 RMD160 5a032ee8e90d00f39b67114fe257ec47001f347b SHA1 5f38676f1650a508e49d35f9405ac96984388135 SHA256 ff0b77be6b36204eeeba71099f6b7530edd80b79eb015994535bc4334bc821eb DIST G4EMLOW.5.1.tar.gz 8287134 RMD160 163f76c359bf9d4f8a2eb3d734de50c2b6dc4d72 SHA1 092e27f2befe10f3e4b2f7450d1ba3f9fe0435bb SHA256 b1bebb1a502257ba9d379e6719be7a453b0aa31c9b01d5026866e9bd811c17d9 +DIST G4EMLOW.6.2.tar.gz 8389172 RMD160 fa51dbb4f0e316b0e682a05c9db4c1dc29db7218 SHA1 627ca63927064f1846aa8d7e2e5c4783fe0b9610 SHA256 1affbc66d8809db0c8e450ca83a0da744e7f5b8e912ec52e93b1f24b47cbd781 DIST G4NDL.3.12.tar.gz 54904967 RMD160 5ea321deb3c1ddc8094c3d28457d627cacd6f2f0 SHA1 d42d0835e8921c15902d7aa410f1207edfbd54df SHA256 05a4d74ff1faa8fa3382fbda780ea258b2e4af7e5ae29856d1deaf72b4235290 +DIST G4NDL.3.13.tar.gz 57034762 RMD160 243b206170d996c7b562a86e388ff4d5f8d11764 SHA1 4acc412a2f29a7a8f84ac50aeb7331c8ed2889ae SHA256 e994b873032b3d1c0bcc2679275c43354d3e1cd5091da76c8fcd4826536f17a3 DIST G4RadioactiveDecay.3.2.tar.gz 761070 RMD160 1f797977c0c66722f4b032ac546c26eaa8a9f14a SHA1 45e706e46a33e08b1706f069d15e8c2145f3410e SHA256 31dc70aa59cb86ef0dbaf96c639e0541b7569d4fc98f92064ecdc8bc4b9c839b DIST PhotonEvaporation.2.0.tar.gz 7506068 RMD160 24d46b08b2ffeca5b3be186baffb650b99accc97 SHA1 df3b4994c7248da7a226c186be747c4b823d34fa SHA256 5aac0ce683ca23274a7736c8e8911d8cf32d2bf33aab33a9a23126664762d61d DIST geant321_3.21.14.dfsg-8.diff.gz 41909 RMD160 4edbe5d3dd93a78198fa2d2d83770c8b85eee4de SHA1 39f48c4263f543b74eee6095c11f5ade9798f253 SHA256 785277dab1e1d3e17d60c85f3826bc67bbd6de7e6a6d40ff7af901371c4d2ce1 DIST geant321_3.21.14.dfsg.orig.tar.gz 10922928 RMD160 253b35bd9cda82c2213ec042274f7e6ff6b9e333 SHA1 ae6f39ccc18eacd576a3493992db5da3b3d3b128 SHA256 186fe98a08ad1de39f68698a09a46e7c2f14c37b22f8f990257b0bd66215c5b4 DIST geant4.9.1.p03.tar.gz 17582985 RMD160 ff2d24b65f19809992e3254e8069c35bbc7f0159 SHA1 970f5afd8e649faaa71d400b748f62224f538d34 SHA256 d791b7aa9da983af4f06f3f271574df0d3a01102c5584469bdabd9675be3ad33 +DIST geant4.9.2.tar.gz 18752051 RMD160 d6ae7fb718e78fb9bb8fe2b8cfd21dca7ef3a293 SHA1 7e6fd6b254652bd50d534237678a2e2654300210 SHA256 28c9598ee38949e74d839bed5f822b3dcf353c2936d4403ab6a50c11dafac110 EBUILD geant-3.21.14-r2.ebuild 1878 RMD160 898e60bbacea833a3e59e1ef33c30c8874320fba SHA1 25fd7be7e6943f01fb9dc1afa23c33b287caceaa SHA256 ed1d7b84a70306d49bb697723264339cd1de02bc7d1da173f4d35bb69395d602 EBUILD geant-4.9.1_p03.ebuild 6846 RMD160 53993f8f170982b90489f914e1767a994065a88f SHA1 3680018d1f835bbcf535a66fed3d8965725d258b SHA256 005d0e5279431dd1b961bef1307ea16ed8b19c0db864769d04a41583a9dec170 -MISC ChangeLog 3205 RMD160 201fb0b7ca274ee5fd921eb067bbf8b321539e5c SHA1 61738b4ff3bd56c913b4e4c2d45cee01498fc5db SHA256 de74a59fc2af1d7fb12ed4a30339fa2bd43548f192d337fcfb5e4dd91900f644 +EBUILD geant-4.9.2.ebuild 7239 RMD160 a5f572285f914a4ad6cc539681a94be3416c49b3 SHA1 99e2c89d617f6054d7b9459f249953c70a03b035 SHA256 9854c07f9e5c5eadb4255917a7a59538cccd654311e484ffcbd1a189091a83f7 +MISC ChangeLog 3465 RMD160 af03214cce02c22b993c6d75769024148716b56d SHA1 ed1f5a3ea93bafb746b6c0879c4c127d2bc20329 SHA256 73ebdc447a3abeaf1753fd82b8e96f45f31fb72caff48515ef6a2c2ad8920e81 MISC metadata.xml 1398 RMD160 b6c91f04fffa3b84c1b680944363dd49bf34c8f9 SHA1 b56fe0e1425e823d63054db467c2d543d0386046 SHA256 666fb94f71ea2aa76ed69003fe3d374c0ac89f3c6dda33910e470a99d667d323 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) -iEYEARECAAYFAkkq3EQACgkQ1ycZbhPLE2CaWACgmCvyBDJ9sC8gtg+bc0slJw9E -52wAn2sfqKtWGOozqiILvAmloMYNtGD8 -=gsru +iEYEARECAAYFAklokOEACgkQ1ycZbhPLE2DkagCfSFcX6r2nqTt7X7MfWU4noDWN +FpMAnRRE7S5D1jSTvG+o0h48O2IYn5p4 +=9bd3 -----END PGP SIGNATURE----- diff --git a/sci-physics/geant/geant-4.9.2.ebuild b/sci-physics/geant/geant-4.9.2.ebuild new file mode 100644 index 000000000000..d20202133b0c --- /dev/null +++ b/sci-physics/geant/geant-4.9.2.ebuild @@ -0,0 +1,233 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-physics/geant/geant-4.9.2.ebuild,v 1.1 2009/01/10 12:13:07 bicatali Exp $ + +EAPI="2" + +inherit eutils fortran multilib versionator toolchain-funcs + +PV1=$(get_version_component_range 1 ${PV}) +PV2=$(get_version_component_range 2 ${PV}) +PV3=$(get_version_component_range 3 ${PV}) +MY_P=${PN}$(replace_version_separator 3 .) + +DESCRIPTION="CERN's detector description and simulation Tool" +HOMEPAGE="http://geant4.cern.ch/" + +SRC_COM="http://geant4.web.cern.ch/geant4/support/source" +SRC_URI="${SRC_COM}/${MY_P}.tar.gz" +GEANT4_DATA="G4NDL.3.13 + G4EMLOW.6.2 + G4RadioactiveDecay.3.2 + PhotonEvaporation.2.0 + G4ABLA.3.0" +for d in ${GEANT4_DATA}; do + SRC_URI="${SRC_URI} data? ( ${SRC_COM}/${d}.tar.gz )" +done + +LICENSE="geant4" +SLOT="4" +KEYWORDS="~amd64 ~hppa ~sparc ~x86" +IUSE="athena +data dawn debug examples gdml geant3 global minimal +motif + +opengl openinventor +raytracerx static +vrml zlib" + +DEPEND=">=sci-physics/clhep-2.0.4.2 + motif? ( x11-libs/openmotif ) + athena? ( x11-libs/libXaw ) + qt4? ( || ( x11-libs/qt:4 x11-libs/qt-gui ) ) + openinventor? ( >=media-libs/openinventor-2.1.5.10-r3 ) + raytracerx? ( x11-libs/libX11 x11-libs/libXmu ) + opengl? ( virtual/opengl + athena? ( x11-libs/Xaw3d ) + qt4? ( || ( x11-libs/qt:4[opengl] x11-libs/qt-opengl ) ) ) + gdml? ( dev-libs/xerces-c ) + geant3? ( sci-physics/geant:3 ) + dawn? ( media-gfx/dawn )" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + FORTRAN="gfortran g77 ifc" + use geant3 && fortran_pkg_setup + eval unset ${!G4*} +} + +src_prepare() { + # propagate user's flags. + sed -i -e 's/-o/$(LDFLAGS) -o/g' source/GNUmakefile || die + sed -i \ + -e "/CXXFLAGS[[:space:]]*.=[[:space:]]-O2/s:=.*:= ${CXXFLAGS}:" \ + -e "/FCFLAGS[[:space:]]*.=[[:space:]]-O2/s:=.*:= ${FFLAGS:--O2}:" \ + -e "/CCFLAGS[[:space:]]*.=[[:space:]]-O2/s:=.*:= ${CFLAGS}:" \ + -e "s:-Wl,-soname:${LDFLAGS} -Wl,-soname:g" \ + config/sys/Linux*gmk || die "flag substitution failed" + + # fix forced lib directory + sed -i \ + -e 's:$(G4LIB)/$(G4SYSTEM):$(G4LIB):g' \ + config/binmake.gmk || die "sed binmake.gmk failed" + 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" + sed -i \ + -e 's:$(G4LIB)/$(G4SYSTEM):$(G4TMP):g' \ + config/globlib.gmk || die "sed globlib.gmk failed" +} + +src_configure() { + export GEANT4_DIR="/usr/share/${PN}${PV1}" + # where to put compiled libraries; + # we set env var G4LIB in src_install() + # to avoid confusing make + export GEANT4_LIBDIR=/usr/$(get_libdir)/${PN}${PV1} + + # these should always to be set + [[ $(tc-getCXX) = ic*c ]] && export G4SYSTEM=Linux-icc \ + || export G4SYSTEM=Linux-g++ + export G4INSTALL="${S}" + export G4INCLUDE="${D}/usr/include/${PN}" + export CLHEP_BASE_DIR=/usr + + # parse USE; just set flags of drivers to build, G4*_USE_* vars are set + # later automatically for G4*_BUILD_*_DRIVER + use minimal && export G4UI_NONE=y \ + && export G4VIS_NONE=y + + use motif && export G4UI_BUILD_XM_SESSION=y + use athena && export G4UI_BUILD_XAW_SESSION=y + use qt4 && export G4UI_BUILD_QT_SESSION=y + + use dawn && export G4VIS_BUILD_DAWN_DRIVER=y + use raytracerx && export G4VIS_BUILD_RAYTRACERX_DRIVER=y + use openinventor && export G4VIS_BUILD_OI_DRIVER=y + use opengl && export G4VIS_BUILD_OPENGLX_DRIVER=y + use opengl && use motif && export G4VIS_BUILD_OPENGLXM_DRIVER=y + + use geant3 && export G4LIB_BUILD_G3TOG4=y + use zlib && export G4LIB_USE_ZLIB=y + use vrml && export G4VIS_BUILD_VRML_DRIVER=y \ + && export G4VIS_BUILD_VRMLFILE_DRIVER=y + + use data && export G4DATA="${GEANT4_DIR}/data" + use debug && export G4DEBUG=y || export G4OPTIMIZE=y + + # switch to see compiling flags + export CPPVERBOSE=y + + # if shared libs are built, the script will also build static libs + # with pic flags + # avoid that by building it twice and removing temporary objects + export G4LIB_BUILD_SHARED=y + +} + +src_compile() { + cd "${S}/source/" + emake || die "Building shared geant failed" + + if use global; then + export G4LIB_USE_GRANULAR=y + emake global || die "Building global libraries failed" + emake || die "Rebuilding shared geant failed" + fi + + if use static; then + rm -rf tmp + export G4LIB_BUILD_STATIC=y ; unset G4LIB_BUILD_SHARED + emake || die "Building static geant failed" + fi +} + +g4_create_env_script() { + # we need to change some variables to the final values since we hide these + # from make during the compile + export G4INSTALL=${GEANT4_DIR} + export G4LIB=${GEANT4_LIBDIR} + export G4INCLUDE=${G4INCLUDE/${D}/} + export G4WORKDIR=\${HOME}/${PN}${PV1} + + local g4env=99${PN}${PV1} + cat <<-EOF > ${g4env} + LDPATH=${G4LIB} + CLHEP_BASE_DIR=${CLHEP_BASE_DIR} + EOF + + # detailed data file locations + if use data; then + G4LEVELGAMMADATA="${G4DATA}/$(basename ${WORKDIR}/PhotonEvaporation*)" + G4RADIOACTIVEDATA="${G4DATA}$(basename ${WORKDIR}/RadioactiveDecay*)" + G4LEDATA="${G4DATA}/$(basename ${WORKDIR}/G4EMLOW*)" + G4ABLADATA="${G4DATA}/$(basename ${WORKDIR}/G4ABLA*)" + G4NEUTRONHPCROSSSECTIONS="${G4DATA}/$(basename ${WORKDIR}/G4NDL*)" + export G4LEVELGAMMADATA G4RADIOACTIVEDATA G4LEDATA \ + G4ABLADATA G4NEUTRONHPCROSSSECTIONS + fi + + # read env variables defined upto now + printenv | grep ^G4 | uniq >> ${g4env} + # define env vars for capabilities we can build into user projects + printenv | uniq | \ + sed -n -e '/^G4/s:BUILD\(.*\)_DRIVER:USE\1:gp' >> ${g4env} + doenvd ${g4env} || die "Installing environment scripts failed " +} + +src_install() { + # install headers via make since we want them in a single directory + cd "${S}/source/" + einfo "Installing Geant4 headers" + emake includes || die 'Installing headers failed' + cd "${S}" + + # but install libraries and Geant library tool manually + einfo "Installing Geant4 libraries" + insinto ${GEANT4_LIBDIR} + doins tmp/*.so || die + doins tmp/libname.map || die + if use static; then + doins tmp/*.a || die + fi + exeinto ${GEANT4_LIBDIR} + doexe tmp/liblist || die + + g4_create_env_script + + # configs + insinto ${GEANT4_DIR} + doins -r config || die + + # install data + if use data; then + einfo "Installing Geant4 data" + insinto ${G4DATA} + pushd "${WORKDIR}" > /dev/null + for d in ${GEANT4_DATA}; do + local p=${d/.} + doins -r *${p/G4} || die "installing data ${d} failed" + done + popd > /dev/null + fi + + # doc and examples + insinto /usr/share/doc/${PF} + local mypv="${PV1}.${PV2}.${PV3}" + doins ReleaseNotes/ReleaseNotes${mypv}.html + [[ -e ReleaseNotes/Patch${mypv}-1.txt ]] && \ + dodoc ReleaseNotes/Patch${mypv}-*.txt + + use examples && doins -r examples + + # TODO: * momo with momo or java flag, and check java stuff +} + +pkg_postinst() { + elog "Geant4 projects are by default build in \$HOME/geant4." + elog "If you want to change, set \$G4WORKDIR to another directory." +} |