[107773] users/mojca

mojca at macports.org mojca at macports.org
Fri Jul 5 09:21:23 PDT 2013


Revision: 107773
          https://trac.macports.org/changeset/107773
Author:   mojca at macports.org
Date:     2013-07-05 09:21:23 -0700 (Fri, 05 Jul 2013)
Log Message:
-----------
gate: first attempt at installing examples

Modified Paths:
--------------
    users/mojca/notes/Gate.txt
    users/mojca/notes/Geant4.txt
    users/mojca/ports/science/gate/Portfile

Modified: users/mojca/notes/Gate.txt
===================================================================
--- users/mojca/notes/Gate.txt	2013-07-05 15:04:40 UTC (rev 107772)
+++ users/mojca/notes/Gate.txt	2013-07-05 16:21:23 UTC (rev 107773)
@@ -18,3 +18,17 @@
 - copy examples & benchmarks
 - figure out if there is some CMAKE variable to copy the examples automatically
 - 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
+- in case of errors, Gate reports location where the file is built (that weird build path that doesn't exist any more)
+
+Something like tho following is needed for running Gate:
+	export LOCALE="en_GB.UTF-8"
+	export LC_ALL="en_GB.UTF-8"
+	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"
+	export G4NEUTRONXSDATA="/opt/local/share/Geant4/Data/G4NEUTRONXS1.2"
+	export G4PIIDATA="/opt/local/share/Geant4/Data/G4PII1.3"
+	export G4RADIOACTIVEDATA="/opt/local/share/Geant4/Data/RadioactiveDecay3.6"
+	export G4REALSURFACEDATA="/opt/local/share/Geant4/Data/RealSurface1.0"
+	export G4SAIDXSDATA="/opt/local/share/Geant4/Data/G4SAIDDATA1.1"
+	/opt/local/bin/Gate $@
\ No newline at end of file

Modified: users/mojca/notes/Geant4.txt
===================================================================
--- users/mojca/notes/Geant4.txt	2013-07-05 15:04:40 UTC (rev 107772)
+++ users/mojca/notes/Geant4.txt	2013-07-05 16:21:23 UTC (rev 107773)
@@ -31,7 +31,9 @@
 - Try to move /opt/local/lib/Geant4/Geant4.10.0/Geant4-10.0.0 to a better place
 	according to http://www.cmake.org/Wiki/CMake/Tutorials/Packaging it should be
 	/opt/local/lib/Geant4/Geant4.10.0/Geant4-10.0.0, so maybe one should not change path to
-	/opt/local/lib/Geant4/Geant4.10.0 after all 
+	/opt/local/lib/Geant4/Geant4.10.0 after all
+  Try if setting GEANT4_CMAKE_DIR (or rather: patching its definition in cmake/Modules/Geant4BuildProjectConfig.cmake helps)
+	set(GEANT4_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}-${${PROJECT_NAME}_VERSION}) -> NO
 - Try to move /opt/local/share/Geant4/Geant4-10.0.0/geant4make/config to a better place
 - Check if /opt/local/share/Geant4/Geant4-10.0.0/geant4make/geant4make.sh works
 - Fix scripts in /opt/local/libexec/Geant4/Geant4.10.0
@@ -63,7 +65,12 @@
 	-rwxr-xr-x  1 macports  admin   406B  8 feb 20:44 History
 	-rwxr-xr-x  1 macports  admin   547B  8 feb 20:43 README
 	./PhotonEvaporation2.2:
+- Test how setting CMAKE_INSTALL_IS_NONRELOCATABLE influences different components,
+  in particular GEANT4_RELATIVE_HEADER_PATH, GEANT4_INCLUDE_DIR_SETUP (cmake/Modules/Geant4BuildProjectConfig.cmake)
+- Test if examples still work if they are manually moved to libexec
 
+- Test if setting EXECUTABLE_OUTPUT_PATH helps move examples to a different place -> NO
+
 Options:
 - 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?)

Modified: users/mojca/ports/science/gate/Portfile
===================================================================
--- users/mojca/ports/science/gate/Portfile	2013-07-05 15:04:40 UTC (rev 107772)
+++ users/mojca/ports/science/gate/Portfile	2013-07-05 16:21:23 UTC (rev 107773)
@@ -36,6 +36,23 @@
 
 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 {
+    set destdocdir ${destroot}${prefix}/share/doc/${name}
+    xinstall -m 755 -d ${destdocdir}
+    file copy ${worksrcpath}/examples ${destdocdir}
+    # TODO: remove CMake files and add material database
+}
+
 depends_lib         port:geant4.9.6
 # clhep implied with geant4
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130705/99d52ffc/attachment.html>


More information about the macports-changes mailing list