public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/vtk/files/, sci-libs/vtk/
Date: Thu, 08 May 2025 06:29:34 +0000 (UTC)	[thread overview]
Message-ID: <1746685604.2bd9e207d4a1c2e5e964b8a3ea9c86b890bb13bc.sam@gentoo> (raw)

commit:     2bd9e207d4a1c2e5e964b8a3ea9c86b890bb13bc
Author:     Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Thu May  1 19:52:52 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu May  8 06:26:44 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2bd9e207

sci-libs/vtk: add 9.4.2

Closes: https://bugs.gentoo.org/954327
Closes: https://bugs.gentoo.org/954326
Closes: https://bugs.gentoo.org/952680
Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/41967
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-libs/vtk/Manifest                              |    6 +
 .../vtk/files/vtk-9.4.2-ThirdParty-gcc15.patch     |   46 +
 .../vtk-9.4.2-find-hdf5-in-global-scope.patch      |   26 +
 sci-libs/vtk/files/vtk-9.4.2-fix-fmt-11.patch      |   34 +
 .../files/vtk-9.4.2-opencascade-components.patch   |   12 +
 sci-libs/vtk/files/vtk-9.4.2-pegtl-3.x.patch       |   40 +
 .../vtk/files/vtk-9.4.2-vtk-m-jobpool-size.patch   |   13 +
 sci-libs/vtk/vtk-9.4.2.ebuild                      | 1043 ++++++++++++++++++++
 8 files changed, 1220 insertions(+)

diff --git a/sci-libs/vtk/Manifest b/sci-libs/vtk/Manifest
index 38ddb6b637c5..4f98e7cf57ee 100644
--- a/sci-libs/vtk/Manifest
+++ b/sci-libs/vtk/Manifest
@@ -1,6 +1,12 @@
 DIST VTK-9.3.1.tar.gz 99964158 BLAKE2B b85aae0aef1a22bd0496e0f5d2c7d3a5c20bbd7db8951ab1f9fe29a48c01ce960e90dc85f36cb6858c2b7dfd7f12cd1cf2e7d0fbb115fc9fd709dd7b481c598e SHA512 5dcd6764b2d9fe476bcc7bd195fab8230b7628579d94656ab037dcaecd07c7d40d0fc4afba446942ca15cd881df17f4c84581047e75a6e11d2e2d339d97c7fa3
+DIST VTK-9.4.2.tar.gz 118621433 BLAKE2B 5e9ffff915e41fad349cb0fc7aba3620e946362a6e91f7291c1a052691cbebfa3d5cb2a686e561f99f44a8aa608caa2d0201ce8b7cabed6337378bf354b69390 SHA512 740919c9b63ad91c5ae45b90b502585a78e9f08b32f06308c475d874decc1e99e813c49c67d37586886ad4860e61630cd51569747003dcf88b3fb744c481f515
 DIST VTKData-9.3.1.tar.gz 612744946 BLAKE2B 6b3a09f6cc98630e817aaeca8094c6a6625372269abfa9003212cd1cdbc101b198f5eeb3474ca675be7f03046c58a5d11b4092ab19ed230422c4100011abfee4 SHA512 befc6b68e33d2c2fb6928006d4fe6feda7e0bbaf31df4488911ab8e3865e3fc1cf3834301301aa2b6de94c4489eebf5e2e8521e8830315d2a1f0e65cb73a6fd3
+DIST VTKData-9.4.2.tar.gz 1095344755 BLAKE2B d995ef59df2d12c85bd8b44280cec3b7b7a9a494ae19c68eda432310e07d92f6da8649f89dd75485c40d49c86ce28bf8e120900a9cb4545454154e04909866b1 SHA512 a379d442ad4f378c961aef3e285b87b633412eddc7b28f99893d34c700ce07eae5267dd33e29fd1aa065095e541145cd5baba3d6c54d9da3e00aea0b7573c51c
 DIST VTKDataFiles-9.3.1.tar.gz 628903288 BLAKE2B cf5919a627ee49809f79d29577d65a48c3332255551c3c229875b25fce911c75c3edeca8d0dfdf9926f93543963ab0e2c992c7469e2c9eed041c39cfd995647d SHA512 360fadd31ab304a27b208745c674eb31759552e98f587569f481c1bda62c7f8ae72598cd40b2c628bb211aace8f62df2ea7ca66f192f8d2e71bca7a4deaa9e89
+DIST VTKDataFiles-9.4.2.tar.gz 1127688904 BLAKE2B 7cf79325e3d8b5eb935f936321b5465c77a1764afeb9206c2709cca48044f686cd7a3e450686c145a4d9b47b32c9f1e8b8661b499ea30e1c2c47f9200eb6d1d9 SHA512 93bcc16ef7989d2e76effb9b6f778f50f9d0048d1c2a89fa55a6c2c9c8ae228d22cea77f588a729db82c0ab0e87cbd37053c228600fcb9f5734caa3cb714fb7a
 DIST VTKLargeData-9.3.1.tar.gz 247523669 BLAKE2B 88ec5046f502db14dd6a26ef81e386babaf560619e16d769834e96046eab46cf762d8c80f9b51c434b77e4e145d8f60e32efbdb4f57d8305494177abec0806ef SHA512 edf5610edfae90f8465d68e0e06e82018978ba27f5b2ae9701939aeb72019acaabeda435c15787f1c4828b44e34c79e2837565a81d6a3accd368a92c6eacebd1
+DIST VTKLargeData-9.4.2.tar.gz 247520755 BLAKE2B d006a0b5a9296332cafcee0917dab1db76e90fa145dbb3093b82dcb668ef38947db97711a00d5013e16147eb3df3cad0f501262897ba342741fa1205a115f31f SHA512 7e896f7b3ee2a454f24bd4b55fe10658d90abd4352ca4d1baed4c67c2606dda7a408ca4d807b05362e311432c0961df0cddfa5236e3aa233ddf28e4a3d48cd58
 DIST VTKLargeDataFiles-9.3.1.tar.gz 247505524 BLAKE2B 5de069309c59a8a73365fb9faba9904189d723fb72976f372e40db3eb100342a19fecd582bd0aa42fc1012675b442a8e42611632004d6b6d6708468c27a4265e SHA512 bbbf0c193432cb5d8a5618c41e66609c7e6f3e4f24f588124c46b537ecec28b5670420b7f77185da534e4098f8b95d8ec4e392fc017df934a84bfc9dc833f634
+DIST VTKLargeDataFiles-9.4.2.tar.gz 247504324 BLAKE2B 650b1f8b9bc8a386a3172fa091cb27dbdfdfe8a7317d7afe109ec4273bfbf3bb67c947e83b7ae47a096327cfba9bc5d655375a7ae7ff46b85291ed684f2f3497 SHA512 c43b3b46a2a3a3ad5938d4b3b323cab8cc51591c9a514abf6fdb33a51009572c6fdb0653b3e49ebe594ab6ff204dbe49f4d9d34a3fb0d56db1b2392674301d02
 DIST vtkDocHtml-9.3.1.tar.gz 165542400 BLAKE2B da8084137b2848f82bf091535950738bd718e65cac8f461fdfb8e9c63ef6db68acfa02655531c8fe22e35f89395d2d066aa5b051abac0e774883552c898de6d9 SHA512 de0d2153c97864b49a8b99e6fbfc8bab78c1522d25bf40ed1f271a8bb4f1f205b008d6bd39f835816972c8439d01f78b68f34d1f88f87755174f0d559841ba29
+DIST vtkDocHtml-9.4.2.tar.gz 191366459 BLAKE2B 36edb0abc9b72def067fc8ce937c7f3154b071a73932634d753ab112436cf66a4b2b5ccc5f2a474ada4d869c4b61457e514bb2e52c4ccf3fb7d27150aadaed4c SHA512 3beb5c1e49f897d320069517134b34ce9bb8ef21a38f95f76e9e06a7bd260532e62e540b3e684daa93641525fe0097d272edfe8370a2a4eb72176d0fd3575b87

diff --git a/sci-libs/vtk/files/vtk-9.4.2-ThirdParty-gcc15.patch b/sci-libs/vtk/files/vtk-9.4.2-ThirdParty-gcc15.patch
new file mode 100644
index 000000000000..5698d6e8f25f
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.4.2-ThirdParty-gcc15.patch
@@ -0,0 +1,46 @@
+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/itlib/small_vector.hpp
++++ b/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/thirdparty/diy/vtkmdiy/include/vtkmdiy/thirdparty/itlib/small_vector.hpp
+@@ -140,6 +140,7 @@
+ 
+ #include <type_traits>
+ #include <cstddef>
++#include <cstdint>
+ #include <memory>
+ 
+ #define ITLIB_SMALL_VECTOR_ERROR_HANDLING_NONE  0

