summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sci-physics/vgm/files/vgm-5.2-r1-root-6.32-TesselatedSolid.patch31
-rw-r--r--sci-physics/vgm/vgm-5.2-r1.ebuild4
2 files changed, 35 insertions, 0 deletions
diff --git a/sci-physics/vgm/files/vgm-5.2-r1-root-6.32-TesselatedSolid.patch b/sci-physics/vgm/files/vgm-5.2-r1-root-6.32-TesselatedSolid.patch
new file mode 100644
index 000000000000..2c1bfc92a349
--- /dev/null
+++ b/sci-physics/vgm/files/vgm-5.2-r1-root-6.32-TesselatedSolid.patch
@@ -0,0 +1,31 @@
+adapt RootGM::TessellatedSolid for ROOT 6.32.00
+
+Bug: https://github.com/vmc-project/vgm/pull/16
+---
+ packages/RootGM/source/solids/TessellatedSolid.cxx | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+--- a/packages/RootGM/source/solids/TessellatedSolid.cxx
++++ b/packages/RootGM/source/solids/TessellatedSolid.cxx
+@@ -178,13 +178,16 @@ VGM::ThreeVector RootGM::TessellatedSolid::Vertex(int ifacet, int index) const
+ {
+ CheckVertexIndex(ifacet, index);
+
+- const TGeoFacet& facet = fTessellated->GetFacet(ifacet);
++#if ROOT_VERSION_CODE > ROOT_VERSION(6, 30, 4)
++ const auto& rvertex = fTessellated->GetVertex((fTessellated->GetFacet(ifacet))[index]);
++#else
++ const auto& rvertex = fTessellated->GetFacet(ifacet).GetVertex(index);
++#endif
+
+ VGM::ThreeVector vertex;
+- vertex.push_back(facet.GetVertex(index).fVec[0] * RootGM::Units::Length());
+- vertex.push_back(facet.GetVertex(index).fVec[1] * RootGM::Units::Length());
+- vertex.push_back(facet.GetVertex(index).fVec[2] * RootGM::Units::Length());
++ vertex.push_back(rvertex.fVec[0] * RootGM::Units::Length());
++ vertex.push_back(rvertex.fVec[1] * RootGM::Units::Length());
++ vertex.push_back(rvertex.fVec[2] * RootGM::Units::Length());
+
+ return vertex;
+ }
+-
diff --git a/sci-physics/vgm/vgm-5.2-r1.ebuild b/sci-physics/vgm/vgm-5.2-r1.ebuild
index 6e5f9a755e9c..ff3c18921bb1 100644
--- a/sci-physics/vgm/vgm-5.2-r1.ebuild
+++ b/sci-physics/vgm/vgm-5.2-r1.ebuild
@@ -45,6 +45,10 @@ DOCS=(
doc/VGMhistory.txt
)
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.2-r1-root-6.32-TesselatedSolid.patch
+)
+
src_configure() {
local mycmakeargs=(
-DCLHEP_DIR="${EPREFIX}/usr"