aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbicatali <bicatali@32389bae-6d03-0410-99cf-db05cde120eb>2008-04-09 13:30:10 +0000
committerbicatali <bicatali@32389bae-6d03-0410-99cf-db05cde120eb>2008-04-09 13:30:10 +0000
commitaf8072c52d45d76dbbbf033a0ac39b408c0fb6a1 (patch)
treefa2da5be20e9c661a298ffa6fb1e57f6699df2c6
parentremoved geant4 (diff)
downloadsci-af8072c52d45d76dbbbf033a0ac39b408c0fb6a1.tar.gz
sci-af8072c52d45d76dbbbf033a0ac39b408c0fb6a1.tar.bz2
sci-af8072c52d45d76dbbbf033a0ac39b408c0fb6a1.zip
readded geant
git-svn-id: http://overlays.gentoo.org/svn/proj/science/overlay@1007 32389bae-6d03-0410-99cf-db05cde120eb
-rw-r--r--sci-physics/geant/ChangeLog27
-rw-r--r--sci-physics/geant/Manifest11
-rw-r--r--sci-physics/geant/files/geant-4.9.1_p01-configure.patch116
-rw-r--r--sci-physics/geant/files/geant-4.9.1_p01-no-source.patch38
-rw-r--r--sci-physics/geant/geant-4.9.1_p01.ebuild198
-rw-r--r--sci-physics/geant/metadata.xml11
6 files changed, 401 insertions, 0 deletions
diff --git a/sci-physics/geant/ChangeLog b/sci-physics/geant/ChangeLog
new file mode 100644
index 000000000..adb141d15
--- /dev/null
+++ b/sci-physics/geant/ChangeLog
@@ -0,0 +1,27 @@
+# ChangeLog for sci-physics/geant4
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 09 Apr 2008; Sébastien Fabbro <bicatali@gentoo.org>
+ geant-4.9.1_p01.ebuild:
+ fixed data install
+
+*geant-4.9.1_p01 (08 Apr 2008)
+
+ 08 Apr 2008; Sébastien Fabbro <bicatali@gentoo.org>
+ +geant-4.9.1_p01.ebuild:
+ Initial import of geant-4. Probably still not working. See bug #212221.
+
+*geant-3.21.14-r1 (11 Mar 2008)
+
+ 11 Mar 2008; Sébastien Fabbro <bicatali@gentoo.org>
+ +geant-3.21.14-r1.ebuild:
+ New series of patches from Debian, more compatible with gfortran and better
+ tests. Much ebuild cleaning.
+
+*geant-3.21.14 (24 Aug 2007)
+
+ 24 Aug 2007; Sébastien Fabbro <bicatali@gentoo.org> +metadata.xml,
+ +geant-3.21.14.ebuild:
+ Initial import.
+
diff --git a/sci-physics/geant/Manifest b/sci-physics/geant/Manifest
new file mode 100644
index 000000000..ba2afe89a
--- /dev/null
+++ b/sci-physics/geant/Manifest
@@ -0,0 +1,11 @@
+AUX geant-4.9.1_p01-configure.patch 2543 RMD160 146187182104386f0499421020848eb1cff3ac12 SHA1 53894a926685d456705b2b14a9da502ca2036994 SHA256 52adff5ca21ffb9620ebba5959cdef9ee321dfd9c62fa7033c6b95bc52c3746e
+AUX geant-4.9.1_p01-no-source.patch 1051 RMD160 5c00cec174e21572ce721017d51dc565415d7ace SHA1 487a4bcd438cfd13cfd5816a16e309f9cf94edd2 SHA256 dfeda02b61522bac6b04f0ced4e9331772878adf42f8998b9a10ef53e03e8483
+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 G4NDL.3.12.tar.gz 54904967 RMD160 5ea321deb3c1ddc8094c3d28457d627cacd6f2f0 SHA1 d42d0835e8921c15902d7aa410f1207edfbd54df SHA256 05a4d74ff1faa8fa3382fbda780ea258b2e4af7e5ae29856d1deaf72b4235290
+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 geant4.9.1.p01.tar.gz 17528409 RMD160 e8bb8df4138d4d8e662eae86b7c2a01813f6621e SHA1 87e511c257c31d579371d745e7c17eae58d3fc9c SHA256 6a634d9e6b4eb201f54c97882cef11ce8f1e6745864d6e5830c6c7b198df8ba4
+EBUILD geant-4.9.1_p01.ebuild 4999 RMD160 9e6da1c28a670a1b529f348c7423f292dd38d9b6 SHA1 ed1eb81626c5ec6b905451b16f56615e35fb9628 SHA256 7fbe5c8effd8dbc4bfe031d645c3923806e520d9049a30b362a03bc568b129bd
+MISC ChangeLog 782 RMD160 886a964b1f33a1cb358baf36655b615b12e2a3a5 SHA1 f65316c54c9d2ed6f55f335162a1c1eec8d6db02 SHA256 f68550704dd98f2fc1beb35571ae61d58a85c7e14c366c8c10a61639ebf8133a
+MISC metadata.xml 487 RMD160 6ef1920ad5ce8a4b81c3960b490f7e1219d29592 SHA1 3df009e39f51086e9bbc66616b65fdad441f956f SHA256 c7ca665634072c0520ad9a26e61bdba7eef1665c32cbe9a9039d8ebbcd35c1d8
diff --git a/sci-physics/geant/files/geant-4.9.1_p01-configure.patch b/sci-physics/geant/files/geant-4.9.1_p01-configure.patch
new file mode 100644
index 000000000..55c925d49
--- /dev/null
+++ b/sci-physics/geant/files/geant-4.9.1_p01-configure.patch
@@ -0,0 +1,116 @@
+--- Configure.orig 2007-11-28 13:49:23.000000000 +0000
++++ Configure 2008-04-07 18:45:41.317949330 +0000
+@@ -579,16 +579,17 @@
+ ;;
+ esac
+
+-: Sanity checks
+-case "$fastread$alldone" in
+-yescont|yesexit) ;;
+-*)
+- if test ! -t 0; then
+- echo "Say 'sh Configure', not 'sh <Configure'"
+- exit 1
+- fi
+- ;;
+-esac
++# breaks things in a sandbox.
++# : Sanity checks
++# case "$fastread$alldone" in
++# yescont|yesexit) ;;
++# *)
++# if test ! -t 0; then
++# echo "Say 'sh Configure', not 'sh <Configure'"
++# exit 1
++# fi
++# ;;
++# esac
+
+ exec 4>&1
+ case "$silent" in
+@@ -982,7 +983,7 @@
+ : general instructions
+ needman=true
+ firsttime=true
+-user=`(logname) 2>/dev/null`
++user=`(logname || true) 2>/dev/null`
+ case "$user" in
+ '') user=`whoami 2>&1`;;
+ esac
+@@ -1315,7 +1316,6 @@
+ '')
+ myuname=`( ($uname -a) 2>/dev/null || hostname) 2>&1`
+
+-mygcc=`( ($g++ -v) 2>/dev/null) 2>&1`
+ myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
+ ./tr '[A-Z]' '[a-z]' | tr '\012' ' '`
+ newmyuname="$myuname"
+@@ -1911,7 +1911,7 @@
+
+ . $src/.config/bin/$g4system/move.sh
+
+- exit 1
++ exit 0
+
+ fi #end of cppflags
+
+@@ -2119,7 +2119,7 @@
+ cp -i $src/.config/bin/$g4system/env.csh .
+ cp -i $src/.config/bin/$g4system/env.sh .
+
+- exit 1
++ exit 0
+ fi #end of -lib or user
+ else #there is no env.sh
+
+@@ -2217,7 +2217,7 @@
+
+ : who configured the system
+ cf_time=`$date 2>&1`
+-cf_by=`(logname) 2>/dev/null`
++cf_by=`(logname || true) 2>/dev/null`
+ case "$cf_by" in
+ "")
+ cf_by=`(whoami) 2>/dev/null`
+@@ -4200,9 +4200,9 @@
+ if test "X$g4osname" = "XLinux" ; then
+ g4vis_xmflags=" -I$g4vis_xmhome/include "
+ if test "X$g4vis_xmhome" = "X/usr/X11R6" ; then
+- g4vis_xmlibs=" -lXm -lXpm "
++ g4vis_xmlibs=" -lXm "
+ else
+- g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXpm "
++ g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm "
+ fi
+ fi
+
+@@ -4908,9 +4908,9 @@
+ if test "X$g4osname" = "XLinux" ; then
+ g4vis_xmflags=" -I$g4vis_xmhome/include "
+ if test "X$g4vis_xmhome" = "X/usr/X11R6" ; then
+- g4vis_xmlibs=" -lXm -lXpm "
++ g4vis_xmlibs=" -lXm "
+ else
+- g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm -lXpm "
++ g4vis_xmlibs=" -L$g4vis_xmhome/lib -lXm "
+ fi
+ fi
+
+@@ -6123,7 +6123,7 @@
+
+ echo ""
+
+- g4_gmake_version=`(gmake -v) 2>/dev/null`
++ g4_gmake_version=`(gmake -v || true) 2>/dev/null`
+ case $g4_gmake_version in
+ GNU*)
+ g4_gmake=y
+@@ -6133,7 +6133,7 @@
+ ;;
+ esac
+
+- g4_make_version=`(make -v) 2>/dev/null`
++ g4_make_version=`(make -v || true) 2>/dev/null`
+ case $g4_make_version in
+ GNU*)
+ g4_make=y
diff --git a/sci-physics/geant/files/geant-4.9.1_p01-no-source.patch b/sci-physics/geant/files/geant-4.9.1_p01-no-source.patch
new file mode 100644
index 000000000..8ca619e88
--- /dev/null
+++ b/sci-physics/geant/files/geant-4.9.1_p01-no-source.patch
@@ -0,0 +1,38 @@
+--- config/scripts/move.sh.SH.orig 2008-04-08 16:08:16.817366051 +0000
++++ config/scripts/move.sh.SH 2008-04-08 19:05:44.332687325 +0000
+@@ -445,33 +445,8 @@
+ cd $g4install
+ #echo `pwd`
+
+-
+-# Remove 'verbosity' in 'tar' command
+-# If not INCLUDE then install full tree in 'src' directory!
+-#
+-if [ X$g4includes_flag = Xn ] ; then
+-if [ X$g4install != X$g4final_install ] ; then
+-echo ""
+-echo "Installing sources and headers..."
+-echo ""
+-mkdir -p $g4final_install/src/geant4/
+-tar cf - Configure config/ source/ environments/ examples/ include/ |(cd $g4final_install/src/geant4/; tar xf -)
+-fi
+-fi
+-
+-########################################
+-# There is no env!
+-if [ X$g4includes_flag = Xy ] ; then
+-
+-if [ X$g4install != X$g4final_install ] ; then
+-echo ""
+-echo "Installing sources..."
+-echo ""
+-
+-mkdir -p $g4final_install/src/geant4/
+-tar cf - Configure config/ source/ environments/ examples/ |(cd $g4final_install/src/geant4/; tar xf -)
+-fi
+-
++# Remove all the stuff to not install sources
++#
+ echo ""
+ echo "Installing headers..."
+ echo ""
diff --git a/sci-physics/geant/geant-4.9.1_p01.ebuild b/sci-physics/geant/geant-4.9.1_p01.ebuild
new file mode 100644
index 000000000..c8caa4ced
--- /dev/null
+++ b/sci-physics/geant/geant-4.9.1_p01.ebuild
@@ -0,0 +1,198 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v3
+# $Header: $
+
+EAPI=1
+
+inherit eutils fortran multilib versionator
+
+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.12
+ G4EMLOW.5.1
+ 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 ~x86"
+IUSE="athena +data dawn debug examples gdml geant3 minimal +motif
+ +opengl openinventor +raytracerx +vrml zlib"
+
+DEPEND="sci-physics/clhep
+ motif? ( virtual/motif )
+ athena? ( x11-libs/libXaw )
+ openinventor? ( media-libs/openinventor )
+ raytracerx? ( x11-libs/libX11 x11-libs/libXmu )
+ opengl? ( virtual/opengl
+ athena? ( x11-libs/Xaw3d ) )
+ 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
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # this patch sanitize the Configure script
+ epatch "${FILESDIR}"/${P}-configure.patch
+ epatch "${FILESDIR}"/${P}-no-source.patch
+
+ # propagate user's make options
+ sed -i \
+ -e "s/g4make=gmake/g4make=\"gmake ${MAKEOPTS}\"/" \
+ Configure || die "sed Configure failed"
+
+ # propagate user's flags.
+ sed -i \
+ -e "s:\(CXXFLAGS*+=\)*-O2:\1 ${CXXFLAGS:--O2}:g" \
+ -e "s:\(FCFLAGS*+=\)*-O2:\1 ${FFLAGS:--O2}:g" \
+ -e "s:\(CCFLAGS*+=\)*-O2:\1 ${CFLAGS:--O2}:g" \
+ config/sys/Linux* || die "flag substitution failed"
+
+ # libdir stuff
+ sed -i \
+ -e "s:lib/geant4:$(get_libdir)/geant:g" \
+ Configure config/scripts/move.sh.SH \
+ || die "multilib substitution failed"
+}
+
+g4ui_use() {
+ local answer=$(use $1 && echo y || echo n)
+ echo "-D g4ui_build_${2:-$1}_session=${answer}
+ -D g4ui_use_${2:-$1}=${answer}"
+}
+
+g4vis_use() {
+ local answer=$(use $1 && echo y || echo n)
+ echo "-D g4vis_build_${2:-$1}_driver=${answer}
+ -D g4vis_use_${2:-$1}=${answer}"
+}
+
+g4w_use() {
+ local answer=$(use $1 && echo y || echo n)
+ echo "-D g4w_use_${2:-$1}=${answer}
+ -D g4wlib_use_${2:-$1}=${answer}"
+}
+
+src_compile() {
+ GEANT4_DATA_DIR=/usr/share/${PN}
+ # The Configure shell script saves its options
+ # in .config/bin/*/config.sh
+
+ local myconf="$(g4vis_use opengl openglx)"
+ use opengl && myconf="${glconf} $(g4vis_use motif openglxm)"
+ use data && myconf="${myconf} -D g4data=${GEANT_DATA_DIR}"
+
+ # switch to see compiling flags
+ export CPPVERBOSE=y
+ use debug && export G4DEBUG=y || export G4OPTIMIZE=y
+
+ # to check what they are doing and working
+ # -D d_portable \
+ # -D g4global=n \
+ # -D g4granular=y
+ # -D g4_use_granular=y
+ # -D g4make=make \
+
+ ./Configure \
+ -deE -build \
+ -D g4analysis_use=n \
+ -D g4includes_flag=y \
+ -D g4include="${D}/usr/include/geant4" \
+ -D g4final_install="${D}/usr" \
+ $(g4ui_use minimal none) \
+ $(g4ui_use athena xaw) \
+ $(g4ui_use motif xm) \
+ $(g4vis_use minimal none) \
+ $(g4vis_use dawn) \
+ $(g4vis_use raytracerx) \
+ $(g4vis_use openinventor oix) \
+ $(g4vis_use vrml) \
+ $(g4vis_use vrml vrmlfile) \
+ $(g4w_use geant3 g3tog4) \
+ $(g4w_use zlib) \
+ ${myconf} \
+ ${EXTRA_ECONF} \
+ || die "Configure failed"
+
+ # 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
+
+ ./Configure \
+ -deO -build \
+ -D g4lib_build_shared=y \
+ -D g4lib_build_static=n \
+ || die "Building shared geant failed"
+
+ rm -rf tmp
+
+ ./Configure \
+ -deO -build \
+ -D g4lib_build_shared=n \
+ -D g4lib_build_static=y \
+ || die "Building shared geant failed"
+}
+
+src_install() {
+ ./Configure \
+ -install \
+ || die "Install failed"
+
+ ./Configure \
+ || die "Final install failed"
+
+ insinto ${GEANT4_DATA_DIR}
+ sed -i \
+ -e "s:${S}:${GEANT4_DATA_DIR}:g" \
+ -e "s:${D}:/:g" \
+ env.*sh
+ doins env.*sh || die "failed installing shell scripts"
+ doins -r config
+ if use data; then
+ cd "${WORKDIR}"
+ for d in ${GEANT4_DATA}; do
+ local p=${d/.}
+ doins -r *${d/G4} || die "installing data ${d} failed"
+ done
+ fi
+
+ # doc and examples
+ insinto /usr/share/doc/${PF}
+ local mypv="4.$(get_version_component_range 2 ${PV})"
+ mypv="${mypv}.$(get_version_component_range 3 ${PV})"
+ doins ReleaseNotes/ReleaseNotes${mypv}.html
+ [[ -e ReleaseNotes/Patch${mypv}-1.txt ]] && \
+ dodoc ReleaseNotes/Patch${mypv}-*.txt
+
+ use examples && doins -r examples
+ # todo: g4py with python flag
+ # todo: momo with momo or java flag, and check java stuff
+}
+
+pkg_postinst() {
+ elog "You can set the Geant4 environment variables"
+ elog "from ${ROOT}${GEANT4_DATA_DIR} shell scripts."
+ elog "Ex: for bash"
+ elog " source ${ROOT}${GEANT4_DATA_DIR}/env.sh"
+ elog
+ elog "Help us to improve the ebuild and dependencies in"
+ elog "http://bugs.gentoo.org/show_bug.cgi?id=212221"
+}
diff --git a/sci-physics/geant/metadata.xml b/sci-physics/geant/metadata.xml
new file mode 100644
index 000000000..8dada074a
--- /dev/null
+++ b/sci-physics/geant/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci-physics</herd>
+<longdescription lang="en">
+ Geant simulates the passage of subatomic particles through matter, for
+ instance, particle detectors. For maximum flexibility, Geant
+ simulations are performed by linking Fortran code supplied by the user
+ with the Geant libraries, then running the resulting executable.
+</longdescription>
+</pkgmetadata>