commit:     c099b293613b51163cf584595a7579a0694970a2
Author:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
AuthorDate: Thu Jul  4 11:11:28 2024 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Thu Jul  4 11:11:51 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c099b293

sci-libs/vtk: fixed build of 9.3.0 with nvidia-cuda-toolkit-12.5 + scrubbed 
patches

Closes: https://bugs.gentoo.org/933720
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 sci-libs/vtk/files/vtk-9.2.5-pegtl-3.x.patch       | 10 +----
 sci-libs/vtk/files/vtk-9.2.6-Java21.patch          |  2 -
 sci-libs/vtk/files/vtk-9.3.0-ThrustPatches.patch   | 51 ++++++++++++++++++++++
 ...ix-Java-error-with-integer-enum-overloads.patch |  9 ----
 .../vtk/files/vtk-9.3.0-opencascade-7.8.0.patch    |  2 -
 sci-libs/vtk/files/vtk-9.3.0-opencascade.patch     |  2 -
 sci-libs/vtk/files/vtk-9.3.0-pdal-2.6.0.patch      | 12 -----
 .../vtk-9.3.0-too-many-initializer-values.patch    |  4 +-
 sci-libs/vtk/vtk-9.3.0.ebuild                      |  1 +
 9 files changed, 55 insertions(+), 38 deletions(-)

diff --git a/sci-libs/vtk/files/vtk-9.2.5-pegtl-3.x.patch 
b/sci-libs/vtk/files/vtk-9.2.5-pegtl-3.x.patch
index 80838b9c45be..e330e1837c90 100644
--- a/sci-libs/vtk/files/vtk-9.2.5-pegtl-3.x.patch
+++ b/sci-libs/vtk/files/vtk-9.2.5-pegtl-3.x.patch
@@ -4,8 +4,6 @@ From: https://github.com/microsoft/vcpkg/pull/29730
 Date: Sat, 18 Feb 2023 10:12:04 +0100
 Subject: [PATCH 1/3] [vtk] update pegtl to version 3
 
-diff --git a/IO/MotionFX/vtkMotionFXCFGGrammar.h 
b/IO/MotionFX/vtkMotionFXCFGGrammar.h
-index dba137386..4cb03e054 100644
 --- a/IO/MotionFX/vtkMotionFXCFGGrammar.h
 +++ b/IO/MotionFX/vtkMotionFXCFGGrammar.h
 @@ -23,7 +23,7 @@
@@ -17,8 +15,6 @@ index dba137386..4cb03e054 100644
  // clang-format on
  
  namespace MotionFX
-diff --git a/IO/MotionFX/vtkMotionFXCFGReader.cxx 
b/IO/MotionFX/vtkMotionFXCFGReader.cxx
-index 338aa736e..374e54b94 100644
 --- a/IO/MotionFX/vtkMotionFXCFGReader.cxx
 +++ b/IO/MotionFX/vtkMotionFXCFGReader.cxx
 @@ -1213,7 +1213,7 @@ bool PositionFileMotion::read_position_file(const 
std::string& rootDir) const
@@ -48,8 +44,6 @@ index 338aa736e..374e54b94 100644
        }
        return false;
      }
-diff --git a/ThirdParty/pegtl/CMakeLists.txt b/ThirdParty/pegtl/CMakeLists.txt
-index 9bbd4c828..0cdb1f53d 100644
 --- a/ThirdParty/pegtl/CMakeLists.txt
 +++ b/ThirdParty/pegtl/CMakeLists.txt
 @@ -5,7 +5,6 @@ vtk_module_third_party(
@@ -60,9 +54,7 @@ index 9bbd4c828..0cdb1f53d 100644
      TARGETS PEGTL::PEGTL
      STANDARD_INCLUDE_DIRS)
  
-diff --git a/CMake/FindPEGTL.cmake b/CMake/FindPEGTL.cmake
-index 73eee02f7..22d8bc159 100644
---- a/CMake/FindPEGTL.cmake    
+--- a/CMake/FindPEGTL.cmake
 +++ b/CMake/FindPEGTL.cmake
 @@ -19,31 +19,43 @@
  # Copyright (c) 2009 Benoit Jacob <[email protected]>

