[107540] users
mojca at macports.org
mojca at macports.org
Tue Jul 2 10:40:59 PDT 2013
Revision: 107540
https://trac.macports.org/changeset/107540
Author: mojca at macports.org
Date: 2013-07-02 10:40:59 -0700 (Tue, 02 Jul 2013)
Log Message:
-----------
mojca's playground for Geant4
Added Paths:
-----------
users/mojca/
users/mojca/ports/
users/mojca/ports/science/
users/mojca/ports/science/geant4-data/
users/mojca/ports/science/geant4-data/Portfile
users/mojca/ports/science/geant4.10.0/
users/mojca/ports/science/geant4.10.0/Portfile
users/mojca/ports/science/geant4.10.0/files/
users/mojca/ports/science/geant4.10.0/files/patch-cmake_Modules_FindAIDA.cmake.diff
users/mojca/ports/science/geant4.9.6/
users/mojca/ports/science/geant4.9.6/Portfile
Added: users/mojca/ports/science/geant4-data/Portfile
===================================================================
--- users/mojca/ports/science/geant4-data/Portfile (rev 0)
+++ users/mojca/ports/science/geant4-data/Portfile 2013-07-02 17:40:59 UTC (rev 107540)
@@ -0,0 +1,68 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id: $
+
+PortSystem 1.0
+
+name geant4-data
+version 1.0
+categories science
+platforms darwin
+license Geant4
+maintainers mojca openmaintainer
+description Data files for Geant4
+long_description ${description}
+homepage http://geant4.web.cern.ch/
+master_sites http://geant4.cern.ch/support/source/
+supported_archs noarch
+
+set geant.datadir ${prefix}/share/Geant4/Data
+
+set geant.data_versions {
+ G4NDL 4.3 55493e74cba90e6cb167a5008e138cd7 G4NDL G4NDL
+ G4NDL 4.2 2302d7ffeef1a450955302f027ee1cf4 G4NDL G4NDL
+ G4EMLOW 6.33 0002a1c16c9b1fb5e8d49dfbce12a576 G4EMLOW G4EMLOW
+ G4EMLOW 6.32 9d3302072ba694b1d4505c330ed89d89 G4EMLOW G4EMLOW
+ PhotonEvaporation 2.1 d1ee8ac49515109c34ae3714c22d59dd G4PhotonEvaporation PhotonEvaporation
+ PhotonEvaporation 2.3 08848ebdd536280a0629d802040b70be G4PhotonEvaporation PhotonEvaporation
+ RadioactiveDecay 3.7 039e5f64b0e451eb5c095bf81552cb42 G4RadioactiveDecay RadioactiveDecay
+ RadioactiveDecay 3.6 9566ff1614bea7455343328cb66abd6f G4RadioactiveDecay RadioactiveDecay
+ G4NEUTRONXS 1.3 ede7c4b3e99cbe1773b672a7404fe0f6 G4NEUTRONXS G4NEUTRONXS
+ G4NEUTRONXS 1.2 092634b9258c7bc387cb83557ff1df81 G4NEUTRONXS G4NEUTRONXS
+ G4PII 1.3 05f2471dbcdf1a2b17cbff84e8e83b37 G4PII G4PII
+ RealSurface 1.0 0dde95e00fcd3bcd745804f870bb6884 RealSurface RealSurface
+ G4SAIDDATA 1.1 d88a31218fdf28455e5c5a3609f7216f G4SAIDDATA G4SAIDDATA
+}
+
+foreach {data.name data.version data.md5 data.filename data.distname} ${geant.data_versions} {
+ subport ${name}-${data.name}-${data.version} {
+
+ version ${data.version}
+ description ${data.name} v${data.version} data files for Geant4
+ long_description ${description}
+ distfiles ${data.filename}.${data.version}${extract.suffix}
+ checksums md5 ${data.md5}
+ distname ${data.distname}${data.version}
+ extract.dir ${destroot}${geant.datadir}
+ pre-extract {
+ xinstall -m 755 -d ${destroot}${geant.datadir}
+ }
+ use_configure no
+ build {}
+ destroot {}
+ }
+}
+
+if {$subport == $name || $subport == ""} {
+ fetch {}
+ checksum {}
+ extract {}
+ patch {}
+ use_configure no
+ build {}
+ destroot {
+ set geant.docdir ${prefix}/share/doc/${name}
+ xinstall -m 755 -d ${destroot}${geant.docdir}
+ system "echo $name is a stub port > ${destroot}${geant.docdir}/README"
+ }
+ livecheck.type none
+}
Added: users/mojca/ports/science/geant4.10.0/Portfile
===================================================================
--- users/mojca/ports/science/geant4.10.0/Portfile (rev 0)
+++ users/mojca/ports/science/geant4.10.0/Portfile 2013-07-02 17:40:59 UTC (rev 107540)
@@ -0,0 +1,107 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id: $
+
+PortSystem 1.0
+PortGroup cmake 1.0
+
+name geant4.10.0
+# TODO: how to recognize whether a version is newer? Do we need an extra string/number? I'm not sure about b01/p02
+version 4.10.00.b01
+categories science
+maintainers nomaintainer
+license Geant4
+description Geant4 is a toolkit for the simulation of the passage of particles through matter.
+long_description Geant4 is a toolkit for the simulation of the passage of particles through matter. \
+ Its areas of application include high energy, nuclear and accelerator physics, as well as studies in medical and space science. \
+ The two main reference papers for Geant4 are published in Nuclear Instruments and Methods in Physics Research A 506 (2003) 250-303, \
+ and IEEE Transactions on Nuclear Science 53 No. 1 (2006) 270-278.
+homepage http://geant4.web.cern.ch/
+platforms darwin
+
+set simpleversion 4.10.0
+
+distfiles geant${version}.tar.gz
+
+master_sites http://geant4.cern.ch/support/source/
+
+checksums rmd160 14820eca2893ffa7a27cd44f51c6c9b4b125b491 \
+ sha256 0fa7c9b0e1b09fd11b682523b839b4c6c67f4c3cd5bc9a9357512c37ea4a9e1e
+
+worksrcdir geant${version}
+configure.dir ${workpath}/build
+build.dir ${configure.dir}
+
+post-extract {
+ file mkdir ${configure.dir}
+}
+
+patchfiles patch-cmake_Modules_FindAIDA.cmake.diff
+
+configure.post_args ${worksrcpath}
+
+depends_lib port:geant4-data-G4NDL-4.3 \
+ port:geant4-data-G4EMLOW-6.33 \
+ port:geant4-data-PhotonEvaporation-2.3 \
+ port:geant4-data-RadioactiveDecay-3.7 \
+ port:geant4-data-G4NEUTRONXS-1.3 \
+ port:geant4-data-G4PII-1.3 \
+ port:geant4-data-RealSurface-1.0 \
+ port:geant4-data-G4SAIDDATA-1.1 \
+ port:zlib \
+ port:expat \
+ port:root \
+ port:aida
+#
+
+variant qt description {Build with Qt support} {
+ depends_lib-append port:qt4-mac
+
+ configure.args-append -DGEANT4_USE_QT=ON
+ # maybe we need more variables?
+}
+
+# TODO: no need for a separate option
+variant clhep description {Use external CLHEP} {
+ depends_lib-append port:clhep
+
+ configure.args-append -DGEANT4_USE_SYSTEM_CLHEP=ON \
+ -DCLHEP_CONFIG_EXECUTABLE=${prefix}/bin/clhep-config \
+ -DCLHEP_INCLUDE_DIR=${prefix}/include \
+ -DCLHEP_LIBRARY=${prefix}/lib/libCLHEP.dylib
+}
+
+configure.args-append -DGEANT4_INSTALL_DATA=OFF \
+ -DGEANT4_INSTALL_DATADIR=${prefix}/share/Geant4/Data \
+ -DCMAKE_INSTALL_BINDIR=libexec/Geant4/Geant${simpleversion} \
+ -DCMAKE_INSTALL_DATAROOTDIR=share/Geant4 \
+ -DCMAKE_INSTALL_INCLUDEDIR=include/Geant4/Geant${simpleversion} \
+ -DCMAKE_INSTALL_LIBDIR=lib/Geant4/Geant${simpleversion} \
+ -DGEANT4_USE_OPENGL_X11=ON
+
+# GEANT4_USE_OPENGL_X11 should be a separate options with all dependencies
+
+# DATAROOTDIR: Geant automatically adds Geant4-10.0.0 (any way to prevent this?)
+# INCLUDEDIR: /opt/local/include/Geant4/Geant4.10.0/Geant4 (any way to prevent double Geant4?)
+# CMake file are under /opt/local/lib/Geant4/Geant4.10.0/Geant4-10.0.0/*.cmake
+# CMAKE_INSTALL_BINDIR: this installs binaries to a non-default location;
+# port select could be used to get the default installation, but all three scripts in bindir need patching to properly detect their location
+
+default_variants +qt +clhep
+
+# one might want to set these variables as well (not sure if they are used at all):
+#
+# CMAKE_INSTALL_DATADIR
+# CMAKE_INSTALL_DOCDIR
+# CMAKE_INSTALL_MANDIR
+# CMAKE_INSTALL_NAME_DIR
+# CMAKE_INSTALL_NAME_TOOL
+
+# EXPAT
+#
+# GEANT4_USE_SYSTEM_EXPAT ON
+# EXPAT_INCLUDE_DIR /usr/include
+# EXPAT_LIBRARY /usr/lib/libexpat.dylib
+
+# ZLIB
+#
+# GEANT4_USE_SYSTEM_ZLIB OFF
Added: users/mojca/ports/science/geant4.10.0/files/patch-cmake_Modules_FindAIDA.cmake.diff
===================================================================
--- users/mojca/ports/science/geant4.10.0/files/patch-cmake_Modules_FindAIDA.cmake.diff (rev 0)
+++ users/mojca/ports/science/geant4.10.0/files/patch-cmake_Modules_FindAIDA.cmake.diff 2013-07-02 17:40:59 UTC (rev 107540)
@@ -0,0 +1,14 @@
+--- cmake/Modules/FindAIDA.cmake.orig
++++ cmake/Modules/FindAIDA.cmake
+@@ -30,10 +30,7 @@ else()
+ OUTPUT_VARIABLE AIDA_LIBRARIES
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+- execute_process(
+- COMMAND ${AIDA_CONFIG_EXECUTABLE} --implementation
+- OUTPUT_VARIABLE AIDA_IMPLEMENTATION
+- OUTPUT_STRIP_TRAILING_WHITESPACE)
++ set(AIDA_IMPLEMENTATION "MacPorts")
+
+ # Make variables changeble to the advanced user
+ mark_as_advanced(AIDA_CONFIG_EXECUTABLE)
Added: users/mojca/ports/science/geant4.9.6/Portfile
===================================================================
--- users/mojca/ports/science/geant4.9.6/Portfile (rev 0)
+++ users/mojca/ports/science/geant4.9.6/Portfile 2013-07-02 17:40:59 UTC (rev 107540)
@@ -0,0 +1,104 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id: $
+
+PortSystem 1.0
+PortGroup cmake 1.0
+
+name geant4.9.6
+version 4.9.6.p02
+categories science
+maintainers nomaintainer
+license Geant4
+description Geant4 is a toolkit for the simulation of the passage of particles through matter.
+long_description Geant4 is a toolkit for the simulation of the passage of particles through matter. \
+ Its areas of application include high energy, nuclear and accelerator physics, as well as studies in medical and space science. \
+ The two main reference papers for Geant4 are published in Nuclear Instruments and Methods in Physics Research A 506 (2003) 250-303, \
+ and IEEE Transactions on Nuclear Science 53 No. 1 (2006) 270-278.
+homepage http://geant4.web.cern.ch/
+platforms darwin
+
+set simpleversion 4.9.6
+
+distfiles geant${version}.tar.gz
+
+master_sites http://geant4.cern.ch/support/source/
+
+checksums rmd160 9ae32c3f8769e303b41df164693f77a74ca6db97 \
+ sha256 cf5df83b7e2c99e6729449b32d3ecb0727b4692317426b66fc7fd41951c7351f
+
+worksrcdir geant${version}
+configure.dir ${workpath}/build
+build.dir ${configure.dir}
+
+post-extract {
+ file mkdir ${configure.dir}
+}
+
+configure.post_args ${worksrcpath}
+
+depends_lib port:geant4-data-G4NDL-4.2 \
+ port:geant4-data-G4EMLOW-6.32 \
+ port:geant4-data-PhotonEvaporation-2.3 \
+ port:geant4-data-RadioactiveDecay-3.6 \
+ port:geant4-data-G4NEUTRONXS-1.2 \
+ port:geant4-data-G4PII-1.3 \
+ port:geant4-data-RealSurface-1.0 \
+ port:geant4-data-G4SAIDDATA-1.1 \
+ port:zlib \
+ port:expat \
+ port:root \
+ port:aida
+#
+
+variant qt description {Build with Qt support} {
+ depends_lib-append port:qt4-mac
+
+ configure.args-append -DGEANT4_USE_QT=ON
+ # maybe we need more variables?
+}
+
+# TODO: no need for a separate option
+variant clhep description {Use external CLHEP} {
+ depends_lib-append port:clhep
+
+ configure.args-append -DGEANT4_USE_SYSTEM_CLHEP=ON \
+ -DCLHEP_CONFIG_EXECUTABLE=${prefix}/bin/clhep-config \
+ -DCLHEP_INCLUDE_DIR=${prefix}/include \
+ -DCLHEP_LIBRARY=${prefix}/lib/libCLHEP.dylib
+}
+
+configure.args-append -DGEANT4_INSTALL_DATA=OFF \
+ -DGEANT4_INSTALL_DATADIR=${prefix}/share/Geant4/Data \
+ -DCMAKE_INSTALL_BINDIR=libexec/Geant4/Geant${simpleversion} \
+ -DCMAKE_INSTALL_DATAROOTDIR=share/Geant4 \
+ -DCMAKE_INSTALL_INCLUDEDIR=include/Geant4/Geant${simpleversion} \
+ -DCMAKE_INSTALL_LIBDIR=lib/Geant4/Geant${simpleversion} \
+ -DGEANT4_USE_OPENGL_X11=ON
+
+# GEANT4_USE_OPENGL_X11 should be a separate options with all dependencies
+
+# DATAROOTDIR: Geant automatically adds /Geant4-9.6.2 (any way to prevent this?)
+# INCLUDEDIR: /opt/local/include/Geant4/Geant4.9.6/Geant4 (any way to prevent double Geant4?)
+# CMake file are under /opt/local/lib/Geant4/Geant4.10.0/Geant4-9.6.2/*.cmake
+# CMAKE_INSTALL_BINDIR: this installs binaries to a non-default location;
+# port select could be used to get the default installation, but all three scripts in bindir need patching to properly detect their location
+
+default_variants +qt +clhep
+
+# one might want to set these variables as well (not sure if they are used at all):
+#
+# CMAKE_INSTALL_DATADIR
+# CMAKE_INSTALL_DOCDIR
+# CMAKE_INSTALL_MANDIR
+# CMAKE_INSTALL_NAME_DIR
+# CMAKE_INSTALL_NAME_TOOL
+
+# EXPAT
+#
+# GEANT4_USE_SYSTEM_EXPAT ON
+# EXPAT_INCLUDE_DIR /usr/include
+# EXPAT_LIBRARY /usr/lib/libexpat.dylib
+
+# ZLIB
+#
+# GEANT4_USE_SYSTEM_ZLIB OFF
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130702/a5f27490/attachment.html>
More information about the macports-changes
mailing list