commit:     8863f3f1551a8190e34e8b14797d96a1527249ce
Author:     Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Sat Sep  7 15:23:32 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Sep  8 13:50:23 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8863f3f1

sci-libs/vtk: fix build with GCC 15

Closes: https://bugs.gentoo.org/937734
Closes: https://bugs.gentoo.org/937735
Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../vtk/files/vtk-9.3.0-ThirdParty-gcc15.patch     | 46 ++++++++++++++++++++++
 .../vtk/files/vtk-9.3.0-core-octree_node.txx.patch | 18 +++++++++
 sci-libs/vtk/vtk-9.3.0-r2.ebuild                   |  2 +
 3 files changed, 66 insertions(+)

diff --git a/sci-libs/vtk/files/vtk-9.3.0-ThirdParty-gcc15.patch 
b/sci-libs/vtk/files/vtk-9.3.0-ThirdParty-gcc15.patch
new file mode 100644
index 000000000000..df2d6fc61167
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.3.0-ThirdParty-gcc15.patch
@@ -0,0 +1,46 @@
+From d00b98bd8ef02f854f1068e8ab8fd2fb28244c3b Mon Sep 17 00:00:00 2001
+From: Ted Rodgers <[email protected]>
+Date: Sat, 10 Aug 2024 16:13:09 -0400
+Subject: [PATCH] include cstdint + correct case/words
+
+--- a/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/filter/contour/worklet/mir/MIRTables.h
++++ b/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/filter/contour/worklet/mir/MIRTables.h
+@@ -11402,7 +11402,7 @@ public:
+ 
+     VTKM_EXEC vtkm::UInt8 GetPoint(vtkm::Id pointIndex) const
+     {
+-      return this->CellFacePortal.Get(pointIndex);
++      return this->CellEdgesPortal.Get(pointIndex);
+     }
+ 
+   private:
+--- 
a/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/filter/scalar_topology/worklet/contourtree_distributed/HierarchicalContourTree.h
++++ 
b/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/filter/scalar_topology/worklet/contourtree_distributed/HierarchicalContourTree.h
+@@ -663,7 +663,7 @@ std::string 
HierarchicalContourTree<FieldType>::PrintDotSuperStructure(const cha
+   auto hyperarcsPortal = this->Hyperarcs.ReadPortal();
+   auto regularNodeGlobalIdsPortal = this->RegularNodeGlobalIds.ReadPortal();
+   auto whichIterationPortal = this->WhichIteration.ReadPortal();
+-  auto whichRoundPortal = this->whichRound.ReadPortal();
++  auto whichRoundPortal = this->WhichRound.ReadPortal();
+   auto superarcsPortal = this->Superarcs.ReadPortal();
+   auto superparentsPortal = this->Superparents.ReadPortal();
+   for (vtkm::Id supernode = 0; supernode < 
this->Supernodes.GetNumberOfValues(); supernode++)
+@@ -708,7 +708,7 @@ std::string 
HierarchicalContourTree<FieldType>::PrintDotSuperStructure(const cha
+     if (contourtree_augmented::NoSuchElement(superarcTo))
+     { // no superarc
+       // if it occurred on the final round, it's the global root and is shown 
as the NULL node
+-      if (whichRoundPortal.Get(superarcFrom) == this->NRounds)
++      if (whichRoundPortal.Get(superarcFrom) == this->NumRounds)
+       { // root node
+         outstream << "\tSN" << std::setw(1) << superarcFrom << " -> SA" << 
std::setw(1) << superarc
+                   << " [label=\"S" << std::setw(1) << superarc << 
"\",style=dotted]\n";
+--- 
a/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/thirdparty/diy/vtkmdiy/include/vtkmdiy/thirdparty/chobo/small_vector.hpp
++++ 
b/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/thirdparty/diy/vtkmdiy/include/vtkmdiy/thirdparty/chobo/small_vector.hpp
+@@ -136,6 +136,7 @@
+ //
+ #pragma once
+ 
++#include <cstdint>
+ #include <type_traits>
+ #include <cstddef>
+ #include <memory>

diff --git a/sci-libs/vtk/files/vtk-9.3.0-core-octree_node.txx.patch 
b/sci-libs/vtk/files/vtk-9.3.0-core-octree_node.txx.patch
new file mode 100644
index 000000000000..7c4d4544a490
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.3.0-core-octree_node.txx.patch
@@ -0,0 +1,18 @@
+From b5f466a66771621a3aaa15434910f413ab7168f7 Mon Sep 17 00:00:00 2001
+From: Ted Rodgers <[email protected]>
+Date: Sat, 10 Aug 2024 16:10:13 -0400
+Subject: [PATCH] octree_node.txx fix chilren typo
+
+Signed-off-by: Paul Zander <[email protected]>
+
+--- a/Utilities/octree/octree/octree_node.txx
++++ b/Utilities/octree/octree/octree_node.txx
+@@ -210,7 +210,7 @@ const octree_node<T_, d_, A_>& octree_node<T_, d_, 
A_>::operator[](int child) co
+   {
+     throw std::domain_error("Attempt to access children of an octree leaf 
node.");
+   }
+-  return this->_M_chilren[child];
++  return this->m_children[child];
+ }
+ 
+ /**\brief Return a reference to a child node.

diff --git a/sci-libs/vtk/vtk-9.3.0-r2.ebuild b/sci-libs/vtk/vtk-9.3.0-r2.ebuild
index cc7a1a438652..fa67ba0e190f 100644
--- a/sci-libs/vtk/vtk-9.3.0-r2.ebuild
+++ b/sci-libs/vtk/vtk-9.3.0-r2.ebuild
@@ -165,6 +165,8 @@ PATCHES=(
        "${FILESDIR}/${PN}-9.3.0-opencascade.patch"
        
"${FILESDIR}/${PN}-9.3.0-fix-Java-error-with-integer-enum-overloads.patch"
        "${FILESDIR}/${PN}-9.3.0-ThrustPatches.patch"
+       "${FILESDIR}/${PN}-9.3.0-core-octree_node.txx.patch"
+       "${FILESDIR}/${PN}-9.3.0-ThirdParty-gcc15.patch"
 )
 
 DOCS=( CONTRIBUTING.md README.md )

Reply via email to