@@ -20,6 +20,7 @@ class Geant4(CMakePackage):
2020 executables = ["^geant4-config$" ]
2121
2222 maintainers ("drbenmorgan" , "sethrj" )
23+
2324 version ("11.3.0" , sha256 = "d9d71daff8890a7b5e0e33ea9a65fe6308ad6713000b43ba6705af77078e7ead" )
2425 version ("11.2.2" , sha256 = "3a8d98c63fc52578f6ebf166d7dffaec36256a186d57f2520c39790367700c8d" )
2526 version ("11.2.1" , sha256 = "76c9093b01128ee2b45a6f4020a1bcb64d2a8141386dea4674b5ae28bcd23293" )
@@ -203,29 +204,30 @@ def std_when(values):
203204 depends_on (
"[email protected] :" ,
when = "@11.2:" )
204205 conflicts ("@:11.1 ^[virtuals=qmake] qt-base" , msg = "Qt6 not supported before 11.2" )
205206
207+ # CMAKE PROBLEMS #
206208 # As released, 10.0.4 has inconsistently capitalised filenames
207209 # in the cmake files; this patch also enables cxxstd 14
208210 patch ("geant4-10.0.4.patch" , when = "@10.0.4" )
209- # Fix member field typo in g4tools wroot
210- # See https://bugzilla-geant4.kek.jp/show_bug.cgi?id=2640
211- patch ("columns-11.patch" , when = "@11:11.2.2" )
212- patch ("columns-10.patch" , when = "@10.4:10" )
213- # As released, 10.03.03 has issues with respect to using external
214- # CLHEP.
215- patch ("CLHEP-10.03.03.patch" , level = 1 , when = "@10.3" )
216211 # Build failure on clang 15, ubuntu 22: see Geant4 problem report #2444
217212 # fixed by ascii-V10-07-03
218- patch ("geant4-10.6.patch" , level = 1 , when = "@10.0:10.6" )
219- # These patches can be applied independent of the cxxstd value?
220- patch ("cxx17.patch" , when = "@10.3 cxxstd=17" )
221- patch ("cxx17_geant4_10_0.patch" , level = 1 , when = "@10.4.0 cxxstd=17" )
222- patch ("geant4-10.4.3-cxx17-removed-features.patch" , level = 1 , when = "@10.4.3 cxxstd=17" )
223-
224- # See https://bugzilla-geant4.kek.jp/show_bug.cgi?id=2556
225- patch (
"package-cache.patch" ,
level = 1 ,
when = "@10.7.0:11.1.2^[email protected] :" )
226-
227- # Issue with Twisted tubes, see https://bugzilla-geant4.kek.jp/show_bug.cgi?id=2619
228- patch ("twisted-tubes.patch" , level = 1 , when = "@11.2.0:11.2.2" )
213+ patch ("geant4-10.6.patch" , when = "@10.0:10.6" )
214+ # Enable "17" cxxstd option in CMake (2 different filenames)
215+ patch ("geant4-10.3-cxx17-cmake.patch" , when = "@10.3 cxxstd=17" )
216+ patch ("geant4-10.4-cxx17-cmake.patch" , when = "@10.4:10.4.2 cxxstd=17" )
217+ # Fix exported cmake: https://bugzilla-geant4.kek.jp/show_bug.cgi?id=2556
218+ patch (
"package-cache.patch" ,
when = "@10.7.0:11.1.2^[email protected] :" )
219+
220+ # BUILD ERRORS #
221+ # Fix C++17: add -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES C++ flag
222+ patch ("geant4-10.4.3-cxx17-removed-features.patch" , when = "@10.4.3 cxxstd=17" )
223+ # Fix C++20: build error due to removed-in-C++20 `ostream::operator>>(char*)`
224+ # (different, simpler approach than upstream Geant4 changes)
225+ patch ("geant4-10.7-cxx20-g3tog4.patch" , when = "@:10.7 cxxstd=20" )
226+ # Fix member field typo in g4tools wroot: https://bugzilla-geant4.kek.jp/show_bug.cgi?id=2640
227+ patch ("columns-10.patch" , when = "@10.4:10" )
228+ patch ("columns-11.patch" , when = "@11:11.2.2" )
229+ # Fix navigation errors with twisted tubes: https://bugzilla-geant4.kek.jp/show_bug.cgi?id=2619
230+ patch ("twisted-tubes.patch" , when = "@11.2.0:11.2.2" )
229231
230232 # NVHPC: "thread-local declaration follows non-thread-local declaration"
231233 conflicts ("%nvhpc" , when = "+threads" )
0 commit comments