diff --git a/sci-libs/vtk/files/vtk-9.2.6-Java21.patch 
b/sci-libs/vtk/files/vtk-9.2.6-Java21.patch
index 08d4c0bf633f..b7b2e233cdb4 100644
--- a/sci-libs/vtk/files/vtk-9.2.6-Java21.patch
+++ b/sci-libs/vtk/files/vtk-9.2.6-Java21.patch
@@ -1,5 +1,3 @@
-diff --git a/Wrapping/Java/CMakeLists.txt b/Wrapping/Java/CMakeLists.txt
-index 01f3f93d..3afd78cf 100644
 --- a/Wrapping/Java/CMakeLists.txt
 +++ b/Wrapping/Java/CMakeLists.txt
 @@ -201,10 +201,10 @@ set(VTK_JAVA_TARGET_VERSION "<DEFAULT>" CACHE STRING 
"javac target version")

diff --git a/sci-libs/vtk/files/vtk-9.3.0-ThrustPatches.patch 
b/sci-libs/vtk/files/vtk-9.3.0-ThrustPatches.patch
new file mode 100644
index 000000000000..82525e75d914
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.3.0-ThrustPatches.patch
@@ -0,0 +1,51 @@
+From 4a4466e7c8cd44d2be2bd3fe6f359faa8e9547aa Mon Sep 17 00:00:00 2001
+From: Kenneth Moreland <[email protected]>
+Date: Tue, 4 Jun 2024 10:04:42 -0400
+Subject: [PATCH] Disable Thrust patch that is no longer needed in modern
+ Thrust
+
+There is a Thrust patch that works around an issue in Thrust 1.9.4
+(https://github.com/NVIDIa/ThirdParty/vtkm/vtkvtkm/vtk-m/thrust/issues/972). 
The underlying issue
+should be fixed in recent versions. In recent versions of CUDA, the patch
+breaks (https://gitlab.kitware.com/vtk/vtk-m/-/issues/818).
+
+This change fixes the problem by disabling the patch where it is not
+needed.
+--- /dev/null
++++ b/ThirdParty/vtkm/vtkvtkm/vtk-m/docs/changelog/obsolete-thrust-patch.md
+@@ -0,0 +1,9 @@
++# Disable Thrust patch that is no longer needed in modern Thrust
++
++There is a Thrust patch that works around an issue in Thrust 1.9.4
++(https://github.com/NVIDIa/ThirdParty/vtkm/vtkvtkm/vtk-m/thrust/issues/972). 
The underlying issue
++should be fixed in recent versions. In recent versions of CUDA, the patch
++breaks (https://gitlab.kitware.com/vtk/vtk-m/-/issues/818).
++
++This change fixes the problem by disabling the patch where it is not
++needed.
+--- a/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/exec/cuda/internal/ThrustPatches.h
++++ b/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/exec/cuda/internal/ThrustPatches.h
+@@ -170,9 +170,9 @@ ALIGN_RE_PAIR(vtkm::Int64, vtkm::Float64);
+ #undef ALIGN_RE_PAIR
+ }
+ }
+-#endif //THRUST_VERSION >= 100900
++#endif //THRUST_VERSION >= 100900 && THRUST_VERSION < 100906
+ 
+-#if THRUST_VERSION >= 100904
++#if (THRUST_VERSION >= 100904) && (THRUST_VERSION < 100909)
+ //So for thrust 1.9.4+ (CUDA 10.1+) the stateless_resource_allocator has a bug
+ //where it is not marked as __host__ __device__ && 
__thrust_exec_check_disable__.
+ //To fix this we add a new partial specialization on cuda::memory_resource
+@@ -236,7 +236,7 @@ public:
+ };
+ }
+ }
+-#endif //THRUST_VERSION >= 100903
++#endif //(THRUST_VERSION >= 100904) && (THRUST_VERSION < 100909)
+ 
+ 
+ #if THRUST_VERSION < 100900
+-- 
+GitLab
+