diff --git a/sci-libs/vtk/files/vtk-9.4.2-find-hdf5-in-global-scope.patch b/sci-libs/vtk/files/vtk-9.4.2-find-hdf5-in-global-scope.patch
new file mode 100644
index 000000000000..ba0ee724b0c2
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.4.2-find-hdf5-in-global-scope.patch
@@ -0,0 +1,26 @@
+From b16f4381d0cdc147e4aff0b6f1fdbac3bbf1de7d Mon Sep 17 00:00:00 2001
+From: Paul Zander <negril.nx@gmail.com>
+Date: Fri, 25 Apr 2025 00:32:48 +0200
+Subject: [PATCH] find hdf5 in global scope
+
+Signed-off-by: Paul Zander <negril.nx@gmail.com>
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 96bb1d4..c5d8e09 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -419,6 +419,11 @@ if (VTK_FORBID_DOWNLOADS AND VTK_BUILD_TESTING)
+     "copy of the testing data.")
+ endif ()
+ 
++if(VTK_MODULE_ENABLE_VTK_hdf5 STREQUAL "WANT" OR
++      VTK_MODULE_ENABLE_VTK_hdf5 STREQUAL "YES")
++  find_package(HDF5 REQUIRED NO_MODULE COMPONENTS HL)
++endif()
++
+ include(vtkModule)
+ include(vtkModuleDebugging)
+ set(vtk_source_directories
+-- 
+2.49.0
+

diff --git a/sci-libs/vtk/files/vtk-9.4.2-fix-fmt-11.patch b/sci-libs/vtk/files/vtk-9.4.2-fix-fmt-11.patch
new file mode 100644
index 000000000000..f586711398ed
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.4.2-fix-fmt-11.patch
@@ -0,0 +1,34 @@
+From 4eaf66f11bb80c0f805fd3361cdd9b412aabe796 Mon Sep 17 00:00:00 2001
+From: Paul Zander <negril.nx+gentoo@gmail.com>
+Date: Tue, 14 Jan 2025 14:00:01 +0100
+Subject: [PATCH] fix fmt-11
+
+Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
+
+diff --git a/ThirdParty/ioss/vtkioss/Ioss_Field.C b/ThirdParty/ioss/vtkioss/Ioss_Field.C
+index fbb2100..8909eef 100644
+--- a/ThirdParty/ioss/vtkioss/Ioss_Field.C
++++ b/ThirdParty/ioss/vtkioss/Ioss_Field.C
+@@ -12,6 +12,7 @@
+ #include <cstdint>
+ #include "vtk_fmt.h"
+ #include VTK_FMT(fmt/ostream.h)
++#include VTK_FMT(fmt/ranges.h)
+ #include <iostream>
+ #include <string>
+ #include <vector>
+diff --git a/ThirdParty/ioss/vtkioss/Ioss_VariableType.C b/ThirdParty/ioss/vtkioss/Ioss_VariableType.C
+index b081dc3..4f1a841 100644
+--- a/ThirdParty/ioss/vtkioss/Ioss_VariableType.C
++++ b/ThirdParty/ioss/vtkioss/Ioss_VariableType.C
+@@ -19,6 +19,7 @@
+ #include VTK_FMT(fmt/core.h)
+ #include VTK_FMT(fmt/format.h)
+ #include VTK_FMT(fmt/ostream.h)
++#include VTK_FMT(fmt/ranges.h)
+ #include <map>
+ #include <sstream>
+ #include <string>
+-- 
+2.48.0
+

diff --git a/sci-libs/vtk/files/vtk-9.4.2-opencascade-components.patch b/sci-libs/vtk/files/vtk-9.4.2-opencascade-components.patch
new file mode 100644
index 000000000000..2b324529c62f
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.4.2-opencascade-components.patch
@@ -0,0 +1,12 @@
+diff --git a/IO/OCCT/CMakeLists.txt b/IO/OCCT/CMakeLists.txt
+index 836d545..2cf67a8 100644
+--- a/IO/OCCT/CMakeLists.txt
++++ b/IO/OCCT/CMakeLists.txt
+@@ -2,6 +2,7 @@ vtk_module_find_package(
+   PACKAGE OpenCASCADE
+   FORWARD_VERSION_REQ EXACT
+   VERSION_VAR "@OpenCASCADE_MAJOR_VERSION@.@OpenCASCADE_MINOR_VERSION@.@OpenCASCADE_MAINTENANCE_VERSION@"
++  COMPONENTS FoundationClasses ModelingData ModelingAlgorithms Visualization ApplicationFramework DataExchange Draw
+ )
+
+ set(opencascade_req_targets

diff --git a/sci-libs/vtk/files/vtk-9.4.2-pegtl-3.x.patch b/sci-libs/vtk/files/vtk-9.4.2-pegtl-3.x.patch
new file mode 100644
index 000000000000..75a0ad8d2260
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.4.2-pegtl-3.x.patch
@@ -0,0 +1,40 @@
+From 8bdf05fd255e0d07fdc61c2b04a5333c9e8dc729 Mon Sep 17 00:00:00 2001
+From: Paul Zander <negril.nx+gentoo@gmail.com>
+Date: Tue, 14 Jan 2025 12:41:12 +0100
+Subject: [PATCH] fix pegtl-3.x
+
+Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
+
+diff --git a/Common/DataModel/vtkCellAttribute.cxx b/Common/DataModel/vtkCellAttribute.cxx
+index 3c022ef..1ed1f66 100644
+--- a/Common/DataModel/vtkCellAttribute.cxx
++++ b/Common/DataModel/vtkCellAttribute.cxx
+@@ -595,10 +595,10 @@ bool vtkCellAttribute::DecodeSpace(
+   {
+     if (!quiet)
+     {
+-      const auto p = err.positions.front();
++      const auto p = err.positions().front();
+       vtkGenericWarningMacro("Attribute Space: " << err.what() << "\n"
+-                                                 << in.line_at(p) << "\n"
+-                                                 << std::string(p.byte_in_line, ' ') << "^\n");
++                                                 << std::string(in.line_at(p)) << "\n"
++                                                 << std::string(p.column, ' ') << "^\n");
+     }
+     return false;
+   }
+diff --git a/ThirdParty/pegtl/Testing/Cxx/TestIncludePEGTL.cxx b/ThirdParty/pegtl/Testing/Cxx/TestIncludePEGTL.cxx
+index 866b313..b324d26 100644
+--- a/ThirdParty/pegtl/Testing/Cxx/TestIncludePEGTL.cxx
++++ b/ThirdParty/pegtl/Testing/Cxx/TestIncludePEGTL.cxx
+@@ -1,6 +1,6 @@
+ #include "vtk_pegtl.h"
+ // clang-format off
+-#include VTK_PEGTL(pegtl/contrib/tracer.hpp)
++#include VTK_PEGTL(pegtl/contrib/trace.hpp)
+ // clang-format on
+ 
+ #include <cstdlib>
+-- 
+2.48.0
+

diff --git a/sci-libs/vtk/files/vtk-9.4.2-vtk-m-jobpool-size.patch b/sci-libs/vtk/files/vtk-9.4.2-vtk-m-jobpool-size.patch
new file mode 100644
index 000000000000..d49e6f87f036
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.4.2-vtk-m-jobpool-size.patch
@@ -0,0 +1,13 @@
+diff --git a/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake/VTKmWrappers.cmake b/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake/VTKmWrappers.cmake
+index 10ba21e..e88299e 100644
+--- a/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake/VTKmWrappers.cmake
++++ b/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake/VTKmWrappers.cmake
+@@ -175,7 +175,7 @@ function(vtkm_setup_job_pool)
+     # will require 3GB of memory. To allow for other NON VTK-m jobs we leave at
+     # least 3GB of memory as 'slop'.
+     cmake_host_system_information(RESULT vtkm_mem_ QUERY TOTAL_PHYSICAL_MEMORY)
+-    math(EXPR vtkm_pool_size "(${vtkm_mem_}/3072)-1")
++    math(EXPR vtkm_pool_size "(${vtkm_mem_}/10240 - 3072)-1")
+ 
+     if (vtkm_pool_size LESS 1)
+       set(vtkm_pool_size 1)

diff --git a/sci-libs/vtk/vtk-9.4.2.ebuild b/sci-libs/vtk/vtk-9.4.2.ebuild
new file mode 100644
index 000000000000..4da711efb6dd
--- /dev/null
+++ b/sci-libs/vtk/vtk-9.4.2.ebuild
@@ -0,0 +1,1043 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# TODO:
+# - add USE flag for remote modules? Those modules can be downloaded
+#	properly before building.
+# - replace usex by usev where applicable
+
+PYTHON_COMPAT=( python3_{11..13} )
+WEBAPP_OPTIONAL=yes
+WEBAPP_MANUAL_SLOT=yes
+
+inherit check-reqs cmake cuda java-pkg-opt-2 multiprocessing python-single-r1 toolchain-funcs virtualx webapp
+
+# Short package version
+MY_PV="$(ver_cut 1-2)"
+
+DESCRIPTION="The Visualization Toolkit"
+HOMEPAGE="https://www.vtk.org/"
+SRC_URI="
+	https://www.vtk.org/files/release/${MY_PV}/VTK-${PV}.tar.gz
+	doc? (
+		https://www.vtk.org/files/release/${MY_PV}/vtkDocHtml-${PV}.tar.gz
+	)
+	examples? (
+		https://www.vtk.org/files/release/${MY_PV}/VTKLargeData-${PV}.tar.gz
+		https://www.vtk.org/files/release/${MY_PV}/VTKLargeDataFiles-${PV}.tar.gz
+	)
+	test? (
+		https://www.vtk.org/files/release/${MY_PV}/VTKData-${PV}.tar.gz
+		https://www.vtk.org/files/release/${MY_PV}/VTKDataFiles-${PV}.tar.gz
+		https://www.vtk.org/files/release/${MY_PV}/VTKLargeData-${PV}.tar.gz
+		https://www.vtk.org/files/release/${MY_PV}/VTKLargeDataFiles-${PV}.tar.gz
+	)
+"
+S="${WORKDIR}/VTK-${PV}"
+
+LICENSE="BSD LGPL-2"
+SLOT="0/${MY_PV}"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
+
+# TODO: Like to simplify these. Mostly the flags related to Groups.
+IUSE="all-modules boost +cgns cuda debug doc examples ffmpeg gdal gles2-only imaging
+	java las +logging minimal mpi mysql +netcdf odbc opencascade openmp openvdb pdal postgres
+	python qt6 +rendering tbb test +threads tk +truetype video_cards_nvidia +views vtkm web"
+
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="
+	all-modules? (
+		boost cgns ffmpeg gdal imaging las mysql netcdf odbc opencascade openvdb pdal
+		postgres rendering truetype views
+	)
+	cuda? ( video_cards_nvidia vtkm )
+	java? ( rendering )
+	minimal? ( !rendering )
+	!minimal? ( rendering )
+	python? ( ${PYTHON_REQUIRED_USE} )
+	qt6? ( rendering )
+	tk? ( python rendering )
+	web? ( python )
+	rendering? ( truetype views )
+"
+# 	cgns? ( !mpi )
+
+# eigen, nlohmann_json, pegtl and utfcpp are referenced in the cmake files
+# and need to be available when VTK consumers configure the dependencies.
+RDEPEND="
+	app-arch/lz4:=
+	app-arch/xz-utils
+	dev-db/sqlite:3
+	dev-libs/double-conversion:=
+	dev-libs/expat
+	dev-libs/icu:=
+	dev-libs/jsoncpp:=
+	>=dev-libs/libfmt-8.1.1:=
+	dev-libs/libxml2:2=
+	dev-libs/libzip:=
+	dev-libs/pugixml
+	media-libs/freetype
+	media-libs/libjpeg-turbo
+	media-libs/libogg
+	media-libs/libpng:=
+	media-libs/tiff:=
+	sci-libs/hdf5:=[mpi=]
+	sys-libs/zlib
+	boost? ( dev-libs/boost:=[mpi?] )
+	cgns? (
+		>=sci-libs/cgnslib-4.1.1:=[hdf5,mpi=]
+		sci-libs/hdf5[cxx]
+		mpi? (
+			sci-libs/hdf5[mpi,unsupported]
+		)
+	)
+	cuda? ( dev-util/nvidia-cuda-toolkit:= )
+	ffmpeg? ( media-video/ffmpeg:= )
+	gdal? ( sci-libs/gdal:= )
+	java? ( >=virtual/jdk-11:= )
+	las? ( sci-geosciences/liblas )
+	!minimal? (
+		>=media-libs/libharu-2.4.0:=
+		media-libs/libtheora
+		sci-libs/proj:=
+	)
+	mpi? ( virtual/mpi[romio] )
+	mysql? ( dev-db/mariadb-connector-c )
+	netcdf? ( sci-libs/netcdf:=[mpi=] )
+	odbc? ( dev-db/unixODBC )
+	openvdb? ( media-gfx/openvdb:= )
+	opencascade? ( sci-libs/opencascade:= )
+	pdal? ( sci-libs/pdal:= )
+	postgres? ( dev-db/postgresql:= )
+	python? (
+		${PYTHON_DEPS}
+		$(python_gen_cond_dep 'mpi? ( dev-python/mpi4py[${PYTHON_USEDEP}] )')
+		$(python_gen_cond_dep 'rendering? ( dev-python/matplotlib[${PYTHON_USEDEP}] )')
+	)
+	qt6? (
+		dev-qt/qtbase:6[gui,opengl,sql,widgets]
+		dev-qt/qtdeclarative:6[opengl]
+		dev-qt/qtshadertools:6
+		x11-libs/libxkbcommon
+	)
+	rendering? (
+		media-libs/glew:=
+		media-libs/libglvnd[X]
+		x11-libs/gl2ps
+		x11-libs/libICE
+		x11-libs/libXcursor
+		x11-libs/libXext
+	)
+	tbb? ( dev-cpp/tbb:= )
+	tk? ( dev-lang/tk:= )
+	truetype? ( media-libs/fontconfig )
+	video_cards_nvidia? ( x11-drivers/nvidia-drivers[tools,static-libs] )
+	views? (
+		x11-libs/libICE
+		x11-libs/libXext
+	)
+	web? ( ${WEBAPP_DEPEND} )
+"
+
+DEPEND="
+	${RDEPEND}
+	dev-cpp/cli11
+	dev-cpp/eigen
+	dev-cpp/nlohmann_json
+	>=dev-libs/pegtl-3
+	dev-libs/utfcpp
+	test? (
+		media-libs/glew
+		x11-libs/libXcursor
+		rendering? ( media-libs/freeglut )
+	)
+"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-9.2.5-pegtl-3.x.patch"
+	"${FILESDIR}/${PN}-9.3.0-java.patch"
+	"${FILESDIR}/${PN}-9.3.0-opencascade.patch"
+	"${FILESDIR}/${PN}-9.3.0-update-for-cuda-12.6.patch"
+
+	"${FILESDIR}/${PN}-9.4.2-pegtl-3.x.patch"
+	"${FILESDIR}/${PN}-9.4.2-fix-fmt-11.patch"
+	"${FILESDIR}/${PN}-9.4.2-opencascade-components.patch"
+	"${FILESDIR}/${PN}-9.4.2-vtk-m-jobpool-size.patch"
+	"${FILESDIR}/${PN}-9.4.2-ThirdParty-gcc15.patch"
+	"${FILESDIR}/${PN}-9.4.2-find-hdf5-in-global-scope.patch"
+)
+
+DOCS=( CONTRIBUTING.md README.md )
+
+vtk_check_reqs() {
+	local dsk="$(( 4096
+		+ $(usex cuda 8192 0)
+		+ $(usex doc 3072 0)
+		+ $(usex examples 3072 0)
+	))"
+	local -x CHECKREQS_DISK_BUILD=${dsk}M
+
+	# In case users are not aware of the extra NINJAOPTS, check
+	# for the more common MAKEOPTS, in case NINJAOPTS is empty
+	local jobs=1
+	if [[ -n "${NINJAOPTS}" ]]; then
+		jobs=$(makeopts_jobs "${NINJAOPTS}" "$(get_nproc)")
+	elif [[ -n "${MAKEOPTS}" ]]; then
+		jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
+	fi
+
+	if use cuda; then
+
+		local mem="$((
+			$(usex cuda 7168 0) * $(( jobs > 4 ? 4 : jobs ))
+		))"
+		local -x CHECKREQS_MEMORY=${mem}M
+	fi
+
+	"check-reqs_pkg_${EBUILD_PHASE}"
+}
+
+cuda_get_host_compiler() {
+	if [[ -n "${NVCC_CCBIN}" ]]; then
+		echo "${NVCC_CCBIN}"
+		return
+	fi
+
+	if [[ -n "${CUDAHOSTCXX}" ]]; then
+		echo "${CUDAHOSTCXX}"
+		return
+	fi
+
+	einfo "Trying to find working CUDA host compiler"
+
+	if ! tc-is-gcc && ! tc-is-clang; then
+		die "$(tc-get-compiler-type) compiler is not supported"
+	fi
+
+	local compiler compiler_type compiler_version
+	local package package_version
+	local NVCC_CCBIN_default
+
+	compiler_type="$(tc-get-compiler-type)"
+	compiler_version="$("${compiler_type}-major-version")"
+
+	# try the default compiler first
+	NVCC_CCBIN="$(tc-getCXX)"
+	NVCC_CCBIN_default="${NVCC_CCBIN}-${compiler_version}"
+
+	compiler="${NVCC_CCBIN/%-${compiler_version}}"
+
+	# store the package so we can re-use it later
+	package="sys-devel/${compiler_type}"
+	package_version="${package}"
+
+	ebegin "testing ${NVCC_CCBIN_default} (default)"
+
+	while ! nvcc -v -ccbin "${NVCC_CCBIN}" - -x cu <<<"int main(){}" &>> "${T}/cuda_get_host_compiler.log" ; do
+		eend 1
+
+		while true; do
+			# prepare next version
+			if ! package_version="<$(best_version "${package_version}")"; then
+				die "could not find a supported version of ${compiler}"
+			fi
+
+			NVCC_CCBIN="${compiler}-$(ver_cut 1 "${package_version/#<${package}-/}")"
+
+			[[ "${NVCC_CCBIN}" != "${NVCC_CCBIN_default}" ]] && break
+		done
+		ebegin "testing ${NVCC_CCBIN}"
+	done
+	eend $?
+
+	# clean temp file
+	rm -f a.out
+
+	echo "${NVCC_CCBIN}"
+	export NVCC_CCBIN
+}
+
+cuda_get_host_native_arch() {
+	[[ -n ${CUDAARCHS} ]] && echo "${CUDAARCHS}"
+
+	__nvcc_device_query || die "failed to query the native device"
+}
+
+vtk_add_sandbox() {
+	local WRITE=()
+
+	# mesa via virtx will make use of udmabuf if it exists
+	[[ -c "/dev/udmabuf" ]] && WRITE+=( "/dev/udmabuf" )
+
+	readarray -t dris <<<"$(
+		find /sys/class/drm/*/device/drm \
+			-mindepth 1 -maxdepth 1 -type d -exec basename {} \; \
+			| sort | uniq | sed 's:^:/dev/dri/:'
+	)"
+
+	[[ -n "${dris[*]}" ]] && WRITE+=( "${dris[@]}" )
+
+	if [[ -d /sys/module/nvidia ]]; then
+		# /dev/nvidia{0-9}
+		readarray -t nvidia_devs <<<"$(
+			find /dev -regextype posix-extended  -regex '/dev/nvidia(|-(nvswitch|vgpu))[0-9]*'
+		)"
+
+		[[ -n "${nvidia_devs[*]}" ]] && WRITE+=( "${nvidia_devs[@]}" )
+
+		WRITE+=(
+			"/dev/nvidiactl"
+			"/dev/nvidia-modeset"
+
+			"/dev/nvidia-vgpuctl"
+
+			"/dev/nvidia-nvlink"
+			"/dev/nvidia-nvswitchctl"
+
+			"/dev/nvidia-uvm"
+			"/dev/nvidia-uvm-tools"
+
+			# "/dev/nvidia-caps/nvidia-cap%d"
+			"/dev/nvidia-caps/"
+			# "/dev/nvidia-caps-imex-channels/channel%d"
+			"/dev/nvidia-caps-imex-channels/"
+		)
+	fi
+
+	# for portage
+	WRITE+=( "/proc/self/task/" )
+
+	local dev
+	for dev in "${WRITE[@]}"; do
+		if [[ ! -e "${dev}" ]]; then
+			eqawarn "${dev} does not exist"
+			# continue
+		fi
+
+		if [[ -w "${dev}" ]]; then
+			eqawarn "${dev} is already writable"
+			# continue
+		fi
+
+		eqawarn "addwrite ${dev}"
+		addwrite "${dev}"
+
+		if [[ ! -d "${dev}" ]] && [[ ! -w "${dev}" ]]; then
+			eerror "can not access ${dev} after addwrite"
+		fi
+	done
+}
+
+pkg_pretend() {
+	[[ ${MERGE_TYPE} != binary ]] && has openmp && tc-check-openmp
+
+	vtk_check_reqs
+
+	# When building binpkgs you probably want to include all targets
+	if use cuda && [[ ${MERGE_TYPE} == "buildonly" ]] && [[ -n "${CUDA_GENERATION}" || -n "${CUDA_ARCH_BIN}" ]]; then
+		local info_message="When building a binary package it's recommended to unset CUDA_GENERATION and CUDA_ARCH_BIN"
+		einfo "$info_message so all available architectures are build."
+	fi
+}
+
+pkg_setup() {
+	[[ ${MERGE_TYPE} != binary ]] && has openmp && tc-check-openmp
+
+	vtk_check_reqs
+
+	if use cuda && [[ ! -e /dev/nvidia-uvm ]]; then
+		# NOTE We try to load nvidia-uvm and nvidia-modeset here,
+		# so __nvcc_device_query does not fail later.
+
+		nvidia-smi -L || true
+	fi
+
+	use java && java-pkg-opt-2_pkg_setup
+	use python && python-single-r1_pkg_setup
+	use web && webapp_pkg_setup
+}
+
+# Note: The following libraries are marked as internal by kitware
+#	and can currently not unbundled:
+#	diy2, exodusII, fides, h5part, kissfft, loguru, verdict, vpic,
+#	vtkm, xdmf{2,3}, zfp
+# TODO: exprtk, ioss
+# Note: As of v9.2.2 we no longer drop bundled libraries, when using system
+# libraries. This just saves a little space. CMake logic of VTK on ThirdParty
+# libraries avoids automagic builds, so deletion is not needed to catch these.
+src_prepare() {
+	if use doc; then
+		einfo "Removing .md5 files from documents."
+		rm -f "${WORKDIR}"/html/*.md5 || die "Failed to remove superfluous hashes"
+		sed -e "s|\${VTK_BINARY_DIR}/Utilities/Doxygen/doc|${WORKDIR}|" \
+			-i Utilities/Doxygen/CMakeLists.txt || die
+	fi
+
+	cmake_src_prepare
+
+	if use test; then
+		ebegin "Copying data files to ${BUILD_DIR}"
+		mkdir -p "${BUILD_DIR}/ExternalData" || die
+		pushd "${BUILD_DIR}/ExternalData" >/dev/null || die
+		ln -sf "../../${S}/.ExternalData/README.rst" . || die
+		ln -sf "../../${S}/.ExternalData/SHA512" . || die
+		popd >/dev/null || die
+		eend "$?"
+	fi
+}
+
+# TODO: check these and consider to use them
+#	VTK_BUILD_SCALED_SOA_ARRAYS
+#	VTK_DISPATCH_{AOS,SOA,TYPED}_ARRAYS
+src_configure() {
+	local mycmakeargs=(
+		-DCMAKE_DISABLE_FIND_PACKAGE_Git="yes"
+		-DVTK_GIT_DESCRIBE="v${PV}"
+		-DVTK_VERSION_FULL="${PV}"
+		-DGIT_EXECUTABLE="${T}/notgit"
+
+		-DCMAKE_POLICY_DEFAULT_CMP0167="OLD"
+		-DCMAKE_POLICY_DEFAULT_CMP0174="OLD"
+		-DCMAKE_POLICY_DEFAULT_CMP0177="OLD"
+
+		-DCMAKE_INSTALL_LICENSEDIR="share/${PN}/licenses"
+		-DVTK_IGNORE_CMAKE_CXX11_CHECKS=yes
+
+		-DVTK_ANDROID_BUILD=OFF
+		-DVTK_IOS_BUILD=OFF
+
+		-DVTK_BUILD_ALL_MODULES="$(usex all-modules)"
+		# we use the pre-built documentation and install these with USE=doc
+		-DVTK_BUILD_DOCUMENTATION=OFF
+		-DVTK_BUILD_EXAMPLES="$(usex examples)"
+
+		# no package in the tree: https://github.com/LLNL/conduit
+		-DVTK_ENABLE_CATALYST=OFF
+		-DVTK_ENABLE_KITS=OFF
+		-DVTK_ENABLE_LOGGING="$(usex logging)"
+		# defaults to ON: USE flag for this?
+		-DVTK_ENABLE_REMOTE_MODULES=OFF
+
+		# disable fetching files during build
+		-DVTK_FORBID_DOWNLOADS="yes"
+
+		-DVTK_GROUP_ENABLE_Imaging="$(usex imaging "YES" "NO")"
+		-DVTK_GROUP_ENABLE_MPI="$(usex mpi "YES" "NO")"
+		-DVTK_GROUP_ENABLE_Qt="$(usex qt6 "YES" "NO")"
+		-DVTK_GROUP_ENABLE_Rendering="$(usex rendering "YES" "NO")"
+		-DVTK_GROUP_ENABLE_StandAlone="$(usex minimal "NO" "YES")"
+		-DVTK_GROUP_ENABLE_Views="$(usex views "YES" "NO")"
+		-DVTK_GROUP_ENABLE_Web="$(usex web "YES" "NO")"
+
+		-DVTK_INSTALL_SDK=ON
+
+		-DVTK_MODULE_ENABLE_VTK_IOCGNSReader="$(usex cgns "YES" "NO")"
+		-DVTK_MODULE_ENABLE_VTK_IOExportPDF="$(usex minimal "NO" "YES")"
+		-DVTK_MODULE_ENABLE_VTK_IOLAS="$(usex las "YES" "NO")"
+		-DVTK_MODULE_ENABLE_VTK_IONetCDF="$(usex netcdf "YES" "NO")"
+		-DVTK_MODULE_ENABLE_VTK_IOOCCT="$(usex opencascade "YES" "NO")"
+		-DVTK_MODULE_ENABLE_VTK_IOOggTheora="$(usex minimal "NO" "YES")"
+		-DVTK_MODULE_ENABLE_VTK_IOOpenVDB="$(usex openvdb "YES" "NO")"
+		-DVTK_MODULE_ENABLE_VTK_IOSQL="YES" # sqlite
+		-DVTK_MODULE_ENABLE_VTK_IOPDAL="$(usex pdal "YES" "NO")"
+		-DVTK_MODULE_ENABLE_VTK_IOXML="YES"
+		-DVTK_MODULE_ENABLE_VTK_IOXMLParser="YES"
+		-DVTK_MODULE_ENABLE_VTK_RenderingFreeType="$(usex truetype "YES" "NO")"
+		-DVTK_MODULE_ENABLE_VTK_RenderingFreeTypeFontConfig="$(usex truetype "YES" "NO")"
+		-DVTK_MODULE_ENABLE_VTK_cgns="$(usex cgns "YES" "NO")"
+		-DVTK_MODULE_ENABLE_VTK_doubleconversion="YES"
+		-DVTK_MODULE_ENABLE_VTK_eigen="YES"
+		-DVTK_MODULE_ENABLE_VTK_expat="YES"
+		-DVTK_MODULE_ENABLE_VTK_fmt="YES"
+		-DVTK_MODULE_ENABLE_VTK_freetype="$(usex truetype "YES" "NO")"
+		-DVTK_MODULE_ENABLE_VTK_hdf5="YES"
+		-DVTK_MODULE_ENABLE_VTK_jpeg="YES"
+		-DVTK_MODULE_ENABLE_VTK_jsoncpp="YES"
+		-DVTK_MODULE_ENABLE_VTK_libharu="$(usex minimal "NO" "YES")"
+		-DVTK_MODULE_ENABLE_VTK_libproj="$(usex minimal "NO" "YES")"
+		-DVTK_MODULE_ENABLE_VTK_libxml2="YES"
+		-DVTK_MODULE_ENABLE_VTK_lz4="YES"
+		-DVTK_MODULE_ENABLE_VTK_lzma="YES"
+		-DVTK_MODULE_ENABLE_VTK_netcdf="$(usex netcdf "YES" "NO")"
+		-DVTK_MODULE_ENABLE_VTK_nlohmannjson="YES"
+		-DVTK_MODULE_ENABLE_VTK_ogg="YES"
+		-DVTK_MODULE_ENABLE_VTK_pegtl="YES"
+		-DVTK_MODULE_ENABLE_VTK_png="YES"
+		-DVTK_MODULE_ENABLE_VTK_pugixml="YES"
+		-DVTK_MODULE_ENABLE_VTK_sqlite="YES"
+		-DVTK_MODULE_ENABLE_VTK_theora="$(usex minimal "NO" "YES")"
+		-DVTK_MODULE_ENABLE_VTK_tiff="YES"
+		-DVTK_MODULE_ENABLE_VTK_utf8="YES"
+		-DVTK_MODULE_ENABLE_VTK_vtkvtkm="$(usex vtkm "YES" "NO")"
+		-DVTK_MODULE_ENABLE_VTK_zlib="YES"
+
+		# not packaged in Gentoo
+		-DVTK_MODULE_USE_EXTERNAL_VTK_fast_float=OFF
+		-DVTK_MODULE_USE_EXTERNAL_VTK_exprtk=OFF
+		-DVTK_MODULE_USE_EXTERNAL_VTK_ioss=OFF
+		-DVTK_MODULE_USE_EXTERNAL_VTK_token=OFF
+		-DVTK_MODULE_USE_EXTERNAL_VTK_verdict=OFF
+
+		-DVTK_RELOCATABLE_INSTALL=ON
+		-DVTK_UNIFIED_INSTALL_TREE=ON
+
+		-DVTK_SMP_ENABLE_OPENMP="$(usex openmp)"
+		-DVTK_SMP_ENABLE_STDTHREAD="$(usex threads)"
+		-DVTK_SMP_ENABLE_TBB="$(usex tbb)"
+
+		-DVTK_USE_CUDA="$(usex cuda)"
+		# use system libraries where possible
+		-DVTK_USE_EXTERNAL=ON
+		# avoid finding package from either ::guru or ::sci
+		-DVTK_USE_MEMKIND=OFF
+		-DVTK_USE_MPI="$(usex mpi)"
+		-DVTK_USE_TK="$(usex tk)"
+		-DVTK_USE_X=ON
+
+		-DVTK_WHEEL_BUILD=OFF
+
+		-DVTK_WRAP_JAVA="$(usex java)"
+		-DVTK_WRAP_PYTHON="$(usex python)"
+	)
+
+	if use all-modules; then
+		mycmakeargs+=(
+			# no package in ::gentoo
+			-DVTK_ENABLE_OSPRAY=OFF
+			# TODO: some of these are tied to the VTK_ENABLE_REMOTE_MODULES
+			# option. Check whether we can download them clean and enable
+			# them.
+			-DVTK_MODULE_ENABLE_VTK_DomainsMicroscopy="NO"
+			-DVTK_MODULE_ENABLE_VTK_fides="NO"
+			-DVTK_MODULE_ENABLE_VTK_FiltersOpenTURNS="NO"
+			-DVTK_MODULE_ENABLE_VTK_IOADIOS2="NO"
+			-DVTK_MODULE_ENABLE_VTK_IOFides="NO"
+
+			-DVTK_MODULE_ENABLE_VTK_RenderingOpenVR="NO"
+			-DVTK_MODULE_ENABLE_VTK_RenderingOpenXR="NO"
+
+			-DVTK_MODULE_USE_EXTERNAL_VTK_cli11="YES"
+		)
+	fi
+
+	if use boost; then
+		mycmakeargs+=(
+			-DVTK_MODULE_ENABLE_VTK_InfovisBoost="YES"
+			-DVTK_MODULE_ENABLE_VTK_InfovisBoostGraphAlgorithms="YES"
+		)
+	fi
+
+	if use cgns; then
+		mycmakeargs+=(
+			-DHDF5_NEED_MPI="$(usex mpi)"
+		)
+	fi
+
+	if use cuda; then
+		cuda_add_sandbox -w
+		addwrite "/proc/self/task"
+		addpredict "/dev/char/"
+
+		if ! test -w /dev/nvidiactl; then
+			# eqawarn "Can't access the GPU at /dev/nvidiactl."
+			# eqawarn "User $(id -nu) is not in the group \"video\"."
+			if [[ -z "${CUDA_GENERATION}" ]] && [[ -z "${CUDA_ARCH_BIN}" ]]; then
+				# build all targets
+				mycmakeargs+=(
+					-DCUDA_GENERATION=""
+				)
+			fi
+		else
+			local -x CUDAARCHS
+			: "${CUDAARCHS:="$(cuda_get_host_native_arch)"}"
+		fi
+
+		# set NVCC_CCBIN
+		local -x CUDAHOSTCXX CUDAHOSTLD
+		CUDAHOSTCXX="$(cuda_get_host_compiler)"
+		CUDAHOSTLD="$(tc-getCXX)"
+		export NVCC_CCBIN="${CUDAHOSTCXX}"
+
+		if tc-is-gcc; then
+			# Filter out IMPLICIT_LINK_DIRECTORIES picked up by CMAKE_DETERMINE_COMPILER_ABI(CUDA)
+			# See /usr/share/cmake/Help/variable/CMAKE_LANG_IMPLICIT_LINK_DIRECTORIES.rst
+			CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES_EXCLUDE=$(
+				"${CUDAHOSTLD}" -E -v - <<<"int main(){}" |& \
+				grep LIBRARY_PATH | cut -d '=' -f 2 | cut -d ':' -f 1
+			)
+		fi
+	fi
+
+	if use debug; then
+		mycmakeargs+=(
+			-DVTK_DEBUG_LEAKS=ON
+			-DVTK_DEBUG_MODULE=ON
+			-DVTK_DEBUG_MODULE_ALL=ON
+			-DVTK_ENABLE_SANITIZER=ON
+			-DVTK_EXTRA_COMPILER_WARNINGS=ON
+			-DVTK_WARN_ON_DISPATCH_FAILURE=ON
+		)
+		if use rendering; then
+			mycmakeargs+=( -DVTK_OPENGL_ENABLE_STREAM_ANNOTATIONS=ON )
+		fi
+	fi
+
+	if use examples || use test; then
+		mycmakeargs+=( -DVTK_USE_LARGE_DATA=ON )
+	fi
+
+	if use ffmpeg; then
+		mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_IOFFMPEG="YES" )
+		if use rendering; then
+			mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_RenderingFFMPEGOpenGL2="YES" )
+		fi
+	fi
+
+	if use gdal; then
+		mycmakeargs+=(
+			-DVTK_MODULE_ENABLE_VTK_GeovisGDAL="YES"
+			-DVTK_MODULE_ENABLE_VTK_IOGDAL="YES"
+			-DVTK_MODULE_ENABLE_VTK_IOGeoJSON="YES"
+		)
+	fi
+
+	if use imaging; then
+		mycmakeargs+=(
+			-DVTK_MODULE_ENABLE_VTK_ImagingColor="YES"
+			-DVTK_MODULE_ENABLE_VTK_ImagingCore="YES"
+			-DVTK_MODULE_ENABLE_VTK_ImagingFourier="YES"
+			-DVTK_MODULE_ENABLE_VTK_ImagingGeneral="YES"
+			-DVTK_MODULE_ENABLE_VTK_ImagingHybrid="YES"
+			-DVTK_MODULE_ENABLE_VTK_ImagingMath="YES"
+			-DVTK_MODULE_ENABLE_VTK_ImagingMorphological="YES"
+			-DVTK_MODULE_ENABLE_VTK_ImagingOpenGL2="YES"
+			-DVTK_MODULE_ENABLE_VTK_ImagingSources="YES"
+			-DVTK_MODULE_ENABLE_VTK_ImagingStatistics="YES"
+			-DVTK_MODULE_ENABLE_VTK_ImagingStencil="YES"
+		)
+		use rendering && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_RenderingImage="YES" )
+	fi
+
+	if ! use java && ! use python; then
+		# defaults to ON
+		mycmakeargs+=( -DVTK_ENABLE_WRAPPING=OFF )
+	fi
+
+	if use java; then
+		mycmakeargs+=(
+			-DCMAKE_INSTALL_JARDIR="share/${PN}"
+			-DVTK_ENABLE_WRAPPING=ON
+			-DVTK_MODULE_ENABLE_VTK_Java="YES"
+			-DVTK_JAVA_SOURCE_VERSION="$(java-config -g PROVIDES_VERSION)"
+			-DVTK_JAVA_TARGET_VERSION="$(java-config -g PROVIDES_VERSION)"
+		)
+	fi
+
+	if use minimal; then
+		mycmakeargs+=(
+			-DVTK_MODULE_ENABLE_VTK_CommonComputationalGeometry="YES"
+			-DVTK_MODULE_ENABLE_VTK_CommonExecutionModel="YES"
+			-DVTK_MODULE_ENABLE_VTK_CommonMath="YES"
+			-DVTK_MODULE_ENABLE_VTK_CommonMisc="YES"
+			-DVTK_MODULE_ENABLE_VTK_CommonSystem="YES"
+			-DVTK_MODULE_ENABLE_VTK_CommonTransforms="YES"
+
+			-DVTK_MODULE_ENABLE_VTK_FiltersCore="YES"
+			-DVTK_MODULE_ENABLE_VTK_FiltersExtraction="YES"
+			-DVTK_MODULE_ENABLE_VTK_FiltersGeneral="YES"
+			-DVTK_MODULE_ENABLE_VTK_FiltersGeneric="YES"
+			-DVTK_MODULE_ENABLE_VTK_FiltersGeometry="YES"
+			-DVTK_MODULE_ENABLE_VTK_FiltersHybrid="NO"
+			-DVTK_MODULE_ENABLE_VTK_FiltersHyperTree="YES"
+			-DVTK_MODULE_ENABLE_VTK_FiltersSources="YES"
+			-DVTK_MODULE_ENABLE_VTK_FiltersStatistics="YES"
+			-DVTK_MODULE_ENABLE_VTK_FiltersVerdict="YES"
+
+			-DVTK_MODULE_ENABLE_VTK_IOCore="YES"
+			-DVTK_MODULE_ENABLE_VTK_IOGeometry="NO"
+			-DVTK_MODULE_ENABLE_VTK_IOLegacy="YES"
+
+			-DVTK_MODULE_ENABLE_VTK_ParallelCore="YES"
+			-DVTK_MODULE_ENABLE_VTK_ParallelDIY="YES"
+		)
+	fi
+
+	if use mpi; then
+		mycmakeargs+=(
+			-DVTK_MODULE_ENABLE_VTK_IOH5part="YES"
+			-DVTK_MODULE_ENABLE_VTK_IOMPIParallel="YES"
+			-DVTK_MODULE_ENABLE_VTK_IOParallel="YES"
+			-DVTK_MODULE_ENABLE_VTK_IOParallelNetCDF="$(usex netcdf "YES" "NO")"
+			-DVTK_MODULE_ENABLE_VTK_IOParallelXML="YES"
+			-DVTK_MODULE_ENABLE_VTK_ParallelMPI="YES"
+			-DVTK_MODULE_ENABLE_VTK_h5part="YES"
+			-DVTK_MODULE_USE_EXTERNAL_VTK_verdict=OFF
+		)
+		use imaging && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_IOMPIImage="YES" )
+		use python && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_ParallelMPI4Py="YES" )
+		if use rendering; then
+			mycmakeargs+=(
+				-DVTK_MODULE_ENABLE_VTK_RenderingParallel="YES"
+				-DVTK_MODULE_ENABLE_VTK_RenderingParallelLIC="YES"
+			)
+		fi
+		use vtkm && mycmakeargs+=( -DVTKm_ENABLE_MPI=ON )
+	fi
+
+	use mysql && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_IOMySQL="YES" )
+	use odbc && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_IOODBC="YES" )
+	use openvdb && mycmakeargs+=( -DOpenVDB_CMAKE_PATH="${ESYSROOT}/usr/$(get_libdir)/cmake/OpenVDB" )
+	use postgres && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_IOPostgreSQL="YES" )
+
+	if use python; then
+		mycmakeargs+=(
+			-DPython3_EXECUTABLE="${PYTHON}"
+			-DVTK_ENABLE_WRAPPING=ON
+			-DVTK_MODULE_ENABLE_VTK_Python="YES"
+			-DVTK_MODULE_ENABLE_VTK_PythonInterpreter="YES"
+			-DVTK_MODULE_ENABLE_VTK_WrappingPythonCore="YES"
+			-DVTK_PYTHON_OPTIONAL_LINK="OFF"
+			-DVTK_PYTHON_SITE_PACKAGES_SUFFIX="lib/${EPYTHON}/site-packages"
+		)
+		use rendering && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_PythonContext2D="YES" )
+	fi
+
+	if use qt6; then
+		mycmakeargs+=(
+			-DCMAKE_INSTALL_QMLDIR="${EPFREIX}/usr/$(get_libdir)/qt6/qml"
+			-DVTK_QT_VERSION="6"
+			-DVTK_MODULE_ENABLE_VTK_GUISupportQt="YES"
+			-DVTK_MODULE_ENABLE_VTK_GUISupportQtQuick="YES"
+		)
+
+		if has_version "dev-qt/qtbase:6[gles2-only]" || use gles2-only; then
+			mycmakeargs+=(
+				# Force using EGL & GLES
+				-DVTK_OPENGL_HAS_EGL=ON
+				-DVTK_OPENGL_USE_GLES=ON
+			)
+		fi
+		if use mysql || use postgres; then
+			mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_GUISupportQtSQL="YES" )
+		fi
+		if use rendering; then
+			mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_RenderingQt="YES" )
+		fi
+		if use views; then
+			mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_ViewsQt="YES" )
+		fi
+	fi
+
+	if use rendering; then
+		mycmakeargs+=(
+			-DVTK_ENABLE_OSPRAY=OFF
+
+			-DVTK_MODULE_ENABLE_VTK_IOExportGL2PS="YES"
+			-DVTK_MODULE_ENABLE_VTK_RenderingAnnotation="YES"
+			-DVTK_MODULE_ENABLE_VTK_RenderingContext2D="YES"
+			-DVTK_MODULE_ENABLE_VTK_RenderingContextOpenGL2="YES"
+			-DVTK_MODULE_ENABLE_VTK_RenderingCore="YES"
+			-DVTK_MODULE_ENABLE_VTK_RenderingExternal="YES"
+			-DVTK_MODULE_ENABLE_VTK_RenderingGL2PSOpenGL2="YES"
+			-DVTK_MODULE_ENABLE_VTK_RenderingHyperTreeGrid="YES"
+			-DVTK_MODULE_ENABLE_VTK_RenderingLICOpenGL2="YES"
+			-DVTK_MODULE_ENABLE_VTK_RenderingLOD="YES"
+			-DVTK_MODULE_ENABLE_VTK_RenderingLabel="YES"
+			-DVTK_MODULE_ENABLE_VTK_RenderingOpenGL2="YES"
+			-DVTK_MODULE_ENABLE_VTK_RenderingRayTracing="YES"
+			-DVTK_MODULE_ENABLE_VTK_RenderingSceneGraph="YES"
+			-DVTK_MODULE_ENABLE_VTK_RenderingUI="YES"
+			-DVTK_MODULE_ENABLE_VTK_RenderingVolume="YES"
+			-DVTK_MODULE_ENABLE_VTK_RenderingVolumeAMR="YES"
+			-DVTK_MODULE_ENABLE_VTK_RenderingVolumeOpenGL2="YES"
+			-DVTK_MODULE_ENABLE_VTK_gl2ps="YES"
+		)
+		use python && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_RenderingMatplotlib="YES" )
+		use tk && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_RenderingTk="YES" )
+		use views && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_ViewsContext2D="YES" )
+		use web && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_RenderingVtkJS="YES" )
+	fi
+
+	# Testing has been changed in 9.2.5: it is now allowed without
+	# requiring to download, if the data files are available locally!
+	if use test; then
+		mycmakeargs+=(
+			-DVTK_BUILD_TESTING=ON
+			# disable fetching data files for the default 'all' target
+			-DVTK_DATA_EXCLUDE_FROM_ALL=OFF
+
+			# requested even if all use flags are off
+			-DVTK_MODULE_ENABLE_VTK_octree="YES"
+			-DVTK_MODULE_ENABLE_VTK_ViewsCore="YES"
+
+			-DVTK_MODULE_USE_EXTERNAL_VTK_cli11="YES"
+		)
+	else
+		mycmakeargs+=( -DVTK_BUILD_TESTING=OFF )
+	fi
+
+	# FIXME: upstream provides 4 threading models, as of 9.1.0. These are
+	# sequential, stdthread, openmp and tbb. AFAICS all of them can be
+	# enabled at the same time. Sequential and STDThread are enabled by
+	# default. The default selected type for the build is sequential.
+	# Assuming sequential < STDThread < openmp < tbb wrt speed, although
+	# this is dependent on the actual scenario where threading is used.
+	if use tbb; then
+		mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="TBB" )
+	elif use openmp; then # FIXME doesn't work with clang
+		mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="OpenMP" )
+	elif use threads; then
+		mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="STDThread" )
+	else
+		mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="Sequential" )
+	fi
+
+	use tk && mycmakeargs+=( -DVTK_GROUP_ENABLE_Tk="YES" )
+
+	if use views; then
+		mycmakeargs+=(
+			-DVTK_MODULE_ENABLE_VTK_ViewsCore="YES"
+			-DVTK_MODULE_ENABLE_VTK_ViewsInfovis="YES"
+		)
+	fi
+
+	if use vtkm; then
+		mycmakeargs+=(
+			-DVTK_MODULE_ENABLE_VTK_AcceleratorsVTKmCore="YES"
+			-DVTK_MODULE_ENABLE_VTK_AcceleratorsVTKmDataModel="YES"
+			-DVTK_MODULE_ENABLE_VTK_AcceleratorsVTKmFilters="YES"
+			-DVTKm_ENABLE_CPACK="no" # "Enable CPack packaging of VTKm" ON
+			-DVTKm_ENABLE_CUDA="$(usex cuda)" # "Enable Cuda support" OFF
+			-DVTKm_ENABLE_DOCUMENTATION="$(usex doc)" # "Build Doxygen documentation" OFF
+			-DVTKm_ENABLE_EXAMPLES="$(usex examples)" # "Build examples" OFF
+			-DVTKm_ENABLE_HDF5_IO="yes" # "Enable HDF5 support" OFF
+			-DVTKm_HDF5_IS_PARALLEL="$(usex mpi)"
+			-DVTKm_ENABLE_LOGGING="$(usex logging)" # "Enable VTKm Logging" ON
+			-DVTKm_ENABLE_MPI="$(usex mpi)" # "Enable MPI support" OFF
+			-DVTKm_ENABLE_OPENMP="$(usex openmp)" # "Enable OpenMP support" OFF
+			-DVTKm_ENABLE_RENDERING="$(usex rendering)" # "Enable rendering library" ON
+			-DVTKm_ENABLE_TBB="$(usex tbb)" # "Enable TBB support" OFF
+			-DVTKm_ENABLE_TESTING="$(usex test)" # "Enable VTKm Testing" ON
+			-DVTKm_ENABLE_TUTORIALS="no" # "Build tutorials" OFF
+			-DVTKm_NO_ASSERT_CUDA="yes" # "Disable assertions for CUDA devices." ON
+			-DVTKm_NO_ASSERT="no" # "Disable assertions in debugging builds." OFF
+			-DVTKm_NO_INSTALL_README_LICENSE="ON" # bug #793221 # "disable the installation of README and LICENSE files" OFF
+			-DVTKm_SKIP_LIBRARY_VERSIONS="no" # "Skip versioning VTK-m libraries" OFF
+			-DVTKm_Vectorization="none" # only sets compiler flags
+		)
+	fi
+
+	if use web; then
+		mycmakeargs+=(
+			-DVTK_MODULE_ENABLE_VTK_WebCore="YES"
+			-DVTK_MODULE_ENABLE_VTK_WebGLExporter="YES"
+		)
+		use python && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_WebPython="YES" )
+	fi
+
+	cmake_src_configure
+}
+
+src_compile() {
+	use test && cmake_build VTKData
+	cmake_src_compile
+}
+
+src_test() {
+	vtk_add_sandbox
+
+	addwrite /dev/fuse
+
+	# The build system prepends /usr/$(get_libdir) to the RUNPATH instead of appending.
+	# Set LD_LIBRARY_PATH to use the just build libraries.
+	local -x LD_LIBRARY_PATH="${BUILD_DIR}/$(get_libdir)${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
+
+	# export VTK_SMP_BACKEND_IN_USE="STDThread"
+
+	local -x -a CMAKE_SKIP_TESTS
+
+	if [[ "${CMAKE_RUN_OPTIONAL_TESTS:=no}" != "yes" ]]; then
+		local -a REALLY_BAD_TESTS BAD_TESTS RANDOM_FAIL_TESTS
+		# don't work at all
+		REALLY_BAD_TESTS=(
+			# File missing? ExternalData/Testing/Data/MotionFX/position_file/Sprocket_New.prn
+			"VTK::IOMotionFXCxx-TestMotionFXCFGReaderPositionFile$" # (Subprocess aborted)
+
+			"VTK::InteractionWidgetsCxx-TestBrokenLineWidget$"
+			"VTK::InteractionWidgetsCxx-TestPolyPlane$"
+			"VTK::AcceleratorsVTKmFiltersCxx-TestVTKMClipWithImplicitFunction$" # (NUMERICAL)
+			"VTK::AcceleratorsVTKmFiltersCxx-TestVTKMHistogram$" # (Failed)
+			"VTK::AcceleratorsVTKmFiltersCxx-TestVTKMMarchingCubes$" # (Failed)
+			"VTK::AcceleratorsVTKmFiltersCxx-TestVTKMMarchingCubes2$" # (Failed)
+			"VTK::ChartsCoreCxx-TestChartDoubleColors$" # (Failed)
+			"VTK::ChartsCoreCxx-TestChartDoubleColorsOpaque$" # (Failed)
+			"VTK::ChartsCoreCxx-TestParallelCoordinatesDouble$" # (Failed)
+			"VTK::CommonDataModelCxx-TestHyperTreeGridGeometricLocator$" # (Failed)
+			"VTK::CommonDataModelCxx-TestTriangle$" # (Failed)
+			"VTK::CommonDataModelCxx-UnitTestCells$" # (Failed)
+			"VTK::FiltersCoreCxx-TestDecimatePolylineFilter$" # (Failed)
+			"VTK::FiltersCoreCxx-TestImplicitPolyDataDistanceCube$" # (Failed)
+			"VTK::FiltersCorePython-TestSphereTreeFilter$" # (Failed)
+			"VTK::FiltersFlowPathsCxx-TestEvenlySpacedStreamlines2D$" # (Failed)
+			"VTK::FiltersGeneralCxx-TestContourTriangulatorHoles$" # (Failed)
+			"VTK::FiltersParallelCxx-TestAngularPeriodicFilter$" # (Failed)
+			"VTK::FiltersParallelDIY2Cxx-TestRedistributeDataSetFilter"
+			"VTK::FiltersParallelDIY2Cxx-MPI-TestProbeLineFilter$" # (Failed)
+			"VTK::FiltersSelectionCxx-TestLinearSelector3D$" # (Failed)
+			"VTK::GUISupportQtQuickCxx-TestQQuickVTKRenderItem$" # (Failed)
+			"VTK::GUISupportQtQuickCxx-TestQQuickVTKRenderItemWidget$" # (Failed)
+			"VTK::GUISupportQtQuickCxx-TestQQuickVTKRenderWindow$" # (Failed)
+			"VTK::RenderingExternalCxx-TestGLUTRenderWindow$" # (Failed)
+			"VTK::RenderingFreeTypeFontConfigCxx-TestSystemFontRendering$" # (Failed)
+			"VTK::IOExportGL2PSCxx-TestGL2PSExporterVolumeRaster" # (Failed)
+			# "VTK::IOExportGL2PSCxx-TestGL2PSExporterVolumeRaster-RasterizePNG$" # (Not Run)
+			# "VTK::IOExportGL2PSCxx-TestGL2PSExporterVolumeRaster-VerifyRasterizedPDFPNG$" # (Failed)
+			# "VTK::IOExportGL2PSCxx-TestGL2PSExporterVolumeRaster-VerifyRasterizedPNG$" # (Failed)
+			"VTK::IOExportPDFCxx-TestPDFTransformedText-VerifyRasterizedPDFPNG$" # (Failed)
+			"VTK::IOOCCTCxx-TestOCCTReader$" # (Failed)
+			"VTK::RenderingCorePython-pickImageData$" # (Failed)
+			"VTK::RenderingRayTracing-HeaderTest$" # (Failed)
+		)
+
+		# don't work in src_test but when on their own
+		BAD_TESTS=(
+			"VTK::AcceleratorsVTKmCoreCxx-TestVTKMImplicitDataArray$" # (NUMERICAL)
+			"VTK::AcceleratorsVTKmFiltersCxx-TestVTKMCleanGrid$" # (NUMERICAL)
+			"VTK::AcceleratorsVTKmFiltersCxx-TestVTKMClip$" # (NUMERICAL)
+			"VTK::AcceleratorsVTKmFiltersCxx-TestVTKMExternalFaces$" # (Failed)
+			"VTK::AcceleratorsVTKmFiltersCxx-TestVTKMExtractVOI$" # (NUMERICAL)
+			"VTK::AcceleratorsVTKmFiltersCxx-TestVTKMLevelOfDetail$" # (NUMERICAL)
+			"VTK::AcceleratorsVTKmFiltersCxx-TestVTKMPointElevation$" # (NUMERICAL)
+			"VTK::AcceleratorsVTKmFiltersCxx-TestVTKMPointTransform$" # (NUMERICAL)
+			"VTK::AcceleratorsVTKmFiltersCxx-TestVTKMPolyDataNormals$" # (NUMERICAL)
+			"VTK::AcceleratorsVTKmFiltersCxx-TestVTKMThreshold$" # (NUMERICAL)
+			"VTK::AcceleratorsVTKmFiltersCxx-TestVTKMThreshold2$" # (NUMERICAL)
+			"VTK::AcceleratorsVTKmFiltersCxx-TestVTKMTriangleMeshPointNormals$" # (NUMERICAL)
+			"VTK::AcceleratorsVTKmFiltersCxx-TestVTKMWarpScalar$" # (NUMERICAL)
+			"VTK::AcceleratorsVTKmFiltersCxx-TestVTKMWarpVector$" # (NUMERICAL)
+			"VTK::ImagingOpenGL2Cxx-TestOpenGLImageGradient$" # (NUMERICAL)
+			"VTK::InteractionWidgetsCxx-TestResliceCursorWidget2$" # (Failed)
+			"VTK::InteractionWidgetsCxx-TestResliceCursorWidget3$" # (Failed)
+			"VTK::InteractionWidgetsPython-TestTensorWidget2$" # (Failed)
+			"VTK::RenderingCoreCxx-TestTextureRGBADepthPeeling$" # (Failed)
+			"VTK::RenderingLICOpenGL2Cxx-SurfaceLICCurvedContrastEnhancedBlended$" # (NUMERICAL)
+			"VTK::RenderingLICOpenGL2Cxx-SurfaceLICCurvedContrastEnhancedBlendedSmallGrain$" # (NUMERICAL)
+			"VTK::RenderingLICOpenGL2Cxx-SurfaceLICCurvedContrastEnhancedColorBlendedSmallGrain$" # (NUMERICAL)
+			"VTK::RenderingLICOpenGL2Cxx-SurfaceLICCurvedContrastEnhancedColorBlendedSmallGrainMask$" # (NUMERICAL)
+			"VTK::RenderingLICOpenGL2Cxx-SurfaceLICCurvedContrastEnhancedColorMappedSmallGrain$" # (NUMERICAL)
+			"VTK::RenderingLICOpenGL2Cxx-SurfaceLICCurvedContrastEnhancedColorMappedSmallGrainMask$" # (NUMERICAL)
+			"VTK::RenderingLICOpenGL2Cxx-SurfaceLICCurvedContrastEnhancedMapped$" # (NUMERICAL)
+			"VTK::RenderingLICOpenGL2Cxx-SurfaceLICCurvedContrastEnhancedMappedSmallGrain$" # (NUMERICAL)
+			"VTK::RenderingLICOpenGL2Cxx-SurfaceLICCurvedContrastEnhancedMappedSmallVectorNormalizeOff$" # (NUMERICAL)
+			"VTK::RenderingLICOpenGL2Cxx-SurfaceLICCurvedContrastEnhancedSmallGrainMask$" # (NUMERICAL)
+			"VTK::RenderingLICOpenGL2Cxx-SurfaceLICCurvedDefaults$" # (NUMERICAL)
+			"VTK::RenderingLICOpenGL2Cxx-SurfaceLICCurvedDefaultsColor$" # (NUMERICAL)
+			"VTK::RenderingLICOpenGL2Cxx-SurfaceLICCurvedEnhancedVectorNormalizeOff$" # (NUMERICAL)
+			"VTK::RenderingLICOpenGL2Cxx-SurfaceLICMultiBlockContrastEnhancedPerlin$" # (NUMERICAL)
+			"VTK::RenderingLICOpenGL2Cxx-SurfaceLICPlanarContrastEnhanced$" # (NUMERICAL)
+			"VTK::RenderingLICOpenGL2Cxx-SurfaceLICPlanarDefaults$" # (NUMERICAL)
+			"VTK::RenderingLICOpenGL2Cxx-SurfaceLICPlanarVectorNormalizeOff$" # (NUMERICAL)
+			"VTK::RenderingLICOpenGL2Cxx-SurfaceLICPlanarVectorNormalizeOffMediumGrainPerlin$" # (NUMERICAL)
+			"VTK::RenderingLICOpenGL2Cxx-SurfaceLICPlanarVectorNormalizeOffMediumGrainUniform$" # (NUMERICAL)
+			"VTK::RenderingLICOpenGL2Cxx-TestImageDataLIC2D$" # (NUMERICAL)
+			"VTK::RenderingLICOpenGL2Cxx-TestStructuredGridLIC2DXSlice$" # (NUMERICAL)
+			"VTK::RenderingLICOpenGL2Cxx-TestStructuredGridLIC2DYSlice$" # (NUMERICAL)
+			"VTK::RenderingLICOpenGL2Cxx-TestStructuredGridLIC2DZSlice$" # (NUMERICAL)
+			"VTK::RenderingMatplotlibCxx-TestContextMathTextImage$" # (NUMERICAL)
+			"VTK::RenderingMatplotlibCxx-TestIndexedLookupScalarBar$" # (NUMERICAL)
+			"VTK::RenderingMatplotlibCxx-TestMathTextActor$" # (NUMERICAL)
+			"VTK::RenderingMatplotlibCxx-TestMathTextActor3D$" # (NUMERICAL)
+			"VTK::RenderingMatplotlibCxx-TestRenderString$" # (NUMERICAL)
+			"VTK::RenderingMatplotlibCxx-TestScalarBarCombinatorics$" # (NUMERICAL)
+			"VTK::RenderingMatplotlibCxx-TestStringToPath$" # (NUMERICAL)
+			"VTK::RenderingOpenGL2Cxx-TestGlyph3DMapperPickability$" # (Failed)
+		)
+
+		RANDOM_FAIL_TESTS=(
+			"VTK::FiltersFlowPathsCxx-TestStreamSurface$"
+			"VTK::AcceleratorsVTKmFiltersCxx-TestVTKMAbort$"
+			"VTK::AcceleratorsVTKmFiltersPython-TestVTKMSlice$"
+			"VTK::IOImageCxx-TestTIFFReaderMultipleMulti$"
+
+			"VTK::FiltersFlowPathsCxx-TestParticleTracers$"
+			"VTK::RenderingOpenGL2Cxx-TestFluidMapper$"
+			"VTK::FiltersCellGridCxx-TestCellGridEvaluator$"
+			"VTK::IOImageCxx-TestTIFFReaderMulti$"
+			"VTK::FiltersGeneralCxx-TestWarpScalarGenerateEnclosure$"
+			"VTK::FiltersGeneralCxx-expCos$"
+			"VTK::FiltersGeneralCxx-TestQuadraturePoints$"
+		)
+
+		CMAKE_SKIP_TESTS+=(
+			"${REALLY_BAD_TESTS[@]}"
+			"${BAD_TESTS[@]}"
+			"${RANDOM_FAIL_TESTS[@]}"
+		)
+	fi
+
+	CMAKE_SKIP_TESTS+=(
+		# requires VTK_USE_MICROSOFT_MEDIA_FOUNDATION
+		"^VTK::IOMovieCxx-Test" # Skipped
+	)
+
+	if use openmp; then
+		# TODO Times out under openmp
+		# local -x VTK_SMP_BACKEND_IN_USE="STDThread"
+		# local -x VTK_SMP_BACKEND_IN_USE="Sequential"
+		# local -x VTK_SMP_BACKEND_IN_USE="OpenMP"
+		# local -x VTK_SMP_BACKEND_IN_USE="TBB"
+
+		CMAKE_SKIP_TESTS+=(
+			"^VTK::CommonCoreCxx-TestSMP$"
+		)
+	fi
+
+	virtx cmake_src_test -j1
+}
+
+src_install() {
+	use web && webapp_src_preinst
+
+	# Stop web page images from being compressed
+	if use doc; then
+		HTML_DOCS=( "${WORKDIR}/html/." )
+	fi
+
+	cmake_src_install
+
+	use java && java-pkg_regjar "${ED}/usr/share/${PN}/${PN}.jar"
+
+	# install examples
+	if use examples; then
+		einfo "Installing examples"
+		mv -v {E,e}xamples || die
+		dodoc -r examples
+		docompress -x "/usr/share/doc/${PF}/examples"
+
+		einfo "Installing datafiles"
+		insinto "/usr/share/${PN}/data"
+		doins -r "${S}/.ExternalData"
+	fi
+
+	use python && python_optimize
+
+	use web && webapp_src_install
+}
+
+# webapp.eclass exports these but we want it optional #534036
+pkg_postinst() {
+	use web && webapp_pkg_postinst
+
+	if use examples; then
+		einfo "You can get more and updated examples at"
+		einfo "https://kitware.github.io/vtk-examples/site/"
+	fi
+}
+
+pkg_prerm() {
+	use web && webapp_pkg_prerm
+}


             reply	other threads:[~2025-05-08  6:29 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-08  6:29 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-01-14 16:20 [gentoo-commits] repo/gentoo:master commit in: sci-libs/vtk/files/, sci-libs/vtk/ Andreas Sturmlechner
2024-12-05 18:01 Sam James
2024-11-25 15:32 Andreas Sturmlechner
2024-09-08 13:51 Sam James
2024-09-07 14:50 Sam James
2024-07-04 11:12 Miroslav Šulc
2024-04-11  9:44 Andrew Ammerlaan
2024-01-10 12:41 Sam James
2023-11-21 12:47 Guilherme Amadio
2023-03-07  7:57 Sam James
2023-01-30 13:26 Sam James
2022-09-01  2:24 Sam James
2022-02-21 23:24 Sam James
2021-12-03 22:51 Sam James
2021-06-10  3:38 Sam James
2020-12-15  2:13 Sam James
2020-06-06 13:17 Andreas Sturmlechner
2020-06-06 10:04 Andreas Sturmlechner
2020-06-06  9:42 Andreas Sturmlechner
2019-11-28 19:04 Andreas Sturmlechner
2019-08-30  8:57 Andreas Sturmlechner
2017-01-26 20:12 David Seifert
2017-01-02 22:09 Justin Lecher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1746685604.2bd9e207d4a1c2e5e964b8a3ea9c86b890bb13bc.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox