Ticket #32716: geant4.10.0-v3.Portfile

File geant4.10.0-v3.Portfile, 4.4 KB (added by mojca (Mojca Miklavec), 11 years ago)

Geant4 10.0 with dependency on geant4-data

Line 
1PortSystem          1.0
2PortGroup           cmake 1.0
3
4name                geant4.10.0
5# TODO: how to recognize whether a version is newer? Do we need an extra string/number? I'm not sure about b01/p02
6version             4.10.00.b01
7categories          science
8maintainers         nomaintainer
9license             Geant4
10description         Geant4 is a toolkit for the simulation of the passage of particles through matter.
11long_description    Geant4 is a toolkit for the simulation of the passage of particles through matter. \
12                    Its areas of application include high energy, nuclear and accelerator physics, as well as studies in medical and space science. \
13                    The two main reference papers for Geant4 are published in Nuclear Instruments and Methods in Physics Research A 506 (2003) 250-303, \
14                    and IEEE Transactions on Nuclear Science 53 No. 1 (2006) 270-278.
15homepage            http://geant4.web.cern.ch/
16platforms           darwin
17
18set simpleversion 4.10.0
19
20distfiles           geant${version}.tar.gz
21
22master_sites        http://geant4.cern.ch/support/source/
23
24checksums           geant${version}.tar.gz \
25                    rmd160  14820eca2893ffa7a27cd44f51c6c9b4b125b491 \
26                    sha256  0fa7c9b0e1b09fd11b682523b839b4c6c67f4c3cd5bc9a9357512c37ea4a9e1e
27
28worksrcdir          geant${version}
29configure.dir       ${workpath}/build
30build.dir           ${configure.dir}
31
32post-extract {
33    file mkdir ${configure.dir}
34}
35
36patchfiles          patch-cmake_Modules_FindAIDA.cmake.diff
37
38configure.post_args ${worksrcpath}
39
40depends_lib         port:geant4-data-G4NDL-4.3 \
41                    port:geant4-data-G4EMLOW-6.33 \
42                    port:geant4-data-PhotonEvaporation-2.3 \
43                    port:geant4-data-RadioactiveDecay-3.7 \
44                    port:geant4-data-G4NEUTRONXS-1.3 \
45                    port:geant4-data-G4PII-1.3 \
46                    port:geant4-data-RealSurface-1.0 \
47                    port:geant4-data-G4SAIDDATA-1.1 \
48                    port:zlib \
49                    port:expat \
50                    port:root \
51                    port:aida
52#
53
54variant qt description {Build with Qt support} {
55    depends_lib-append  port:qt4-mac
56
57    configure.args-append -DGEANT4_USE_QT=ON
58    # maybe we need more variables?
59}
60
61# TODO: this is a temporary option only: one should alway use system CLHEP since that appears to be needed by Gate (and even some examples in Geant4)
62# however, I separated it into its own option since this is currently broken
63variant clhep description {Use external CLHEP} {
64    depends_lib-append port:clhep
65
66    configure.args-append -DGEANT4_USE_SYSTEM_CLHEP=ON \
67                          -DCLHEP_CONFIG_EXECUTABLE=${prefix}/bin/clhep-config \
68                          -DCLHEP_INCLUDE_DIR=${prefix}/include \
69                          -DCLHEP_LIBRARY=${prefix}/lib/libCLHEP.dylib
70}
71
72configure.args-append -DGEANT4_INSTALL_DATA=OFF \
73                      -DGEANT4_INSTALL_DATADIR=${prefix}/share/Geant4/Data \
74                      -DCMAKE_INSTALL_BINDIR=libexec/Geant4/Geant${simpleversion} \
75                      -DCMAKE_INSTALL_DATAROOTDIR=share/Geant4 \
76                      -DCMAKE_INSTALL_INCLUDEDIR=include/Geant4/Geant${simpleversion} \
77                      -DCMAKE_INSTALL_LIBDIR=lib/Geant4/Geant${simpleversion} \
78                      -DGEANT4_USE_OPENGL_X11=ON       
79
80# GEANT4_USE_OPENGL_X11 should be a separate options with all dependencies
81
82# DATAROOTDIR: Geant automatically adds Geant4-10.0.0 (any way to prevent this?)
83# INCLUDEDIR: /opt/local/include/Geant4/Geant4.10.0/Geant4 (any way to prevent double Geant4?)
84# CMake file are under /opt/local/lib/Geant4/Geant4.10.0/Geant4-10.0.0/*.cmake
85# CMAKE_INSTALL_BINDIR: this installs binaries to a non-default location;
86#     port select could be used to get the default installation, but all three scripts in bindir need patching to properly detect their location
87
88default_variants +qt
89
90# one might want to set these variables as well (not sure if they are used at all):
91#
92# CMAKE_INSTALL_DATADIR
93# CMAKE_INSTALL_DOCDIR
94# CMAKE_INSTALL_MANDIR
95# CMAKE_INSTALL_NAME_DIR
96# CMAKE_INSTALL_NAME_TOOL
97
98# EXPAT
99#
100# GEANT4_USE_SYSTEM_EXPAT          ON
101# EXPAT_INCLUDE_DIR                /usr/include                                                                                                                                   
102# EXPAT_LIBRARY                    /usr/lib/libexpat.dylib
103
104# ZLIB
105#
106# GEANT4_USE_SYSTEM_ZLIB           OFF