[108392] users/mojca
mojca at macports.org
mojca at macports.org
Mon Jul 22 08:55:47 PDT 2013
Revision: 108392
https://trac.macports.org/changeset/108392
Author: mojca at macports.org
Date: 2013-07-22 08:55:47 -0700 (Mon, 22 Jul 2013)
Log Message:
-----------
gate: update
- version has been renamed to beta 7.0
- change path to GateMaterials.db in examples
- binary now accepts -psn_*, no need to catch it in the bash script
- no need for qt_menu.nib
- require_active_variants geant4-9.6 qt
Modified Paths:
--------------
users/mojca/notes/Gate.txt
users/mojca/notes/Geant4.txt
users/mojca/ports/science/gate/Portfile
users/mojca/ports/science/geant/Portfile
Modified: users/mojca/notes/Gate.txt
===================================================================
--- users/mojca/notes/Gate.txt 2013-07-22 15:08:48 UTC (rev 108391)
+++ users/mojca/notes/Gate.txt 2013-07-22 15:55:47 UTC (rev 108392)
@@ -14,32 +14,39 @@
- http://suhard.fr/gate/gate6.2.dmg
TODO:
-- to load the material database, it would be great if Gate would look into some predefined location
- in general/src/GateTools.cc there is
- G4String GateTools::FindGateFile(const G4String& fileName)
- which checks for the environmental variable GATEHOME and may potentially load the material database and other files from there
-- check if qt4-mac is enabled for Geant4, else prevent compilation (or make a Gate variant without qt4)
+- get variables from geant port
- Should examples go to share/doc/gate or to share/gate/doc?
-- replace "../../GateMaterials.db" with "GateMaterials.db" in examples
-- remove CMake files from examples (possibly add material database, but I guess it should not be needed)
+- remove CMake files from examples
+- I end up with /opt/local/share/gate/._gui.mac: why?
+- png icon: less transparency if possible
- load gui.mac
-- png icon: less transparency if possible
Upstream feature requests:
+- repository at GitHub
- CMAKE variable to copy the examples automatically
- try to prevent crashing by catching errors
- geant: figure out how file/open & friends menu works (http://geant4.in2p3.fr/spip.php?article84&lang=en)
- prepare a nice default startup gui
+- enable hardcoded GATEHOME
+ in general/src/GateTools.cc there is
+ G4String GateTools::FindGateFile(const G4String& fileName)
+ which checks for the environmental variable GATEHOME and may potentially load the material database and other files from there
+- png icon
+Compile warnings:
+- a handful of unused variables
+- redefinition of endianess
+
DONE:
- copy license/LICENSE.txt -> OK
- copy examples & benchmarks -> OK
- maybe put the Gate binary to libexec and create a shell script in ${prefix}/bin/Gate which sets all the necessary variables (data files) and calls the real binary afterwards -> OK
- try to copy the material database somewhere and set GATEHOME -> OK
- in case of errors, Gate reports location where the file is built (that weird build path that doesn't exist any more) -> OK
+- replace "../../GateMaterials.db" with "GateMaterials.db" in examples
+- check if qt4-mac is enabled for Geant4, else prevent compilation (or make a Gate variant without qt4)
Something like tho following is needed for running Gate:
- export LC_NUMERIC=C
export G4LEDATA="/opt/local/share/Geant4/Data/G4EMLOW6.32"
export G4LEVELGAMMADATA="/opt/local/share/Geant4/Data/PhotonEvaporation2.3"
export G4NEUTRONHPDATA="/opt/local/share/Geant4/Data/G4NDL4.2"
Modified: users/mojca/notes/Geant4.txt
===================================================================
--- users/mojca/notes/Geant4.txt 2013-07-22 15:08:48 UTC (rev 108391)
+++ users/mojca/notes/Geant4.txt 2013-07-22 15:55:47 UTC (rev 108392)
@@ -1,4 +1,5 @@
TODO:
+- figure out if adding "distname" changes anything (so that all files go to the same folder - maybe they already do)
- specify expat more precisely
- resolve dependencies for X11
/System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
@@ -215,5 +216,16 @@
- athena/xaw is now deprecated, so I didn't include it
Bugs:
-- http://bugzilla-geant4.kek.jp/show_bug.cgi?id=1485 "aida-config --implementation" doesn't work
-- http://bugzilla-geant4.kek.jp/show_bug.cgi?id=1487 LC_NUMERIC confuses strtod when Qt is being used
+- http://bugzilla-geant4.kek.jp/show_bug.cgi?id=1485 "aida-config --implementation" doesn't work (no longer a problem)
+- http://bugzilla-geant4.kek.jp/show_bug.cgi?id=1486 file permissions in G4NEUTRONS1.1 (no longer a problem)
+- http://bugzilla-geant4.kek.jp/show_bug.cgi?id=1487 LC_NUMERIC confuses strtod when Qt is being used (patched in Portfile)
+- http://bugzilla-geant4.kek.jp/show_bug.cgi?id=1494 Antialiasing in Qt/OpenGL makes objects invisible
+- http://bugzilla-geant4.kek.jp/show_bug.cgi?id=1495 Issues and requests for Qt's "Save as ..."
+- http://bugzilla-geant4.kek.jp/show_bug.cgi?id=1497 Qt interface: allow pasting multiple lines
+
+Other feature requests:
+- ability to change program icon (question)
+- open/save files (question)
+- open files with a double-click
+- support for mac applications
+- avoid the need to hardcode data paths
Modified: users/mojca/ports/science/gate/Portfile
===================================================================
--- users/mojca/ports/science/gate/Portfile 2013-07-22 15:08:48 UTC (rev 108391)
+++ users/mojca/ports/science/gate/Portfile 2013-07-22 15:55:47 UTC (rev 108392)
@@ -7,19 +7,15 @@
# TODO: temporary - if checksums are desired
PortGroup github 1.0
-github.setup mojca gate 635b457f48
+github.setup mojca gate 6327ec9eb9
## official repository
# fetch.type git
# git.url http://git.opengatecollaboration.org/git/opengate-public.git
-# git.branch 635b457f48879af5aec42b88d9058a459352e49b
+# git.branch 6327ec9eb9c523e2b3183ccedb4932156072aeb7
-## previous release (would need quite some patches to start working)
-# distfiles gate_v6_2_tar_gz_15843.gz
-# master_sites http://www.opengatecollaboration.org/sites/opengatecollaboration.org/files/gate_release/2012/08/
-
name gate
-version 6.2
+version 7.0-beta
categories science
maintainers mojca
license LGPL
@@ -30,8 +26,8 @@
homepage http://www.opengatecollaboration.org
platforms darwin
-checksums rmd160 c83b9d5e16d8527089fa6513732f0281a30d6f11 \
- sha256 d0b34aa7db1eee7ebb3df2b15d887e63c2a0460d9908f2969e5b1915e5867a4b
+checksums rmd160 549d40b0900dd62d67046cad9c805210977a62d7 \
+ sha256 7053d86eaa550217cc8df683fc42d63e7ea35dd91258c3c923abcb998c194327
set geant.data_versions_9.6 {
G4NDL 4.2 G4NDL G4NEUTRONHPDATA
@@ -74,11 +70,15 @@
post-patch {
# patch examples if needed
if {[variant_isset examples]} {
- # TODO: this must be done in a better way
- # replace "/vis/open OGLIX" with "/vis/open OGLIQt" (not sure about the difference between OGLIQt and OGLSQt; maybe even just OGL)
- foreach examplefile {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} {
- reinplace "s|OGLIX|OGLIQt|g" ${worksrcpath}/examples/${examplefile}
- reinplace "s|OGLSX|OGLIQt|g" ${worksrcpath}/examples/${examplefile}
+ 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}
}
}
}
@@ -102,7 +102,7 @@
}
post-destroot {
- # TODO: the share folder is already set in another phase and should not repeat
+ # 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
@@ -111,43 +111,38 @@
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}"
+ 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 export ${data.envvariable}=\\\"\\\$G4DATADIR/${data.name}${data.version}\\\" >> ${destexecutable}"
}
- system "echo export LC_NUMERIC=C >> ${destexecutable}"
- system "echo 'if \[\[ \$1 == -psn_* ]]; then' >> ${destexecutable}"
- system "echo ${libexecdir}/Gate --qt >> ${destexecutable}"
- system "echo else >> ${destexecutable}"
system "echo ${libexecdir}/Gate \\\$@ >> ${destexecutable}"
- system "echo fi >> ${destexecutable}"
system "chmod 755 ${destexecutable}"
-
- # TODO:
- # - check if qt_menu.nib is actually needed (it is needed for static qt library)
- # - check that qt_menu.nib actually exists
- # - the second folder should probably come from PortGroup?
- copy $prefix/lib/Resources/qt_menu.nib ${destroot}${applications_dir}/${app.name}.app/Contents
}
variant examples description {Install examples to doc} {
}
variant geant495 conflicts geant496 description {Use Geant4 9.5} {
- depends_lib-append port:geant4-9.5
# TODO: this can probably be done in a more elegant way
+ # how to copy this from geant4 suports?
set geant.data_versions ${geant.data_versions_9.5}
- set geant.datadir ${prefix}/share/Geant4/Data/Geant4.9.5
- # TODO: how to copy this from geant4 suports?
- configure.args-append -DGeant4_DIR=${prefix}/lib/Geant4/Geant4.9.6/Geant4-9.5.2
+ set geant.datadir ${prefix}/share/Geant4/Data/Geant4.9.5
+ set geant.cmakedir ${prefix}/lib/Geant4/Geant4.9.6/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 description {Use Geant4 9.6} {
- depends_lib-append port:geant4-9.6
# TODO: this can probably be done in a more elegant way
+ # how to copy this from geant4 suports?
set geant.data_versions ${geant.data_versions_9.6}
- set geant.datadir ${prefix}/share/Geant4/Data/Geant4.9.6
- # TODO: how to copy this from geant4 suports?
- configure.args-append -DGeant4_DIR=${prefix}/lib/Geant4/Geant4.9.6/Geant4-9.6.2
+ set geant.datadir ${prefix}/share/Geant4/Data/Geant4.9.6
+ set geant.cmakedir ${prefix}/lib/Geant4/Geant4.9.6/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}
}
if {![variant_isset geant495] && ![variant_isset geant496]} {
default_variants +geant496
Modified: users/mojca/ports/science/geant/Portfile
===================================================================
--- users/mojca/ports/science/geant/Portfile 2013-07-22 15:08:48 UTC (rev 108391)
+++ users/mojca/ports/science/geant/Portfile 2013-07-22 15:55:47 UTC (rev 108392)
@@ -270,124 +270,6 @@
}
}
-# subport geant4-gate {
-# PortGroup github 1.0
-#
-# # TODO: just temporary
-# github.setup mojca opengate f14c352c92
-#
-# name gate
-# version 6.2
-# revision 0
-# # 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
-#
-# # distfiles gate_v6_2_tar_gz_15843.gz
-# # master_sites http://www.opengatecollaboration.org/sites/opengatecollaboration.org/files/gate_release/2012/08/
-#
-# checksums rmd160 b21ab59aa0d7dec9771a9e5a213ee8d739c5666e \
-# sha256 843424c70c27e4f26cf64b99ddc73b614a0be2abed25a7a48af739eaa5f881f3
-#
-# worksrcdir gate_v${version}
-# configure.dir ${workpath}/build
-# build.dir ${configure.dir}
-#
-# post-extract {
-# file mkdir ${configure.dir}
-# }
-#
-# configure.post_args ${worksrcpath}
-#
-# # copy examples
-# # TODO: this must be done in a better way
-# post-patch {
-# # replace "/vis/open OGLIX" with "/vis/open OGLIQt" (not sure about the difference between OGLIQt and OGLSQt)
-# foreach examplefile {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} {
-# reinplace "s|OGLIX|OGLIQt|g" ${worksrcpath}/examples/${examplefile}
-# reinplace "s|OGLSX|OGLIQt|g" ${worksrcpath}/examples/${examplefile}
-# system "echo ${examplefile}"
-# }
-# }
-# pre-destroot {
-# # copy examples
-# # Should examples go to share/doc/gate or to share/gate/doc?
-# set destdocdir ${destroot}${prefix}/share/doc/${name}
-# xinstall -m 755 -d ${destdocdir}
-# copy ${worksrcpath}/examples ${destdocdir}
-# # TODO: remove CMake files and add material database
-# # add materials database
-# set sharedir ${prefix}/share/${name}
-# set destsharedir ${destroot}${sharedir}
-# copy ${worksrcpath}/GateMaterials.db ${destsharedir}
-# copy ${worksrcpath}/GateMaterialsGPU.db ${destsharedir}
-# }
-# post-destroot {
-# # TODO: use some more elegant way
-# # if [variant_isset geant496] {
-# # set geant.data_versions ${geant.data_versions_9.6}
-# # }
-# # if [variant_isset geant495] {
-# # set geant.data_versions ${geant.data_versions_9.5}
-# # }
-#
-# # 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}
-# xinstall -m 755 ${destexecutable}
-# system "echo \\\$GATEHOME=${sharedir} >> ${destexecutable}"
-# system "echo export G4DATADIR=${geant.datadir} > ${destexecutable}"
-# foreach {data.name data.version data.filename data.envvariable data.md5 data.rmd160 data.sha256} ${geant.data_versions} {
-# system "echo export ${data.envvariable}=\\\$G4DATADIR/${data.name}${data.version} >> ${destexecutable}"
-# }
-# system "echo ${libexecdir}/Gate \\\$@ >> ${destexecutable}"
-# }
-#
-# # depends_lib port:geant4.9.6
-# # clhep implied with geant4
-#
-# # depends_lib port:clhep \
-# # port:zlib
-#
-# variant geant495 conflicts geant496 description {Use Geant4 9.5} {
-# depends_lib port:geant4-9.5
-# # TODO: this can probably be done in a more elegant way
-# set geant.data_versions ${geant.data_versions_9.5}
-# # TODO: how to copy this from geant4 suports?
-# # set geant.datadir ${prefix}/share/Geant4/Data/Geant4.9.5
-# configure.args-append -DGeant4_DIR=${prefix}/share/Geant4/Data/Geant4.9.5
-# }
-# variant geant496 conflicts geant495 description {Use Geant4 9.6} {
-# depends_lib port:geant4-9.5
-# # TODO: this can probably be done in a more elegant way
-# set geant.data_versions ${geant.data_versions_9.6}
-# # TODO: how to copy this from geant4 suports?
-# # set geant.datadir ${prefix}/share/Geant4/Data/Geant4.9.6
-# configure.args-append -DGeant4_DIR=${prefix}/share/Geant4/Data/Geant4.9.6
-# }
-# if {![variant_isset geant495] && ![variant_isset geant496]} {
-# default_variants +geant496
-# }
-#
-# configure.args-append -DGATE_USE_SYSTEM_CLHEP=ON
-# # configure.args-append -DGEANT4_INSTALL_DATA=ON \
-# # -DGEANT4_BUILD_EXAMPLES=ON \
-# # -DGEANT4_INSTALL_EXAMPLES=ON \
-# # -DWITH_GEANT4_UIVIS=ON \
-# # -DGEANT4_USE_OPENGL_X11=ON
-#
-# # TODO: this should come from Geant4 PortGroup
-# # configure.args-append -DGeant4_DIR=${geant.datadir}
-# }
-
-
# stub port
if {$subport == $name || $subport == ""} {
fetch {}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130722/306b0232/attachment-0001.html>
More information about the macports-changes
mailing list