[120009] trunk/dports/science

mojca at macports.org mojca at macports.org
Mon May 12 18:22:48 PDT 2014


Revision: 120009
          https://trac.macports.org/changeset/120009
Author:   mojca at macports.org
Date:     2014-05-12 18:22:47 -0700 (Mon, 12 May 2014)
Log Message:
-----------
gate: new port (closes #35992)

Added Paths:
-----------
    trunk/dports/science/gate/
    trunk/dports/science/gate/Portfile
    trunk/dports/science/gate/files/patch-addmenu.diff

Removed Paths:
-------------
    trunk/dports/science/gate/Portfile
    trunk/dports/science/gate/files/patch-addmenu.diff

Deleted: trunk/dports/science/gate/Portfile
===================================================================
--- users/mojca/ports/science/gate/Portfile	2014-05-10 03:15:11 UTC (rev 119919)
+++ trunk/dports/science/gate/Portfile	2014-05-13 01:22:47 UTC (rev 120009)
@@ -1,184 +0,0 @@
-# -*- 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$
-
-# Keep in sync with Geant4 (and/or implement a PortGroup)
-
-PortSystem          1.0
-PortGroup           app 1.0
-PortGroup           cmake 1.0
-PortGroup           active_variants 1.1
-
-set                 git_sha e86c0082fe
-set                 git_date 20140317
-
-# TODO: temporary - if checksums are desired
-PortGroup           github 1.0
-github.setup        mojca gate ${git_sha}
-
-## official repository
-# fetch.type          git
-# git.url             http://git.opengatecollaboration.org/git/opengate-public.git
-# git.branch          e86c0082fe617d1cad13ac3d35ae759bcf4e27f4
-
-name                gate
-version             6.99-git-${git_date}-${git_sha}
-categories          science
-maintainers         mojca
-license             LGPL
-description         GATE description
-long_description    GATE is dedicated to numerical simulations in medical imaging and radiotherapy. \
-                    It currently supports simulations of Emission Tomography (PET and SPECT), \
-                    Computed Tomography (CT) and Radiotherapy experiments.
-homepage            http://www.opengatecollaboration.org
-platforms           darwin
-
-checksums           rmd160  4211aa4db0f2ab44934535848397dd932c6d14d8 \
-                    sha256  4235aab2d341cb6361ae7502e9429e03d6f0aa43cd478c5f49836b8d373f06c1
-
-set geant.data_versions_10.0 {
-    G4NDL              4.4   G4NDL                G4NEUTRONHPDATA
-    G4EMLOW            6.35  G4EMLOW              G4LEDATA
-    PhotonEvaporation  3.0   G4PhotonEvaporation  G4LEVELGAMMADATA
-    RadioactiveDecay   4.0   G4RadioactiveDecay   G4RADIOACTIVEDATA
-    G4NEUTRONXS        1.4   G4NEUTRONXS          G4NEUTRONXSDATA
-    G4PII              1.3   G4PII                G4PIIDATA
-    RealSurface        1.0   RealSurface          G4REALSURFACEDATA
-    G4SAIDDATA         1.1   G4SAIDDATA           G4SAIDXSDATA
-    G4ABLA             3.0   G4ABLA               G4ABLADATA
-    G4ENSDFSTATE       1.0   G4ENSDFSTATE         G4ENSDFSTATEDATA
-}
-set geant.data_versions_9.6 {
-    G4NDL              4.2   G4NDL                G4NEUTRONHPDATA
-    G4EMLOW            6.32  G4EMLOW              G4LEDATA
-    PhotonEvaporation  2.3   G4PhotonEvaporation  G4LEVELGAMMADATA
-    RadioactiveDecay   3.6   G4RadioactiveDecay   G4RADIOACTIVEDATA
-    G4NEUTRONXS        1.2   G4NEUTRONXS          G4NEUTRONXSDATA
-    G4PII              1.3   G4PII                G4PIIDATA
-    RealSurface        1.0   RealSurface          G4REALSURFACEDATA
-    G4SAIDDATA         1.1   G4SAIDDATA           G4SAIDXSDATA
-}
-set geant.data_versions_9.5 {
-    G4NDL              4.0   G4NDL                G4NEUTRONHPDATA
-    G4EMLOW            6.32  G4EMLOW              G4LEDATA
-    PhotonEvaporation  2.2   G4PhotonEvaporation  G4LEVELGAMMADATA
-    RadioactiveDecay   3.4   G4RadioactiveDecay   G4RADIOACTIVEDATA
-    G4ABLA             3.0   G4ABLA               G4ABLADATA
-    G4NEUTRONXS        1.1   G4NEUTRONXS          G4NEUTRONXSDATA
-    G4PII              1.3   G4PII                G4PIIDATA
-    RealSurface        1.0   RealSurface          G4REALSURFACEDATA
-}
-set geant.datadir ""
-set geant.data_versions ""
-
-app.name            Gate
-app.executable      Gate
-app.icon            ${filespath}/gate.png
-
-configure.dir       ${workpath}/build
-build.dir           ${configure.dir}
-
-post-extract {
-    file mkdir ${configure.dir}
-}
-configure.post_args ${worksrcpath}
-
-depends_lib         port:clhep \
-                    port:qt4-mac \
-                    port:root
-
-# Geant4.9.5 probably doesn't support icon bars
-if {![variant_isset geant495]} {
-    patchfiles      patch-addmenu.diff
-}
-
-post-patch {
-    # patch examples if needed
-    if {[variant_isset examples]} {
-        foreach f [exec find "${worksrcpath}/examples" -type f -name "*.mac"] {
-            # gpumacros/ct/mac/visu.mac gpumacros/optical/macro_biolum_cpu.mac gpumacros/optical/macro_biolum_gpu.mac gpumacros/pet/mac/visu.mac gpumacros/photradthera/mac/visu.mac example_CT/classic/visu.mac example_CT/fast/visu.mac example_CT/vrt/visu.mac example_OPTICAL/macro/Visualisation.mac example_PET/PET_CylindricalPET_System.mac example_PET/PET_Ecat_System.mac example_PHANTOM_SOURCE/Voxelized_Phantom_Source/mainMacro.mac example_SPECT/vis.mac example_TimeActivityCurve/vis.mac example_TrackerDetector/visu.mac
-            # replace "/vis/open OGLIX" with "/vis/open OGLIQt" (not sure about the difference between OGLIQt and OGLSQt; maybe even just OGL)
-            # just in case we could check that the statement actually starts with /vis/open
-            reinplace "s|OGLIX|OGLIQt|g" ${f}
-            reinplace "s|OGLSX|OGLSQt|g" ${f}
-            # TODO: create a single expression to cover both, possibly storing the variables to simplify the replacement part
-            reinplace "s|/gate/geometry/setMaterialDatabase.*GateMaterials.db|/gate/geometry/setMaterialDatabase GateMaterials.db|g" ${f}
-            reinplace "s|/gate/geometry/setMaterialDatabase.*GateMaterialsGPU.db|/gate/geometry/setMaterialDatabase GateMaterialsGPU.db|g" ${f}
-        }
-    }
-}
-pre-destroot {
-    set destdocdir ${destroot}${prefix}/share/doc/${name}
-    xinstall -m 755 -d ${destdocdir}
-    # copy license
-    copy ${worksrcpath}/license ${destdocdir}
-    # copy examples
-    if {[variant_isset examples]} {
-        copy ${worksrcpath}/examples ${destdocdir}
-    }
-    # copy materials database
-    set sharedir ${prefix}/share/${name}
-    set destsharedir ${destroot}${sharedir}
-    xinstall -m 755 -d ${destsharedir}
-    copy ${worksrcpath}/GateMaterials.db ${destsharedir}
-    copy ${worksrcpath}/GateMaterialsGPU.db ${destsharedir}
-    # copy the initial macro files with basic setup
-    copy ${filespath}/gui.mac   ${destsharedir}
-    copy ${filespath}/icons.mac ${destsharedir}
-}
-
-post-destroot {
-    # TODO: the share folder is already set in another phase and should not repeat (actually, all the pre-destroot actions could go to post-destroot)
-    set sharedir ${prefix}/share/${name}
-    # move the binary and set environmental variables
-    set destexecutable ${destroot}${prefix}/bin/Gate
-    set libexecdir ${prefix}/libexec/${name}
-    set destlibexecdir ${destroot}${libexecdir}
-    xinstall -m 755 -d ${destlibexecdir}
-    move ${destexecutable} ${destlibexecdir}
-    system "echo '#!/bin/bash' > ${destexecutable}"
-    system "echo export GATEHOME=\\\"${sharedir}\\\" >> ${destexecutable}"
-    system "echo export G4DATADIR=\\\"${geant.datadir}\\\" >> ${destexecutable}"
-    foreach {data.name data.version data.filename data.envvariable} ${geant.data_versions} {
-        system "echo export ${data.envvariable}=\\\"\\\$G4DATADIR/${data.name}${data.version}\\\" >> ${destexecutable}"
-    }
-    system "echo ${libexecdir}/Gate \\\$@ >> ${destexecutable}"
-    system "chmod 755 ${destexecutable}"
-}
-
-variant examples description {Install examples to doc} {
-}
-variant geant495 conflicts geant496 geant4100 description {Use Geant4 9.5} {
-    # TODO: this can probably be done in a more elegant way
-    #       how to copy datadir and cmakedir from geant4 without duplication?
-    set geant.data_versions ${geant.data_versions_9.5}
-    set geant.datadir       ${prefix}/share/Geant4/Data/Geant4.9.5
-    set geant.cmakedir      ${prefix}/lib/Geant4-9.5.2
-
-    depends_lib-append      port:geant4.9.5
-    require_active_variants geant4.9.5 qt
-    configure.args-append   -DGeant4_DIR=${geant.cmakedir}
-}
-variant geant496 conflicts geant495 geant4100 description {Use Geant4 9.6} {
-    set geant.data_versions ${geant.data_versions_9.6}
-    set geant.datadir       ${prefix}/share/Geant4/Data/Geant4.9.6
-    set geant.cmakedir      ${prefix}/lib/Geant4-9.6.2
-
-    depends_lib-append      port:geant4.9.6
-    require_active_variants geant4.9.6 qt
-    configure.args-append   -DGeant4_DIR=${geant.cmakedir}
-}
-variant geant4100 conflicts geant495 geant496 description {Use Geant4 10.0 (doesn't work yet)} {
-    set geant.data_versions ${geant.data_versions_10.0}
-    set geant.datadir       ${prefix}/share/Geant4/Data/Geant4.10.0
-    set geant.cmakedir      ${prefix}/lib/Geant4-10.0.0
-
-    depends_lib-append      port:geant4.10.0
-    require_active_variants geant4.10.0 qt
-    configure.args-append   -DGeant4_DIR=${geant.cmakedir}
-}
-
-if {![variant_isset geant495] && ![variant_isset geant496] && ![variant_isset geant4100]} {
-    default_variants +geant496
-}
-
-configure.args-append -DGATE_USE_SYSTEM_CLHEP=ON

Copied: trunk/dports/science/gate/Portfile (from rev 120008, users/mojca/ports/science/gate/Portfile)
===================================================================
--- trunk/dports/science/gate/Portfile	                        (rev 0)
+++ trunk/dports/science/gate/Portfile	2014-05-13 01:22:47 UTC (rev 120009)
@@ -0,0 +1,186 @@
+# -*- 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$
+
+# Keep in sync with Geant4 (and/or implement a PortGroup)
+
+PortSystem          1.0
+PortGroup           app 1.0
+PortGroup           cmake 1.0
+PortGroup           active_variants 1.1
+
+set                 git_sha f97fe6c0a0
+set                 git_date 20140507
+
+# Using GitHub just for the sake of downloadable zips
+PortGroup           github 1.0
+github.setup        OpenGATE gate ${git_sha}
+version             7.0
+# version           7.0-git-${git_date}-${git_sha}
+
+## official repository
+# fetch.type        git
+# git.url           http://git.opengatecollaboration.org/git/opengate-public.git
+# git.branch        <sha>
+
+categories          science
+maintainers         mojca openmaintainer
+license             LGPL
+description         GATE description
+long_description    GATE is dedicated to numerical simulations in medical imaging and radiotherapy. \
+                    It currently supports simulations of Emission Tomography (PET and SPECT), \
+                    Computed Tomography (CT) and Radiotherapy experiments.
+homepage            http://www.opengatecollaboration.org
+platforms           darwin
+
+checksums           rmd160  01e29ed24c6eebaad73ff4a74afc481e618804ff \
+                    sha256  ca1cdac09686407fb3890c3ae162772409d8527a3c46b9997dc2edf91a86f270
+
+set geant.data_versions_10.0 {
+    G4NDL              4.4   G4NDL                G4NEUTRONHPDATA
+    G4EMLOW            6.35  G4EMLOW              G4LEDATA
+    PhotonEvaporation  3.0   G4PhotonEvaporation  G4LEVELGAMMADATA
+    RadioactiveDecay   4.0   G4RadioactiveDecay   G4RADIOACTIVEDATA
+    G4NEUTRONXS        1.4   G4NEUTRONXS          G4NEUTRONXSDATA
+    G4PII              1.3   G4PII                G4PIIDATA
+    RealSurface        1.0   RealSurface          G4REALSURFACEDATA
+    G4SAIDDATA         1.1   G4SAIDDATA           G4SAIDXSDATA
+    G4ABLA             3.0   G4ABLA               G4ABLADATA
+    G4ENSDFSTATE       1.0   G4ENSDFSTATE         G4ENSDFSTATEDATA
+}
+set geant.data_versions_9.6 {
+    G4NDL              4.2   G4NDL                G4NEUTRONHPDATA
+    G4EMLOW            6.32  G4EMLOW              G4LEDATA
+    PhotonEvaporation  2.3   G4PhotonEvaporation  G4LEVELGAMMADATA
+    RadioactiveDecay   3.6   G4RadioactiveDecay   G4RADIOACTIVEDATA
+    G4NEUTRONXS        1.2   G4NEUTRONXS          G4NEUTRONXSDATA
+    G4PII              1.3   G4PII                G4PIIDATA
+    RealSurface        1.0   RealSurface          G4REALSURFACEDATA
+    G4SAIDDATA         1.1   G4SAIDDATA           G4SAIDXSDATA
+}
+set geant.data_versions_9.5 {
+    G4NDL              4.0   G4NDL                G4NEUTRONHPDATA
+    G4EMLOW            6.32  G4EMLOW              G4LEDATA
+    PhotonEvaporation  2.2   G4PhotonEvaporation  G4LEVELGAMMADATA
+    RadioactiveDecay   3.4   G4RadioactiveDecay   G4RADIOACTIVEDATA
+    G4ABLA             3.0   G4ABLA               G4ABLADATA
+    G4NEUTRONXS        1.1   G4NEUTRONXS          G4NEUTRONXSDATA
+    G4PII              1.3   G4PII                G4PIIDATA
+    RealSurface        1.0   RealSurface          G4REALSURFACEDATA
+}
+set geant.datadir ""
+set geant.data_versions ""
+
+app.name            Gate
+app.executable      Gate
+app.icon            ${filespath}/gate.png
+
+configure.dir       ${workpath}/build
+build.dir           ${configure.dir}
+
+post-extract {
+    file mkdir ${configure.dir}
+}
+configure.post_args ${worksrcpath}
+
+depends_lib         port:qt4-mac \
+                    port:root5
+
+# Geant4.9.5 probably doesn't support icon bars
+if {![variant_isset geant495]} {
+    patchfiles      patch-addmenu.diff
+}
+
+configure.args-append \
+                    -DGATE_USE_SYSTEM_CLHEP=OFF \
+                    -DROOT_CONFIG_EXECUTABLE=${prefix}/libexec/root5/bin/root-config
+                    # ROOT is optional: we could make a variant if needed
+
+post-patch {
+    # patch examples if needed
+    if {[variant_isset examples]} {
+        foreach f [exec find "${worksrcpath}/examples" -type f -name "*.mac"] {
+            # gpumacros/ct/mac/visu.mac gpumacros/optical/macro_biolum_cpu.mac gpumacros/optical/macro_biolum_gpu.mac gpumacros/pet/mac/visu.mac gpumacros/photradthera/mac/visu.mac example_CT/classic/visu.mac example_CT/fast/visu.mac example_CT/vrt/visu.mac example_OPTICAL/macro/Visualisation.mac example_PET/PET_CylindricalPET_System.mac example_PET/PET_Ecat_System.mac example_PHANTOM_SOURCE/Voxelized_Phantom_Source/mainMacro.mac example_SPECT/vis.mac example_TimeActivityCurve/vis.mac example_TrackerDetector/visu.mac
+            # replace "/vis/open OGLIX" with "/vis/open OGLIQt" (not sure about the difference between OGLIQt and OGLSQt; maybe even just OGL)
+            # just in case we could check that the statement actually starts with /vis/open
+            reinplace "s|OGLIX|OGLIQt|g" ${f}
+            reinplace "s|OGLSX|OGLSQt|g" ${f}
+            # TODO: create a single expression to cover both, possibly storing the variables to simplify the replacement part
+            reinplace "s|/gate/geometry/setMaterialDatabase.*GateMaterials.db|/gate/geometry/setMaterialDatabase GateMaterials.db|g" ${f}
+            reinplace "s|/gate/geometry/setMaterialDatabase.*GateMaterialsGPU.db|/gate/geometry/setMaterialDatabase GateMaterialsGPU.db|g" ${f}
+        }
+    }
+}
+pre-destroot {
+    set destdocdir ${destroot}${prefix}/share/doc/${name}
+    xinstall -m 755 -d ${destdocdir}
+    # copy license
+    copy ${worksrcpath}/license ${destdocdir}
+    # copy examples
+    if {[variant_isset examples]} {
+        copy ${worksrcpath}/examples ${destdocdir}
+    }
+    # copy materials database
+    set sharedir ${prefix}/share/${name}
+    set destsharedir ${destroot}${sharedir}
+    xinstall -m 755 -d ${destsharedir}
+    copy ${worksrcpath}/GateMaterials.db ${destsharedir}
+    copy ${worksrcpath}/GateMaterialsGPU.db ${destsharedir}
+    # copy the initial macro files with basic setup
+    copy ${filespath}/gui.mac   ${destsharedir}
+    copy ${filespath}/icons.mac ${destsharedir}
+}
+
+post-destroot {
+    # TODO: the share folder is already set in another phase and should not repeat (actually, all the pre-destroot actions could go to post-destroot)
+    set sharedir ${prefix}/share/${name}
+    # move the binary and set environmental variables
+    set destexecutable ${destroot}${prefix}/bin/Gate
+    set libexecdir ${prefix}/libexec/${name}
+    set destlibexecdir ${destroot}${libexecdir}
+    xinstall -m 755 -d ${destlibexecdir}
+    move ${destexecutable} ${destlibexecdir}
+    system "echo '#!/bin/bash' > ${destexecutable}"
+    system "echo export GATEHOME=\\\"${sharedir}\\\" >> ${destexecutable}"
+    system "echo export G4DATADIR=\\\"${geant.datadir}\\\" >> ${destexecutable}"
+    foreach {data.name data.version data.filename data.envvariable} ${geant.data_versions} {
+        system "echo export ${data.envvariable}=\\\"\\\$G4DATADIR/${data.name}${data.version}\\\" >> ${destexecutable}"
+    }
+    system "echo ${libexecdir}/Gate \\\$@ >> ${destexecutable}"
+    system "chmod 755 ${destexecutable}"
+}
+
+variant examples description {Install examples to doc} {
+}
+variant geant495 conflicts geant496 geant4100 description {Use Geant4 9.5 (deprecated)} {
+    # TODO: this can probably be done in a more elegant way
+    #       how to copy datadir and cmakedir from geant4 without duplication?
+    set geant.data_versions ${geant.data_versions_9.5}
+    set geant.datadir       ${prefix}/share/Geant4/Data/Geant4.9.5
+    set geant.cmakedir      ${prefix}/lib/Geant4-9.5.2
+
+    depends_lib-append      port:geant4.9.5
+    require_active_variants geant4.9.5 qt
+    configure.args-append   -DGeant4_DIR=${geant.cmakedir}
+}
+variant geant496 conflicts geant495 geant4100 description {Use Geant4 9.6} {
+    set geant.data_versions ${geant.data_versions_9.6}
+    set geant.datadir       ${prefix}/share/Geant4/Data/Geant4.9.6
+    set geant.cmakedir      ${prefix}/lib/Geant4-9.6.2
+
+    depends_lib-append      port:geant4.9.6
+    require_active_variants geant4.9.6 qt
+    configure.args-append   -DGeant4_DIR=${geant.cmakedir}
+}
+variant geant4100 conflicts geant495 geant496 description {Use Geant4 10.0 (not yet officially supported)} {
+    set geant.data_versions ${geant.data_versions_10.0}
+    set geant.datadir       ${prefix}/share/Geant4/Data/Geant4.10.0
+    set geant.cmakedir      ${prefix}/lib/Geant4-10.0.0
+
+    depends_lib-append      port:geant4.10.0
+    require_active_variants geant4.10.0 qt
+    configure.args-append   -DGeant4_DIR=${geant.cmakedir}
+}
+
+if {![variant_isset geant495] && ![variant_isset geant496] && ![variant_isset geant4100]} {
+    default_variants +geant496
+}

Deleted: trunk/dports/science/gate/files/patch-addmenu.diff
===================================================================
--- users/mojca/ports/science/gate/files/patch-addmenu.diff	2014-05-10 03:15:11 UTC (rev 119919)
+++ trunk/dports/science/gate/files/patch-addmenu.diff	2014-05-13 01:22:47 UTC (rev 120009)
@@ -1,10 +0,0 @@
---- Gate.cc
-+++ Gate.cc
-@@ -377,6 +377,7 @@ int main( int argc, char* argv[] )
-   else {
-     if (ui) // Launching interactive mode // Qt
-       {
-+        UImanager->ApplyCommand("/gate/control/execute gui.mac");
-         ui->SessionStart();
-         delete ui;
-       }

Copied: trunk/dports/science/gate/files/patch-addmenu.diff (from rev 120007, users/mojca/ports/science/gate/files/patch-addmenu.diff)
===================================================================
--- trunk/dports/science/gate/files/patch-addmenu.diff	                        (rev 0)
+++ trunk/dports/science/gate/files/patch-addmenu.diff	2014-05-13 01:22:47 UTC (rev 120009)
@@ -0,0 +1,10 @@
+--- Gate.cc.orig
++++ Gate.cc
+@@ -382,6 +382,7 @@ int main( int argc, char* argv[] )
+ 
+     if (ui) // Launching interactive mode // Qt
+       {
++        UImanager->ApplyCommand("/gate/control/execute gui.mac");
+         ui->SessionStart();
+         delete ui;
+       }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140512/ba543443/attachment-0001.html>


More information about the macports-changes mailing list