TODO: - decide on a precise name (geant/geant4 and geant4.9.6/geant4-9.6) - What licence is needed to make sure that Geant can be installed as a binary package? - print out a notice about setting up the environmental variables (this port uses a nonstandard way to set them up) - specify expat more precisely - resolve dependencies for X11 (proper checks) /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0) should these come from macports? Try mesa: /usr/X11/lib/libGL.1.dylib (compatibility version 1.2.0, current version 1.2.0) /usr/X11/lib/libGLU.1.dylib (compatibility version 1.3.0, current version 1.3.0) xorg-libsm /opt/local/lib/libSM.6.dylib (compatibility version 7.0.0, current version 7.1.0) xorg-libice /opt/local/lib/libICE.6.dylib (compatibility version 10.0.0, current version 10.0.0) xorg-libX11 /opt/local/lib/libX11.6.dylib (compatibility version 10.0.0, current version 10.0.0) xorg-libXext /opt/local/lib/libXext.6.dylib (compatibility version 11.0.0, current version 11.0.0) xorg-libXmu /opt/local/lib/libXmu.6.dylib (compatibility version 9.0.0, current version 9.0.0) qt4-mac /opt/local/lib/libQtOpenGL.4.dylib (compatibility version 4.8.0, current version 4.8.2) /opt/local/lib/libQtGui.4.dylib (compatibility version 4.8.0, current version 4.8.2) /opt/local/lib/libQtCore.4.dylib (compatibility version 4.8.0, current version 4.8.2) OPENGL_INCLUDE_DIR /System/Library/Frameworks/OpenGL.framework OPENGL_X11_INCLUDE_DIR /usr/X11R6/include OPENGL_X11_gl_LIBRARY /usr/X11R6/lib/libGL.dylib OPENGL_X11_glu_LIBRARY /usr/X11R6/lib/libGLU.dylib OPENGL_gl_LIBRARY /System/Library/Frameworks/OpenGL.framework OPENGL_glu_LIBRARY /System/Library/Frameworks/AGL.framework X11_ICE_INCLUDE_PATH /opt/local/include X11_ICE_LIB /opt/local/lib/libICE.dylib X11_SM_INCLUDE_PATH /opt/local/include X11_SM_LIB /opt/local/lib/libSM.dylib X11_X11_INCLUDE_PATH /opt/local/include X11_X11_LIB /opt/local/lib/libX11.dylib X11_XRes_INCLUDE_PATH /usr/include X11_XRes_LIB /usr/X11R6/lib/libXRes.dylib X11_XShm_INCLUDE_PATH /opt/local/include X11_XSync_INCLUDE_PATH /opt/local/include X11_XTest_INCLUDE_PATH /usr/include X11_XTest_LIB /usr/X11R6/lib/libXtst.dylib X11_Xaccessrules_INCLUDE_PATH /opt/local/include X11_Xaccessstr_INCLUDE_PATH /opt/local/include X11_Xau_INCLUDE_PATH /opt/local/include X11_Xau_LIB /opt/local/lib/libXau.dylib X11_Xcomposite_INCLUDE_PATH /opt/local/include X11_Xcomposite_LIB /opt/local/lib/libXcomposite.dylib X11_Xcursor_INCLUDE_PATH /opt/local/include X11_Xcursor_LIB /opt/local/lib/libXcursor.dylib X11_Xdamage_INCLUDE_PATH /opt/local/include X11_Xdamage_LIB /opt/local/lib/libXdamage.dylib X11_Xdmcp_INCLUDE_PATH /opt/local/include X11_Xdmcp_LIB /opt/local/lib/libXdmcp.dylib X11_Xext_LIB /opt/local/lib/libXext.dylib X11_Xfixes_INCLUDE_PATH /opt/local/include X11_Xfixes_LIB /opt/local/lib/libXfixes.dylib X11_Xft_INCLUDE_PATH /opt/local/include X11_Xft_LIB /opt/local/lib/libXft.dylib X11_Xi_INCLUDE_PATH /opt/local/include X11_Xi_LIB /opt/local/lib/libXi.dylib X11_Xinerama_INCLUDE_PATH /opt/local/include X11_Xinerama_LIB /opt/local/lib/libXinerama.dylib X11_Xinput_INCLUDE_PATH /opt/local/include X11_Xinput_LIB /opt/local/lib/libXi.dylib X11_Xkb_INCLUDE_PATH /opt/local/include X11_Xkbfile_INCLUDE_PATH /opt/local/include X11_Xkbfile_LIB /opt/local/lib/libxkbfile.dylib X11_Xkblib_INCLUDE_PATH /opt/local/include X11_Xlib_INCLUDE_PATH /opt/local/include X11_Xmu_INCLUDE_PATH /opt/local/include X11_Xmu_LIB /opt/local/lib/libXmu.dylib X11_Xmu_LIBRARY /opt/local/lib/libXmu.dylib - why duplicate? X11_Xpm_INCLUDE_PATH /opt/local/include X11_Xpm_LIB /opt/local/lib/libXpm.dylib X11_Xrandr_INCLUDE_PATH /opt/local/include X11_Xrandr_LIB /opt/local/lib/libXrandr.dylib X11_Xrender_INCLUDE_PATH /opt/local/include X11_Xrender_LIB /opt/local/lib/libXrender.dylib X11_Xscreensaver_INCLUDE_PATH /opt/local/include X11_Xscreensaver_LIB /opt/local/lib/libXss.dylib X11_Xshape_INCLUDE_PATH /opt/local/include X11_Xt_INCLUDE_PATH /opt/local/include X11_Xt_LIB /opt/local/lib/libXt.dylib X11_Xutil_INCLUDE_PATH /opt/local/include X11_Xv_INCLUDE_PATH /usr/include X11_Xv_LIB /usr/X11R6/lib/libXv.dylib X11_Xxf86misc_LIB /usr/X11R6/lib/libXxf86misc.dylib X11_Xxf86vm_LIB /opt/local/lib/libXxf86vm.dylib X11_dpms_INCLUDE_PATH /opt/local/include X11_xf86misc_INCLUDE_PATH /usr/include X11_xf86vmode_INCLUDE_PATH /opt/local/include /usr/X11R6/lib/libGL.dylib mesa /usr/X11R6/lib/libGLU.dylib mesa /usr/X11R6/lib/libXRes.dylib xorg-libXres /usr/X11R6/lib/libXtst.dylib xorg-libXtst /usr/X11R6/lib/libXv.dylib xorg-libXv /usr/X11R6/lib/libXxf86misc.dylib xorg-libXxf86misc /opt/local/lib/libICE.dylib is provided by: xorg-libice /opt/local/lib/libSM.dylib is provided by: xorg-libsm /opt/local/lib/libX11.dylib is provided by: xorg-libX11 /opt/local/lib/libXau.dylib is provided by: xorg-libXau /opt/local/lib/libXcomposite.dylib is provided by: xorg-libXcomposite /opt/local/lib/libXcursor.dylib is provided by: xorg-libXcursor /opt/local/lib/libXdamage.dylib is provided by: xorg-libXdamage /opt/local/lib/libXdmcp.dylib is provided by: xorg-libXdmcp /opt/local/lib/libXext.dylib is provided by: xorg-libXext /opt/local/lib/libXfixes.dylib is provided by: xorg-libXfixes /opt/local/lib/libXft.dylib is provided by: Xft2 /opt/local/lib/libXi.dylib is provided by: xorg-libXi /opt/local/lib/libXinerama.dylib is provided by: xorg-libXinerama /opt/local/lib/libXi.dylib is provided by: xorg-libXi /opt/local/lib/libxkbfile.dylib is provided by: xorg-libxkbfile /opt/local/lib/libXmu.dylib is provided by: xorg-libXmu /opt/local/lib/libXmu.dylib is provided by: xorg-libXmu /opt/local/lib/libXpm.dylib is provided by: xpm /opt/local/lib/libXrandr.dylib is provided by: xorg-libXrandr /opt/local/lib/libXrender.dylib is provided by: xrender /opt/local/lib/libXss.dylib is provided by: xorg-libXScrnSaver /opt/local/lib/libXt.dylib is provided by: xorg-libXt /opt/local/lib/libXxf86vm.dylib is provided by: xorg-libXxf86vm - Check if /opt/local/share/Geant4/Geant4-10.0.0/geant4make/geant4make.sh works Lower priority: - implement livecheck - Try to move /opt/local/share/Geant4/Geant4-10.0.0/geant4make/config to a better place - Try to get rid of one level in /opt/local/include/Geant4/Geant4.10.0/Geant4 (low priority, maybe not be needed at all) - Fix scripts in /opt/local/libexec/Geant4/Geant4.10.0 (symlinking to them doesn't work, but on the other hand they are probably not needed) - Carefully check different CMake configuration options - Do default arguments need to be turned off explicitly? configure.args-append/delete -DGEANT4_USE_OPENGL_X11=OFF - figure out if it is possible to hardcode paths into Geant4 sources to some extent example: G4PenelopeOscillatorManage.cc uses char* path = getenv("G4LEDATA"); - Test how setting CMAKE_INSTALL_IS_NONRELOCATABLE influences different components, in particular GEANT4_RELATIVE_HEADER_PATH, GEANT4_INCLUDE_DIR_SETUP (cmake/Modules/Geant4BuildProjectConfig.cmake) - Try to patch the sources to move examples to libexec without manually moving them in post-destroot -- Libraries -L/opt/local/lib/root -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lpthread -lm -ldl were added to the linkage list CMake Warning at examples/advanced/ChargeExchangeMC/CMakeLists.txt:131 (message): Could not find ROOT Qt library, skip GUI histograming support -- G4 Examples: AIDA package not found. --> CompositeCalorimeter example disabled -- G4 Examples: AIDA found. --> gammaray_telescope example with AIDA enabled. -- G4 Examples: gdml not found. --> human_phantom example with gdml disabled. -- G4 Examples: HBOOK package not found. --> g4tools/hbook analysis disabled -- G4 Examples: HBOOK package not found. --> g4tools/hbook analysis disabled -- G4 Examples: HepMC package not found. --> HepMCEx01 example disabled -- G4 Examples: HepMC package not found. --> HepMCEx02 example disabled -- G4 Examples: HepMC package not found. --> MCTruth example disabled -- G4 Examples: Pythia6 package not found. --> decayer6 example disabled -- G4 Examples: GCCXML not found. --> P01 example disabled -- G4 Examples: GCCXML not found. --> P02 example disabled AIDA: Geant4 compiles just fine without iAIDA I don't see any option to switch aida support on or off, so I'm not exactly sure how to handle the dependency in a proper way other than making it a requirement geant4.9.4 port provided the default +aida option 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?) - 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 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 Additional packages that might be useful: - gccxml-devel -- G4 Examples: GCCXML not found. --> P01 example disabled -- G4 Examples: GCCXML not found. --> P02 example disabled - pythia (but it's version 8!) -- G4 Examples: Pythia6 package not found. --> decayer6 example disabled - gdml (no such port) http://gdml.web.cern.ch/GDML/ -- G4 Examples: GDML not installed --> ChargeExchangeMC example disabled -- G4 Examples: GDML not installed --> gdml examples disabled -- G4 Examples: gdml not found. --> human_phantom example with gdml disabled. - hbook (no such port) -- G4 Examples: HBOOK package not found. --> g4tools/hbook analysis disabled -- G4 Examples: HBOOK package not found. --> g4tools/hbook analysis disabled - hepmc (no such port); https://savannah.cern.ch/projects/hepmc/ -- G4 Examples: HepMC package not found. --> HepMCEx01 example disabled -- G4 Examples: HepMC package not found. --> HepMCEx02 example disabled -- G4 Examples: HepMC package not found. --> MCTruth example disabled - this is wrong: -- G4 Examples: AIDA package not found. --> CompositeCalorimeter example disabled - probably not needed: -- G4 Examples: G3TOG4 not installed --> g3tog4 examples disabled ---> Scanning binaries for linking errors: 98.8% Could not open /opt/local/lib/libExP01ClassesDict.so: Error opening or reading file (referenced from /opt/local/libexec/Geant4/Geant4.9.6/examples/exampleP01) ---> Scanning binaries for linking errors: 98.8% Could not open /opt/local/lib/libExP02ClassesDict.so: Error opening or reading file (referenced from /opt/local/libexec/Geant4/Geant4.9.6/examples/exampleP02) DONE: - For 9.5 the following variables need to be set: export G4DATA=/opt/local/share/Geant4/Data export G4NEUTRONHPDATA=$G4DATA/G4NDL4.0 export G4LEDATA=$G4DATA/G4EMLOW6.23 export G4LEVELGAMMADATA=$G4DATA/PhotonEvaporation2.2 export G4RADIOACTIVEDATA=$G4DATA/RadioactiveDecay3.4 export G4NEUTRONXSDATA=$G4DATA/G4NEUTRONXS1.2 export G4ABLA=$G4DATA/G4ABLA3.0 export G4PIIDATA=$G4DATA/G4PII1.3 export G4REALSURFACEDATA=$G4DATA/RealSurface1.0 and probably similar for 9.6 - The following files have "wrong" permissions: ./G4NEUTRONXS1.1: -rwxr-xr-x 1 macports admin 256B 15 nov 2011 History -rwxr-xr-x 1 macports admin 428B 15 nov 2011 README ./G4NEUTRONXS1.2: -rwxr-xr-x 1 macports admin 331B 15 okt 2012 History ./G4NEUTRONXS1.3: -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: - proper expansion of variables (kind-of) - 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-10.0.0, so maybe one should not change path to /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) -> OK --- cmake/Modules/Geant4BuildProjectConfig.cmake +++ cmake/Modules/Geant4BuildProjectConfig.cmake -set(GEANT4_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}-${${PROJECT_NAME}_VERSION}) +set(GEANT4_CMAKE_DIR lib/${PROJECT_NAME}-${${PROJECT_NAME}_VERSION}) One thing than works is the following (but is an ugly hack): 0.) remove 1.) move /opt/local/lib/Geant4/Geant4.9.6/Geant4-9.6.2 to /opt/local/lib/Geant4-9.6.2 or rather all files but the symlink Darwin-clang which needs to stay for the sake of the old way of compiling programs 2.) in Geant4Config.cmake in that directory replace - get_filename_component(Geant4_INCLUDE_DIR "${_thisdir}/../../../../include/Geant4/Geant4.9.6/Geant4" ABSOLUTE) + get_filename_component(Geant4_INCLUDE_DIR "/opt/local/include/Geant4/Geant4.9.6/Geant4" ABSOLUTE) 3.) in Geant4LibraryDepends-release.cmake remove two lines (12&13) - GET_FILENAME_COMPONENT(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) - GET_FILENAME_COMPONENT(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) (apparently each line goes one level up) - Try to build examples and test whether they work -> seems OK - Test if examples still work if they are manually moved to libexec -> OK - Test if setting EXECUTABLE_OUTPUT_PATH helps move examples to a different place -> NO - What is /opt/local/lib/Geant4/Geant4.10.0/Geant4-10.0.0/Darwin-clang doing there? -> needed by GNUmake and needs to stay there - geant4-config could use absolute paths instead of -L/opt/local/libexec/Geant4/Geant4.9.6/../../../lib/Geant4/Geant4.9.6 -> it does when absolute paths are specified as options - install geant4-config via "port select" Release dates and package dependencies: a = G4NDL b = G4EMLOW c = PhotonEvaporation d = RadioactiveDecay e = f = G4NEUTRONXS g = G4PII h = RealSurface i = G4SAIDDATA a b c d e f g h i geant4 9.4 - b01 2010-06-25 3.13 6.13 2.0 3.2 3.0 1.0 --- 1.0 - 000 2010-12-17 3.14 6.19 2.1 3.3 3.0 1.0 1.2 1.0 - p01 2011-02-18 = = = = = = = = - p02 2011-06-24 = = = = = = = = - p03 2011-12-09 = = = = = = = = - p04 2012-04-13 3.14 6.19 2.1 3.3 3.0 1.0 1.2 1.0 geant4 9.5 - b01 2011-03-30 3.15 6.22 2.2 3.3 3.0 1.0 1.3 1.0 - 000 2011-12-02 4.0 6.23 2.2 3.4 3.0 1.1 1.3 1.0 - p01 2012-03-20 = = = = = = = = - p02 2012-10-22 4.0 6.23 2.2 3.4 3.0 1.1 1.3 1.0 geant4 9.6 - b01 2012-06-29 4.1 6.27 2.2 3.4 3.0 1.1 1.3 1.0 --- - 000 2012-11-30 4.2 6.32 2.3 3.6 --- 1.2 1.3 1.0 1.1 - p01 2013-02-01 = = = = --- = = = = - p02 2013-05-17 4.2 6.32 2.3 3.6 --- 1.2 1.3 1.0 1.1 geant4 10.0 - b01 2013-06-28 4.3 6.33 2.3 3.7 --- 1.3 1.3 1.0 1.1 444M G4NDL4.3 75M G4EMLOW6.33 33M PhotonEvaporation2.3 11M RadioactiveDecay3.7 5,8M G4NEUTRONXS1.3 24M G4PII1.3 21M RealSurface1.0 164K G4SAIDDATA1.1 Options: From installation notes: It is recommended that Windows and Mac users prefer the Geant4 Qt4 GUI. Note also that on Mac you can only pick Qt4 OR X11/Motif interfaces. This is due to incompatibilities between Apple's native OpenGL Framework and the OpenGL supplied with X11 on this platform. - opengl_x11 (or maybe just x11?) - motif (or maybe motif_x11?) - raytracer_x11 (or just raytracer?) - 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 (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=1500 Graceful error handling in Qt interface - http://bugzilla-geant4.kek.jp/show_bug.cgi?id=1501 XrayFluoAnalysisManager: use of undeclared identifier 'MeV'; did you mean 'CLHEP::MeV' (problem only on 10.0 with +examples) - http://bugzilla-geant4.kek.jp/show_bug.cgi?id=1502 P01 compiled with CMake loading nonexistent libExP01ClassesDict.so Fixed: - http://bugzilla-geant4.kek.jp/show_bug.cgi?id=1497 Qt interface: allow pasting multiple lines (patched in Portfile for 4.9.6, not officially released yet) 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