Cleanup and python 3.13

This commit is contained in:
Mario Fetka
2025-05-05 10:23:40 +02:00
parent 7c1ee4ca45
commit b56141d74d
121 changed files with 9006 additions and 479 deletions

View File

@@ -0,0 +1,128 @@
From: 31058da34eeb26165011b07fe41baf825f7df1a3 Mon Sep 17 00:00:00 2001
From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com>
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
--- a/IO/MotionFX/vtkMotionFXCFGGrammar.h
+++ b/IO/MotionFX/vtkMotionFXCFGGrammar.h
@@ -23,7 +23,7 @@
// for debugging
// clang-format off
-#include VTK_PEGTL(pegtl/contrib/tracer.hpp)
+#include VTK_PEGTL(pegtl/contrib/trace.hpp)
// clang-format on
namespace MotionFX
--- a/IO/MotionFX/vtkMotionFXCFGReader.cxx
+++ b/IO/MotionFX/vtkMotionFXCFGReader.cxx
@@ -1213,7 +1213,7 @@ bool PositionFileMotion::read_position_file(const std::string& rootDir) const
}
return true;
}
- catch (const tao::pegtl::input_error& e)
+ catch (const tao::pegtl::parse_error& e)
{
vtkGenericWarningMacro("PositionFileMotion::read_position_file failed: " << e.what());
}
@@ -1232,7 +1232,7 @@ bool UniversalTransformMotion::read_universaltransform_file(const std::string& r
in, numbers, this->transforms);
return true;
}
- catch (const tao::pegtl::input_error& e)
+ catch (const tao::pegtl::parse_error& e)
{
vtkGenericWarningMacro(
"UniversalTransformMotion::read_universaltransform_file failed: " << e.what());
@@ -1267,7 +1267,7 @@ public:
if (getenv("MOTIONFX_DEBUG_GRAMMAR") != nullptr)
{
tao::pegtl::read_input<> in2(filename);
- tao::pegtl::parse<MotionFX::CFG::Grammar, tao::pegtl::nothing, tao::pegtl::tracer>(in2);
+ tao::pegtl::complete_trace<MotionFX::CFG::Grammar>(in2);
}
return false;
}
--- a/ThirdParty/pegtl/CMakeLists.txt
+++ b/ThirdParty/pegtl/CMakeLists.txt
@@ -5,7 +5,6 @@ vtk_module_third_party(
VERSION "2.8.3"
EXTERNAL
PACKAGE PEGTL
- VERSION 2.0.0
TARGETS PEGTL::PEGTL
STANDARD_INCLUDE_DIRS)
--- a/CMake/FindPEGTL.cmake
+++ b/CMake/FindPEGTL.cmake
@@ -19,31 +19,43 @@
# Copyright (c) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>
# Redistribution and use is allowed according to the terms of the 2-clause BSD license.
-find_path(PEGTL_INCLUDE_DIR
- NAMES pegtl/version.hpp
- PATH_SUFFIXES tao
- DOC "Path to PEGTL headers")
-mark_as_advanced(PEGTL_INCLUDE_DIR)
+message(STATUS "Searching for PEGTL")
+find_package(PEGTL CONFIG REQUIRED)
+if(TARGET taocpp::pegtl)
+ message(STATUS "Searching for PEGTL - found target taocpp::pegtl")
+ set_target_properties(taocpp::pegtl PROPERTIES IMPORTED_GLOBAL TRUE)
+ if(NOT TARGET PEGTL::PEGTL)
+ add_library(PEGTL::PEGTL IMPORTED INTERFACE)
+ target_link_libraries(PEGTL::PEGTL INTERFACE taocpp::pegtl)
+ endif()
+else()
+ find_path(PEGTL_INCLUDE_DIR
+ NAMES pegtl/version.hpp
+ PATH_SUFFIXES tao
+ DOC "Path to PEGTL headers")
+ mark_as_advanced(PEGTL_INCLUDE_DIR)
-if (PEGTL_INCLUDE_DIR)
- file(STRINGS "${PEGTL_INCLUDE_DIR}/pegtl/version.hpp" _pegtl_version_header
- REGEX "TAO_PEGTL_VERSION")
- string(REGEX MATCH "define[ \t]+TAO_PEGTL_VERSION[ \t]+\"([0-9.]+)\"" _pegtl_version_match "${_pegtl_version_header}")
- set(PEGTL_VERSION "${CMAKE_MATCH_1}")
- unset(_pegtl_version_header)
- unset(_pegtl_version_match)
-endif ()
+ if (PEGTL_INCLUDE_DIR)
+ file(STRINGS "${PEGTL_INCLUDE_DIR}/pegtl/version.hpp" _pegtl_version_header
+ REGEX "TAO_PEGTL_VERSION")
+ string(REGEX MATCH "define[ \t]+TAO_PEGTL_VERSION[ \t]+\"([0-9.]+)\"" _pegtl_version_match "${_pegtl_version_header}")
+ set(PEGTL_VERSION "${CMAKE_MATCH_1}")
+ unset(_pegtl_version_header)
+ unset(_pegtl_version_match)
+ endif ()
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(PEGTL
- REQUIRED_VARS PEGTL_INCLUDE_DIR
- VERSION_VAR PEGTL_VERSION)
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(PEGTL
+ REQUIRED_VARS PEGTL_INCLUDE_DIR
+ VERSION_VAR PEGTL_VERSION)
-if (PEGTL_FOUND)
- set(PEGTL_INCLUDE_DIRS "${PEGTL_INCLUDE_DIR}")
- if (NOT TARGET PEGTL::PEGTL)
- add_library(PEGTL::PEGTL INTERFACE IMPORTED)
- set_target_properties(PEGTL::PEGTL PROPERTIES
- INTERFACE_INCLUDE_DIRECTORIES "${PEGTL_INCLUDE_DIR}")
- endif ()
-endif ()
+ if (PEGTL_FOUND)
+ set(PEGTL_INCLUDE_DIRS "${PEGTL_INCLUDE_DIR}")
+ if (NOT TARGET PEGTL::PEGTL)
+ add_library(PEGTL::PEGTL INTERFACE IMPORTED)
+ set_target_properties(PEGTL::PEGTL PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${PEGTL_INCLUDE_DIR}")
+ endif ()
+ message(STATUS "Searching for PEGTL - found")
+ endif ()
+endif ()
\ No newline at end of file

View File

@@ -0,0 +1,47 @@
From d00b98bd8ef02f854f1068e8ab8fd2fb28244c3b Mon Sep 17 00:00:00 2001
From: Ted Rodgers <ted.d.rodgers@gmail.com>
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>

View File

@@ -0,0 +1,51 @@
From 4a4466e7c8cd44d2be2bd3fe6f359faa8e9547aa Mon Sep 17 00:00:00 2001
From: Kenneth Moreland <morelandkd@ornl.gov>
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

View File

@@ -0,0 +1,18 @@
From b5f466a66771621a3aaa15434910f413ab7168f7 Mon Sep 17 00:00:00 2001
From: Ted Rodgers <ted.d.rodgers@gmail.com>
Date: Sat, 10 Aug 2024 16:10:13 -0400
Subject: [PATCH] octree_node.txx fix chilren typo
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
--- 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.

View File

@@ -0,0 +1,11 @@
--- a/Wrapping/Java/Testing/Java/CMakeLists.txt
+++ b/Wrapping/Java/Testing/Java/CMakeLists.txt
@@ -22,6 +22,8 @@ if (WIN32)
endif ()
set(vtk_test_classpath
"$<TARGET_FILE:VTK::vtkjava>")
+list(APPEND vtk_test_classpath
+ ${java_classpath})
string(REPLACE ";" "${classpath_separator}" vtk_test_classpath "${vtk_test_classpath}")
add_library(vtkjava_tests STATIC

View File

@@ -0,0 +1,29 @@
--- a/IO/OCCT/CMakeLists.txt
+++ b/IO/OCCT/CMakeLists.txt
@@ -5,11 +5,11 @@ vtk_module_find_package(
)
set(opencascade_req_targets
- TKSTEP
- TKIGES
+ TKDESTEP
+ TKDEIGES
TKMesh
- TKXDESTEP
- TKXDEIGES)
+ TKXSDRAWSTEP
+ TKXSDRAWIGES)
set(opencascade_missing_targets)
foreach (opencascade_req_target IN LISTS opencascade_req_targets)
if (NOT TARGET "${opencascade_req_target}")
--- a/IO/OCCT/vtkOCCTReader.cxx
+++ b/IO/OCCT/vtkOCCTReader.cxx
@@ -348,7 +348,7 @@ public:
int GetHash(const TDF_Label& label)
{
TopoDS_Shape aShape;
- return this->ShapeTool->GetShape(label, aShape) ? aShape.HashCode(INT_MAX) : 0;
+ return this->ShapeTool->GetShape(label, aShape) ? opencascade::hash(aShape) : 0;
}
//----------------------------------------------------------------------------

View File

@@ -0,0 +1,15 @@
From: https://gitlab.archlinux.org/archlinux/packaging/packages/vtk/-/blob/main/vtk-occt.patch
From: Sven-Hendrik Haase <svenstaro@archlinux.org>
--- a/IO/OCCT/vtkOCCTReader.h
+++ b/IO/OCCT/vtkOCCTReader.h
@@ -48,8 +48,8 @@ public:
* It can be either STEP or IGES.
* Default is FILE_FORMAT::STEP
*/
- VTK_DEPRECATED_IN_9_3_0("Use SetFormat with unsigned int instead.")
- vtkSetEnumMacro(FileFormat, Format);
+ // VTK_DEPRECATED_IN_9_3_0("Use SetFormat with unsigned int instead.")
+ // vtkSetEnumMacro(FileFormat, Format);
vtkSetClampMacro(FileFormat, unsigned int, Format::STEP, Format::IGES);
///@}

View File

@@ -0,0 +1,22 @@
From f568d669465f5825006be2fba8a117060e832618 Mon Sep 17 00:00:00 2001
From: Paul Zander <negril.nx+gentoo@gmail.com>
Date: Sun, 8 Sep 2024 22:27:09 +0200
Subject: [PATCH] update for cuda 12.6
https://github.com/NVIDIA/cccl/commit/733eb94a2b98b8d5b5ab1e39cbd8ac1aed9173ec
Bug: https://bugs.gentoo.org/938673
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
--- a/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/exec/cuda/internal/WrappedOperators.h
+++ b/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/exec/cuda/internal/WrappedOperators.h
@@ -195,7 +195,7 @@ namespace detail
//
template <typename T, typename F>
struct is_commutative<vtkm::exec::cuda::internal::WrappedBinaryOperator<T, F>>
- : public thrust::detail::is_arithmetic<T>
+ : public ::cuda::std::is_arithmetic<T>
{
};
}

