diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-01-10 19:03:44 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-01-10 19:03:44 +0000 |
commit | 6a4408b9bbd9fe61dc0966f587db94081fa5f52b (patch) | |
tree | b169c2aac67648694c722324d81d57fd34c69d23 /sci-libs/vtk/files | |
parent | 8c8f1cfd2aa9e839aad7dad6fd43b370cfbc0a1e (diff) |
gentoo auto-resync : 10:01:2024 - 19:03:44
Diffstat (limited to 'sci-libs/vtk/files')
6 files changed, 312 insertions, 0 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 new file mode 100644 index 000000000000..80838b9c45be --- /dev/null +++ b/sci-libs/vtk/files/vtk-9.2.5-pegtl-3.x.patch @@ -0,0 +1,136 @@ +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 + +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 @@ + + // for debugging + // clang-format off +-#include VTK_PEGTL(pegtl/contrib/tracer.hpp) ++#include VTK_PEGTL(pegtl/contrib/trace.hpp) + // 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 + } + 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; + } +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( + VERSION "2.8.3" + EXTERNAL + PACKAGE PEGTL +- VERSION 2.0.0 + TARGETS PEGTL::PEGTL + STANDARD_INCLUDE_DIRS) + +diff --git a/CMake/FindPEGTL.cmake b/CMake/FindPEGTL.cmake +index 73eee02f7..22d8bc159 100644 +--- 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 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 new file mode 100644 index 000000000000..1b06b59a996e --- /dev/null +++ b/sci-libs/vtk/files/vtk-9.3.0-fix-Java-error-with-integer-enum-overloads.patch @@ -0,0 +1,51 @@ +From: dd7acfb4548dc76f1191aa96778f35c0cda80d35 Mon Sep 17 00:00:00 2001 +From: David Gobbi <david.gobbi@gmail.com> +From: https://gitlab.kitware.com/vtk/vtk/-/merge_requests/10712 +Date: Sat, 18 Nov 2023 15:57:18 -0700 +Subject: [PATCH] Fix Java error with integer, enum overloads + +The Java wrappers simply cast enum types to 'jint', and do not +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) + * return 0 if the types do not map to the same type */ + static int CheckMatch(unsigned int type1, unsigned int type2, const char* c1, const char* c2) + { ++ /* VTK_PARSE_UNKNOWN is used for enum types, which are mapped to java's int type */ + static unsigned int byteTypes[] = { VTK_PARSE_UNSIGNED_CHAR, VTK_PARSE_SIGNED_CHAR, 0 }; + static unsigned int shortTypes[] = { VTK_PARSE_UNSIGNED_SHORT, VTK_PARSE_SHORT, 0 }; +- static unsigned int intTypes[] = { VTK_PARSE_UNSIGNED_INT, VTK_PARSE_INT, 0 }; ++ static unsigned int intTypes[] = { VTK_PARSE_UNKNOWN, VTK_PARSE_UNSIGNED_INT, VTK_PARSE_INT, 0 }; + 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) + * return 0 if the types do not map to the same type */ + static int CheckMatch(unsigned int type1, unsigned int type2, const char* c1, const char* c2) + { ++ /* VTK_PARSE_UNKNOWN is used for enum types, which are mapped to java's int type */ + static unsigned int byteTypes[] = { VTK_PARSE_UNSIGNED_CHAR, VTK_PARSE_SIGNED_CHAR, 0 }; + static unsigned int shortTypes[] = { VTK_PARSE_UNSIGNED_SHORT, VTK_PARSE_SHORT, 0 }; +- static unsigned int intTypes[] = { VTK_PARSE_UNSIGNED_INT, VTK_PARSE_INT, 0 }; ++ static unsigned int intTypes[] = { VTK_PARSE_UNKNOWN, VTK_PARSE_UNSIGNED_INT, VTK_PARSE_INT, 0 }; + static unsigned int longTypes[] = { VTK_PARSE_UNSIGNED_LONG, VTK_PARSE_UNSIGNED_LONG_LONG, + VTK_PARSE_LONG, VTK_PARSE_LONG_LONG, 0 }; + +-- +GitLab + diff --git a/sci-libs/vtk/files/vtk-9.3.0-java.patch b/sci-libs/vtk/files/vtk-9.3.0-java.patch new file mode 100644 index 000000000000..4b9125515eac --- /dev/null +++ b/sci-libs/vtk/files/vtk-9.3.0-java.patch @@ -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 diff --git a/sci-libs/vtk/files/vtk-9.3.0-opencascade.patch b/sci-libs/vtk/files/vtk-9.3.0-opencascade.patch new file mode 100644 index 000000000000..e26caecf497c --- /dev/null +++ b/sci-libs/vtk/files/vtk-9.3.0-opencascade.patch @@ -0,0 +1,17 @@ +From: https://gitlab.archlinux.org/archlinux/packaging/packages/vtk/-/blob/main/vtk-occt.patch +From: Sven-Hendrik Haase <svenstaro@archlinux.org> +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: + * 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); + ///@} + 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 new file mode 100644 index 000000000000..98ab24334fd4 --- /dev/null +++ b/sci-libs/vtk/files/vtk-9.3.0-pdal-2.6.0.patch @@ -0,0 +1,77 @@ +From: ccee5db79d6037c4d752b5f29dc30fb0dfd039bf Mon Sep 17 00:00:00 2001 +From: Timothée Couble <timothee.couble@kitware.com> +From: https://gitlab.kitware.com/vtk/vtk/-/merge_requests/10692 +Date: Fri, 10 Nov 2023 10:03:07 +0100 +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) + set(classes + vtkPDALReader) + +-set(pdal_libraries pdal_util) +-if (APPLE OR WIN32) ++set(pdal_libraries) ++if (PDAL_VERSION VERSION_LESS "2.6") ++ set(pdal_libraries pdal_util) ++ if (APPLE OR WIN32) ++ list(APPEND pdal_libraries ++ pdalcpp) ++ else() ++ list(APPEND pdal_libraries ++ pdal_base) ++ endif() ++else () + list(APPEND pdal_libraries + pdalcpp) +-else() +- list(APPEND pdal_libraries +- pdal_base) +-endif() ++endif () + + vtk_module_add_module(VTK::IOPDAL + CLASSES ${classes}) +-- +GitLab + + +From 5bf45b44760bac09b0079827346e78af38d981af Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timoth=C3=A9e=20Couble?= <timothee.couble@kitware.com> +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 + vtk_module_link(VTK::IOPDAL + PRIVATE + ${pdal_libraries}) ++ ++# PDAL 2.0 didn't include interfaces to its exported targets. ++# Resolved in https://github.com/PDAL/PDAL/issues/2262. ++if (PDAL_VERSION VERSION_LESS "2.1") ++ vtk_module_include(VTK::IOPDAL ++ PRIVATE ++ ${PDAL_INCLUDE_DIRS}) ++endif () ++ + vtk_add_test_mangling(VTK::IOPDAL) +-- +GitLab + 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 new file mode 100644 index 000000000000..13b6bf94a4ec --- /dev/null +++ b/sci-libs/vtk/files/vtk-9.3.0-too-many-initializer-values.patch @@ -0,0 +1,20 @@ +--- 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 +@@ -334,7 +334,7 @@ + auto TransformForScalarRange(const ArrayHandleType& src, + const vtkm::cont::ArrayHandle<vtkm::UInt8>& ghost, vtkm::UInt8 ghostValueToSkip, bool finitesOnly) + { +- DecoratorForScalarRanage decorator{ ghostValueToSkip, finitesOnly }; ++ DecoratorForScalarRanage decorator{ { ghostValueToSkip, finitesOnly } }; + return vtkm::cont::make_ArrayHandleDecorator(src.GetNumberOfValues(), decorator, src, ghost); + } + +@@ -342,7 +342,7 @@ + auto TransformForVectorRange(const ArrayHandleType& src, + const vtkm::cont::ArrayHandle<vtkm::UInt8>& ghost, vtkm::UInt8 ghostValueToSkip, bool finitesOnly) + { +- DecoratorForVectorRanage decorator{ ghostValueToSkip, finitesOnly }; ++ DecoratorForVectorRanage decorator{ { ghostValueToSkip, finitesOnly } }; + return vtkm::cont::make_ArrayHandleDecorator(src.GetNumberOfValues(), decorator, src, ghost); + } + |