summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Freyermuth <o.freyermuth@googlemail.com>2024-11-29 00:51:49 +0100
committerGuilherme Amadio <amadio@gentoo.org>2024-12-02 15:52:11 +0100
commitf4c51faec44b6dd21c329666b3e1bc46b64d8629 (patch)
tree6ce90241517abe1a4150b13e270ec0e97fb1e643 /sci-physics
parentx11-misc/xsnow: Stabilize 3.7.5 sparc, #945691 (diff)
downloadgentoo-f4c51faec44b6dd21c329666b3e1bc46b64d8629.tar.gz
gentoo-f4c51faec44b6dd21c329666b3e1bc46b64d8629.tar.bz2
gentoo-f4c51faec44b6dd21c329666b3e1bc46b64d8629.zip
sci-physics/geant4_vmc: fix build failure with -g4root
Closes: https://bugs.gentoo.org/943657 Closes: https://github.com/gentoo/gentoo/pull/39513 Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com> Signed-off-by: Guilherme Amadio <amadio@gentoo.org>
Diffstat (limited to 'sci-physics')
-rw-r--r--sci-physics/geant4_vmc/files/geant4_vmc-6.6_p1-no-g4root.patch44
-rw-r--r--sci-physics/geant4_vmc/geant4_vmc-6.6_p1.ebuild1
2 files changed, 45 insertions, 0 deletions
diff --git a/sci-physics/geant4_vmc/files/geant4_vmc-6.6_p1-no-g4root.patch b/sci-physics/geant4_vmc/files/geant4_vmc-6.6_p1-no-g4root.patch
new file mode 100644
index 000000000000..ec645d18b4c8
--- /dev/null
+++ b/sci-physics/geant4_vmc/files/geant4_vmc-6.6_p1-no-g4root.patch
@@ -0,0 +1,44 @@
+From 528092d80bc6835efaf9a7b75e4da74f27ac4850 Mon Sep 17 00:00:00 2001
+From: Ivana Hrivnacova <Ivana.Hrivnacova@cern.ch>
+Date: Thu, 28 Nov 2024 12:30:48 +0100
+Subject: [PATCH] Fix compilation with -DGeant4VMC_USE_G4Root=OFF: (#69)
+
+Added compilation flag for unprotected use of G4Root in TG4GeometryManager
+
+Bug: https://bugs.gentoo.org/943657
+Bug: https://github.com/vmc-project/geant4_vmc/issues/68
+---
+ source/geometry/src/TG4GeometryManager.cxx | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/source/geometry/src/TG4GeometryManager.cxx b/source/geometry/src/TG4GeometryManager.cxx
+index 02751e8458..d8d9db65ec 100644
+--- a/source/geometry/src/TG4GeometryManager.cxx
++++ b/source/geometry/src/TG4GeometryManager.cxx
+@@ -29,12 +29,15 @@
+ #include "TG4ModelConfigurationManager.h"
+ #include "TG4OpGeometryManager.h"
+ #include "TG4RadiatorDescription.h"
+-#include "TG4RootDetectorConstruction.h"
+ #include "TG4SDManager.h"
+ #include "TG4StateManager.h"
+ #include "TG4VUserPostDetConstruction.h"
+ #include "TG4VUserRegionConstruction.h"
+
++#ifdef USE_G4ROOT
++#include "TG4RootDetectorConstruction.h"
++#endif
++
+ #include <G4FieldManager.hh>
+ #include <G4LogicalVolumeStore.hh>
+ #include <G4Material.hh>
+@@ -521,7 +524,9 @@ void TG4GeometryManager::FillMediumMapFromRoot()
+ geoVolume = gGeoManager->GetVolume(volName.data());
+ }
+ else {
++#ifdef USE_G4ROOT
+ geoVolume = fRootDetectorConstruction->GetVolume(lv);
++#endif
+ }
+
+ if (!geoVolume) {
diff --git a/sci-physics/geant4_vmc/geant4_vmc-6.6_p1.ebuild b/sci-physics/geant4_vmc/geant4_vmc-6.6_p1.ebuild
index a55c3bef5369..f30c81deccd9 100644
--- a/sci-physics/geant4_vmc/geant4_vmc-6.6_p1.ebuild
+++ b/sci-physics/geant4_vmc/geant4_vmc-6.6_p1.ebuild
@@ -42,6 +42,7 @@ DOCS=(history README.md)
PATCHES=(
"${FILESDIR}"/${PN}-6.6-fix-preinstall-tests.patch
+ "${FILESDIR}"/${PN}-6.6_p1-no-g4root.patch
)
src_configure() {