diff --git 
a/sci-libs/vtk/files/vtk-9.3.0-fix-Java-error-with-integer-enum-overloads.patch 
b/sci-libs/vtk/files/vtk-9.3.0-fix-Java-error-with-integer-enum-overloads.patch
index 1b06b59a996e..7dd005ff4191 100644
--- 
a/sci-libs/vtk/files/vtk-9.3.0-fix-Java-error-with-integer-enum-overloads.patch
+++ 
b/sci-libs/vtk/files/vtk-9.3.0-fix-Java-error-with-integer-enum-overloads.patch
@@ -9,13 +9,6 @@ distinguish them as individual types that are distinct from 
'int'
 or 'unsigned int'.  So when a method is overloaded with both 'int'
 and an enum type, only one of the overloads can be wrapped.  The
 'int' (or 'unsigned int') is the one that is chosen.
----
- Wrapping/Tools/vtkParseJava.c | 3 ++-
- Wrapping/Tools/vtkWrapJava.c  | 3 ++-
- 2 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/Wrapping/Tools/vtkParseJava.c b/Wrapping/Tools/vtkParseJava.c
-index 36b58dda425..9f1544561f3 100644
 --- a/Wrapping/Tools/vtkParseJava.c
 +++ b/Wrapping/Tools/vtkParseJava.c
 @@ -248,9 +248,10 @@ void return_result_native(FILE* fp)
@@ -30,8 +23,6 @@ index 36b58dda425..9f1544561f3 100644
    static unsigned int longTypes[] = { VTK_PARSE_UNSIGNED_LONG, 
VTK_PARSE_UNSIGNED_LONG_LONG,
      VTK_PARSE_LONG, VTK_PARSE_LONG_LONG, 0 };
  
-diff --git a/Wrapping/Tools/vtkWrapJava.c b/Wrapping/Tools/vtkWrapJava.c
-index d629cc5c8a8..009853d2a89 100644
 --- a/Wrapping/Tools/vtkWrapJava.c
 +++ b/Wrapping/Tools/vtkWrapJava.c
 @@ -639,9 +639,10 @@ void OutputFunctionResult(FILE* fp)

diff --git a/sci-libs/vtk/files/vtk-9.3.0-opencascade-7.8.0.patch 
b/sci-libs/vtk/files/vtk-9.3.0-opencascade-7.8.0.patch
index 4adec4944492..0e6410c18ea0 100644
--- a/sci-libs/vtk/files/vtk-9.3.0-opencascade-7.8.0.patch
+++ b/sci-libs/vtk/files/vtk-9.3.0-opencascade-7.8.0.patch
@@ -16,8 +16,6 @@
  set(opencascade_missing_targets)
  foreach (opencascade_req_target IN LISTS opencascade_req_targets)
    if (NOT TARGET "${opencascade_req_target}")
-diff --git a/IO/OCCT/vtkOCCTReader.cxx b/IO/OCCT/vtkOCCTReader.cxx
-index 52e76be..7235309 100644
 --- a/IO/OCCT/vtkOCCTReader.cxx
 +++ b/IO/OCCT/vtkOCCTReader.cxx
 @@ -348,7 +348,7 @@ public:

diff --git a/sci-libs/vtk/files/vtk-9.3.0-opencascade.patch 
b/sci-libs/vtk/files/vtk-9.3.0-opencascade.patch
index e26caecf497c..d7e0e3f9556c 100644
--- a/sci-libs/vtk/files/vtk-9.3.0-opencascade.patch
+++ b/sci-libs/vtk/files/vtk-9.3.0-opencascade.patch
@@ -1,7 +1,5 @@
 From: 
https://gitlab.archlinux.org/archlinux/packaging/packages/vtk/-/blob/main/vtk-occt.patch
 From: Sven-Hendrik Haase <[email protected]>
-diff --git a/IO/OCCT/vtkOCCTReader.h b/IO/OCCT/vtkOCCTReader.h
-index 36a02f5be3..33fa45fccc 100644
 --- a/IO/OCCT/vtkOCCTReader.h
 +++ b/IO/OCCT/vtkOCCTReader.h
 @@ -48,8 +48,8 @@ public:

diff --git a/sci-libs/vtk/files/vtk-9.3.0-pdal-2.6.0.patch 
b/sci-libs/vtk/files/vtk-9.3.0-pdal-2.6.0.patch
index 98ab24334fd4..261f3736eb3d 100644
--- a/sci-libs/vtk/files/vtk-9.3.0-pdal-2.6.0.patch
+++ b/sci-libs/vtk/files/vtk-9.3.0-pdal-2.6.0.patch
@@ -6,12 +6,6 @@ Subject: [PATCH 1/2] IOPDAL: Always links with pdalcpp
 
 pdal_base and pdal_utils libraries are removed in PDAL 2.6.0
 link with pdalcpp instead starting from this version.
----
- IO/PDAL/CMakeLists.txt | 18 ++++++++++++------
- 1 file changed, 12 insertions(+), 6 deletions(-)
-
-diff --git a/IO/PDAL/CMakeLists.txt b/IO/PDAL/CMakeLists.txt
-index c31af0410f4..b83a9334109 100644
 --- a/IO/PDAL/CMakeLists.txt
 +++ b/IO/PDAL/CMakeLists.txt
 @@ -3,14 +3,20 @@ vtk_module_find_package(PACKAGE PDAL VERSION 2.1)
@@ -50,12 +44,6 @@ From: =?UTF-8?q?Timoth=C3=A9e=20Couble?= 
<[email protected]>
 Date: Fri, 10 Nov 2023 10:12:32 +0100
 Subject: [PATCH 2/2] Add support for PDAL 2.0 version
 
----
- IO/PDAL/CMakeLists.txt | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/IO/PDAL/CMakeLists.txt b/IO/PDAL/CMakeLists.txt
-index b83a9334109..a7027524e4f 100644
 --- a/IO/PDAL/CMakeLists.txt
 +++ b/IO/PDAL/CMakeLists.txt
 @@ -23,4 +23,13 @@ vtk_module_add_module(VTK::IOPDAL

diff --git a/sci-libs/vtk/files/vtk-9.3.0-too-many-initializer-values.patch 
b/sci-libs/vtk/files/vtk-9.3.0-too-many-initializer-values.patch
index 13b6bf94a4ec..52c37250c7e7 100644
--- a/sci-libs/vtk/files/vtk-9.3.0-too-many-initializer-values.patch
+++ b/sci-libs/vtk/files/vtk-9.3.0-too-many-initializer-values.patch
@@ -1,5 +1,5 @@
---- a/Accelerators/Vtkm/Core/vtkmlib/vtkmDataArray.hxx 2023-11-14 
00:37:21.000000000 +0100
-+++ b/Accelerators/Vtkm/Core/vtkmlib/vtkmDataArray.hxx 2023-11-19 
17:09:22.089595938 +0100
+--- a/Accelerators/Vtkm/Core/vtkmlib/vtkmDataArray.hxx
++++ b/Accelerators/Vtkm/Core/vtkmlib/vtkmDataArray.hxx
 @@ -334,7 +334,7 @@
  auto TransformForScalarRange(const ArrayHandleType& src,
    const vtkm::cont::ArrayHandle<vtkm::UInt8>& ghost, vtkm::UInt8 
ghostValueToSkip, bool finitesOnly)

diff --git a/sci-libs/vtk/vtk-9.3.0.ebuild b/sci-libs/vtk/vtk-9.3.0.ebuild
index e2f30ffb2241..cc7a1a438652 100644
--- a/sci-libs/vtk/vtk-9.3.0.ebuild
+++ b/sci-libs/vtk/vtk-9.3.0.ebuild
@@ -164,6 +164,7 @@ PATCHES=(
        "${FILESDIR}/${PN}-9.3.0-java.patch"
        "${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"
 )
 
 DOCS=( CONTRIBUTING.md README.md )

Reply via email to