View File

@@ -0,0 +1,70 @@
From a811c0c4aca246a89f85a1eecc805e388a645178 Mon Sep 17 00:00:00 2001
From: Paul Zander <negril.nx+gentoo@gmail.com>
Date: Tue, 17 Sep 2024 18:45:03 +0200
Subject: [PATCH] fix fmt-11
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
diff --git a/ThirdParty/ioss/vtkioss/Ioss_Decomposition.C b/ThirdParty/ioss/vtkioss/Ioss_Decomposition.C
index 388d524..a94afc6 100644
--- a/ThirdParty/ioss/vtkioss/Ioss_Decomposition.C
+++ b/ThirdParty/ioss/vtkioss/Ioss_Decomposition.C
@@ -15,6 +15,7 @@
#include <cassert>
#include "vtk_fmt.h"
#include VTK_FMT(fmt/ostream.h)
+#include VTK_FMT(fmt/ranges.h)
#include <numeric>
#if !defined(NO_ZOLTAN_SUPPORT)
diff --git a/ThirdParty/ioss/vtkioss/Ioss_IOFactory.C b/ThirdParty/ioss/vtkioss/Ioss_IOFactory.C
index 440f352..ca71a90 100644
--- a/ThirdParty/ioss/vtkioss/Ioss_IOFactory.C
+++ b/ThirdParty/ioss/vtkioss/Ioss_IOFactory.C
@@ -12,6 +12,7 @@
#include <cstddef> // for nullptr
#include "vtk_fmt.h"
#include VTK_FMT(fmt/ostream.h)
+#include VTK_FMT(fmt/ranges.h)
#include <map> // for _Rb_tree_iterator, etc
#include <ostream> // for basic_ostream, etc
#include <set>
diff --git a/ThirdParty/ioss/vtkioss/Ioss_StructuredBlock.C b/ThirdParty/ioss/vtkioss/Ioss_StructuredBlock.C
index 1609c31..85b67e2 100644
--- a/ThirdParty/ioss/vtkioss/Ioss_StructuredBlock.C
+++ b/ThirdParty/ioss/vtkioss/Ioss_StructuredBlock.C
@@ -15,6 +15,7 @@
#include <Ioss_StructuredBlock.h>
#include "vtk_fmt.h"
#include VTK_FMT(fmt/ostream.h)
+#include VTK_FMT(fmt/ranges.h)
#include <cstddef> // for size_t
#include <numeric>
diff --git a/ThirdParty/ioss/vtkioss/Ioss_Utils.C b/ThirdParty/ioss/vtkioss/Ioss_Utils.C
index 57021ab..cc5b8a4 100644
--- a/ThirdParty/ioss/vtkioss/Ioss_Utils.C
+++ b/ThirdParty/ioss/vtkioss/Ioss_Utils.C
@@ -21,6 +21,7 @@
#include VTK_FMT(fmt/chrono.h)
#include VTK_FMT(fmt/format.h)
#include VTK_FMT(fmt/ostream.h)
+#include VTK_FMT(fmt/ranges.h)
#include <fstream>
#include <sstream>
#include <string>
diff --git a/ThirdParty/ioss/vtkioss/Ioss_ZoneConnectivity.C b/ThirdParty/ioss/vtkioss/Ioss_ZoneConnectivity.C
index 5d32481..5cb3c02 100644
--- a/ThirdParty/ioss/vtkioss/Ioss_ZoneConnectivity.C
+++ b/ThirdParty/ioss/vtkioss/Ioss_ZoneConnectivity.C
@@ -9,6 +9,7 @@
#include <cstddef> // for size_t
#include "vtk_fmt.h"
#include VTK_FMT(fmt/ostream.h)
+#include VTK_FMT(fmt/ranges.h)
#include <string> // for string
#include <vector> // for vector
--
2.46.0