public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/vtk/, sci-libs/vtk/files/
@ 2016-03-25 17:07 David Seifert
  0 siblings, 0 replies; 19+ messages in thread
From: David Seifert @ 2016-03-25 17:07 UTC (permalink / raw
  To: gentoo-commits

commit:     996251840da71035c44744e6bce83444bb866975
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 25 17:07:07 2016 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Fri Mar 25 17:07:25 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99625184

sci-libs/vtk: Add explicit cast to fix gdal-2.0 breakage

Gentoo-Bug: 554316

Package-Manager: portage-2.2.28

 sci-libs/vtk/files/vtk-6.1.0-gdal2.patch |  33 +++
 sci-libs/vtk/vtk-6.1.0-r2.ebuild         | 390 +++++++++++++++++++++++++++++++
 2 files changed, 423 insertions(+)

diff --git a/sci-libs/vtk/files/vtk-6.1.0-gdal2.patch b/sci-libs/vtk/files/vtk-6.1.0-gdal2.patch
new file mode 100644
index 0000000..c218641
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-6.1.0-gdal2.patch
@@ -0,0 +1,33 @@
+diff --git a/IO/GDAL/vtkGDALVectorReader.cxx b/IO/GDAL/vtkGDALVectorReader.cxx
+index 86854a0..a0e234a 100644
+--- a/IO/GDAL/vtkGDALVectorReader.cxx
++++ b/IO/GDAL/vtkGDALVectorReader.cxx
+# Patch to build against newer GDAL per upstream commit
+# https://projects.archlinux.org/svntogit/community.git/tree/trunk/gdal2.patch?h=packages/vtk&id=43307598a98872fd4ce7739e47f5bb4cfcb5372d
+@@ -44,7 +44,7 @@ class vtkGDALVectorReader::Internal
+ public:
+   Internal( const char* srcName, int srcMode, int appendFeatures, int addFeatIds )
+     {
+-    this->Source = OGRSFDriverRegistrar::Open( srcName, srcMode, &this->Driver );
++    this->Source = (GDALDataset*) OGROpen( srcName, srcMode, NULL );
+     if ( ! this->Source )
+       {
+       this->LastError = CPLGetLastErrorMsg();
+@@ -61,7 +61,7 @@ public:
+     {
+     if ( this->Source )
+       {
+-      OGRDataSource::DestroyDataSource( this->Source );
++      GDALClose( (GDALDatasetH) this->Source );
+       }
+     }
+
+@@ -304,7 +304,7 @@ public:
+     return nCells;
+     }
+
+-  OGRDataSource* Source;
++  GDALDataset* Source;
+   OGRSFDriver* Driver;
+   const char* LastError;
+   int LayerIdx;

diff --git a/sci-libs/vtk/vtk-6.1.0-r2.ebuild b/sci-libs/vtk/vtk-6.1.0-r2.ebuild
new file mode 100644
index 0000000..c653faa
--- /dev/null
+++ b/sci-libs/vtk/vtk-6.1.0-r2.ebuild
@@ -0,0 +1,390 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+CMAKE_MAKEFILE_GENERATOR=ninja
+WEBAPP_OPTIONAL=yes
+WEBAPP_MANUAL_SLOT=yes
+
+inherit eutils flag-o-matic java-pkg-opt-2 python-single-r1 qmake-utils versionator toolchain-funcs cmake-utils virtualx webapp
+
+# Short package version
+SPV="$(get_version_component_range 1-2)"
+
+DESCRIPTION="The Visualization Toolkit"
+HOMEPAGE="http://www.vtk.org/"
+SRC_URI="
+	http://www.${PN}.org/files/release/${SPV}/VTK-${PV}.tar.gz
+	doc? ( http://www.${PN}.org/files/release/${SPV}/${PN}DocHtml-${PV}.tar.gz )
+	test? (
+		http://www.${PN}.org/files/release/${SPV}/VTKData-${PV}.tar.gz
+		http://www.${PN}.org/files/release/${SPV}/VTKLargeData-${PV}.tar.gz
+		)
+	"
+
+LICENSE="BSD LGPL-2"
+KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
+SLOT="0"
+IUSE="
+	all-modules aqua boost cg doc examples imaging ffmpeg gdal java json kaapi mpi
+	mysql odbc offscreen postgres python qt4 rendering smp tbb test theora tk tcl
+	video_cards_nvidia views web xdmf2 R +X"
+
+REQUIRED_USE="
+	all-modules? ( python xdmf2 )
+	java? ( qt4 )
+	python? ( ${PYTHON_REQUIRED_USE} )
+	tcl? ( rendering )
+	smp? ( ^^ ( kaapi tbb ) )
+	test? ( python )
+	tk? ( tcl )
+	web? ( python )
+	^^ ( X aqua offscreen )
+	"
+
+RDEPEND="
+	dev-libs/expat
+	dev-libs/jsoncpp
+	dev-libs/libxml2:2
+	>=media-libs/freetype-2.5.4
+	media-libs/libpng:0
+	media-libs/mesa
+	media-libs/libtheora
+	media-libs/tiff:0
+	sci-libs/exodusii
+	sci-libs/hdf5:=
+	sci-libs/netcdf-cxx:3
+	sys-libs/zlib
+	virtual/jpeg:0
+	virtual/opengl
+	>=x11-libs/gl2ps-1.3.8
+	x11-libs/libX11
+	x11-libs/libXmu
+	x11-libs/libXt
+	boost? ( >=dev-libs/boost-1.40.0[mpi?] )
+	cg? ( media-gfx/nvidia-cg-toolkit )
+	examples? (
+		dev-qt/qtcore:4
+		dev-qt/qtgui:4
+		sci-libs/vtkdata
+	)
+	ffmpeg? ( virtual/ffmpeg )
+	gdal? ( sci-libs/gdal )
+	java? ( >=virtual/jre-1.5:* )
+	kaapi? ( <sci-libs/xkaapi-3 )
+	mpi? (
+		virtual/mpi[cxx,romio]
+		python? ( dev-python/mpi4py[${PYTHON_USEDEP}] )
+	mysql? ( virtual/mysql )
+	odbc? ( dev-db/unixODBC )
+	offscreen? ( media-libs/mesa[osmesa] )
+	postgres? ( dev-db/postgresql:= )
+	python? (
+		${PYTHON_DEPS}
+		dev-python/sip[${PYTHON_USEDEP}]
+		)
+	)
+	qt4? (
+		dev-qt/designer:4
+		dev-qt/qtcore:4
+		dev-qt/qtgui:4
+		dev-qt/qtopengl:4
+		dev-qt/qtsql:4
+		dev-qt/qtwebkit:4
+		python? ( dev-python/PyQt4[${PYTHON_USEDEP}] )
+		)
+	tbb? ( dev-cpp/tbb )
+	tcl? ( dev-lang/tcl:0= )
+	tk? ( dev-lang/tk:0= )
+	video_cards_nvidia? ( media-video/nvidia-settings )
+	web? (
+		${WEBAPP_DEPEND}
+		python? (
+			dev-python/autobahn[${PYTHON_USEDEP}]
+			dev-python/twisted-core[${PYTHON_USEDEP}]
+			dev-python/zope-interface[${PYTHON_USEDEP}]
+			)
+		)
+	xdmf2? ( sci-libs/xdmf2 )
+	R? ( dev-lang/R )"
+DEPEND="${RDEPEND}
+	doc? ( app-doc/doxygen )
+	java? ( >=virtual/jdk-1.5 )"
+
+S="${WORKDIR}"/VTK-${PV}
+
+PATCHES=(
+	"${FILESDIR}"/${P}-freetype.patch
+	"${FILESDIR}"/${P}-install.patch
+	"${FILESDIR}"/${P}-system.patch
+	"${FILESDIR}"/${P}-netcdf.patch
+	"${FILESDIR}"/${P}-web.patch
+	"${FILESDIR}"/${P}-glext.patch
+	"${FILESDIR}"/${P}-memset.patch
+	"${FILESDIR}"/${P}-gdal2.patch
+	)
+
+RESTRICT=test
+
+pkg_setup() {
+	use java && java-pkg-opt-2_pkg_setup
+	use python && python-single-r1_pkg_setup
+	use web && webapp_pkg_setup
+
+	append-cppflags -D__STDC_CONSTANT_MACROS -D_UNICODE
+}
+
+src_prepare() {
+	sed \
+		-e 's:libproj4:libproj:g' \
+		-e 's:lib_proj.h:lib_abi.h:g' \
+		-i CMake/FindLIBPROJ4.cmake || die
+
+	local x
+	# missing: VPIC alglib exodusII freerange ftgl libproj4 mrmpi sqlite utf8 verdict xmdf2 xmdf3
+	for x in expat freetype gl2ps hdf5 jpeg jsoncpp libxml2 netcdf oggtheora png tiff zlib; do
+		ebegin "Dropping bundled ${x}"
+		rm -r ThirdParty/${x}/vtk${x} || die
+		eend $?
+	done
+	rm -r \
+		ThirdParty/AutobahnPython/autobahn \
+		ThirdParty/Twisted/twisted \
+		ThirdParty/ZopeInterface/zope \
+		|| die
+
+	use java && export JAVA_HOME="${EPREFIX}/etc/java-config-2/current-system-vm"
+
+	if use mpi; then
+		export CC=mpicc
+		export CXX=mpicxx
+		export FC=mpif90
+		export F90=mpif90
+		export F77=mpif77
+	fi
+
+	cmake-utils_src_prepare
+}
+
+src_configure() {
+	# general configuration
+	local mycmakeargs=(
+		-Wno-dev
+#		-DCMAKE_SKIP_RPATH=YES
+		-DVTK_DIR="${S}"
+		-DVTK_INSTALL_LIBRARY_DIR=$(get_libdir)
+		-DVTK_DATA_ROOT:PATH="${EPREFIX}/usr/share/${PN}/data"
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+		-DVTK_CUSTOM_LIBRARY_SUFFIX=""
+		-DBUILD_SHARED_LIBS=ON
+		-DVTK_USE_SYSTEM_AUTOBAHN=ON
+		-DVTK_USE_SYSTEM_EXPAT=ON
+		-DVTK_USE_SYSTEM_FREETYPE=ON
+		-DVTK_USE_SYSTEM_FreeType=ON
+		-DVTK_USE_SYSTEM_GL2PS=ON
+		-DVTK_USE_SYSTEM_HDF5=ON
+		-DVTK_USE_SYSTEM_JPEG=ON
+		-DVTK_USE_SYSTEM_LIBPROJ4=OFF
+#		-DLIBPROJ4_DIR="${EPREFIX}/usr"
+		-DVTK_USE_SYSTEM_LIBXML2=ON
+		-DVTK_USE_SYSTEM_LibXml2=ON
+		-DVTK_USE_SYSTEM_NETCDF=ON
+		-DVTK_USE_SYSTEM_OGGTHEORA=ON
+		-DVTK_USE_SYSTEM_PNG=ON
+		-DVTK_USE_SYSTEM_TIFF=ON
+		-DVTK_USE_SYSTEM_TWISTED=ON
+		-DVTK_USE_SYSTEM_XDMF2=OFF
+		-DVTK_USE_SYSTEM_XDMF3=OFF
+		-DVTK_USE_SYSTEM_ZLIB=ON
+		-DVTK_USE_SYSTEM_ZOPE=ON
+		-DVTK_USE_SYSTEM_LIBRARIES=ON
+		-DVTK_USE_GL2PS=ON
+		-DVTK_USE_LARGE_DATA=ON
+		-DVTK_USE_PARALLEL=ON
+	)
+
+	mycmakeargs+=(
+		-DVTK_EXTRA_COMPILER_WARNINGS=ON
+		-DVTK_Group_StandAlone=ON
+	)
+
+	mycmakeargs+=(
+		$(cmake-utils_use_build doc DOCUMENTATION)
+		$(cmake-utils_use_build examples EXAMPLES)
+		$(cmake-utils_use_build test VTK_BUILD_ALL_MODULES_FOR_TESTS)
+		$(cmake-utils_use all-modules VTK_BUILD_ALL_MODULES)
+		$(cmake-utils_use doc DOCUMENTATION_HTML_HELP)
+		$(cmake-utils_use imaging VTK_Group_Imaging)
+		$(cmake-utils_use mpi VTK_Group_MPI)
+		$(cmake-utils_use qt4 VTK_Group_Qt)
+		$(cmake-utils_use rendering VTK_Group_Rendering)
+		$(cmake-utils_use tk VTK_Group_Tk)
+		$(cmake-utils_use views VTK_Group_Views)
+		$(cmake-utils_use web VTK_Group_Web)
+		$(cmake-utils_use web VTK_WWW_DIR="${ED}/${MY_HTDOCSDIR}")
+		$(cmake-utils_use java VTK_WRAP_JAVA)
+		$(cmake-utils_use python VTK_WRAP_PYTHON)
+		$(cmake-utils_use python VTK_WRAP_PYTHON_SIP)
+		$(cmake-utils_use tcl VTK_WRAP_TCL)
+	)
+
+	mycmakeargs+=(
+		$(cmake-utils_use boost VTK_USE_BOOST)
+		$(cmake-utils_use cg VTK_USE_CG_SHADERS)
+		$(cmake-utils_use odbc VTK_USE_ODBC)
+		$(cmake-utils_use offscreen VTK_USE_OFFSCREEN)
+		$(cmake-utils_use offscreen VTK_OPENGL_HAS_OSMESA)
+		$(cmake-utils_use smp vtkFiltersSMP)
+		$(cmake-utils_use theora VTK_USE_OGGTHEORA_ENCODER)
+		$(cmake-utils_use video_cards_nvidia VTK_USE_NVCONTROL)
+		$(cmake-utils_use R Module_vtkFiltersStatisticsGnuR)
+		$(cmake-utils_use X VTK_USE_X)
+	)
+
+	# IO
+	mycmakeargs+=(
+		$(cmake-utils_use ffmpeg VTK_USE_FFMPEG_ENCODER)
+		$(cmake-utils_use gdal Module_vtkIOGDAL)
+		$(cmake-utils_use json Module_vtkIOGeoJSON)
+		$(cmake-utils_use xdmf2 Module_vtkIOXdmf2)
+	)
+	# Apple stuff, does it really work?
+	mycmakeargs+=( $(cmake-utils_use aqua VTK_USE_COCOA) )
+
+	if use examples || use test; then
+		mycmakeargs+=( -DBUILD_TESTING=ON )
+	fi
+
+	if use kaapi; then
+		mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="Kaapi" )
+	elif use tbb; then
+		mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="TBB" )
+	else
+		mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="Sequential" )
+	fi
+
+	if use java; then
+#		local _ejavahome=${EPREFIX}/etc/java-config-2/current-system-vm
+#
+#	mycmakeargs+=(
+#			-DJAVAC=${EPREFIX}/usr/bin/javac
+#			-DJAVAC=$(java-config -c)
+#			-DJAVA_AWT_INCLUDE_PATH=${JAVA_HOME}/include
+#			-DJAVA_INCLUDE_PATH:PATH=${JAVA_HOME}/include
+#			-DJAVA_INCLUDE_PATH2:PATH=${JAVA_HOME}/include/linux
+#		)
+#
+		if [ "${ARCH}" == "amd64" ]; then
+			mycmakeargs+=( -DJAVA_AWT_LIBRARY="${JAVA_HOME}/jre/lib/${ARCH}/libjawt.so;${JAVA_HOME}/jre/lib/${ARCH}/xawt/libmawt.so" )
+		else
+			mycmakeargs+=( -DJAVA_AWT_LIBRARY="${JAVA_HOME}/jre/lib/i386/libjawt.so;${JAVA_HOME}/jre/lib/i386/xawt/libmawt.so" )
+		fi
+	fi
+	if use python; then
+		mycmakeargs+=(
+			-DVTK_INSTALL_PYTHON_MODULE_DIR="$(python_get_sitedir)"
+			-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
+			-DPYTHON_LIBRARY="$(python_get_library_path)"
+			-DSIP_PYQT_DIR="${EPREFIX}/usr/share/sip"
+			-DSIP_INCLUDE_DIR="$(python_get_includedir)"
+			-DVTK_PYTHON_INCLUDE_DIR="$(python_get_includedir)"
+			-DVTK_PYTHON_LIBRARY="$(python_get_library_path)"
+			-DVTK_PYTHON_SETUP_ARGS:STRING="--prefix=${PREFIX} --root=${D}"
+		)
+	fi
+
+	if use qt4; then
+		mycmakeargs+=(
+			-DVTK_USE_QVTK=ON
+			-DVTK_USE_QVTK_OPENGL=ON
+			-DVTK_USE_QVTK_QTOPENGL=ON
+			-DQT_WRAP_CPP=ON
+			-DQT_WRAP_UI=ON
+			-DVTK_INSTALL_QT_DIR=/$(get_libdir)/qt4/plugins/designer
+			-DDESIRED_QT_VERSION=4
+			-DVTK_QT_VERSION=4
+			-DQT_MOC_EXECUTABLE="$(qt4_get_bindir)/moc"
+			-DQT_UIC_EXECUTABLE="$(qt4_get_bindir)/uic"
+			-DQT_INCLUDE_DIR="${EPREFIX}/usr/include/qt4"
+			-DQT_QMAKE_EXECUTABLE="$(qt4_get_bindir)/qmake"
+		)
+	fi
+
+	if use R; then
+		mycmakeargs+=(
+#			-DR_LIBRARY_BLAS=$($(tc-getPKG_CONFIG) --libs blas)
+#			-DR_LIBRARY_LAPACK=$($(tc-getPKG_CONFIG) --libs lapack)
+			-DR_LIBRARY_BLAS=/usr/$(get_libdir)/R/lib/libR.so
+			-DR_LIBRARY_LAPACK=/usr/$(get_libdir)/R/lib/libR.so
+		)
+	fi
+
+	cmake-utils_src_configure
+}
+
+src_test() {
+	local tcllib
+	ln -sf "${BUILD_DIR}"/lib  "${BUILD_DIR}"/lib/Release || die
+	for tcllib in "${BUILD_DIR}"/lib/lib*TCL*so; do
+		ln -sf $(basename "${tcllib}").1 "${tcllib/.so/-${SPV}.so}" || die
+	done
+	export LD_LIBRARY_PATH="${BUILD_DIR}"/lib:"${JAVA_HOME}"/jre/lib/${ARCH}/:"${JAVA_HOME}"/jre/lib/${ARCH}/xawt/
+	local VIRTUALX_COMMAND="cmake-utils_src_test"
+#	local VIRTUALX_COMMAND="cmake-utils_src_test -R Java"
+#	local VIRTUALX_COMMAND="cmake-utils_src_test -I 364,365"
+	virtualmake
+}
+
+src_install() {
+	use web && webapp_src_preinst
+	# install docs
+	HTML_DOCS=( "${S}"/README.html )
+
+	cmake-utils_src_install
+
+	use java && java-pkg_regjar "${ED}"/usr/$(get_libdir)/${PN}.jar
+
+	if use tcl; then
+		# install Tcl docs
+		docinto vtk_tcl
+		dodoc "${S}"/Wrapping/Tcl/README
+	fi
+
+	# install examples
+	if use examples; then
+		insinto /usr/share/${PN}
+		mv -v Examples examples || die
+		doins -r examples
+	fi
+
+	#install big docs
+	if use doc; then
+		cd "${WORKDIR}"/html || die
+		rm -f *.md5 || die "Failed to remove superfluous hashes"
+		einfo "Installing API docs. This may take some time."
+		docinto html
+		dodoc -r ./*
+	fi
+
+	# environment
+	cat >> "${T}"/40${PN} <<- EOF
+	VTK_DATA_ROOT=${EPREFIX}/usr/share/${PN}/data
+	VTK_DIR=${EPREFIX}/usr/$(get_libdir)/${PN}-${SPV}
+	VTKHOME=${EPREFIX}/usr
+	EOF
+	doenvd "${T}"/40${PN}
+
+	use web && webapp_src_install
+}
+
+# webapp.eclass exports these but we want it optional #534036
+pkg_postinst() {
+	use web && webapp_pkg_postinst
+}
+
+pkg_prerm() {
+	use web && webapp_pkg_prerm
+}


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/vtk/, sci-libs/vtk/files/
@ 2017-06-02 14:59 Matthias Maier
  0 siblings, 0 replies; 19+ messages in thread
From: Matthias Maier @ 2017-06-02 14:59 UTC (permalink / raw
  To: gentoo-commits

commit:     f56f5ec0f8a43546c9590397c822365c07754628
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Fri Jun  2 14:58:21 2017 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Fri Jun  2 14:59:02 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f56f5ec0

sci-libs/vtk: fix configure error with gcc 6/7, bug #596084

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 sci-libs/vtk/files/vtk-6.1.0-gcc67.patch | 26 ++++++++++++++++++++++++++
 sci-libs/vtk/vtk-6.1.0-r3.ebuild         |  1 +
 sci-libs/vtk/vtk-6.1.0-r4.ebuild         |  1 +
 3 files changed, 28 insertions(+)

diff --git a/sci-libs/vtk/files/vtk-6.1.0-gcc67.patch b/sci-libs/vtk/files/vtk-6.1.0-gcc67.patch
new file mode 100644
index 00000000000..83d1ae18f21
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-6.1.0-gcc67.patch
@@ -0,0 +1,26 @@
+diff --git a/old/vtkCompilerExtras.cmake b/CMake/vtkCompilerExtras.cmake
+index 05b2db9..92c2c4c 100644
+--- a/old/vtkCompilerExtras.cmake
++++ b/CMake/vtkCompilerExtras.cmake
+@@ -27,7 +27,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
+     OUTPUT_VARIABLE _gcc_version_info
+     ERROR_VARIABLE _gcc_version_info)
+ 
+-  string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]"
++  string (REGEX MATCH "[0-9]\\.[0-9]\\.[0-9]"
+     _gcc_version "${_gcc_version_info}")
+   if(NOT _gcc_version)
+     string (REGEX REPLACE ".*\\(GCC\\).* ([34]\\.[0-9]) .*" "\\1.0"
+diff --git a/old/GenerateExportHeader.cmake b/CMake/GenerateExportHeader.cmake
+index 3cc12dd..b7a47df 100644
+--- a/old/GenerateExportHeader.cmake
++++ b/CMake/GenerateExportHeader.cmake
+@@ -166,7 +166,7 @@ macro(_test_compiler_hidden_visibility)
+     execute_process(COMMAND ${CMAKE_C_COMPILER} --version
+       OUTPUT_VARIABLE _gcc_version_info
+       ERROR_VARIABLE _gcc_version_info)
+-    string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]"
++    string(REGEX MATCH "[0-9]\\.[0-9]\\.[0-9]"
+       _gcc_version "${_gcc_version_info}")
+     # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
+     # patch level, handle this here:

diff --git a/sci-libs/vtk/vtk-6.1.0-r3.ebuild b/sci-libs/vtk/vtk-6.1.0-r3.ebuild
index 7367f5ccbe6..1345bde683e 100644
--- a/sci-libs/vtk/vtk-6.1.0-r3.ebuild
+++ b/sci-libs/vtk/vtk-6.1.0-r3.ebuild
@@ -124,6 +124,7 @@ PATCHES=(
 	"${FILESDIR}"/${P}-glext.patch
 	"${FILESDIR}"/${P}-memset.patch
 	"${FILESDIR}"/${P}-gdal2.patch
+	"${FILESDIR}"/${P}-gcc67.patch
 	)
 
 RESTRICT=test

diff --git a/sci-libs/vtk/vtk-6.1.0-r4.ebuild b/sci-libs/vtk/vtk-6.1.0-r4.ebuild
index 9f22a8e6793..409b62823c8 100644
--- a/sci-libs/vtk/vtk-6.1.0-r4.ebuild
+++ b/sci-libs/vtk/vtk-6.1.0-r4.ebuild
@@ -124,6 +124,7 @@ PATCHES=(
 	"${FILESDIR}"/${P}-glext.patch
 	"${FILESDIR}"/${P}-memset.patch
 	"${FILESDIR}"/${P}-gdal2.patch
+	"${FILESDIR}"/${P}-gcc67.patch
 	)
 
 RESTRICT=test


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/vtk/, sci-libs/vtk/files/
@ 2017-07-06 12:49 Michael Palimaka
  0 siblings, 0 replies; 19+ messages in thread
From: Michael Palimaka @ 2017-07-06 12:49 UTC (permalink / raw
  To: gentoo-commits

commit:     b7f85bc606ce1067c6cd9d607c4e07ea55c2f9bf
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Thu Jul  6 12:41:59 2017 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Thu Jul  6 12:48:58 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7f85bc6

sci-libs/vtk: remove old

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 sci-libs/vtk/Manifest                       |   8 -
 sci-libs/vtk/files/vtk-6.1.0-freetype.patch |  22 --
 sci-libs/vtk/files/vtk-6.1.0-gcc67.patch    |  26 --
 sci-libs/vtk/files/vtk-6.1.0-gdal2.patch    |  33 ---
 sci-libs/vtk/files/vtk-6.1.0-glext.patch    |  13 -
 sci-libs/vtk/files/vtk-6.1.0-install.patch  |  19 --
 sci-libs/vtk/files/vtk-6.1.0-netcdf.patch   |  29 ---
 sci-libs/vtk/files/vtk-6.1.0-system.patch   |  27 --
 sci-libs/vtk/files/vtk-6.1.0-web.patch      |  25 --
 sci-libs/vtk/metadata.xml                   |   1 -
 sci-libs/vtk/vtk-6.1.0-r3.ebuild            | 390 ----------------------------
 sci-libs/vtk/vtk-6.1.0-r4.ebuild            | 390 ----------------------------
 sci-libs/vtk/vtk-7.0.0.ebuild               | 348 -------------------------
 13 files changed, 1331 deletions(-)

diff --git a/sci-libs/vtk/Manifest b/sci-libs/vtk/Manifest
index e25d4468ada..7882a427ce0 100644
--- a/sci-libs/vtk/Manifest
+++ b/sci-libs/vtk/Manifest
@@ -1,12 +1,4 @@
-DIST VTK-6.1.0.tar.gz 27608882 SHA256 bd7df10a479606d529a8b71f466c44a2bdd11fd534c62ce0aa44fad91883fa34 SHA512 3ab922166502348e5cdd68e14dbf4717c0405c9d8881c04aa8be8f95d8516af39cd02aaca5171c6de8af1b462ca386399b7a87a843ec62999f0f32c11788a2dc WHIRLPOOL e387390efdc8cd2e413524794786369ba8a2bfe788913dfb161b82d9bc041e15ed5585286bebe38f955d1def3043481303d3bc74c648bbf5bf856e212ac9950c
-DIST VTK-7.0.0.tar.gz 30659751 SHA256 78a990a15ead79cdc752e86b83cfab7dbf5b7ef51ba409db02570dbdd9ec32c3 SHA512 4ce51ff6ddf56f1fb45c1b09a09389bc43dffd892f80c833ea861537e02a61079e9cfd3931308f7d72f37d1977806ed2ce010a7b5c2c1a0c5bb1435e09e1f049 WHIRLPOOL 5b6aaf42440b27b6d46ceb5484266df84c7dd205eb87353faec034a080b0d2bc61dafaee05ff3d16e381fae8ec00ef093a93f422d531d7061250f4c15dd6be37
 DIST VTK-7.1.0.tar.gz 31171521 SHA256 5f3ea001204d4f714be972a810a62c0f2277fbb9d8d2f8df39562988ca37497a SHA512 83f0c9291cd2bc517a4bc449ad28a1d77e7ece169e846c7beab0b1140b9ef4b7bad30e3fa6e5a59826a707df78e2e336e07fa8bd30cf7498096ee80feef16534 WHIRLPOOL 7e52342bae6487f3cdede70a6b77da4c74b27d8e9eb45aef3065f12d4ff940093b4051b1d3bfb523ddbd2b9b4f18da5b78c32570c2d76dcc8ea1aebaa8987047
-DIST VTKData-6.1.0.tar.gz 94452190 SHA256 aba27ac05d721e36b9424131f1d0f673448f2b31aac34e9e74590fdf208ad0c7 SHA512 4e23cc3de3b81a852458849f2bd4dfe2e84e9df4f77f5f0d4ac249b04a7f74144a483a91876bd748bb90685d1943071e9b36fce8dd618376621bc37e63365e65 WHIRLPOOL 1ee803055e3bbf0c8150807a77efce81406c8a512c40644c5ccc35279cb1098bb8f0382b5f2bb01f483c8a38a4e81ee70ed39145c52b4375a0545919faee2a28
-DIST VTKData-7.0.0.tar.gz 183031503 SHA256 68260172ed85134a135a2a7ab2173f6e44640dc20de43fa0f286b545a53fae15 SHA512 a97fd3a3df96b09ee356f60bae190bbd5ca803d774fcfae5d788a897662ba1344990ca0981e41d2b3caa0750b08ed9e60905df2a1dfe29e4b9fba68e6e13c3de WHIRLPOOL dd1bf3faf428cfecb7f85b0b5239a11b48d4d3240c4b44bcb7bbeac91692d976a53a63d7705814d86450af93d5df8a570f612e67c3503d485d6f5522e33375c9
 DIST VTKData-7.1.0.tar.gz 249106922 SHA256 4e476a982b08de1ea8d6655ba6dde6ec3fdfa4720d093a184fba6978f8406795 SHA512 8f78fdce36fc683c8b8b7137a02fd727f322ceecce66f20a4b1b3f8d260e8e894c1ec1ed46eb2427e501239f12b02b1476ca3a302fa1f9287584110598972f9e WHIRLPOOL 1998bb07ab7c689033dd061b4d4fae96515521c80e81f7b3984b0990fcb692417fd2ffd27329c7024dd363595bc5ac9a4e03ce36efb8b088e8b10f093080f4b0
-DIST VTKLargeData-6.1.0.tar.gz 166019220 SHA256 d8985508ff2b7fbfbae0aadedfbe2b293640cf6441d3cce41da5c3f591c96d4c SHA512 3663a124c16448882ad3aef0fb15f55f438863ba2176106803ad9c6fb561325accd74f2675d8b6e1de791babfa8b992e516d87640efedda4a6daeb5affc2cf3f WHIRLPOOL db62af365a5c1d71b209d21578184ff1ee7a5913aefd7e5729b7dc555bdd20a8f070ed83051387634bf6a9fc1141ab68a291ec0d557602fa5802e3e6020b7ae1
-DIST VTKLargeData-7.0.0.tar.gz 166680081 SHA256 27db751b93480c0ea9362927a25d8ab5b2cb47532b1e898cdf77c1e41db29ecc SHA512 a17d7b883262c12a0cf0689eec02d92415746d3eea64d308e22d4945e0eaa2bef8eadafef995690c1e02d357c8887a62702c5eaf0f46fe19a66cb9993ce18624 WHIRLPOOL 1e19a68d3a4e7e00d417ddf7f460331179b26f9ef434beedfc52e31a4733892fbd11209c45763a69c775fcbd510971f6463f00e9dbc794945db5110fe646bf84
 DIST VTKLargeData-7.1.0.tar.gz 166680011 SHA256 dbf9e9a427e1183886ee7686272c571447491eb7179036f2401622ac7987c6b2 SHA512 79d058732932837f2873a14850e18375d6a43f07de7cf4b71570ae32cf7abb7651052378ff9cbd1e221c95f78e46c13c9852425a509ae02c826f5345e836e455 WHIRLPOOL 3dfb71273a3de14d046f42e8f19b96c04fa08ae5f91309b595143e8c3be7206115c71a87816ae6415bf17b4b739b41a618d79f6e5acbd06193e5114eb88c975d
-DIST vtkDocHtml-6.1.0.tar.gz 230827905 SHA256 e35d0f5b7905e5c827d8daa71ee61b14dc080445efad91f97583a2b9303c1813 SHA512 fcae74a65157d87b39a162facdecbb0ab0a9b95b9f2555ed2b15d635b82034bfc62181eea441caf0b1edbe036b792a8231d409908b943398ce7f662c149d3a60 WHIRLPOOL bc1714223259953a605612c0da124ece60604989458b7de5cf24b37d0f4c339f50c07a13d899f218364e61a35f8e1ace126eda5e83acbc3fe4930b041df0f55d
-DIST vtkDocHtml-7.0.0.tar.gz 114223726 SHA256 e2f5ff7b693880d6f7dd842428d212ea2739dd93f12f008adce3b9958125d65d SHA512 062a2d23df2c1330b2ef46758038cd222923d17c1f3bf810f6df30456729c2f33a921815cd501aa41aeb9739500f121a5b35538613365cbf30f3c7a483e4a235 WHIRLPOOL 853894c3a382dccb3f2947911b7b10fd76956fe48a4ba0ad71169e826a2e663bb965bbf4026c8874e4c9df1778ee5c6a0147fab7140169a9674c63daf7fc6f98
 DIST vtkDocHtml-7.1.0.tar.gz 128927849 SHA256 e69c15a247769437768d1904dd3e36eda1829ae2db5843929b3e64febb8bb35c SHA512 cac6d005262d3849f84c2632dd737c4dcd9f23d5015266d683bcc8c65fad0d88e87faf9b1d5f68fdabe7b2ed97927a9f907020cbeae2b6e7223a5ffee54f2679 WHIRLPOOL ac6c5c577151ab4b7cc832bfef06b4d4e5372bd0f31e89f80cd46afde44ba416bde3cc9e558c193ace0c79c27e46adb43d898b64d61dbc260d363517a49b0dce

diff --git a/sci-libs/vtk/files/vtk-6.1.0-freetype.patch b/sci-libs/vtk/files/vtk-6.1.0-freetype.patch
deleted file mode 100644
index b7d3e409cde..00000000000
--- a/sci-libs/vtk/files/vtk-6.1.0-freetype.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/ParaView-v4.2.0-source/VTK/Rendering/FreeType/vtkFreeTypeTools.cxx_orig	2014-12-23 09:25:35.000000000 +0100
-+++ b/ParaView-v4.2.0-source/VTK/Rendering/FreeType/vtkFreeTypeTools.cxx	2014-12-24 09:40:31.886953389 +0100
-@@ -1185,7 +1185,7 @@
-     if (bitmap)
-       {
-       metaData.ascent = std::max(bitmapGlyph->top - 1, metaData.ascent);
--      metaData.descent = std::min(-(bitmap->rows - (bitmapGlyph->top - 1)),
-+      metaData.descent = std::min(-(static_cast<int>(bitmap->rows) - (bitmapGlyph->top - 1)),
-                                   metaData.descent);
-       }
-     ++heightString;
-@@ -1952,8 +1952,8 @@
-     if (bitmap)
-       {
-       bbox[0] = std::min(bbox[0], pen[0] + bitmapGlyph->left);
--      bbox[1] = std::max(bbox[1], pen[0] + bitmapGlyph->left + bitmap->width);
--      bbox[2] = std::min(bbox[2], pen[1] + bitmapGlyph->top - 1 - bitmap->rows);
-+      bbox[1] = std::max(bbox[1], pen[0] + bitmapGlyph->left + static_cast<int>(bitmap->width));
-+      bbox[2] = std::min(bbox[2], pen[1] + bitmapGlyph->top - 1 - static_cast<int>(bitmap->rows));
-       bbox[3] = std::max(bbox[3], pen[1] + bitmapGlyph->top - 1);
-       }
-     else

diff --git a/sci-libs/vtk/files/vtk-6.1.0-gcc67.patch b/sci-libs/vtk/files/vtk-6.1.0-gcc67.patch
deleted file mode 100644
index 83d1ae18f21..00000000000
--- a/sci-libs/vtk/files/vtk-6.1.0-gcc67.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/old/vtkCompilerExtras.cmake b/CMake/vtkCompilerExtras.cmake
-index 05b2db9..92c2c4c 100644
---- a/old/vtkCompilerExtras.cmake
-+++ b/CMake/vtkCompilerExtras.cmake
-@@ -27,7 +27,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
-     OUTPUT_VARIABLE _gcc_version_info
-     ERROR_VARIABLE _gcc_version_info)
- 
--  string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]"
-+  string (REGEX MATCH "[0-9]\\.[0-9]\\.[0-9]"
-     _gcc_version "${_gcc_version_info}")
-   if(NOT _gcc_version)
-     string (REGEX REPLACE ".*\\(GCC\\).* ([34]\\.[0-9]) .*" "\\1.0"
-diff --git a/old/GenerateExportHeader.cmake b/CMake/GenerateExportHeader.cmake
-index 3cc12dd..b7a47df 100644
---- a/old/GenerateExportHeader.cmake
-+++ b/CMake/GenerateExportHeader.cmake
-@@ -166,7 +166,7 @@ macro(_test_compiler_hidden_visibility)
-     execute_process(COMMAND ${CMAKE_C_COMPILER} --version
-       OUTPUT_VARIABLE _gcc_version_info
-       ERROR_VARIABLE _gcc_version_info)
--    string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]"
-+    string(REGEX MATCH "[0-9]\\.[0-9]\\.[0-9]"
-       _gcc_version "${_gcc_version_info}")
-     # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
-     # patch level, handle this here:

diff --git a/sci-libs/vtk/files/vtk-6.1.0-gdal2.patch b/sci-libs/vtk/files/vtk-6.1.0-gdal2.patch
deleted file mode 100644
index c2186410227..00000000000
--- a/sci-libs/vtk/files/vtk-6.1.0-gdal2.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-diff --git a/IO/GDAL/vtkGDALVectorReader.cxx b/IO/GDAL/vtkGDALVectorReader.cxx
-index 86854a0..a0e234a 100644
---- a/IO/GDAL/vtkGDALVectorReader.cxx
-+++ b/IO/GDAL/vtkGDALVectorReader.cxx
-# Patch to build against newer GDAL per upstream commit
-# https://projects.archlinux.org/svntogit/community.git/tree/trunk/gdal2.patch?h=packages/vtk&id=43307598a98872fd4ce7739e47f5bb4cfcb5372d
-@@ -44,7 +44,7 @@ class vtkGDALVectorReader::Internal
- public:
-   Internal( const char* srcName, int srcMode, int appendFeatures, int addFeatIds )
-     {
--    this->Source = OGRSFDriverRegistrar::Open( srcName, srcMode, &this->Driver );
-+    this->Source = (GDALDataset*) OGROpen( srcName, srcMode, NULL );
-     if ( ! this->Source )
-       {
-       this->LastError = CPLGetLastErrorMsg();
-@@ -61,7 +61,7 @@ public:
-     {
-     if ( this->Source )
-       {
--      OGRDataSource::DestroyDataSource( this->Source );
-+      GDALClose( (GDALDatasetH) this->Source );
-       }
-     }
-
-@@ -304,7 +304,7 @@ public:
-     return nCells;
-     }
-
--  OGRDataSource* Source;
-+  GDALDataset* Source;
-   OGRSFDriver* Driver;
-   const char* LastError;
-   int LayerIdx;

diff --git a/sci-libs/vtk/files/vtk-6.1.0-glext.patch b/sci-libs/vtk/files/vtk-6.1.0-glext.patch
deleted file mode 100644
index b5529a5fc3d..00000000000
--- a/sci-libs/vtk/files/vtk-6.1.0-glext.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -up VTK-6.1.0/Rendering/OpenGL/vtkOpenGL.h.glext VTK-6.1.0/Rendering/OpenGL/vtkOpenGL.h
---- VTK-6.1.0/Rendering/OpenGL/vtkOpenGL.h.glext	2014-01-22 08:55:41.000000000 -0700
-+++ VTK-6.1.0/Rendering/OpenGL/vtkOpenGL.h	2014-11-19 10:27:12.349345199 -0700
-@@ -19,7 +19,8 @@
- #include "vtkConfigure.h"
- 
- // To prevent gl.h to include glext.h provided by the system
--#define GL_GLEXT_LEGACY
-+// https://bugzilla.redhat.com/show_bug.cgi?id=1138466
-+// #define GL_GLEXT_LEGACY
- #if defined(__APPLE__) && (defined(VTK_USE_CARBON) || defined(VTK_USE_COCOA))
- # include <OpenGL/gl.h> // Include OpenGL API.
- #else

diff --git a/sci-libs/vtk/files/vtk-6.1.0-install.patch b/sci-libs/vtk/files/vtk-6.1.0-install.patch
deleted file mode 100644
index 27c6c3adfee..00000000000
--- a/sci-libs/vtk/files/vtk-6.1.0-install.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff -up VTK-6.1.0/CMake/vtkModuleTop.cmake.install VTK-6.1.0/CMake/vtkModuleTop.cmake
---- VTK-6.1.0/CMake/vtkModuleTop.cmake.install	2014-01-23 19:12:04.922871103 -0700
-+++ VTK-6.1.0/CMake/vtkModuleTop.cmake	2014-01-23 19:14:33.002645155 -0700
-@@ -330,11 +330,15 @@ if (NOT VTK_INSTALL_NO_DEVELOPMENT)
-                 CMake/pythonmodules.h.in
-                 CMake/UseVTK.cmake
-                 CMake/FindTCL.cmake
-+                CMake/TopologicalSort.cmake
-                 CMake/vtkTclTkMacros.cmake
-                 CMake/vtk-forward.c.in
-+                CMake/vtkGroups.cmake
-                 CMake/vtkForwardingExecutable.cmake
-                 CMake/vtkJavaWrapping.cmake
-                 CMake/vtkMakeInstantiator.cmake
-+                CMake/vtkMakeInstantiator.cxx.in
-+                CMake/vtkMakeInstantiator.h.in
-                 CMake/vtkModuleAPI.cmake
-                 CMake/vtkModuleHeaders.cmake.in
-                 CMake/vtkModuleInfo.cmake.in

diff --git a/sci-libs/vtk/files/vtk-6.1.0-netcdf.patch b/sci-libs/vtk/files/vtk-6.1.0-netcdf.patch
deleted file mode 100644
index e6f8b643172..00000000000
--- a/sci-libs/vtk/files/vtk-6.1.0-netcdf.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-diff -up VTK/ThirdParty/netcdf/CMakeLists.txt.netcdf VTK/ThirdParty/netcdf/CMakeLists.txt
---- VTK/ThirdParty/netcdf/CMakeLists.txt.netcdf	2013-12-27 20:29:11.644289659 -0700
-+++ VTK/ThirdParty/netcdf/CMakeLists.txt	2013-12-27 20:33:48.071895769 -0700
-@@ -1,10 +1,18 @@
--vtk_module_third_party(NetCDF
--  LIBRARIES vtkNetCDF vtkNetCDF_cxx
--  INCLUDE_DIRS
--    ${CMAKE_CURRENT_SOURCE_DIR}/vtknetcdf/include
--    ${CMAKE_CURRENT_BINARY_DIR}/vtknetcdf
--  COMPONENTS C CXX
--  )
-+if(NOT VTK_USE_SYSTEM_NETCDF)
-+  vtk_module_third_party(NetCDF
-+    LIBRARIES vtkNetCDF vtkNetCDF_cxx
-+    INCLUDE_DIRS
-+      ${CMAKE_CURRENT_SOURCE_DIR}/vtknetcdf/include
-+      ${CMAKE_CURRENT_BINARY_DIR}/vtknetcdf
-+    COMPONENTS C CXX
-+    )
-+else(NOT VTK_USE_SYSTEM_NETCDF)
-+  vtk_module_third_party(NetCDF
-+    LIBRARIES vtkNetCDF netcdf
-+    COMPONENTS C CXX
-+    )
-+endif()
-+
- 
- #Configure the top cpp header to switch between system and internal
- #netcdf just like vtk_module_third_party does for the c header.

diff --git a/sci-libs/vtk/files/vtk-6.1.0-system.patch b/sci-libs/vtk/files/vtk-6.1.0-system.patch
deleted file mode 100644
index c75d544447e..00000000000
--- a/sci-libs/vtk/files/vtk-6.1.0-system.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff -up VTK/CMake/vtkModuleMacros.cmake.system VTK/CMake/vtkModuleMacros.cmake
---- VTK/CMake/vtkModuleMacros.cmake.system	2013-12-24 19:17:43.000000000 -0700
-+++ VTK/CMake/vtkModuleMacros.cmake	2013-12-27 20:28:22.375573277 -0700
-@@ -682,7 +682,7 @@ macro(vtk_module_third_party _pkg)
-     message(FATAL_ERROR "Cannot specify both LIBRARIES and NO_LIBRARIES")
-   endif()
- 
--  option(VTK_USE_SYSTEM_${_upper} "Use system-installed ${_pkg}" OFF)
-+  option(VTK_USE_SYSTEM_${_upper} "Use system-installed ${_pkg}" ${VTK_USE_SYSTEM_LIBRARIES})
-   mark_as_advanced(VTK_USE_SYSTEM_${_upper})
- 
-   if(VTK_USE_SYSTEM_${_upper})
-diff -up VTK/CMakeLists.txt.system VTK/CMakeLists.txt
---- VTK/CMakeLists.txt.system	2013-12-27 20:28:22.374573241 -0700
-+++ VTK/CMakeLists.txt	2013-12-27 20:28:48.118669708 -0700
-@@ -132,6 +132,11 @@ if (CMAKE_CROSSCOMPILING AND NOT COMPILE
- endif()
- 
- #-----------------------------------------------------------------------------
-+# Do we try to use system libraries by default?
-+OPTION(VTK_USE_SYSTEM_LIBRARIES "Use the system's libraries by default." OFF)
-+MARK_AS_ADVANCED(VTK_USE_SYSTEM_LIBRARIES)
-+
-+#-----------------------------------------------------------------------------
- # The third party macros are still used in one or two third party builds.
- include(vtkThirdParty)
- 

diff --git a/sci-libs/vtk/files/vtk-6.1.0-web.patch b/sci-libs/vtk/files/vtk-6.1.0-web.patch
deleted file mode 100644
index a85f2cd9964..00000000000
--- a/sci-libs/vtk/files/vtk-6.1.0-web.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 58373b120db6d51c6d5eace38447cdb45ff858d1 Mon Sep 17 00:00:00 2001
-From: Patric Schmitz <patric.schmitz@rwth-aachen.de>
-Date: Tue, 28 Oct 2014 16:24:22 +0100
-Subject: [PATCH] Include vtkPythonPackages in Web/JavaScript/CMakeLists.txt
-
-Change-Id: Ie7bffa19bdaa78c5b090c886e50c1af76e2aadee
----
- Web/Applications/CMakeLists.txt | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Web/Applications/CMakeLists.txt b/Web/Applications/CMakeLists.txt
-index c9e7ad3..b4c9a60 100644
---- a/Web/Applications/CMakeLists.txt
-+++ b/Web/Applications/CMakeLists.txt
-@@ -12,6 +12,7 @@ set(WEB_APPLICATIONS
- 
- set(WEB_APPS_DEPENDS)
- 
-+include(vtkPythonPackages) # for copy_files_recursive
- foreach(_app ${WEB_APPLICATIONS})
-   file(MAKE_DIRECTORY "${VTK_WWW_DIR}/apps/${_app}")
- 
--- 
-2.2.1
-

diff --git a/sci-libs/vtk/metadata.xml b/sci-libs/vtk/metadata.xml
index dbcdc25b234..3a5d7bde969 100644
--- a/sci-libs/vtk/metadata.xml
+++ b/sci-libs/vtk/metadata.xml
@@ -8,7 +8,6 @@
   <use>
     <flag name="all-modules">Build all modules</flag>
     <flag name="boost">Add support for boost</flag>
-    <flag name="cg">Use nvidia's cg shaders</flag>
     <flag name="gdal">Support for gdal formated data</flag>
     <flag name="imaging">Building Imaging modules</flag>
     <flag name="json">Support for json formated data</flag>

diff --git a/sci-libs/vtk/vtk-6.1.0-r3.ebuild b/sci-libs/vtk/vtk-6.1.0-r3.ebuild
deleted file mode 100644
index 1345bde683e..00000000000
--- a/sci-libs/vtk/vtk-6.1.0-r3.ebuild
+++ /dev/null
@@ -1,390 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-CMAKE_MAKEFILE_GENERATOR=ninja
-WEBAPP_OPTIONAL=yes
-WEBAPP_MANUAL_SLOT=yes
-
-inherit eutils flag-o-matic java-pkg-opt-2 python-single-r1 qmake-utils versionator toolchain-funcs cmake-utils virtualx webapp
-
-# Short package version
-SPV="$(get_version_component_range 1-2)"
-
-DESCRIPTION="The Visualization Toolkit"
-HOMEPAGE="http://www.vtk.org/"
-SRC_URI="
-	http://www.${PN}.org/files/release/${SPV}/VTK-${PV}.tar.gz
-	doc? ( http://www.${PN}.org/files/release/${SPV}/${PN}DocHtml-${PV}.tar.gz )
-	test? (
-		http://www.${PN}.org/files/release/${SPV}/VTKData-${PV}.tar.gz
-		http://www.${PN}.org/files/release/${SPV}/VTKLargeData-${PV}.tar.gz
-		)
-	"
-
-LICENSE="BSD LGPL-2"
-KEYWORDS="amd64 ~arm x86 ~amd64-linux ~x86-linux"
-SLOT="0"
-IUSE="
-	all-modules aqua boost cg doc examples imaging ffmpeg gdal java json kaapi mpi
-	mysql odbc offscreen postgres python qt4 rendering smp tbb test theora tk tcl
-	video_cards_nvidia views web xdmf2 R +X"
-
-REQUIRED_USE="
-	all-modules? ( python xdmf2 )
-	java? ( qt4 )
-	python? ( ${PYTHON_REQUIRED_USE} )
-	tcl? ( rendering )
-	smp? ( ^^ ( kaapi tbb ) )
-	test? ( python )
-	tk? ( tcl )
-	web? ( python )
-	^^ ( X aqua offscreen )
-	"
-
-RDEPEND="
-	dev-libs/expat
-	dev-libs/jsoncpp
-	dev-libs/libxml2:2
-	>=media-libs/freetype-2.5.4
-	media-libs/libpng:0
-	media-libs/mesa
-	media-libs/libtheora
-	media-libs/tiff:0
-	sci-libs/exodusii
-	sci-libs/hdf5:=
-	sci-libs/netcdf-cxx:3
-	sys-libs/zlib
-	virtual/jpeg:0
-	virtual/opengl
-	>=x11-libs/gl2ps-1.3.8
-	x11-libs/libX11
-	x11-libs/libXmu
-	x11-libs/libXt
-	boost? ( >=dev-libs/boost-1.40.0[mpi?] )
-	cg? ( media-gfx/nvidia-cg-toolkit )
-	examples? (
-		dev-qt/qtcore:4
-		dev-qt/qtgui:4
-		sci-libs/vtkdata
-	)
-	ffmpeg? ( virtual/ffmpeg )
-	gdal? ( sci-libs/gdal )
-	java? ( >=virtual/jre-1.5:* )
-	kaapi? ( <sci-libs/xkaapi-3 )
-	mpi? (
-		virtual/mpi[cxx,romio]
-		python? ( dev-python/mpi4py[${PYTHON_USEDEP}] )
-	mysql? ( virtual/mysql )
-	odbc? ( dev-db/unixODBC )
-	offscreen? ( media-libs/mesa[osmesa] )
-	postgres? ( dev-db/postgresql:= )
-	python? (
-		${PYTHON_DEPS}
-		dev-python/sip[${PYTHON_USEDEP}]
-		)
-	)
-	qt4? (
-		dev-qt/designer:4
-		dev-qt/qtcore:4
-		dev-qt/qtgui:4
-		dev-qt/qtopengl:4
-		dev-qt/qtsql:4
-		dev-qt/qtwebkit:4
-		python? ( dev-python/PyQt4[${PYTHON_USEDEP}] )
-		)
-	tbb? ( dev-cpp/tbb )
-	tcl? ( dev-lang/tcl:0= )
-	tk? ( dev-lang/tk:0= )
-	video_cards_nvidia? ( || ( x11-drivers/nvidia-drivers[tools,static-libs] media-video/nvidia-settings ) )
-	web? (
-		${WEBAPP_DEPEND}
-		python? (
-			dev-python/autobahn[${PYTHON_USEDEP}]
-			dev-python/twisted-core[${PYTHON_USEDEP}]
-			dev-python/zope-interface[${PYTHON_USEDEP}]
-			)
-		)
-	xdmf2? ( sci-libs/xdmf2 )
-	R? ( dev-lang/R )"
-DEPEND="${RDEPEND}
-	doc? ( app-doc/doxygen )
-	java? ( >=virtual/jdk-1.5 )"
-
-S="${WORKDIR}"/VTK-${PV}
-
-PATCHES=(
-	"${FILESDIR}"/${P}-freetype.patch
-	"${FILESDIR}"/${P}-install.patch
-	"${FILESDIR}"/${P}-system.patch
-	"${FILESDIR}"/${P}-netcdf.patch
-	"${FILESDIR}"/${P}-web.patch
-	"${FILESDIR}"/${P}-glext.patch
-	"${FILESDIR}"/${P}-memset.patch
-	"${FILESDIR}"/${P}-gdal2.patch
-	"${FILESDIR}"/${P}-gcc67.patch
-	)
-
-RESTRICT=test
-
-pkg_setup() {
-	use java && java-pkg-opt-2_pkg_setup
-	use python && python-single-r1_pkg_setup
-	use web && webapp_pkg_setup
-
-	append-cppflags -D__STDC_CONSTANT_MACROS -D_UNICODE
-}
-
-src_prepare() {
-	sed \
-		-e 's:libproj4:libproj:g' \
-		-e 's:lib_proj.h:lib_abi.h:g' \
-		-i CMake/FindLIBPROJ4.cmake || die
-
-	local x
-	# missing: VPIC alglib exodusII freerange ftgl libproj4 mrmpi sqlite utf8 verdict xmdf2 xmdf3
-	for x in expat freetype gl2ps hdf5 jpeg jsoncpp libxml2 netcdf oggtheora png tiff zlib; do
-		ebegin "Dropping bundled ${x}"
-		rm -r ThirdParty/${x}/vtk${x} || die
-		eend $?
-	done
-	rm -r \
-		ThirdParty/AutobahnPython/autobahn \
-		ThirdParty/Twisted/twisted \
-		ThirdParty/ZopeInterface/zope \
-		|| die
-
-	use java && export JAVA_HOME="${EPREFIX}/etc/java-config-2/current-system-vm"
-
-	if use mpi; then
-		export CC=mpicc
-		export CXX=mpicxx
-		export FC=mpif90
-		export F90=mpif90
-		export F77=mpif77
-	fi
-
-	cmake-utils_src_prepare
-}
-
-src_configure() {
-	# general configuration
-	local mycmakeargs=(
-		-Wno-dev
-#		-DCMAKE_SKIP_RPATH=YES
-		-DVTK_DIR="${S}"
-		-DVTK_INSTALL_LIBRARY_DIR=$(get_libdir)
-		-DVTK_DATA_ROOT:PATH="${EPREFIX}/usr/share/${PN}/data"
-		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
-		-DVTK_CUSTOM_LIBRARY_SUFFIX=""
-		-DBUILD_SHARED_LIBS=ON
-		-DVTK_USE_SYSTEM_AUTOBAHN=ON
-		-DVTK_USE_SYSTEM_EXPAT=ON
-		-DVTK_USE_SYSTEM_FREETYPE=ON
-		-DVTK_USE_SYSTEM_FreeType=ON
-		-DVTK_USE_SYSTEM_GL2PS=ON
-		-DVTK_USE_SYSTEM_HDF5=ON
-		-DVTK_USE_SYSTEM_JPEG=ON
-		-DVTK_USE_SYSTEM_LIBPROJ4=OFF
-#		-DLIBPROJ4_DIR="${EPREFIX}/usr"
-		-DVTK_USE_SYSTEM_LIBXML2=ON
-		-DVTK_USE_SYSTEM_LibXml2=ON
-		-DVTK_USE_SYSTEM_NETCDF=ON
-		-DVTK_USE_SYSTEM_OGGTHEORA=ON
-		-DVTK_USE_SYSTEM_PNG=ON
-		-DVTK_USE_SYSTEM_TIFF=ON
-		-DVTK_USE_SYSTEM_TWISTED=ON
-		-DVTK_USE_SYSTEM_XDMF2=OFF
-		-DVTK_USE_SYSTEM_XDMF3=OFF
-		-DVTK_USE_SYSTEM_ZLIB=ON
-		-DVTK_USE_SYSTEM_ZOPE=ON
-		-DVTK_USE_SYSTEM_LIBRARIES=ON
-		-DVTK_USE_GL2PS=ON
-		-DVTK_USE_LARGE_DATA=ON
-		-DVTK_USE_PARALLEL=ON
-	)
-
-	mycmakeargs+=(
-		-DVTK_EXTRA_COMPILER_WARNINGS=ON
-		-DVTK_Group_StandAlone=ON
-	)
-
-	mycmakeargs+=(
-		$(cmake-utils_use_build doc DOCUMENTATION)
-		$(cmake-utils_use_build examples EXAMPLES)
-		$(cmake-utils_use_build test VTK_BUILD_ALL_MODULES_FOR_TESTS)
-		$(cmake-utils_use all-modules VTK_BUILD_ALL_MODULES)
-		$(cmake-utils_use doc DOCUMENTATION_HTML_HELP)
-		$(cmake-utils_use imaging VTK_Group_Imaging)
-		$(cmake-utils_use mpi VTK_Group_MPI)
-		$(cmake-utils_use qt4 VTK_Group_Qt)
-		$(cmake-utils_use rendering VTK_Group_Rendering)
-		$(cmake-utils_use tk VTK_Group_Tk)
-		$(cmake-utils_use views VTK_Group_Views)
-		$(cmake-utils_use web VTK_Group_Web)
-		$(cmake-utils_use web VTK_WWW_DIR="${ED}/${MY_HTDOCSDIR}")
-		$(cmake-utils_use java VTK_WRAP_JAVA)
-		$(cmake-utils_use python VTK_WRAP_PYTHON)
-		$(cmake-utils_use python VTK_WRAP_PYTHON_SIP)
-		$(cmake-utils_use tcl VTK_WRAP_TCL)
-	)
-
-	mycmakeargs+=(
-		$(cmake-utils_use boost VTK_USE_BOOST)
-		$(cmake-utils_use cg VTK_USE_CG_SHADERS)
-		$(cmake-utils_use odbc VTK_USE_ODBC)
-		$(cmake-utils_use offscreen VTK_USE_OFFSCREEN)
-		$(cmake-utils_use offscreen VTK_OPENGL_HAS_OSMESA)
-		$(cmake-utils_use smp vtkFiltersSMP)
-		$(cmake-utils_use theora VTK_USE_OGGTHEORA_ENCODER)
-		$(cmake-utils_use video_cards_nvidia VTK_USE_NVCONTROL)
-		$(cmake-utils_use R Module_vtkFiltersStatisticsGnuR)
-		$(cmake-utils_use X VTK_USE_X)
-	)
-
-	# IO
-	mycmakeargs+=(
-		$(cmake-utils_use ffmpeg VTK_USE_FFMPEG_ENCODER)
-		$(cmake-utils_use gdal Module_vtkIOGDAL)
-		$(cmake-utils_use json Module_vtkIOGeoJSON)
-		$(cmake-utils_use xdmf2 Module_vtkIOXdmf2)
-	)
-	# Apple stuff, does it really work?
-	mycmakeargs+=( $(cmake-utils_use aqua VTK_USE_COCOA) )
-
-	if use examples || use test; then
-		mycmakeargs+=( -DBUILD_TESTING=ON )
-	fi
-
-	if use kaapi; then
-		mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="Kaapi" )
-	elif use tbb; then
-		mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="TBB" )
-	else
-		mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="Sequential" )
-	fi
-
-	if use java; then
-#		local _ejavahome=${EPREFIX}/etc/java-config-2/current-system-vm
-#
-#	mycmakeargs+=(
-#			-DJAVAC=${EPREFIX}/usr/bin/javac
-#			-DJAVAC=$(java-config -c)
-#			-DJAVA_AWT_INCLUDE_PATH=${JAVA_HOME}/include
-#			-DJAVA_INCLUDE_PATH:PATH=${JAVA_HOME}/include
-#			-DJAVA_INCLUDE_PATH2:PATH=${JAVA_HOME}/include/linux
-#		)
-#
-		if [ "${ARCH}" == "amd64" ]; then
-			mycmakeargs+=( -DJAVA_AWT_LIBRARY="${JAVA_HOME}/jre/lib/${ARCH}/libjawt.so;${JAVA_HOME}/jre/lib/${ARCH}/xawt/libmawt.so" )
-		else
-			mycmakeargs+=( -DJAVA_AWT_LIBRARY="${JAVA_HOME}/jre/lib/i386/libjawt.so;${JAVA_HOME}/jre/lib/i386/xawt/libmawt.so" )
-		fi
-	fi
-	if use python; then
-		mycmakeargs+=(
-			-DVTK_INSTALL_PYTHON_MODULE_DIR="$(python_get_sitedir)"
-			-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
-			-DPYTHON_LIBRARY="$(python_get_library_path)"
-			-DSIP_PYQT_DIR="${EPREFIX}/usr/share/sip"
-			-DSIP_INCLUDE_DIR="$(python_get_includedir)"
-			-DVTK_PYTHON_INCLUDE_DIR="$(python_get_includedir)"
-			-DVTK_PYTHON_LIBRARY="$(python_get_library_path)"
-			-DVTK_PYTHON_SETUP_ARGS:STRING="--prefix=${EPREFIX}/usr --root=${D}"
-		)
-	fi
-
-	if use qt4; then
-		mycmakeargs+=(
-			-DVTK_USE_QVTK=ON
-			-DVTK_USE_QVTK_OPENGL=ON
-			-DVTK_USE_QVTK_QTOPENGL=ON
-			-DQT_WRAP_CPP=ON
-			-DQT_WRAP_UI=ON
-			-DVTK_INSTALL_QT_DIR=/$(get_libdir)/qt4/plugins/designer
-			-DDESIRED_QT_VERSION=4
-			-DVTK_QT_VERSION=4
-			-DQT_MOC_EXECUTABLE="$(qt4_get_bindir)/moc"
-			-DQT_UIC_EXECUTABLE="$(qt4_get_bindir)/uic"
-			-DQT_INCLUDE_DIR="${EPREFIX}/usr/include/qt4"
-			-DQT_QMAKE_EXECUTABLE="$(qt4_get_bindir)/qmake"
-		)
-	fi
-
-	if use R; then
-		mycmakeargs+=(
-#			-DR_LIBRARY_BLAS=$($(tc-getPKG_CONFIG) --libs blas)
-#			-DR_LIBRARY_LAPACK=$($(tc-getPKG_CONFIG) --libs lapack)
-			-DR_LIBRARY_BLAS=/usr/$(get_libdir)/R/lib/libR.so
-			-DR_LIBRARY_LAPACK=/usr/$(get_libdir)/R/lib/libR.so
-		)
-	fi
-
-	cmake-utils_src_configure
-}
-
-src_test() {
-	local tcllib
-	ln -sf "${BUILD_DIR}"/lib  "${BUILD_DIR}"/lib/Release || die
-	for tcllib in "${BUILD_DIR}"/lib/lib*TCL*so; do
-		ln -sf $(basename "${tcllib}").1 "${tcllib/.so/-${SPV}.so}" || die
-	done
-	export LD_LIBRARY_PATH="${BUILD_DIR}"/lib:"${JAVA_HOME}"/jre/lib/${ARCH}/:"${JAVA_HOME}"/jre/lib/${ARCH}/xawt/
-	local VIRTUALX_COMMAND="cmake-utils_src_test"
-#	local VIRTUALX_COMMAND="cmake-utils_src_test -R Java"
-#	local VIRTUALX_COMMAND="cmake-utils_src_test -I 364,365"
-	virtualmake
-}
-
-src_install() {
-	use web && webapp_src_preinst
-	# install docs
-	HTML_DOCS=( "${S}"/README.html )
-
-	cmake-utils_src_install
-
-	use java && java-pkg_regjar "${ED}"/usr/$(get_libdir)/${PN}.jar
-
-	if use tcl; then
-		# install Tcl docs
-		docinto vtk_tcl
-		dodoc "${S}"/Wrapping/Tcl/README
-	fi
-
-	# install examples
-	if use examples; then
-		insinto /usr/share/${PN}
-		mv -v Examples examples || die
-		doins -r examples
-	fi
-
-	#install big docs
-	if use doc; then
-		cd "${WORKDIR}"/html || die
-		rm -f *.md5 || die "Failed to remove superfluous hashes"
-		einfo "Installing API docs. This may take some time."
-		docinto html
-		dodoc -r ./*
-	fi
-
-	# environment
-	cat >> "${T}"/40${PN} <<- EOF
-	VTK_DATA_ROOT=${EPREFIX}/usr/share/${PN}/data
-	VTK_DIR=${EPREFIX}/usr/$(get_libdir)/${PN}-${SPV}
-	VTKHOME=${EPREFIX}/usr
-	EOF
-	doenvd "${T}"/40${PN}
-
-	use web && webapp_src_install
-}
-
-# webapp.eclass exports these but we want it optional #534036
-pkg_postinst() {
-	use web && webapp_pkg_postinst
-}
-
-pkg_prerm() {
-	use web && webapp_pkg_prerm
-}

diff --git a/sci-libs/vtk/vtk-6.1.0-r4.ebuild b/sci-libs/vtk/vtk-6.1.0-r4.ebuild
deleted file mode 100644
index 409b62823c8..00000000000
--- a/sci-libs/vtk/vtk-6.1.0-r4.ebuild
+++ /dev/null
@@ -1,390 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-CMAKE_MAKEFILE_GENERATOR=ninja
-WEBAPP_OPTIONAL=yes
-WEBAPP_MANUAL_SLOT=yes
-
-inherit eutils flag-o-matic java-pkg-opt-2 python-single-r1 qmake-utils versionator toolchain-funcs cmake-utils virtualx webapp
-
-# Short package version
-SPV="$(get_version_component_range 1-2)"
-
-DESCRIPTION="The Visualization Toolkit"
-HOMEPAGE="http://www.vtk.org/"
-SRC_URI="
-	http://www.${PN}.org/files/release/${SPV}/VTK-${PV}.tar.gz
-	doc? ( http://www.${PN}.org/files/release/${SPV}/${PN}DocHtml-${PV}.tar.gz )
-	test? (
-		http://www.${PN}.org/files/release/${SPV}/VTKData-${PV}.tar.gz
-		http://www.${PN}.org/files/release/${SPV}/VTKLargeData-${PV}.tar.gz
-		)
-	"
-
-LICENSE="BSD LGPL-2"
-KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
-SLOT="0"
-IUSE="
-	all-modules aqua boost cg doc examples imaging ffmpeg gdal java json kaapi mpi
-	mysql odbc offscreen postgres python qt5 rendering smp tbb test theora tk tcl
-	video_cards_nvidia views web xdmf2 R +X"
-
-REQUIRED_USE="
-	all-modules? ( python xdmf2 )
-	java? ( qt5 )
-	python? ( ${PYTHON_REQUIRED_USE} )
-	tcl? ( rendering )
-	smp? ( ^^ ( kaapi tbb ) )
-	test? ( python )
-	tk? ( tcl )
-	web? ( python )
-	^^ ( X aqua offscreen )
-	"
-
-RDEPEND="
-	dev-libs/expat
-	dev-libs/jsoncpp
-	dev-libs/libxml2:2
-	>=media-libs/freetype-2.5.4
-	media-libs/libpng:0
-	media-libs/mesa
-	media-libs/libtheora
-	media-libs/tiff:0
-	sci-libs/exodusii
-	sci-libs/hdf5:=
-	sci-libs/netcdf-cxx:3
-	sys-libs/zlib
-	virtual/jpeg:0
-	virtual/opengl
-	>=x11-libs/gl2ps-1.3.8
-	x11-libs/libX11
-	x11-libs/libXmu
-	x11-libs/libXt
-	boost? ( >=dev-libs/boost-1.40.0[mpi?] )
-	cg? ( media-gfx/nvidia-cg-toolkit )
-	examples? (
-		dev-qt/qtcore:5
-		dev-qt/qtgui:5
-		sci-libs/vtkdata
-	)
-	ffmpeg? ( virtual/ffmpeg )
-	gdal? ( sci-libs/gdal )
-	java? ( >=virtual/jre-1.5:* )
-	kaapi? ( <sci-libs/xkaapi-3 )
-	mpi? (
-		virtual/mpi[cxx,romio]
-		python? ( dev-python/mpi4py[${PYTHON_USEDEP}] )
-	mysql? ( virtual/mysql )
-	odbc? ( dev-db/unixODBC )
-	offscreen? ( media-libs/mesa[osmesa] )
-	postgres? ( dev-db/postgresql:= )
-	python? (
-		${PYTHON_DEPS}
-		dev-python/sip[${PYTHON_USEDEP}]
-		)
-	)
-	qt5? (
-		dev-qt/designer:5
-		dev-qt/qtcore:5
-		dev-qt/qtgui:5
-		dev-qt/qtopengl:5
-		dev-qt/qtsql:5
-		dev-qt/qtwebkit:5
-		python? ( dev-python/PyQt5[${PYTHON_USEDEP}] )
-		)
-	tbb? ( dev-cpp/tbb )
-	tcl? ( dev-lang/tcl:0= )
-	tk? ( dev-lang/tk:0= )
-	video_cards_nvidia? ( || ( x11-drivers/nvidia-drivers[tools,static-libs] media-video/nvidia-settings ) )
-	web? (
-		${WEBAPP_DEPEND}
-		python? (
-			dev-python/autobahn[${PYTHON_USEDEP}]
-			dev-python/twisted-core[${PYTHON_USEDEP}]
-			dev-python/zope-interface[${PYTHON_USEDEP}]
-			)
-		)
-	xdmf2? ( sci-libs/xdmf2 )
-	R? ( dev-lang/R )"
-DEPEND="${RDEPEND}
-	doc? ( app-doc/doxygen )
-	java? ( >=virtual/jdk-1.5 )"
-
-S="${WORKDIR}"/VTK-${PV}
-
-PATCHES=(
-	"${FILESDIR}"/${P}-freetype.patch
-	"${FILESDIR}"/${P}-install.patch
-	"${FILESDIR}"/${P}-system.patch
-	"${FILESDIR}"/${P}-netcdf.patch
-	"${FILESDIR}"/${P}-web.patch
-	"${FILESDIR}"/${P}-glext.patch
-	"${FILESDIR}"/${P}-memset.patch
-	"${FILESDIR}"/${P}-gdal2.patch
-	"${FILESDIR}"/${P}-gcc67.patch
-	)
-
-RESTRICT=test
-
-pkg_setup() {
-	use java && java-pkg-opt-2_pkg_setup
-	use python && python-single-r1_pkg_setup
-	use web && webapp_pkg_setup
-
-	append-cppflags -D__STDC_CONSTANT_MACROS -D_UNICODE
-}
-
-src_prepare() {
-	sed \
-		-e 's:libproj4:libproj:g' \
-		-e 's:lib_proj.h:lib_abi.h:g' \
-		-i CMake/FindLIBPROJ4.cmake || die
-
-	local x
-	# missing: VPIC alglib exodusII freerange ftgl libproj4 mrmpi sqlite utf8 verdict xmdf2 xmdf3
-	for x in expat freetype gl2ps hdf5 jpeg jsoncpp libxml2 netcdf oggtheora png tiff zlib; do
-		ebegin "Dropping bundled ${x}"
-		rm -r ThirdParty/${x}/vtk${x} || die
-		eend $?
-	done
-	rm -r \
-		ThirdParty/AutobahnPython/autobahn \
-		ThirdParty/Twisted/twisted \
-		ThirdParty/ZopeInterface/zope \
-		|| die
-
-	use java && export JAVA_HOME="${EPREFIX}/etc/java-config-2/current-system-vm"
-
-	if use mpi; then
-		export CC=mpicc
-		export CXX=mpicxx
-		export FC=mpif90
-		export F90=mpif90
-		export F77=mpif77
-	fi
-
-	cmake-utils_src_prepare
-}
-
-src_configure() {
-	# general configuration
-	local mycmakeargs=(
-		-Wno-dev
-#		-DCMAKE_SKIP_RPATH=YES
-		-DVTK_DIR="${S}"
-		-DVTK_INSTALL_LIBRARY_DIR=$(get_libdir)
-		-DVTK_DATA_ROOT:PATH="${EPREFIX}/usr/share/${PN}/data"
-		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
-		-DVTK_CUSTOM_LIBRARY_SUFFIX=""
-		-DBUILD_SHARED_LIBS=ON
-		-DVTK_USE_SYSTEM_AUTOBAHN=ON
-		-DVTK_USE_SYSTEM_EXPAT=ON
-		-DVTK_USE_SYSTEM_FREETYPE=ON
-		-DVTK_USE_SYSTEM_FreeType=ON
-		-DVTK_USE_SYSTEM_GL2PS=ON
-		-DVTK_USE_SYSTEM_HDF5=ON
-		-DVTK_USE_SYSTEM_JPEG=ON
-		-DVTK_USE_SYSTEM_LIBPROJ4=OFF
-#		-DLIBPROJ4_DIR="${EPREFIX}/usr"
-		-DVTK_USE_SYSTEM_LIBXML2=ON
-		-DVTK_USE_SYSTEM_LibXml2=ON
-		-DVTK_USE_SYSTEM_NETCDF=ON
-		-DVTK_USE_SYSTEM_OGGTHEORA=ON
-		-DVTK_USE_SYSTEM_PNG=ON
-		-DVTK_USE_SYSTEM_TIFF=ON
-		-DVTK_USE_SYSTEM_TWISTED=ON
-		-DVTK_USE_SYSTEM_XDMF2=OFF
-		-DVTK_USE_SYSTEM_XDMF3=OFF
-		-DVTK_USE_SYSTEM_ZLIB=ON
-		-DVTK_USE_SYSTEM_ZOPE=ON
-		-DVTK_USE_SYSTEM_LIBRARIES=ON
-		-DVTK_USE_GL2PS=ON
-		-DVTK_USE_LARGE_DATA=ON
-		-DVTK_USE_PARALLEL=ON
-	)
-
-	mycmakeargs+=(
-		-DVTK_EXTRA_COMPILER_WARNINGS=ON
-		-DVTK_Group_StandAlone=ON
-	)
-
-	mycmakeargs+=(
-		$(cmake-utils_use_build doc DOCUMENTATION)
-		$(cmake-utils_use_build examples EXAMPLES)
-		$(cmake-utils_use_build test VTK_BUILD_ALL_MODULES_FOR_TESTS)
-		$(cmake-utils_use all-modules VTK_BUILD_ALL_MODULES)
-		$(cmake-utils_use doc DOCUMENTATION_HTML_HELP)
-		$(cmake-utils_use imaging VTK_Group_Imaging)
-		$(cmake-utils_use mpi VTK_Group_MPI)
-		$(cmake-utils_use rendering VTK_Group_Rendering)
-		$(cmake-utils_use tk VTK_Group_Tk)
-		$(cmake-utils_use views VTK_Group_Views)
-		$(cmake-utils_use web VTK_Group_Web)
-		$(cmake-utils_use web VTK_WWW_DIR="${ED}/${MY_HTDOCSDIR}")
-		$(cmake-utils_use java VTK_WRAP_JAVA)
-		$(cmake-utils_use python VTK_WRAP_PYTHON)
-		$(cmake-utils_use python VTK_WRAP_PYTHON_SIP)
-		$(cmake-utils_use tcl VTK_WRAP_TCL)
-	)
-
-	mycmakeargs+=(
-		$(cmake-utils_use boost VTK_USE_BOOST)
-		$(cmake-utils_use cg VTK_USE_CG_SHADERS)
-		$(cmake-utils_use odbc VTK_USE_ODBC)
-		$(cmake-utils_use offscreen VTK_USE_OFFSCREEN)
-		$(cmake-utils_use offscreen VTK_OPENGL_HAS_OSMESA)
-		$(cmake-utils_use smp vtkFiltersSMP)
-		$(cmake-utils_use theora VTK_USE_OGGTHEORA_ENCODER)
-		$(cmake-utils_use video_cards_nvidia VTK_USE_NVCONTROL)
-		$(cmake-utils_use R Module_vtkFiltersStatisticsGnuR)
-		$(cmake-utils_use X VTK_USE_X)
-	)
-
-	# IO
-	mycmakeargs+=(
-		$(cmake-utils_use ffmpeg VTK_USE_FFMPEG_ENCODER)
-		$(cmake-utils_use gdal Module_vtkIOGDAL)
-		$(cmake-utils_use json Module_vtkIOGeoJSON)
-		$(cmake-utils_use xdmf2 Module_vtkIOXdmf2)
-	)
-	# Apple stuff, does it really work?
-	mycmakeargs+=( $(cmake-utils_use aqua VTK_USE_COCOA) )
-
-	if use examples || use test; then
-		mycmakeargs+=( -DBUILD_TESTING=ON )
-	fi
-
-	if use kaapi; then
-		mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="Kaapi" )
-	elif use tbb; then
-		mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="TBB" )
-	else
-		mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="Sequential" )
-	fi
-
-	if use java; then
-#		local _ejavahome=${EPREFIX}/etc/java-config-2/current-system-vm
-#
-#	mycmakeargs+=(
-#			-DJAVAC=${EPREFIX}/usr/bin/javac
-#			-DJAVAC=$(java-config -c)
-#			-DJAVA_AWT_INCLUDE_PATH=${JAVA_HOME}/include
-#			-DJAVA_INCLUDE_PATH:PATH=${JAVA_HOME}/include
-#			-DJAVA_INCLUDE_PATH2:PATH=${JAVA_HOME}/include/linux
-#		)
-#
-		if [ "${ARCH}" == "amd64" ]; then
-			mycmakeargs+=( -DJAVA_AWT_LIBRARY="${JAVA_HOME}/jre/lib/${ARCH}/libjawt.so;${JAVA_HOME}/jre/lib/${ARCH}/xawt/libmawt.so" )
-		else
-			mycmakeargs+=( -DJAVA_AWT_LIBRARY="${JAVA_HOME}/jre/lib/i386/libjawt.so;${JAVA_HOME}/jre/lib/i386/xawt/libmawt.so" )
-		fi
-	fi
-	if use python; then
-		mycmakeargs+=(
-			-DVTK_INSTALL_PYTHON_MODULE_DIR="$(python_get_sitedir)"
-			-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
-			-DPYTHON_LIBRARY="$(python_get_library_path)"
-			-DSIP_PYQT_DIR="${EPREFIX}/usr/share/sip"
-			-DSIP_INCLUDE_DIR="$(python_get_includedir)"
-			-DVTK_PYTHON_INCLUDE_DIR="$(python_get_includedir)"
-			-DVTK_PYTHON_LIBRARY="$(python_get_library_path)"
-			-DVTK_PYTHON_SETUP_ARGS:STRING="--prefix=${EPREFIX}/usr --root=${D}"
-		)
-	fi
-
-	if use qt5; then
-		mycmakeargs+=(
-			-DVTK_USE_QVTK=ON
-			-DVTK_USE_QVTK_OPENGL=ON
-			-DVTK_USE_QVTK_QTOPENGL=ON
-			-DQT_WRAP_CPP=ON
-			-DQT_WRAP_UI=ON
-			-DVTK_INSTALL_QT_DIR=/$(get_libdir)/qt5/plugins/designer
-			-DDESIRED_QT_VERSION=5
-			-DVTK_QT_VERSION=5
-			-DQT_MOC_EXECUTABLE="$(qt5_get_bindir)/moc"
-			-DQT_UIC_EXECUTABLE="$(qt5_get_bindir)/uic"
-			-DQT_INCLUDE_DIR="${EPREFIX}/usr/include/qt5"
-			-DQT_QMAKE_EXECUTABLE="$(qt5_get_bindir)/qmake"
-			-DVTK_Group_Qt:BOOL=ON
-		)
-	fi
-
-	if use R; then
-		mycmakeargs+=(
-#			-DR_LIBRARY_BLAS=$($(tc-getPKG_CONFIG) --libs blas)
-#			-DR_LIBRARY_LAPACK=$($(tc-getPKG_CONFIG) --libs lapack)
-			-DR_LIBRARY_BLAS=/usr/$(get_libdir)/R/lib/libR.so
-			-DR_LIBRARY_LAPACK=/usr/$(get_libdir)/R/lib/libR.so
-		)
-	fi
-
-	cmake-utils_src_configure
-}
-
-src_test() {
-	local tcllib
-	ln -sf "${BUILD_DIR}"/lib  "${BUILD_DIR}"/lib/Release || die
-	for tcllib in "${BUILD_DIR}"/lib/lib*TCL*so; do
-		ln -sf $(basename "${tcllib}").1 "${tcllib/.so/-${SPV}.so}" || die
-	done
-	export LD_LIBRARY_PATH="${BUILD_DIR}"/lib:"${JAVA_HOME}"/jre/lib/${ARCH}/:"${JAVA_HOME}"/jre/lib/${ARCH}/xawt/
-	local VIRTUALX_COMMAND="cmake-utils_src_test"
-#	local VIRTUALX_COMMAND="cmake-utils_src_test -R Java"
-#	local VIRTUALX_COMMAND="cmake-utils_src_test -I 364,365"
-	virtualmake
-}
-
-src_install() {
-	use web && webapp_src_preinst
-	# install docs
-	HTML_DOCS=( "${S}"/README.html )
-
-	cmake-utils_src_install
-
-	use java && java-pkg_regjar "${ED}"/usr/$(get_libdir)/${PN}.jar
-
-	if use tcl; then
-		# install Tcl docs
-		docinto vtk_tcl
-		dodoc "${S}"/Wrapping/Tcl/README
-	fi
-
-	# install examples
-	if use examples; then
-		insinto /usr/share/${PN}
-		mv -v Examples examples || die
-		doins -r examples
-	fi
-
-	#install big docs
-	if use doc; then
-		cd "${WORKDIR}"/html || die
-		rm -f *.md5 || die "Failed to remove superfluous hashes"
-		einfo "Installing API docs. This may take some time."
-		docinto html
-		dodoc -r ./*
-	fi
-
-	# environment
-	cat >> "${T}"/40${PN} <<- EOF
-	VTK_DATA_ROOT=${EPREFIX}/usr/share/${PN}/data
-	VTK_DIR=${EPREFIX}/usr/$(get_libdir)/${PN}-${SPV}
-	VTKHOME=${EPREFIX}/usr
-	EOF
-	doenvd "${T}"/40${PN}
-
-	use web && webapp_src_install
-}
-
-# webapp.eclass exports these but we want it optional #534036
-pkg_postinst() {
-	use web && webapp_pkg_postinst
-}
-
-pkg_prerm() {
-	use web && webapp_pkg_prerm
-}

diff --git a/sci-libs/vtk/vtk-7.0.0.ebuild b/sci-libs/vtk/vtk-7.0.0.ebuild
deleted file mode 100644
index b6db179c4bb..00000000000
--- a/sci-libs/vtk/vtk-7.0.0.ebuild
+++ /dev/null
@@ -1,348 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-WEBAPP_OPTIONAL=yes
-WEBAPP_MANUAL_SLOT=yes
-
-inherit flag-o-matic java-pkg-opt-2 python-single-r1 qmake-utils versionator toolchain-funcs cmake-utils virtualx webapp
-
-# Short package version
-SPV="$(get_version_component_range 1-2)"
-
-DESCRIPTION="The Visualization Toolkit"
-HOMEPAGE="http://www.vtk.org/"
-SRC_URI="
-	http://www.vtk.org/files/release/${SPV}/VTK-${PV}.tar.gz
-	doc? ( http://www.vtk.org/files/release/${SPV}/vtkDocHtml-${PV}.tar.gz )
-	test? (
-		http://www.vtk.org/files/release/${SPV}/VTKData-${PV}.tar.gz
-		http://www.vtk.org/files/release/${SPV}/VTKLargeData-${PV}.tar.gz
-		)
-	"
-
-LICENSE="BSD LGPL-2"
-KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
-SLOT="0"
-IUSE="
-	all-modules aqua boost doc examples imaging ffmpeg gdal java json kaapi mpi
-	mysql odbc offscreen postgres python qt5 rendering tbb test theora tk tcl
-	video_cards_nvidia views web xdmf2 R +X"
-
-REQUIRED_USE="
-	all-modules? ( python xdmf2 boost )
-	java? ( qt5 )
-	python? ( ${PYTHON_REQUIRED_USE} )
-	tcl? ( rendering )
-	test? ( python )
-	tk? ( tcl )
-	web? ( python )
-	^^ ( X aqua offscreen )
-	"
-
-RDEPEND="
-	boost? ( dev-libs/boost:=[mpi?] )
-	dev-libs/expat
-	dev-libs/jsoncpp:=
-	dev-libs/libxml2:2
-	examples? (
-		dev-qt/qtcore:5
-		dev-qt/qtgui:5
-		sci-libs/vtkdata
-	)
-	ffmpeg? ( virtual/ffmpeg )
-	gdal? ( sci-libs/gdal )
-	java? ( >=virtual/jdk-1.7:* )
-	kaapi? ( <sci-libs/xkaapi-3 )
-	>=media-libs/freetype-2.5.4
-	media-libs/libpng:0=
-	media-libs/mesa
-	media-libs/libtheora
-	media-libs/tiff:0
-	mpi? (
-		virtual/mpi[cxx,romio]
-		python? ( dev-python/mpi4py[${PYTHON_USEDEP}] )
-	)
-	mysql? ( virtual/mysql )
-	odbc? ( dev-db/unixODBC )
-	offscreen? ( media-libs/mesa[osmesa] )
-	postgres? ( dev-db/postgresql:= )
-	python? (
-		${PYTHON_DEPS}
-		dev-python/sip[${PYTHON_USEDEP}]
-	)
-	qt5? (
-		dev-qt/designer:5
-		dev-qt/qtcore:5
-		dev-qt/qtgui:5
-		dev-qt/qtopengl:5
-		dev-qt/qtsql:5
-		dev-qt/qtwebkit:5
-		python? ( dev-python/PyQt5[${PYTHON_USEDEP}] )
-	)
-	R? ( dev-lang/R )
-	sci-libs/exodusii
-	sci-libs/hdf5:=
-	sci-libs/netcdf-cxx:0=
-	sys-libs/zlib
-	tbb? ( dev-cpp/tbb )
-	tcl? ( dev-lang/tcl:0= )
-	tk? ( dev-lang/tk:0= )
-	video_cards_nvidia? ( || ( x11-drivers/nvidia-drivers[tools,static-libs] media-video/nvidia-settings ) )
-	virtual/jpeg:0
-	virtual/opengl
-	web? (
-		${WEBAPP_DEPEND}
-		dev-python/autobahn[${PYTHON_USEDEP}]
-		dev-python/twisted-core[${PYTHON_USEDEP}]
-		dev-python/zope-interface[${PYTHON_USEDEP}]
-	)
-	xdmf2? ( sci-libs/xdmf2 )
-	>=x11-libs/gl2ps-1.3.8
-	x11-libs/libX11
-	x11-libs/libXmu
-	x11-libs/libXt"
-
-DEPEND="${RDEPEND}
-	doc? ( app-doc/doxygen )"
-
-S="${WORKDIR}"/VTK-${PV}
-
-PATCHES=(
-	"${FILESDIR}"/${P}-glext.patch
-	"${FILESDIR}"/${PN}-6.1.0-memset.patch
-	"${FILESDIR}"/${PN}-6.1.0-gdal2.patch
-	)
-
-RESTRICT=test
-
-pkg_setup() {
-	use java && java-pkg-opt-2_pkg_setup
-	use python && python-single-r1_pkg_setup
-	use web && webapp_pkg_setup
-}
-
-src_prepare() {
-	sed \
-		-e 's:libproj4:libproj:g' \
-		-e 's:lib_proj.h:lib_abi.h:g' \
-		-i CMake/FindLIBPROJ4.cmake || die
-
-	local x
-	# missing: VPIC alglib exodusII freerange ftgl libproj4 mrmpi sqlite utf8 verdict xmdf2 xmdf3
-	for x in expat freetype gl2ps hdf5 jpeg jsoncpp libxml2 netcdf oggtheora png tiff zlib; do
-		ebegin "Dropping bundled ${x}"
-		rm -r ThirdParty/${x}/vtk${x} || die
-		eend $?
-	done
-	rm -r \
-		ThirdParty/AutobahnPython/autobahn \
-		ThirdParty/Twisted/twisted \
-		ThirdParty/ZopeInterface/zope \
-		|| die
-
-	cmake-utils_src_prepare
-}
-
-src_configure() {
-	# general configuration
-	local mycmakeargs=(
-		-Wno-dev
-		-DVTK_DIR="${S}"
-		-DVTK_INSTALL_LIBRARY_DIR=$(get_libdir)
-		-DVTK_INSTALL_DOC_DIR="${EPREFIX}/usr/share/doc/${PF}"
-		-DVTK_DATA_ROOT="${EPREFIX}/usr/share/${PN}/data"
-		-DVTK_CUSTOM_LIBRARY_SUFFIX=""
-		-DBUILD_SHARED_LIBS=ON
-		-DVTK_USE_SYSTEM_AUTOBAHN=ON
-		-DVTK_USE_SYSTEM_EXPAT=ON
-		-DVTK_USE_SYSTEM_FREETYPE=ON
-		-DVTK_USE_SYSTEM_FreeType=ON
-		-DVTK_USE_SYSTEM_GL2PS=ON
-		-DVTK_USE_SYSTEM_HDF5=ON
-		-DVTK_USE_SYSTEM_JPEG=ON
-		-DVTK_USE_SYSTEM_LIBPROJ4=OFF
-		-DVTK_USE_SYSTEM_LIBXML2=ON
-		-DVTK_USE_SYSTEM_LibXml2=ON
-		-DVTK_USE_SYSTEM_NETCDF=ON
-		-DVTK_USE_SYSTEM_OGGTHEORA=ON
-		-DVTK_USE_SYSTEM_PNG=ON
-		-DVTK_USE_SYSTEM_TIFF=ON
-		-DVTK_USE_SYSTEM_TWISTED=ON
-		-DVTK_USE_SYSTEM_XDMF2=OFF
-		-DVTK_USE_SYSTEM_XDMF3=OFF
-		-DVTK_USE_SYSTEM_ZLIB=ON
-		-DVTK_USE_SYSTEM_ZOPE=ON
-		-DVTK_USE_SYSTEM_LIBRARIES=ON
-		-DVTK_USE_GL2PS=ON
-		-DVTK_USE_LARGE_DATA=ON
-		-DVTK_USE_PARALLEL=ON
-		-DVTK_EXTRA_COMPILER_WARNINGS=ON
-		-DVTK_Group_StandAlone=ON
-		-DBUILD_DOCUMENTATION=$(usex doc)
-		-DBUILD_EXAMPLES=$(usex examples)
-		-DBUILD_VTK_BUILD_ALL_MODULES_FOR_TESTS=$(usex test)
-		-DVTK_BUILD_ALL_MODULES=$(usex all-modules)
-		-DUSE_DOCUMENTATION_HTML_HELP=$(usex doc)
-		-DVTK_Group_Imaging=$(usex imaging)
-		-DVTK_Group_MPI=$(usex mpi)
-		-DVTK_Group_Rendering=$(usex rendering)
-		-DVTK_Group_Tk=$(usex tk)
-		-DVTK_Group_Views=$(usex views)
-		-DVTK_Group_Web=$(usex web)
-		-DVTK_WWW_DIR="${ED%/}/${MY_HTDOCSDIR}"
-		-DVTK_WRAP_JAVA=$(usex java)
-		-DVTK_WRAP_PYTHON=$(usex python)
-		-DVTK_WRAP_PYTHON_SIP=$(usex python)
-		-DVTK_WRAP_TCL=$(usex tcl)
-		-DVTK_USE_BOOST=$(usex boost)
-		-DUSE_VTK_USE_BOOST=$(usex boost)
-		-DModule_vtkInfovisBoost=$(usex boost)
-		-DModule_vtkInfovisBoostGraphAlgorithms=$(usex boost)
-		-DVTK_USE_ODBC=$(usex odbc)
-		-DModule_vtkIOODBC=$(usex odbc)
-		-DVTK_USE_OFFSCREEN=$(usex offscreen)
-		-DVTK_OPENGL_HAS_OSMESA=$(usex offscreen)
-		-DVTK_USE_OGGTHEORA_ENCODER=$(usex theora)
-		-DVTK_USE_NVCONTROL=$(usex video_cards_nvidia)
-		-DModule_vtkFiltersStatisticsGnuR=$(usex R)
-		-DVTK_USE_X=$(usex X)
-	# IO
-		-DVTK_USE_FFMPEG_ENCODER=$(usex ffmpeg)
-		-DModule_vtkIOGDAL=$(usex gdal)
-		-DModule_vtkIOGeoJSON=$(usex json)
-		-DModule_vtkIOXdmf2=$(usex xdmf2)
-	# Apple stuff, does it really work?
-		-DVTK_USE_COCOA=$(usex aqua)
-	)
-
-	if use examples || use test; then
-		mycmakeargs+=( -DBUILD_TESTING=ON )
-	fi
-
-	if use java; then
-		local javacargs=$(java-pkg_javac-args)
-		mycmakeargs+=( -DJAVAC_OPTIONS=${javacargs// /;} )
-	fi
-
-	if use kaapi; then
-		mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="Kaapi" )
-	elif use tbb; then
-		mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="TBB" )
-	else
-		mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="Sequential" )
-	fi
-
-	if use python; then
-		mycmakeargs+=(
-			-DVTK_INSTALL_PYTHON_MODULE_DIR="$(python_get_sitedir)"
-			-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
-			-DPYTHON_LIBRARY="$(python_get_library_path)"
-			-DSIP_PYQT_DIR="${EPREFIX}/usr/share/sip"
-			-DSIP_INCLUDE_DIR="$(python_get_includedir)"
-			-DVTK_PYTHON_INCLUDE_DIR="$(python_get_includedir)"
-			-DVTK_PYTHON_LIBRARY="$(python_get_library_path)"
-			-DVTK_PYTHON_SETUP_ARGS:STRING="--prefix=${EPREFIX} --root=${D}"
-		)
-	fi
-
-	if use qt5; then
-		mycmakeargs+=(
-			-DVTK_USE_QVTK=ON
-			-DVTK_USE_QVTK_OPENGL=ON
-			-DVTK_USE_QVTK_QTOPENGL=ON
-			-DQT_WRAP_CPP=ON
-			-DQT_WRAP_UI=ON
-			-DVTK_INSTALL_QT_DIR="$(qt5_get_libdir)/qt5/plugins/designer"
-			-DDESIRED_QT_VERSION=5
-			-DVTK_QT_VERSION=5
-			-DQT_MOC_EXECUTABLE="$(qt5_get_bindir)/moc"
-			-DQT_UIC_EXECUTABLE="$(qt5_get_bindir)/uic"
-			-DQT_INCLUDE_DIR="${EPREFIX}/usr/include/qt5"
-			-DQT_QMAKE_EXECUTABLE="$(qt5_get_bindir)/qmake"
-			-DVTK_Group_Qt:BOOL=ON
-		)
-	fi
-
-	if use R; then
-		mycmakeargs+=(
-			-DR_LIBRARY_BLAS=/usr/$(get_libdir)/R/lib/libR.so
-			-DR_LIBRARY_LAPACK=/usr/$(get_libdir)/R/lib/libR.so
-		)
-	fi
-
-	append-cppflags -D__STDC_CONSTANT_MACROS -D_UNICODE
-
-	use java && export JAVA_HOME="${EPREFIX}/etc/java-config-2/current-system-vm"
-
-	if use mpi; then
-		export CC=mpicc
-		export CXX=mpicxx
-		export FC=mpif90
-		export F90=mpif90
-		export F77=mpif77
-	fi
-
-	cmake-utils_src_configure
-}
-
-src_test() {
-	local tcllib
-	ln -sf "${BUILD_DIR}"/lib  "${BUILD_DIR}"/lib/Release || die
-	for tcllib in "${BUILD_DIR}"/lib/lib*TCL*so; do
-		ln -sf ${tcllib##*/}.1 "${tcllib/.so/-${SPV}.so}" || die
-	done
-	export LD_LIBRARY_PATH="${BUILD_DIR}"/lib:"${JAVA_HOME}"/jre/lib/${ARCH}/:"${JAVA_HOME}"/jre/lib/${ARCH}/xawt/
-	virtx cmake-utils_src_test
-}
-
-src_install() {
-	use web && webapp_src_preinst
-
-	cmake-utils_src_install
-
-	use java && java-pkg_regjar "${ED%/}"/usr/$(get_libdir)/${PN}.jar
-
-	if use tcl; then
-		# install Tcl docs
-		docinto vtk_tcl
-		dodoc Wrapping/Tcl/README
-		docinto .
-	fi
-
-	# 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
-	fi
-
-	#install big docs
-	if use doc; then
-		rm -f "${WORKDIR}"/html/*.md5 || die "Failed to remove superfluous hashes"
-		einfo "Installing API docs. This may take some time."
-		dodoc -r "${WORKDIR}"/html
-	fi
-
-	# environment
-	cat >> "${T}"/40${PN} <<- EOF || die
-		VTK_DATA_ROOT=${EPREFIX}/usr/share/${PN}/data
-		VTK_DIR=${EPREFIX}/usr/$(get_libdir)/${PN}-${SPV}
-		VTKHOME=${EPREFIX}/usr
-		EOF
-	doenvd "${T}"/40${PN}
-
-	use web && webapp_src_install
-}
-
-# webapp.eclass exports these but we want it optional #534036
-pkg_postinst() {
-	use web && webapp_pkg_postinst
-}
-
-pkg_prerm() {
-	use web && webapp_pkg_prerm
-}


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/vtk/, sci-libs/vtk/files/
@ 2017-07-06 13:37 Michael Palimaka
  0 siblings, 0 replies; 19+ messages in thread
From: Michael Palimaka @ 2017-07-06 13:37 UTC (permalink / raw
  To: gentoo-commits

commit:     491a9cab41c19581749635d563ca2cbe1c138726
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Thu Jul  6 13:36:54 2017 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Thu Jul  6 13:37:16 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=491a9cab

Revert "sci-libs/vtk: remove old"

This broke the tree.

This reverts commit b7f85bc606ce1067c6cd9d607c4e07ea55c2f9bf.

 sci-libs/vtk/Manifest                       |   8 +
 sci-libs/vtk/files/vtk-6.1.0-freetype.patch |  22 ++
 sci-libs/vtk/files/vtk-6.1.0-gcc67.patch    |  26 ++
 sci-libs/vtk/files/vtk-6.1.0-gdal2.patch    |  33 +++
 sci-libs/vtk/files/vtk-6.1.0-glext.patch    |  13 +
 sci-libs/vtk/files/vtk-6.1.0-install.patch  |  19 ++
 sci-libs/vtk/files/vtk-6.1.0-netcdf.patch   |  29 +++
 sci-libs/vtk/files/vtk-6.1.0-system.patch   |  27 ++
 sci-libs/vtk/files/vtk-6.1.0-web.patch      |  25 ++
 sci-libs/vtk/metadata.xml                   |   1 +
 sci-libs/vtk/vtk-6.1.0-r3.ebuild            | 390 ++++++++++++++++++++++++++++
 sci-libs/vtk/vtk-6.1.0-r4.ebuild            | 390 ++++++++++++++++++++++++++++
 sci-libs/vtk/vtk-7.0.0.ebuild               | 348 +++++++++++++++++++++++++
 13 files changed, 1331 insertions(+)

diff --git a/sci-libs/vtk/Manifest b/sci-libs/vtk/Manifest
index 7882a427ce0..e25d4468ada 100644
--- a/sci-libs/vtk/Manifest
+++ b/sci-libs/vtk/Manifest
@@ -1,4 +1,12 @@
+DIST VTK-6.1.0.tar.gz 27608882 SHA256 bd7df10a479606d529a8b71f466c44a2bdd11fd534c62ce0aa44fad91883fa34 SHA512 3ab922166502348e5cdd68e14dbf4717c0405c9d8881c04aa8be8f95d8516af39cd02aaca5171c6de8af1b462ca386399b7a87a843ec62999f0f32c11788a2dc WHIRLPOOL e387390efdc8cd2e413524794786369ba8a2bfe788913dfb161b82d9bc041e15ed5585286bebe38f955d1def3043481303d3bc74c648bbf5bf856e212ac9950c
+DIST VTK-7.0.0.tar.gz 30659751 SHA256 78a990a15ead79cdc752e86b83cfab7dbf5b7ef51ba409db02570dbdd9ec32c3 SHA512 4ce51ff6ddf56f1fb45c1b09a09389bc43dffd892f80c833ea861537e02a61079e9cfd3931308f7d72f37d1977806ed2ce010a7b5c2c1a0c5bb1435e09e1f049 WHIRLPOOL 5b6aaf42440b27b6d46ceb5484266df84c7dd205eb87353faec034a080b0d2bc61dafaee05ff3d16e381fae8ec00ef093a93f422d531d7061250f4c15dd6be37
 DIST VTK-7.1.0.tar.gz 31171521 SHA256 5f3ea001204d4f714be972a810a62c0f2277fbb9d8d2f8df39562988ca37497a SHA512 83f0c9291cd2bc517a4bc449ad28a1d77e7ece169e846c7beab0b1140b9ef4b7bad30e3fa6e5a59826a707df78e2e336e07fa8bd30cf7498096ee80feef16534 WHIRLPOOL 7e52342bae6487f3cdede70a6b77da4c74b27d8e9eb45aef3065f12d4ff940093b4051b1d3bfb523ddbd2b9b4f18da5b78c32570c2d76dcc8ea1aebaa8987047
+DIST VTKData-6.1.0.tar.gz 94452190 SHA256 aba27ac05d721e36b9424131f1d0f673448f2b31aac34e9e74590fdf208ad0c7 SHA512 4e23cc3de3b81a852458849f2bd4dfe2e84e9df4f77f5f0d4ac249b04a7f74144a483a91876bd748bb90685d1943071e9b36fce8dd618376621bc37e63365e65 WHIRLPOOL 1ee803055e3bbf0c8150807a77efce81406c8a512c40644c5ccc35279cb1098bb8f0382b5f2bb01f483c8a38a4e81ee70ed39145c52b4375a0545919faee2a28
+DIST VTKData-7.0.0.tar.gz 183031503 SHA256 68260172ed85134a135a2a7ab2173f6e44640dc20de43fa0f286b545a53fae15 SHA512 a97fd3a3df96b09ee356f60bae190bbd5ca803d774fcfae5d788a897662ba1344990ca0981e41d2b3caa0750b08ed9e60905df2a1dfe29e4b9fba68e6e13c3de WHIRLPOOL dd1bf3faf428cfecb7f85b0b5239a11b48d4d3240c4b44bcb7bbeac91692d976a53a63d7705814d86450af93d5df8a570f612e67c3503d485d6f5522e33375c9
 DIST VTKData-7.1.0.tar.gz 249106922 SHA256 4e476a982b08de1ea8d6655ba6dde6ec3fdfa4720d093a184fba6978f8406795 SHA512 8f78fdce36fc683c8b8b7137a02fd727f322ceecce66f20a4b1b3f8d260e8e894c1ec1ed46eb2427e501239f12b02b1476ca3a302fa1f9287584110598972f9e WHIRLPOOL 1998bb07ab7c689033dd061b4d4fae96515521c80e81f7b3984b0990fcb692417fd2ffd27329c7024dd363595bc5ac9a4e03ce36efb8b088e8b10f093080f4b0
+DIST VTKLargeData-6.1.0.tar.gz 166019220 SHA256 d8985508ff2b7fbfbae0aadedfbe2b293640cf6441d3cce41da5c3f591c96d4c SHA512 3663a124c16448882ad3aef0fb15f55f438863ba2176106803ad9c6fb561325accd74f2675d8b6e1de791babfa8b992e516d87640efedda4a6daeb5affc2cf3f WHIRLPOOL db62af365a5c1d71b209d21578184ff1ee7a5913aefd7e5729b7dc555bdd20a8f070ed83051387634bf6a9fc1141ab68a291ec0d557602fa5802e3e6020b7ae1
+DIST VTKLargeData-7.0.0.tar.gz 166680081 SHA256 27db751b93480c0ea9362927a25d8ab5b2cb47532b1e898cdf77c1e41db29ecc SHA512 a17d7b883262c12a0cf0689eec02d92415746d3eea64d308e22d4945e0eaa2bef8eadafef995690c1e02d357c8887a62702c5eaf0f46fe19a66cb9993ce18624 WHIRLPOOL 1e19a68d3a4e7e00d417ddf7f460331179b26f9ef434beedfc52e31a4733892fbd11209c45763a69c775fcbd510971f6463f00e9dbc794945db5110fe646bf84
 DIST VTKLargeData-7.1.0.tar.gz 166680011 SHA256 dbf9e9a427e1183886ee7686272c571447491eb7179036f2401622ac7987c6b2 SHA512 79d058732932837f2873a14850e18375d6a43f07de7cf4b71570ae32cf7abb7651052378ff9cbd1e221c95f78e46c13c9852425a509ae02c826f5345e836e455 WHIRLPOOL 3dfb71273a3de14d046f42e8f19b96c04fa08ae5f91309b595143e8c3be7206115c71a87816ae6415bf17b4b739b41a618d79f6e5acbd06193e5114eb88c975d
+DIST vtkDocHtml-6.1.0.tar.gz 230827905 SHA256 e35d0f5b7905e5c827d8daa71ee61b14dc080445efad91f97583a2b9303c1813 SHA512 fcae74a65157d87b39a162facdecbb0ab0a9b95b9f2555ed2b15d635b82034bfc62181eea441caf0b1edbe036b792a8231d409908b943398ce7f662c149d3a60 WHIRLPOOL bc1714223259953a605612c0da124ece60604989458b7de5cf24b37d0f4c339f50c07a13d899f218364e61a35f8e1ace126eda5e83acbc3fe4930b041df0f55d
+DIST vtkDocHtml-7.0.0.tar.gz 114223726 SHA256 e2f5ff7b693880d6f7dd842428d212ea2739dd93f12f008adce3b9958125d65d SHA512 062a2d23df2c1330b2ef46758038cd222923d17c1f3bf810f6df30456729c2f33a921815cd501aa41aeb9739500f121a5b35538613365cbf30f3c7a483e4a235 WHIRLPOOL 853894c3a382dccb3f2947911b7b10fd76956fe48a4ba0ad71169e826a2e663bb965bbf4026c8874e4c9df1778ee5c6a0147fab7140169a9674c63daf7fc6f98
 DIST vtkDocHtml-7.1.0.tar.gz 128927849 SHA256 e69c15a247769437768d1904dd3e36eda1829ae2db5843929b3e64febb8bb35c SHA512 cac6d005262d3849f84c2632dd737c4dcd9f23d5015266d683bcc8c65fad0d88e87faf9b1d5f68fdabe7b2ed97927a9f907020cbeae2b6e7223a5ffee54f2679 WHIRLPOOL ac6c5c577151ab4b7cc832bfef06b4d4e5372bd0f31e89f80cd46afde44ba416bde3cc9e558c193ace0c79c27e46adb43d898b64d61dbc260d363517a49b0dce

diff --git a/sci-libs/vtk/files/vtk-6.1.0-freetype.patch b/sci-libs/vtk/files/vtk-6.1.0-freetype.patch
new file mode 100644
index 00000000000..b7d3e409cde
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-6.1.0-freetype.patch
@@ -0,0 +1,22 @@
+--- a/ParaView-v4.2.0-source/VTK/Rendering/FreeType/vtkFreeTypeTools.cxx_orig	2014-12-23 09:25:35.000000000 +0100
++++ b/ParaView-v4.2.0-source/VTK/Rendering/FreeType/vtkFreeTypeTools.cxx	2014-12-24 09:40:31.886953389 +0100
+@@ -1185,7 +1185,7 @@
+     if (bitmap)
+       {
+       metaData.ascent = std::max(bitmapGlyph->top - 1, metaData.ascent);
+-      metaData.descent = std::min(-(bitmap->rows - (bitmapGlyph->top - 1)),
++      metaData.descent = std::min(-(static_cast<int>(bitmap->rows) - (bitmapGlyph->top - 1)),
+                                   metaData.descent);
+       }
+     ++heightString;
+@@ -1952,8 +1952,8 @@
+     if (bitmap)
+       {
+       bbox[0] = std::min(bbox[0], pen[0] + bitmapGlyph->left);
+-      bbox[1] = std::max(bbox[1], pen[0] + bitmapGlyph->left + bitmap->width);
+-      bbox[2] = std::min(bbox[2], pen[1] + bitmapGlyph->top - 1 - bitmap->rows);
++      bbox[1] = std::max(bbox[1], pen[0] + bitmapGlyph->left + static_cast<int>(bitmap->width));
++      bbox[2] = std::min(bbox[2], pen[1] + bitmapGlyph->top - 1 - static_cast<int>(bitmap->rows));
+       bbox[3] = std::max(bbox[3], pen[1] + bitmapGlyph->top - 1);
+       }
+     else

diff --git a/sci-libs/vtk/files/vtk-6.1.0-gcc67.patch b/sci-libs/vtk/files/vtk-6.1.0-gcc67.patch
new file mode 100644
index 00000000000..83d1ae18f21
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-6.1.0-gcc67.patch
@@ -0,0 +1,26 @@
+diff --git a/old/vtkCompilerExtras.cmake b/CMake/vtkCompilerExtras.cmake
+index 05b2db9..92c2c4c 100644
+--- a/old/vtkCompilerExtras.cmake
++++ b/CMake/vtkCompilerExtras.cmake
+@@ -27,7 +27,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
+     OUTPUT_VARIABLE _gcc_version_info
+     ERROR_VARIABLE _gcc_version_info)
+ 
+-  string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]"
++  string (REGEX MATCH "[0-9]\\.[0-9]\\.[0-9]"
+     _gcc_version "${_gcc_version_info}")
+   if(NOT _gcc_version)
+     string (REGEX REPLACE ".*\\(GCC\\).* ([34]\\.[0-9]) .*" "\\1.0"
+diff --git a/old/GenerateExportHeader.cmake b/CMake/GenerateExportHeader.cmake
+index 3cc12dd..b7a47df 100644
+--- a/old/GenerateExportHeader.cmake
++++ b/CMake/GenerateExportHeader.cmake
+@@ -166,7 +166,7 @@ macro(_test_compiler_hidden_visibility)
+     execute_process(COMMAND ${CMAKE_C_COMPILER} --version
+       OUTPUT_VARIABLE _gcc_version_info
+       ERROR_VARIABLE _gcc_version_info)
+-    string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]"
++    string(REGEX MATCH "[0-9]\\.[0-9]\\.[0-9]"
+       _gcc_version "${_gcc_version_info}")
+     # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
+     # patch level, handle this here:

diff --git a/sci-libs/vtk/files/vtk-6.1.0-gdal2.patch b/sci-libs/vtk/files/vtk-6.1.0-gdal2.patch
new file mode 100644
index 00000000000..c2186410227
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-6.1.0-gdal2.patch
@@ -0,0 +1,33 @@
+diff --git a/IO/GDAL/vtkGDALVectorReader.cxx b/IO/GDAL/vtkGDALVectorReader.cxx
+index 86854a0..a0e234a 100644
+--- a/IO/GDAL/vtkGDALVectorReader.cxx
++++ b/IO/GDAL/vtkGDALVectorReader.cxx
+# Patch to build against newer GDAL per upstream commit
+# https://projects.archlinux.org/svntogit/community.git/tree/trunk/gdal2.patch?h=packages/vtk&id=43307598a98872fd4ce7739e47f5bb4cfcb5372d
+@@ -44,7 +44,7 @@ class vtkGDALVectorReader::Internal
+ public:
+   Internal( const char* srcName, int srcMode, int appendFeatures, int addFeatIds )
+     {
+-    this->Source = OGRSFDriverRegistrar::Open( srcName, srcMode, &this->Driver );
++    this->Source = (GDALDataset*) OGROpen( srcName, srcMode, NULL );
+     if ( ! this->Source )
+       {
+       this->LastError = CPLGetLastErrorMsg();
+@@ -61,7 +61,7 @@ public:
+     {
+     if ( this->Source )
+       {
+-      OGRDataSource::DestroyDataSource( this->Source );
++      GDALClose( (GDALDatasetH) this->Source );
+       }
+     }
+
+@@ -304,7 +304,7 @@ public:
+     return nCells;
+     }
+
+-  OGRDataSource* Source;
++  GDALDataset* Source;
+   OGRSFDriver* Driver;
+   const char* LastError;
+   int LayerIdx;

diff --git a/sci-libs/vtk/files/vtk-6.1.0-glext.patch b/sci-libs/vtk/files/vtk-6.1.0-glext.patch
new file mode 100644
index 00000000000..b5529a5fc3d
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-6.1.0-glext.patch
@@ -0,0 +1,13 @@
+diff -up VTK-6.1.0/Rendering/OpenGL/vtkOpenGL.h.glext VTK-6.1.0/Rendering/OpenGL/vtkOpenGL.h
+--- VTK-6.1.0/Rendering/OpenGL/vtkOpenGL.h.glext	2014-01-22 08:55:41.000000000 -0700
++++ VTK-6.1.0/Rendering/OpenGL/vtkOpenGL.h	2014-11-19 10:27:12.349345199 -0700
+@@ -19,7 +19,8 @@
+ #include "vtkConfigure.h"
+ 
+ // To prevent gl.h to include glext.h provided by the system
+-#define GL_GLEXT_LEGACY
++// https://bugzilla.redhat.com/show_bug.cgi?id=1138466
++// #define GL_GLEXT_LEGACY
+ #if defined(__APPLE__) && (defined(VTK_USE_CARBON) || defined(VTK_USE_COCOA))
+ # include <OpenGL/gl.h> // Include OpenGL API.
+ #else

diff --git a/sci-libs/vtk/files/vtk-6.1.0-install.patch b/sci-libs/vtk/files/vtk-6.1.0-install.patch
new file mode 100644
index 00000000000..27c6c3adfee
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-6.1.0-install.patch
@@ -0,0 +1,19 @@
+diff -up VTK-6.1.0/CMake/vtkModuleTop.cmake.install VTK-6.1.0/CMake/vtkModuleTop.cmake
+--- VTK-6.1.0/CMake/vtkModuleTop.cmake.install	2014-01-23 19:12:04.922871103 -0700
++++ VTK-6.1.0/CMake/vtkModuleTop.cmake	2014-01-23 19:14:33.002645155 -0700
+@@ -330,11 +330,15 @@ if (NOT VTK_INSTALL_NO_DEVELOPMENT)
+                 CMake/pythonmodules.h.in
+                 CMake/UseVTK.cmake
+                 CMake/FindTCL.cmake
++                CMake/TopologicalSort.cmake
+                 CMake/vtkTclTkMacros.cmake
+                 CMake/vtk-forward.c.in
++                CMake/vtkGroups.cmake
+                 CMake/vtkForwardingExecutable.cmake
+                 CMake/vtkJavaWrapping.cmake
+                 CMake/vtkMakeInstantiator.cmake
++                CMake/vtkMakeInstantiator.cxx.in
++                CMake/vtkMakeInstantiator.h.in
+                 CMake/vtkModuleAPI.cmake
+                 CMake/vtkModuleHeaders.cmake.in
+                 CMake/vtkModuleInfo.cmake.in

diff --git a/sci-libs/vtk/files/vtk-6.1.0-netcdf.patch b/sci-libs/vtk/files/vtk-6.1.0-netcdf.patch
new file mode 100644
index 00000000000..e6f8b643172
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-6.1.0-netcdf.patch
@@ -0,0 +1,29 @@
+diff -up VTK/ThirdParty/netcdf/CMakeLists.txt.netcdf VTK/ThirdParty/netcdf/CMakeLists.txt
+--- VTK/ThirdParty/netcdf/CMakeLists.txt.netcdf	2013-12-27 20:29:11.644289659 -0700
++++ VTK/ThirdParty/netcdf/CMakeLists.txt	2013-12-27 20:33:48.071895769 -0700
+@@ -1,10 +1,18 @@
+-vtk_module_third_party(NetCDF
+-  LIBRARIES vtkNetCDF vtkNetCDF_cxx
+-  INCLUDE_DIRS
+-    ${CMAKE_CURRENT_SOURCE_DIR}/vtknetcdf/include
+-    ${CMAKE_CURRENT_BINARY_DIR}/vtknetcdf
+-  COMPONENTS C CXX
+-  )
++if(NOT VTK_USE_SYSTEM_NETCDF)
++  vtk_module_third_party(NetCDF
++    LIBRARIES vtkNetCDF vtkNetCDF_cxx
++    INCLUDE_DIRS
++      ${CMAKE_CURRENT_SOURCE_DIR}/vtknetcdf/include
++      ${CMAKE_CURRENT_BINARY_DIR}/vtknetcdf
++    COMPONENTS C CXX
++    )
++else(NOT VTK_USE_SYSTEM_NETCDF)
++  vtk_module_third_party(NetCDF
++    LIBRARIES vtkNetCDF netcdf
++    COMPONENTS C CXX
++    )
++endif()
++
+ 
+ #Configure the top cpp header to switch between system and internal
+ #netcdf just like vtk_module_third_party does for the c header.

diff --git a/sci-libs/vtk/files/vtk-6.1.0-system.patch b/sci-libs/vtk/files/vtk-6.1.0-system.patch
new file mode 100644
index 00000000000..c75d544447e
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-6.1.0-system.patch
@@ -0,0 +1,27 @@
+diff -up VTK/CMake/vtkModuleMacros.cmake.system VTK/CMake/vtkModuleMacros.cmake
+--- VTK/CMake/vtkModuleMacros.cmake.system	2013-12-24 19:17:43.000000000 -0700
++++ VTK/CMake/vtkModuleMacros.cmake	2013-12-27 20:28:22.375573277 -0700
+@@ -682,7 +682,7 @@ macro(vtk_module_third_party _pkg)
+     message(FATAL_ERROR "Cannot specify both LIBRARIES and NO_LIBRARIES")
+   endif()
+ 
+-  option(VTK_USE_SYSTEM_${_upper} "Use system-installed ${_pkg}" OFF)
++  option(VTK_USE_SYSTEM_${_upper} "Use system-installed ${_pkg}" ${VTK_USE_SYSTEM_LIBRARIES})
+   mark_as_advanced(VTK_USE_SYSTEM_${_upper})
+ 
+   if(VTK_USE_SYSTEM_${_upper})
+diff -up VTK/CMakeLists.txt.system VTK/CMakeLists.txt
+--- VTK/CMakeLists.txt.system	2013-12-27 20:28:22.374573241 -0700
++++ VTK/CMakeLists.txt	2013-12-27 20:28:48.118669708 -0700
+@@ -132,6 +132,11 @@ if (CMAKE_CROSSCOMPILING AND NOT COMPILE
+ endif()
+ 
+ #-----------------------------------------------------------------------------
++# Do we try to use system libraries by default?
++OPTION(VTK_USE_SYSTEM_LIBRARIES "Use the system's libraries by default." OFF)
++MARK_AS_ADVANCED(VTK_USE_SYSTEM_LIBRARIES)
++
++#-----------------------------------------------------------------------------
+ # The third party macros are still used in one or two third party builds.
+ include(vtkThirdParty)
+ 

diff --git a/sci-libs/vtk/files/vtk-6.1.0-web.patch b/sci-libs/vtk/files/vtk-6.1.0-web.patch
new file mode 100644
index 00000000000..a85f2cd9964
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-6.1.0-web.patch
@@ -0,0 +1,25 @@
+From 58373b120db6d51c6d5eace38447cdb45ff858d1 Mon Sep 17 00:00:00 2001
+From: Patric Schmitz <patric.schmitz@rwth-aachen.de>
+Date: Tue, 28 Oct 2014 16:24:22 +0100
+Subject: [PATCH] Include vtkPythonPackages in Web/JavaScript/CMakeLists.txt
+
+Change-Id: Ie7bffa19bdaa78c5b090c886e50c1af76e2aadee
+---
+ Web/Applications/CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Web/Applications/CMakeLists.txt b/Web/Applications/CMakeLists.txt
+index c9e7ad3..b4c9a60 100644
+--- a/Web/Applications/CMakeLists.txt
++++ b/Web/Applications/CMakeLists.txt
+@@ -12,6 +12,7 @@ set(WEB_APPLICATIONS
+ 
+ set(WEB_APPS_DEPENDS)
+ 
++include(vtkPythonPackages) # for copy_files_recursive
+ foreach(_app ${WEB_APPLICATIONS})
+   file(MAKE_DIRECTORY "${VTK_WWW_DIR}/apps/${_app}")
+ 
+-- 
+2.2.1
+

diff --git a/sci-libs/vtk/metadata.xml b/sci-libs/vtk/metadata.xml
index 3a5d7bde969..dbcdc25b234 100644
--- a/sci-libs/vtk/metadata.xml
+++ b/sci-libs/vtk/metadata.xml
@@ -8,6 +8,7 @@
   <use>
     <flag name="all-modules">Build all modules</flag>
     <flag name="boost">Add support for boost</flag>
+    <flag name="cg">Use nvidia's cg shaders</flag>
     <flag name="gdal">Support for gdal formated data</flag>
     <flag name="imaging">Building Imaging modules</flag>
     <flag name="json">Support for json formated data</flag>

diff --git a/sci-libs/vtk/vtk-6.1.0-r3.ebuild b/sci-libs/vtk/vtk-6.1.0-r3.ebuild
new file mode 100644
index 00000000000..1345bde683e
--- /dev/null
+++ b/sci-libs/vtk/vtk-6.1.0-r3.ebuild
@@ -0,0 +1,390 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+CMAKE_MAKEFILE_GENERATOR=ninja
+WEBAPP_OPTIONAL=yes
+WEBAPP_MANUAL_SLOT=yes
+
+inherit eutils flag-o-matic java-pkg-opt-2 python-single-r1 qmake-utils versionator toolchain-funcs cmake-utils virtualx webapp
+
+# Short package version
+SPV="$(get_version_component_range 1-2)"
+
+DESCRIPTION="The Visualization Toolkit"
+HOMEPAGE="http://www.vtk.org/"
+SRC_URI="
+	http://www.${PN}.org/files/release/${SPV}/VTK-${PV}.tar.gz
+	doc? ( http://www.${PN}.org/files/release/${SPV}/${PN}DocHtml-${PV}.tar.gz )
+	test? (
+		http://www.${PN}.org/files/release/${SPV}/VTKData-${PV}.tar.gz
+		http://www.${PN}.org/files/release/${SPV}/VTKLargeData-${PV}.tar.gz
+		)
+	"
+
+LICENSE="BSD LGPL-2"
+KEYWORDS="amd64 ~arm x86 ~amd64-linux ~x86-linux"
+SLOT="0"
+IUSE="
+	all-modules aqua boost cg doc examples imaging ffmpeg gdal java json kaapi mpi
+	mysql odbc offscreen postgres python qt4 rendering smp tbb test theora tk tcl
+	video_cards_nvidia views web xdmf2 R +X"
+
+REQUIRED_USE="
+	all-modules? ( python xdmf2 )
+	java? ( qt4 )
+	python? ( ${PYTHON_REQUIRED_USE} )
+	tcl? ( rendering )
+	smp? ( ^^ ( kaapi tbb ) )
+	test? ( python )
+	tk? ( tcl )
+	web? ( python )
+	^^ ( X aqua offscreen )
+	"
+
+RDEPEND="
+	dev-libs/expat
+	dev-libs/jsoncpp
+	dev-libs/libxml2:2
+	>=media-libs/freetype-2.5.4
+	media-libs/libpng:0
+	media-libs/mesa
+	media-libs/libtheora
+	media-libs/tiff:0
+	sci-libs/exodusii
+	sci-libs/hdf5:=
+	sci-libs/netcdf-cxx:3
+	sys-libs/zlib
+	virtual/jpeg:0
+	virtual/opengl
+	>=x11-libs/gl2ps-1.3.8
+	x11-libs/libX11
+	x11-libs/libXmu
+	x11-libs/libXt
+	boost? ( >=dev-libs/boost-1.40.0[mpi?] )
+	cg? ( media-gfx/nvidia-cg-toolkit )
+	examples? (
+		dev-qt/qtcore:4
+		dev-qt/qtgui:4
+		sci-libs/vtkdata
+	)
+	ffmpeg? ( virtual/ffmpeg )
+	gdal? ( sci-libs/gdal )
+	java? ( >=virtual/jre-1.5:* )
+	kaapi? ( <sci-libs/xkaapi-3 )
+	mpi? (
+		virtual/mpi[cxx,romio]
+		python? ( dev-python/mpi4py[${PYTHON_USEDEP}] )
+	mysql? ( virtual/mysql )
+	odbc? ( dev-db/unixODBC )
+	offscreen? ( media-libs/mesa[osmesa] )
+	postgres? ( dev-db/postgresql:= )
+	python? (
+		${PYTHON_DEPS}
+		dev-python/sip[${PYTHON_USEDEP}]
+		)
+	)
+	qt4? (
+		dev-qt/designer:4
+		dev-qt/qtcore:4
+		dev-qt/qtgui:4
+		dev-qt/qtopengl:4
+		dev-qt/qtsql:4
+		dev-qt/qtwebkit:4
+		python? ( dev-python/PyQt4[${PYTHON_USEDEP}] )
+		)
+	tbb? ( dev-cpp/tbb )
+	tcl? ( dev-lang/tcl:0= )
+	tk? ( dev-lang/tk:0= )
+	video_cards_nvidia? ( || ( x11-drivers/nvidia-drivers[tools,static-libs] media-video/nvidia-settings ) )
+	web? (
+		${WEBAPP_DEPEND}
+		python? (
+			dev-python/autobahn[${PYTHON_USEDEP}]
+			dev-python/twisted-core[${PYTHON_USEDEP}]
+			dev-python/zope-interface[${PYTHON_USEDEP}]
+			)
+		)
+	xdmf2? ( sci-libs/xdmf2 )
+	R? ( dev-lang/R )"
+DEPEND="${RDEPEND}
+	doc? ( app-doc/doxygen )
+	java? ( >=virtual/jdk-1.5 )"
+
+S="${WORKDIR}"/VTK-${PV}
+
+PATCHES=(
+	"${FILESDIR}"/${P}-freetype.patch
+	"${FILESDIR}"/${P}-install.patch
+	"${FILESDIR}"/${P}-system.patch
+	"${FILESDIR}"/${P}-netcdf.patch
+	"${FILESDIR}"/${P}-web.patch
+	"${FILESDIR}"/${P}-glext.patch
+	"${FILESDIR}"/${P}-memset.patch
+	"${FILESDIR}"/${P}-gdal2.patch
+	"${FILESDIR}"/${P}-gcc67.patch
+	)
+
+RESTRICT=test
+
+pkg_setup() {
+	use java && java-pkg-opt-2_pkg_setup
+	use python && python-single-r1_pkg_setup
+	use web && webapp_pkg_setup
+
+	append-cppflags -D__STDC_CONSTANT_MACROS -D_UNICODE
+}
+
+src_prepare() {
+	sed \
+		-e 's:libproj4:libproj:g' \
+		-e 's:lib_proj.h:lib_abi.h:g' \
+		-i CMake/FindLIBPROJ4.cmake || die
+
+	local x
+	# missing: VPIC alglib exodusII freerange ftgl libproj4 mrmpi sqlite utf8 verdict xmdf2 xmdf3
+	for x in expat freetype gl2ps hdf5 jpeg jsoncpp libxml2 netcdf oggtheora png tiff zlib; do
+		ebegin "Dropping bundled ${x}"
+		rm -r ThirdParty/${x}/vtk${x} || die
+		eend $?
+	done
+	rm -r \
+		ThirdParty/AutobahnPython/autobahn \
+		ThirdParty/Twisted/twisted \
+		ThirdParty/ZopeInterface/zope \
+		|| die
+
+	use java && export JAVA_HOME="${EPREFIX}/etc/java-config-2/current-system-vm"
+
+	if use mpi; then
+		export CC=mpicc
+		export CXX=mpicxx
+		export FC=mpif90
+		export F90=mpif90
+		export F77=mpif77
+	fi
+
+	cmake-utils_src_prepare
+}
+
+src_configure() {
+	# general configuration
+	local mycmakeargs=(
+		-Wno-dev
+#		-DCMAKE_SKIP_RPATH=YES
+		-DVTK_DIR="${S}"
+		-DVTK_INSTALL_LIBRARY_DIR=$(get_libdir)
+		-DVTK_DATA_ROOT:PATH="${EPREFIX}/usr/share/${PN}/data"
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+		-DVTK_CUSTOM_LIBRARY_SUFFIX=""
+		-DBUILD_SHARED_LIBS=ON
+		-DVTK_USE_SYSTEM_AUTOBAHN=ON
+		-DVTK_USE_SYSTEM_EXPAT=ON
+		-DVTK_USE_SYSTEM_FREETYPE=ON
+		-DVTK_USE_SYSTEM_FreeType=ON
+		-DVTK_USE_SYSTEM_GL2PS=ON
+		-DVTK_USE_SYSTEM_HDF5=ON
+		-DVTK_USE_SYSTEM_JPEG=ON
+		-DVTK_USE_SYSTEM_LIBPROJ4=OFF
+#		-DLIBPROJ4_DIR="${EPREFIX}/usr"
+		-DVTK_USE_SYSTEM_LIBXML2=ON
+		-DVTK_USE_SYSTEM_LibXml2=ON
+		-DVTK_USE_SYSTEM_NETCDF=ON
+		-DVTK_USE_SYSTEM_OGGTHEORA=ON
+		-DVTK_USE_SYSTEM_PNG=ON
+		-DVTK_USE_SYSTEM_TIFF=ON
+		-DVTK_USE_SYSTEM_TWISTED=ON
+		-DVTK_USE_SYSTEM_XDMF2=OFF
+		-DVTK_USE_SYSTEM_XDMF3=OFF
+		-DVTK_USE_SYSTEM_ZLIB=ON
+		-DVTK_USE_SYSTEM_ZOPE=ON
+		-DVTK_USE_SYSTEM_LIBRARIES=ON
+		-DVTK_USE_GL2PS=ON
+		-DVTK_USE_LARGE_DATA=ON
+		-DVTK_USE_PARALLEL=ON
+	)
+
+	mycmakeargs+=(
+		-DVTK_EXTRA_COMPILER_WARNINGS=ON
+		-DVTK_Group_StandAlone=ON
+	)
+
+	mycmakeargs+=(
+		$(cmake-utils_use_build doc DOCUMENTATION)
+		$(cmake-utils_use_build examples EXAMPLES)
+		$(cmake-utils_use_build test VTK_BUILD_ALL_MODULES_FOR_TESTS)
+		$(cmake-utils_use all-modules VTK_BUILD_ALL_MODULES)
+		$(cmake-utils_use doc DOCUMENTATION_HTML_HELP)
+		$(cmake-utils_use imaging VTK_Group_Imaging)
+		$(cmake-utils_use mpi VTK_Group_MPI)
+		$(cmake-utils_use qt4 VTK_Group_Qt)
+		$(cmake-utils_use rendering VTK_Group_Rendering)
+		$(cmake-utils_use tk VTK_Group_Tk)
+		$(cmake-utils_use views VTK_Group_Views)
+		$(cmake-utils_use web VTK_Group_Web)
+		$(cmake-utils_use web VTK_WWW_DIR="${ED}/${MY_HTDOCSDIR}")
+		$(cmake-utils_use java VTK_WRAP_JAVA)
+		$(cmake-utils_use python VTK_WRAP_PYTHON)
+		$(cmake-utils_use python VTK_WRAP_PYTHON_SIP)
+		$(cmake-utils_use tcl VTK_WRAP_TCL)
+	)
+
+	mycmakeargs+=(
+		$(cmake-utils_use boost VTK_USE_BOOST)
+		$(cmake-utils_use cg VTK_USE_CG_SHADERS)
+		$(cmake-utils_use odbc VTK_USE_ODBC)
+		$(cmake-utils_use offscreen VTK_USE_OFFSCREEN)
+		$(cmake-utils_use offscreen VTK_OPENGL_HAS_OSMESA)
+		$(cmake-utils_use smp vtkFiltersSMP)
+		$(cmake-utils_use theora VTK_USE_OGGTHEORA_ENCODER)
+		$(cmake-utils_use video_cards_nvidia VTK_USE_NVCONTROL)
+		$(cmake-utils_use R Module_vtkFiltersStatisticsGnuR)
+		$(cmake-utils_use X VTK_USE_X)
+	)
+
+	# IO
+	mycmakeargs+=(
+		$(cmake-utils_use ffmpeg VTK_USE_FFMPEG_ENCODER)
+		$(cmake-utils_use gdal Module_vtkIOGDAL)
+		$(cmake-utils_use json Module_vtkIOGeoJSON)
+		$(cmake-utils_use xdmf2 Module_vtkIOXdmf2)
+	)
+	# Apple stuff, does it really work?
+	mycmakeargs+=( $(cmake-utils_use aqua VTK_USE_COCOA) )
+
+	if use examples || use test; then
+		mycmakeargs+=( -DBUILD_TESTING=ON )
+	fi
+
+	if use kaapi; then
+		mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="Kaapi" )
+	elif use tbb; then
+		mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="TBB" )
+	else
+		mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="Sequential" )
+	fi
+
+	if use java; then
+#		local _ejavahome=${EPREFIX}/etc/java-config-2/current-system-vm
+#
+#	mycmakeargs+=(
+#			-DJAVAC=${EPREFIX}/usr/bin/javac
+#			-DJAVAC=$(java-config -c)
+#			-DJAVA_AWT_INCLUDE_PATH=${JAVA_HOME}/include
+#			-DJAVA_INCLUDE_PATH:PATH=${JAVA_HOME}/include
+#			-DJAVA_INCLUDE_PATH2:PATH=${JAVA_HOME}/include/linux
+#		)
+#
+		if [ "${ARCH}" == "amd64" ]; then
+			mycmakeargs+=( -DJAVA_AWT_LIBRARY="${JAVA_HOME}/jre/lib/${ARCH}/libjawt.so;${JAVA_HOME}/jre/lib/${ARCH}/xawt/libmawt.so" )
+		else
+			mycmakeargs+=( -DJAVA_AWT_LIBRARY="${JAVA_HOME}/jre/lib/i386/libjawt.so;${JAVA_HOME}/jre/lib/i386/xawt/libmawt.so" )
+		fi
+	fi
+	if use python; then
+		mycmakeargs+=(
+			-DVTK_INSTALL_PYTHON_MODULE_DIR="$(python_get_sitedir)"
+			-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
+			-DPYTHON_LIBRARY="$(python_get_library_path)"
+			-DSIP_PYQT_DIR="${EPREFIX}/usr/share/sip"
+			-DSIP_INCLUDE_DIR="$(python_get_includedir)"
+			-DVTK_PYTHON_INCLUDE_DIR="$(python_get_includedir)"
+			-DVTK_PYTHON_LIBRARY="$(python_get_library_path)"
+			-DVTK_PYTHON_SETUP_ARGS:STRING="--prefix=${EPREFIX}/usr --root=${D}"
+		)
+	fi
+
+	if use qt4; then
+		mycmakeargs+=(
+			-DVTK_USE_QVTK=ON
+			-DVTK_USE_QVTK_OPENGL=ON
+			-DVTK_USE_QVTK_QTOPENGL=ON
+			-DQT_WRAP_CPP=ON
+			-DQT_WRAP_UI=ON
+			-DVTK_INSTALL_QT_DIR=/$(get_libdir)/qt4/plugins/designer
+			-DDESIRED_QT_VERSION=4
+			-DVTK_QT_VERSION=4
+			-DQT_MOC_EXECUTABLE="$(qt4_get_bindir)/moc"
+			-DQT_UIC_EXECUTABLE="$(qt4_get_bindir)/uic"
+			-DQT_INCLUDE_DIR="${EPREFIX}/usr/include/qt4"
+			-DQT_QMAKE_EXECUTABLE="$(qt4_get_bindir)/qmake"
+		)
+	fi
+
+	if use R; then
+		mycmakeargs+=(
+#			-DR_LIBRARY_BLAS=$($(tc-getPKG_CONFIG) --libs blas)
+#			-DR_LIBRARY_LAPACK=$($(tc-getPKG_CONFIG) --libs lapack)
+			-DR_LIBRARY_BLAS=/usr/$(get_libdir)/R/lib/libR.so
+			-DR_LIBRARY_LAPACK=/usr/$(get_libdir)/R/lib/libR.so
+		)
+	fi
+
+	cmake-utils_src_configure
+}
+
+src_test() {
+	local tcllib
+	ln -sf "${BUILD_DIR}"/lib  "${BUILD_DIR}"/lib/Release || die
+	for tcllib in "${BUILD_DIR}"/lib/lib*TCL*so; do
+		ln -sf $(basename "${tcllib}").1 "${tcllib/.so/-${SPV}.so}" || die
+	done
+	export LD_LIBRARY_PATH="${BUILD_DIR}"/lib:"${JAVA_HOME}"/jre/lib/${ARCH}/:"${JAVA_HOME}"/jre/lib/${ARCH}/xawt/
+	local VIRTUALX_COMMAND="cmake-utils_src_test"
+#	local VIRTUALX_COMMAND="cmake-utils_src_test -R Java"
+#	local VIRTUALX_COMMAND="cmake-utils_src_test -I 364,365"
+	virtualmake
+}
+
+src_install() {
+	use web && webapp_src_preinst
+	# install docs
+	HTML_DOCS=( "${S}"/README.html )
+
+	cmake-utils_src_install
+
+	use java && java-pkg_regjar "${ED}"/usr/$(get_libdir)/${PN}.jar
+
+	if use tcl; then
+		# install Tcl docs
+		docinto vtk_tcl
+		dodoc "${S}"/Wrapping/Tcl/README
+	fi
+
+	# install examples
+	if use examples; then
+		insinto /usr/share/${PN}
+		mv -v Examples examples || die
+		doins -r examples
+	fi
+
+	#install big docs
+	if use doc; then
+		cd "${WORKDIR}"/html || die
+		rm -f *.md5 || die "Failed to remove superfluous hashes"
+		einfo "Installing API docs. This may take some time."
+		docinto html
+		dodoc -r ./*
+	fi
+
+	# environment
+	cat >> "${T}"/40${PN} <<- EOF
+	VTK_DATA_ROOT=${EPREFIX}/usr/share/${PN}/data
+	VTK_DIR=${EPREFIX}/usr/$(get_libdir)/${PN}-${SPV}
+	VTKHOME=${EPREFIX}/usr
+	EOF
+	doenvd "${T}"/40${PN}
+
+	use web && webapp_src_install
+}
+
+# webapp.eclass exports these but we want it optional #534036
+pkg_postinst() {
+	use web && webapp_pkg_postinst
+}
+
+pkg_prerm() {
+	use web && webapp_pkg_prerm
+}

diff --git a/sci-libs/vtk/vtk-6.1.0-r4.ebuild b/sci-libs/vtk/vtk-6.1.0-r4.ebuild
new file mode 100644
index 00000000000..409b62823c8
--- /dev/null
+++ b/sci-libs/vtk/vtk-6.1.0-r4.ebuild
@@ -0,0 +1,390 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+CMAKE_MAKEFILE_GENERATOR=ninja
+WEBAPP_OPTIONAL=yes
+WEBAPP_MANUAL_SLOT=yes
+
+inherit eutils flag-o-matic java-pkg-opt-2 python-single-r1 qmake-utils versionator toolchain-funcs cmake-utils virtualx webapp
+
+# Short package version
+SPV="$(get_version_component_range 1-2)"
+
+DESCRIPTION="The Visualization Toolkit"
+HOMEPAGE="http://www.vtk.org/"
+SRC_URI="
+	http://www.${PN}.org/files/release/${SPV}/VTK-${PV}.tar.gz
+	doc? ( http://www.${PN}.org/files/release/${SPV}/${PN}DocHtml-${PV}.tar.gz )
+	test? (
+		http://www.${PN}.org/files/release/${SPV}/VTKData-${PV}.tar.gz
+		http://www.${PN}.org/files/release/${SPV}/VTKLargeData-${PV}.tar.gz
+		)
+	"
+
+LICENSE="BSD LGPL-2"
+KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
+SLOT="0"
+IUSE="
+	all-modules aqua boost cg doc examples imaging ffmpeg gdal java json kaapi mpi
+	mysql odbc offscreen postgres python qt5 rendering smp tbb test theora tk tcl
+	video_cards_nvidia views web xdmf2 R +X"
+
+REQUIRED_USE="
+	all-modules? ( python xdmf2 )
+	java? ( qt5 )
+	python? ( ${PYTHON_REQUIRED_USE} )
+	tcl? ( rendering )
+	smp? ( ^^ ( kaapi tbb ) )
+	test? ( python )
+	tk? ( tcl )
+	web? ( python )
+	^^ ( X aqua offscreen )
+	"
+
+RDEPEND="
+	dev-libs/expat
+	dev-libs/jsoncpp
+	dev-libs/libxml2:2
+	>=media-libs/freetype-2.5.4
+	media-libs/libpng:0
+	media-libs/mesa
+	media-libs/libtheora
+	media-libs/tiff:0
+	sci-libs/exodusii
+	sci-libs/hdf5:=
+	sci-libs/netcdf-cxx:3
+	sys-libs/zlib
+	virtual/jpeg:0
+	virtual/opengl
+	>=x11-libs/gl2ps-1.3.8
+	x11-libs/libX11
+	x11-libs/libXmu
+	x11-libs/libXt
+	boost? ( >=dev-libs/boost-1.40.0[mpi?] )
+	cg? ( media-gfx/nvidia-cg-toolkit )
+	examples? (
+		dev-qt/qtcore:5
+		dev-qt/qtgui:5
+		sci-libs/vtkdata
+	)
+	ffmpeg? ( virtual/ffmpeg )
+	gdal? ( sci-libs/gdal )
+	java? ( >=virtual/jre-1.5:* )
+	kaapi? ( <sci-libs/xkaapi-3 )
+	mpi? (
+		virtual/mpi[cxx,romio]
+		python? ( dev-python/mpi4py[${PYTHON_USEDEP}] )
+	mysql? ( virtual/mysql )
+	odbc? ( dev-db/unixODBC )
+	offscreen? ( media-libs/mesa[osmesa] )
+	postgres? ( dev-db/postgresql:= )
+	python? (
+		${PYTHON_DEPS}
+		dev-python/sip[${PYTHON_USEDEP}]
+		)
+	)
+	qt5? (
+		dev-qt/designer:5
+		dev-qt/qtcore:5
+		dev-qt/qtgui:5
+		dev-qt/qtopengl:5
+		dev-qt/qtsql:5
+		dev-qt/qtwebkit:5
+		python? ( dev-python/PyQt5[${PYTHON_USEDEP}] )
+		)
+	tbb? ( dev-cpp/tbb )
+	tcl? ( dev-lang/tcl:0= )
+	tk? ( dev-lang/tk:0= )
+	video_cards_nvidia? ( || ( x11-drivers/nvidia-drivers[tools,static-libs] media-video/nvidia-settings ) )
+	web? (
+		${WEBAPP_DEPEND}
+		python? (
+			dev-python/autobahn[${PYTHON_USEDEP}]
+			dev-python/twisted-core[${PYTHON_USEDEP}]
+			dev-python/zope-interface[${PYTHON_USEDEP}]
+			)
+		)
+	xdmf2? ( sci-libs/xdmf2 )
+	R? ( dev-lang/R )"
+DEPEND="${RDEPEND}
+	doc? ( app-doc/doxygen )
+	java? ( >=virtual/jdk-1.5 )"
+
+S="${WORKDIR}"/VTK-${PV}
+
+PATCHES=(
+	"${FILESDIR}"/${P}-freetype.patch
+	"${FILESDIR}"/${P}-install.patch
+	"${FILESDIR}"/${P}-system.patch
+	"${FILESDIR}"/${P}-netcdf.patch
+	"${FILESDIR}"/${P}-web.patch
+	"${FILESDIR}"/${P}-glext.patch
+	"${FILESDIR}"/${P}-memset.patch
+	"${FILESDIR}"/${P}-gdal2.patch
+	"${FILESDIR}"/${P}-gcc67.patch
+	)
+
+RESTRICT=test
+
+pkg_setup() {
+	use java && java-pkg-opt-2_pkg_setup
+	use python && python-single-r1_pkg_setup
+	use web && webapp_pkg_setup
+
+	append-cppflags -D__STDC_CONSTANT_MACROS -D_UNICODE
+}
+
+src_prepare() {
+	sed \
+		-e 's:libproj4:libproj:g' \
+		-e 's:lib_proj.h:lib_abi.h:g' \
+		-i CMake/FindLIBPROJ4.cmake || die
+
+	local x
+	# missing: VPIC alglib exodusII freerange ftgl libproj4 mrmpi sqlite utf8 verdict xmdf2 xmdf3
+	for x in expat freetype gl2ps hdf5 jpeg jsoncpp libxml2 netcdf oggtheora png tiff zlib; do
+		ebegin "Dropping bundled ${x}"
+		rm -r ThirdParty/${x}/vtk${x} || die
+		eend $?
+	done
+	rm -r \
+		ThirdParty/AutobahnPython/autobahn \
+		ThirdParty/Twisted/twisted \
+		ThirdParty/ZopeInterface/zope \
+		|| die
+
+	use java && export JAVA_HOME="${EPREFIX}/etc/java-config-2/current-system-vm"
+
+	if use mpi; then
+		export CC=mpicc
+		export CXX=mpicxx
+		export FC=mpif90
+		export F90=mpif90
+		export F77=mpif77
+	fi
+
+	cmake-utils_src_prepare
+}
+
+src_configure() {
+	# general configuration
+	local mycmakeargs=(
+		-Wno-dev
+#		-DCMAKE_SKIP_RPATH=YES
+		-DVTK_DIR="${S}"
+		-DVTK_INSTALL_LIBRARY_DIR=$(get_libdir)
+		-DVTK_DATA_ROOT:PATH="${EPREFIX}/usr/share/${PN}/data"
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+		-DVTK_CUSTOM_LIBRARY_SUFFIX=""
+		-DBUILD_SHARED_LIBS=ON
+		-DVTK_USE_SYSTEM_AUTOBAHN=ON
+		-DVTK_USE_SYSTEM_EXPAT=ON
+		-DVTK_USE_SYSTEM_FREETYPE=ON
+		-DVTK_USE_SYSTEM_FreeType=ON
+		-DVTK_USE_SYSTEM_GL2PS=ON
+		-DVTK_USE_SYSTEM_HDF5=ON
+		-DVTK_USE_SYSTEM_JPEG=ON
+		-DVTK_USE_SYSTEM_LIBPROJ4=OFF
+#		-DLIBPROJ4_DIR="${EPREFIX}/usr"
+		-DVTK_USE_SYSTEM_LIBXML2=ON
+		-DVTK_USE_SYSTEM_LibXml2=ON
+		-DVTK_USE_SYSTEM_NETCDF=ON
+		-DVTK_USE_SYSTEM_OGGTHEORA=ON
+		-DVTK_USE_SYSTEM_PNG=ON
+		-DVTK_USE_SYSTEM_TIFF=ON
+		-DVTK_USE_SYSTEM_TWISTED=ON
+		-DVTK_USE_SYSTEM_XDMF2=OFF
+		-DVTK_USE_SYSTEM_XDMF3=OFF
+		-DVTK_USE_SYSTEM_ZLIB=ON
+		-DVTK_USE_SYSTEM_ZOPE=ON
+		-DVTK_USE_SYSTEM_LIBRARIES=ON
+		-DVTK_USE_GL2PS=ON
+		-DVTK_USE_LARGE_DATA=ON
+		-DVTK_USE_PARALLEL=ON
+	)
+
+	mycmakeargs+=(
+		-DVTK_EXTRA_COMPILER_WARNINGS=ON
+		-DVTK_Group_StandAlone=ON
+	)
+
+	mycmakeargs+=(
+		$(cmake-utils_use_build doc DOCUMENTATION)
+		$(cmake-utils_use_build examples EXAMPLES)
+		$(cmake-utils_use_build test VTK_BUILD_ALL_MODULES_FOR_TESTS)
+		$(cmake-utils_use all-modules VTK_BUILD_ALL_MODULES)
+		$(cmake-utils_use doc DOCUMENTATION_HTML_HELP)
+		$(cmake-utils_use imaging VTK_Group_Imaging)
+		$(cmake-utils_use mpi VTK_Group_MPI)
+		$(cmake-utils_use rendering VTK_Group_Rendering)
+		$(cmake-utils_use tk VTK_Group_Tk)
+		$(cmake-utils_use views VTK_Group_Views)
+		$(cmake-utils_use web VTK_Group_Web)
+		$(cmake-utils_use web VTK_WWW_DIR="${ED}/${MY_HTDOCSDIR}")
+		$(cmake-utils_use java VTK_WRAP_JAVA)
+		$(cmake-utils_use python VTK_WRAP_PYTHON)
+		$(cmake-utils_use python VTK_WRAP_PYTHON_SIP)
+		$(cmake-utils_use tcl VTK_WRAP_TCL)
+	)
+
+	mycmakeargs+=(
+		$(cmake-utils_use boost VTK_USE_BOOST)
+		$(cmake-utils_use cg VTK_USE_CG_SHADERS)
+		$(cmake-utils_use odbc VTK_USE_ODBC)
+		$(cmake-utils_use offscreen VTK_USE_OFFSCREEN)
+		$(cmake-utils_use offscreen VTK_OPENGL_HAS_OSMESA)
+		$(cmake-utils_use smp vtkFiltersSMP)
+		$(cmake-utils_use theora VTK_USE_OGGTHEORA_ENCODER)
+		$(cmake-utils_use video_cards_nvidia VTK_USE_NVCONTROL)
+		$(cmake-utils_use R Module_vtkFiltersStatisticsGnuR)
+		$(cmake-utils_use X VTK_USE_X)
+	)
+
+	# IO
+	mycmakeargs+=(
+		$(cmake-utils_use ffmpeg VTK_USE_FFMPEG_ENCODER)
+		$(cmake-utils_use gdal Module_vtkIOGDAL)
+		$(cmake-utils_use json Module_vtkIOGeoJSON)
+		$(cmake-utils_use xdmf2 Module_vtkIOXdmf2)
+	)
+	# Apple stuff, does it really work?
+	mycmakeargs+=( $(cmake-utils_use aqua VTK_USE_COCOA) )
+
+	if use examples || use test; then
+		mycmakeargs+=( -DBUILD_TESTING=ON )
+	fi
+
+	if use kaapi; then
+		mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="Kaapi" )
+	elif use tbb; then
+		mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="TBB" )
+	else
+		mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="Sequential" )
+	fi
+
+	if use java; then
+#		local _ejavahome=${EPREFIX}/etc/java-config-2/current-system-vm
+#
+#	mycmakeargs+=(
+#			-DJAVAC=${EPREFIX}/usr/bin/javac
+#			-DJAVAC=$(java-config -c)
+#			-DJAVA_AWT_INCLUDE_PATH=${JAVA_HOME}/include
+#			-DJAVA_INCLUDE_PATH:PATH=${JAVA_HOME}/include
+#			-DJAVA_INCLUDE_PATH2:PATH=${JAVA_HOME}/include/linux
+#		)
+#
+		if [ "${ARCH}" == "amd64" ]; then
+			mycmakeargs+=( -DJAVA_AWT_LIBRARY="${JAVA_HOME}/jre/lib/${ARCH}/libjawt.so;${JAVA_HOME}/jre/lib/${ARCH}/xawt/libmawt.so" )
+		else
+			mycmakeargs+=( -DJAVA_AWT_LIBRARY="${JAVA_HOME}/jre/lib/i386/libjawt.so;${JAVA_HOME}/jre/lib/i386/xawt/libmawt.so" )
+		fi
+	fi
+	if use python; then
+		mycmakeargs+=(
+			-DVTK_INSTALL_PYTHON_MODULE_DIR="$(python_get_sitedir)"
+			-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
+			-DPYTHON_LIBRARY="$(python_get_library_path)"
+			-DSIP_PYQT_DIR="${EPREFIX}/usr/share/sip"
+			-DSIP_INCLUDE_DIR="$(python_get_includedir)"
+			-DVTK_PYTHON_INCLUDE_DIR="$(python_get_includedir)"
+			-DVTK_PYTHON_LIBRARY="$(python_get_library_path)"
+			-DVTK_PYTHON_SETUP_ARGS:STRING="--prefix=${EPREFIX}/usr --root=${D}"
+		)
+	fi
+
+	if use qt5; then
+		mycmakeargs+=(
+			-DVTK_USE_QVTK=ON
+			-DVTK_USE_QVTK_OPENGL=ON
+			-DVTK_USE_QVTK_QTOPENGL=ON
+			-DQT_WRAP_CPP=ON
+			-DQT_WRAP_UI=ON
+			-DVTK_INSTALL_QT_DIR=/$(get_libdir)/qt5/plugins/designer
+			-DDESIRED_QT_VERSION=5
+			-DVTK_QT_VERSION=5
+			-DQT_MOC_EXECUTABLE="$(qt5_get_bindir)/moc"
+			-DQT_UIC_EXECUTABLE="$(qt5_get_bindir)/uic"
+			-DQT_INCLUDE_DIR="${EPREFIX}/usr/include/qt5"
+			-DQT_QMAKE_EXECUTABLE="$(qt5_get_bindir)/qmake"
+			-DVTK_Group_Qt:BOOL=ON
+		)
+	fi
+
+	if use R; then
+		mycmakeargs+=(
+#			-DR_LIBRARY_BLAS=$($(tc-getPKG_CONFIG) --libs blas)
+#			-DR_LIBRARY_LAPACK=$($(tc-getPKG_CONFIG) --libs lapack)
+			-DR_LIBRARY_BLAS=/usr/$(get_libdir)/R/lib/libR.so
+			-DR_LIBRARY_LAPACK=/usr/$(get_libdir)/R/lib/libR.so
+		)
+	fi
+
+	cmake-utils_src_configure
+}
+
+src_test() {
+	local tcllib
+	ln -sf "${BUILD_DIR}"/lib  "${BUILD_DIR}"/lib/Release || die
+	for tcllib in "${BUILD_DIR}"/lib/lib*TCL*so; do
+		ln -sf $(basename "${tcllib}").1 "${tcllib/.so/-${SPV}.so}" || die
+	done
+	export LD_LIBRARY_PATH="${BUILD_DIR}"/lib:"${JAVA_HOME}"/jre/lib/${ARCH}/:"${JAVA_HOME}"/jre/lib/${ARCH}/xawt/
+	local VIRTUALX_COMMAND="cmake-utils_src_test"
+#	local VIRTUALX_COMMAND="cmake-utils_src_test -R Java"
+#	local VIRTUALX_COMMAND="cmake-utils_src_test -I 364,365"
+	virtualmake
+}
+
+src_install() {
+	use web && webapp_src_preinst
+	# install docs
+	HTML_DOCS=( "${S}"/README.html )
+
+	cmake-utils_src_install
+
+	use java && java-pkg_regjar "${ED}"/usr/$(get_libdir)/${PN}.jar
+
+	if use tcl; then
+		# install Tcl docs
+		docinto vtk_tcl
+		dodoc "${S}"/Wrapping/Tcl/README
+	fi
+
+	# install examples
+	if use examples; then
+		insinto /usr/share/${PN}
+		mv -v Examples examples || die
+		doins -r examples
+	fi
+
+	#install big docs
+	if use doc; then
+		cd "${WORKDIR}"/html || die
+		rm -f *.md5 || die "Failed to remove superfluous hashes"
+		einfo "Installing API docs. This may take some time."
+		docinto html
+		dodoc -r ./*
+	fi
+
+	# environment
+	cat >> "${T}"/40${PN} <<- EOF
+	VTK_DATA_ROOT=${EPREFIX}/usr/share/${PN}/data
+	VTK_DIR=${EPREFIX}/usr/$(get_libdir)/${PN}-${SPV}
+	VTKHOME=${EPREFIX}/usr
+	EOF
+	doenvd "${T}"/40${PN}
+
+	use web && webapp_src_install
+}
+
+# webapp.eclass exports these but we want it optional #534036
+pkg_postinst() {
+	use web && webapp_pkg_postinst
+}
+
+pkg_prerm() {
+	use web && webapp_pkg_prerm
+}

diff --git a/sci-libs/vtk/vtk-7.0.0.ebuild b/sci-libs/vtk/vtk-7.0.0.ebuild
new file mode 100644
index 00000000000..b6db179c4bb
--- /dev/null
+++ b/sci-libs/vtk/vtk-7.0.0.ebuild
@@ -0,0 +1,348 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+WEBAPP_OPTIONAL=yes
+WEBAPP_MANUAL_SLOT=yes
+
+inherit flag-o-matic java-pkg-opt-2 python-single-r1 qmake-utils versionator toolchain-funcs cmake-utils virtualx webapp
+
+# Short package version
+SPV="$(get_version_component_range 1-2)"
+
+DESCRIPTION="The Visualization Toolkit"
+HOMEPAGE="http://www.vtk.org/"
+SRC_URI="
+	http://www.vtk.org/files/release/${SPV}/VTK-${PV}.tar.gz
+	doc? ( http://www.vtk.org/files/release/${SPV}/vtkDocHtml-${PV}.tar.gz )
+	test? (
+		http://www.vtk.org/files/release/${SPV}/VTKData-${PV}.tar.gz
+		http://www.vtk.org/files/release/${SPV}/VTKLargeData-${PV}.tar.gz
+		)
+	"
+
+LICENSE="BSD LGPL-2"
+KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
+SLOT="0"
+IUSE="
+	all-modules aqua boost doc examples imaging ffmpeg gdal java json kaapi mpi
+	mysql odbc offscreen postgres python qt5 rendering tbb test theora tk tcl
+	video_cards_nvidia views web xdmf2 R +X"
+
+REQUIRED_USE="
+	all-modules? ( python xdmf2 boost )
+	java? ( qt5 )
+	python? ( ${PYTHON_REQUIRED_USE} )
+	tcl? ( rendering )
+	test? ( python )
+	tk? ( tcl )
+	web? ( python )
+	^^ ( X aqua offscreen )
+	"
+
+RDEPEND="
+	boost? ( dev-libs/boost:=[mpi?] )
+	dev-libs/expat
+	dev-libs/jsoncpp:=
+	dev-libs/libxml2:2
+	examples? (
+		dev-qt/qtcore:5
+		dev-qt/qtgui:5
+		sci-libs/vtkdata
+	)
+	ffmpeg? ( virtual/ffmpeg )
+	gdal? ( sci-libs/gdal )
+	java? ( >=virtual/jdk-1.7:* )
+	kaapi? ( <sci-libs/xkaapi-3 )
+	>=media-libs/freetype-2.5.4
+	media-libs/libpng:0=
+	media-libs/mesa
+	media-libs/libtheora
+	media-libs/tiff:0
+	mpi? (
+		virtual/mpi[cxx,romio]
+		python? ( dev-python/mpi4py[${PYTHON_USEDEP}] )
+	)
+	mysql? ( virtual/mysql )
+	odbc? ( dev-db/unixODBC )
+	offscreen? ( media-libs/mesa[osmesa] )
+	postgres? ( dev-db/postgresql:= )
+	python? (
+		${PYTHON_DEPS}
+		dev-python/sip[${PYTHON_USEDEP}]
+	)
+	qt5? (
+		dev-qt/designer:5
+		dev-qt/qtcore:5
+		dev-qt/qtgui:5
+		dev-qt/qtopengl:5
+		dev-qt/qtsql:5
+		dev-qt/qtwebkit:5
+		python? ( dev-python/PyQt5[${PYTHON_USEDEP}] )
+	)
+	R? ( dev-lang/R )
+	sci-libs/exodusii
+	sci-libs/hdf5:=
+	sci-libs/netcdf-cxx:0=
+	sys-libs/zlib
+	tbb? ( dev-cpp/tbb )
+	tcl? ( dev-lang/tcl:0= )
+	tk? ( dev-lang/tk:0= )
+	video_cards_nvidia? ( || ( x11-drivers/nvidia-drivers[tools,static-libs] media-video/nvidia-settings ) )
+	virtual/jpeg:0
+	virtual/opengl
+	web? (
+		${WEBAPP_DEPEND}
+		dev-python/autobahn[${PYTHON_USEDEP}]
+		dev-python/twisted-core[${PYTHON_USEDEP}]
+		dev-python/zope-interface[${PYTHON_USEDEP}]
+	)
+	xdmf2? ( sci-libs/xdmf2 )
+	>=x11-libs/gl2ps-1.3.8
+	x11-libs/libX11
+	x11-libs/libXmu
+	x11-libs/libXt"
+
+DEPEND="${RDEPEND}
+	doc? ( app-doc/doxygen )"
+
+S="${WORKDIR}"/VTK-${PV}
+
+PATCHES=(
+	"${FILESDIR}"/${P}-glext.patch
+	"${FILESDIR}"/${PN}-6.1.0-memset.patch
+	"${FILESDIR}"/${PN}-6.1.0-gdal2.patch
+	)
+
+RESTRICT=test
+
+pkg_setup() {
+	use java && java-pkg-opt-2_pkg_setup
+	use python && python-single-r1_pkg_setup
+	use web && webapp_pkg_setup
+}
+
+src_prepare() {
+	sed \
+		-e 's:libproj4:libproj:g' \
+		-e 's:lib_proj.h:lib_abi.h:g' \
+		-i CMake/FindLIBPROJ4.cmake || die
+
+	local x
+	# missing: VPIC alglib exodusII freerange ftgl libproj4 mrmpi sqlite utf8 verdict xmdf2 xmdf3
+	for x in expat freetype gl2ps hdf5 jpeg jsoncpp libxml2 netcdf oggtheora png tiff zlib; do
+		ebegin "Dropping bundled ${x}"
+		rm -r ThirdParty/${x}/vtk${x} || die
+		eend $?
+	done
+	rm -r \
+		ThirdParty/AutobahnPython/autobahn \
+		ThirdParty/Twisted/twisted \
+		ThirdParty/ZopeInterface/zope \
+		|| die
+
+	cmake-utils_src_prepare
+}
+
+src_configure() {
+	# general configuration
+	local mycmakeargs=(
+		-Wno-dev
+		-DVTK_DIR="${S}"
+		-DVTK_INSTALL_LIBRARY_DIR=$(get_libdir)
+		-DVTK_INSTALL_DOC_DIR="${EPREFIX}/usr/share/doc/${PF}"
+		-DVTK_DATA_ROOT="${EPREFIX}/usr/share/${PN}/data"
+		-DVTK_CUSTOM_LIBRARY_SUFFIX=""
+		-DBUILD_SHARED_LIBS=ON
+		-DVTK_USE_SYSTEM_AUTOBAHN=ON
+		-DVTK_USE_SYSTEM_EXPAT=ON
+		-DVTK_USE_SYSTEM_FREETYPE=ON
+		-DVTK_USE_SYSTEM_FreeType=ON
+		-DVTK_USE_SYSTEM_GL2PS=ON
+		-DVTK_USE_SYSTEM_HDF5=ON
+		-DVTK_USE_SYSTEM_JPEG=ON
+		-DVTK_USE_SYSTEM_LIBPROJ4=OFF
+		-DVTK_USE_SYSTEM_LIBXML2=ON
+		-DVTK_USE_SYSTEM_LibXml2=ON
+		-DVTK_USE_SYSTEM_NETCDF=ON
+		-DVTK_USE_SYSTEM_OGGTHEORA=ON
+		-DVTK_USE_SYSTEM_PNG=ON
+		-DVTK_USE_SYSTEM_TIFF=ON
+		-DVTK_USE_SYSTEM_TWISTED=ON
+		-DVTK_USE_SYSTEM_XDMF2=OFF
+		-DVTK_USE_SYSTEM_XDMF3=OFF
+		-DVTK_USE_SYSTEM_ZLIB=ON
+		-DVTK_USE_SYSTEM_ZOPE=ON
+		-DVTK_USE_SYSTEM_LIBRARIES=ON
+		-DVTK_USE_GL2PS=ON
+		-DVTK_USE_LARGE_DATA=ON
+		-DVTK_USE_PARALLEL=ON
+		-DVTK_EXTRA_COMPILER_WARNINGS=ON
+		-DVTK_Group_StandAlone=ON
+		-DBUILD_DOCUMENTATION=$(usex doc)
+		-DBUILD_EXAMPLES=$(usex examples)
+		-DBUILD_VTK_BUILD_ALL_MODULES_FOR_TESTS=$(usex test)
+		-DVTK_BUILD_ALL_MODULES=$(usex all-modules)
+		-DUSE_DOCUMENTATION_HTML_HELP=$(usex doc)
+		-DVTK_Group_Imaging=$(usex imaging)
+		-DVTK_Group_MPI=$(usex mpi)
+		-DVTK_Group_Rendering=$(usex rendering)
+		-DVTK_Group_Tk=$(usex tk)
+		-DVTK_Group_Views=$(usex views)
+		-DVTK_Group_Web=$(usex web)
+		-DVTK_WWW_DIR="${ED%/}/${MY_HTDOCSDIR}"
+		-DVTK_WRAP_JAVA=$(usex java)
+		-DVTK_WRAP_PYTHON=$(usex python)
+		-DVTK_WRAP_PYTHON_SIP=$(usex python)
+		-DVTK_WRAP_TCL=$(usex tcl)
+		-DVTK_USE_BOOST=$(usex boost)
+		-DUSE_VTK_USE_BOOST=$(usex boost)
+		-DModule_vtkInfovisBoost=$(usex boost)
+		-DModule_vtkInfovisBoostGraphAlgorithms=$(usex boost)
+		-DVTK_USE_ODBC=$(usex odbc)
+		-DModule_vtkIOODBC=$(usex odbc)
+		-DVTK_USE_OFFSCREEN=$(usex offscreen)
+		-DVTK_OPENGL_HAS_OSMESA=$(usex offscreen)
+		-DVTK_USE_OGGTHEORA_ENCODER=$(usex theora)
+		-DVTK_USE_NVCONTROL=$(usex video_cards_nvidia)
+		-DModule_vtkFiltersStatisticsGnuR=$(usex R)
+		-DVTK_USE_X=$(usex X)
+	# IO
+		-DVTK_USE_FFMPEG_ENCODER=$(usex ffmpeg)
+		-DModule_vtkIOGDAL=$(usex gdal)
+		-DModule_vtkIOGeoJSON=$(usex json)
+		-DModule_vtkIOXdmf2=$(usex xdmf2)
+	# Apple stuff, does it really work?
+		-DVTK_USE_COCOA=$(usex aqua)
+	)
+
+	if use examples || use test; then
+		mycmakeargs+=( -DBUILD_TESTING=ON )
+	fi
+
+	if use java; then
+		local javacargs=$(java-pkg_javac-args)
+		mycmakeargs+=( -DJAVAC_OPTIONS=${javacargs// /;} )
+	fi
+
+	if use kaapi; then
+		mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="Kaapi" )
+	elif use tbb; then
+		mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="TBB" )
+	else
+		mycmakeargs+=( -DVTK_SMP_IMPLEMENTATION_TYPE="Sequential" )
+	fi
+
+	if use python; then
+		mycmakeargs+=(
+			-DVTK_INSTALL_PYTHON_MODULE_DIR="$(python_get_sitedir)"
+			-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
+			-DPYTHON_LIBRARY="$(python_get_library_path)"
+			-DSIP_PYQT_DIR="${EPREFIX}/usr/share/sip"
+			-DSIP_INCLUDE_DIR="$(python_get_includedir)"
+			-DVTK_PYTHON_INCLUDE_DIR="$(python_get_includedir)"
+			-DVTK_PYTHON_LIBRARY="$(python_get_library_path)"
+			-DVTK_PYTHON_SETUP_ARGS:STRING="--prefix=${EPREFIX} --root=${D}"
+		)
+	fi
+
+	if use qt5; then
+		mycmakeargs+=(
+			-DVTK_USE_QVTK=ON
+			-DVTK_USE_QVTK_OPENGL=ON
+			-DVTK_USE_QVTK_QTOPENGL=ON
+			-DQT_WRAP_CPP=ON
+			-DQT_WRAP_UI=ON
+			-DVTK_INSTALL_QT_DIR="$(qt5_get_libdir)/qt5/plugins/designer"
+			-DDESIRED_QT_VERSION=5
+			-DVTK_QT_VERSION=5
+			-DQT_MOC_EXECUTABLE="$(qt5_get_bindir)/moc"
+			-DQT_UIC_EXECUTABLE="$(qt5_get_bindir)/uic"
+			-DQT_INCLUDE_DIR="${EPREFIX}/usr/include/qt5"
+			-DQT_QMAKE_EXECUTABLE="$(qt5_get_bindir)/qmake"
+			-DVTK_Group_Qt:BOOL=ON
+		)
+	fi
+
+	if use R; then
+		mycmakeargs+=(
+			-DR_LIBRARY_BLAS=/usr/$(get_libdir)/R/lib/libR.so
+			-DR_LIBRARY_LAPACK=/usr/$(get_libdir)/R/lib/libR.so
+		)
+	fi
+
+	append-cppflags -D__STDC_CONSTANT_MACROS -D_UNICODE
+
+	use java && export JAVA_HOME="${EPREFIX}/etc/java-config-2/current-system-vm"
+
+	if use mpi; then
+		export CC=mpicc
+		export CXX=mpicxx
+		export FC=mpif90
+		export F90=mpif90
+		export F77=mpif77
+	fi
+
+	cmake-utils_src_configure
+}
+
+src_test() {
+	local tcllib
+	ln -sf "${BUILD_DIR}"/lib  "${BUILD_DIR}"/lib/Release || die
+	for tcllib in "${BUILD_DIR}"/lib/lib*TCL*so; do
+		ln -sf ${tcllib##*/}.1 "${tcllib/.so/-${SPV}.so}" || die
+	done
+	export LD_LIBRARY_PATH="${BUILD_DIR}"/lib:"${JAVA_HOME}"/jre/lib/${ARCH}/:"${JAVA_HOME}"/jre/lib/${ARCH}/xawt/
+	virtx cmake-utils_src_test
+}
+
+src_install() {
+	use web && webapp_src_preinst
+
+	cmake-utils_src_install
+
+	use java && java-pkg_regjar "${ED%/}"/usr/$(get_libdir)/${PN}.jar
+
+	if use tcl; then
+		# install Tcl docs
+		docinto vtk_tcl
+		dodoc Wrapping/Tcl/README
+		docinto .
+	fi
+
+	# 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
+	fi
+
+	#install big docs
+	if use doc; then
+		rm -f "${WORKDIR}"/html/*.md5 || die "Failed to remove superfluous hashes"
+		einfo "Installing API docs. This may take some time."
+		dodoc -r "${WORKDIR}"/html
+	fi
+
+	# environment
+	cat >> "${T}"/40${PN} <<- EOF || die
+		VTK_DATA_ROOT=${EPREFIX}/usr/share/${PN}/data
+		VTK_DIR=${EPREFIX}/usr/$(get_libdir)/${PN}-${SPV}
+		VTKHOME=${EPREFIX}/usr
+		EOF
+	doenvd "${T}"/40${PN}
+
+	use web && webapp_src_install
+}
+
+# webapp.eclass exports these but we want it optional #534036
+pkg_postinst() {
+	use web && webapp_pkg_postinst
+}
+
+pkg_prerm() {
+	use web && webapp_pkg_prerm
+}


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/vtk/, sci-libs/vtk/files/
@ 2020-05-01 16:48 Matthias Maier
  0 siblings, 0 replies; 19+ messages in thread
From: Matthias Maier @ 2020-05-01 16:48 UTC (permalink / raw
  To: gentoo-commits

commit:     5c9d6ce7a1706c381df35c68f28f56132b57c344
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Fri May  1 14:45:17 2020 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Fri May  1 16:47:27 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c9d6ce7

sci-libs/vtk: fix compilation with openmpi-4

Closes: https://bugs.gentoo.org/683382
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 sci-libs/vtk/files/vtk-8.1.0-openmpi-4-compatibility.patch | 14 ++++++++++++++
 sci-libs/vtk/vtk-8.1.0-r6.ebuild                           |  6 ++++++
 2 files changed, 20 insertions(+)

diff --git a/sci-libs/vtk/files/vtk-8.1.0-openmpi-4-compatibility.patch b/sci-libs/vtk/files/vtk-8.1.0-openmpi-4-compatibility.patch
new file mode 100644
index 00000000000..267c1d91b0c
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-8.1.0-openmpi-4-compatibility.patch
@@ -0,0 +1,14 @@
+diff --git a/ThirdParty/mpi4py/vtkmpi4py/src/lib-mpi/config/openmpi.h b/ThirdParty/mpi4py/vtkmpi4py/src/lib-mpi/config/openmpi.h
+index 3173831..e8ee74b 100644
+--- a/ThirdParty/mpi4py/vtkmpi4py/src/lib-mpi/config/openmpi.h
++++ b/ThirdParty/mpi4py/vtkmpi4py/src/lib-mpi/config/openmpi.h
+@@ -141,4 +141,9 @@
+ 
+ #endif
+ 
++ #if OMPI_NUMVERSION >= 40000
++ #undef  PyMPI_HAVE_MPI_LB
++ #undef  PyMPI_HAVE_MPI_UB
++ #endif /* OMPI >= 4.0.0 */
++
+ #endif /* !PyMPI_CONFIG_OPENMPI_H */

diff --git a/sci-libs/vtk/vtk-8.1.0-r6.ebuild b/sci-libs/vtk/vtk-8.1.0-r6.ebuild
index 06e69225f0f..9e5bc9d717c 100644
--- a/sci-libs/vtk/vtk-8.1.0-r6.ebuild
+++ b/sci-libs/vtk/vtk-8.1.0-r6.ebuild
@@ -116,6 +116,10 @@ DEPEND="${RDEPEND}
 
 S="${WORKDIR}"/VTK-${PV}
 
+PATCHES=(
+	"${FILESDIR}"/vtk-8.1.0-openmpi-4-compatibility.patch
+)
+
 RESTRICT="test"
 
 pkg_setup() {
@@ -125,6 +129,8 @@ pkg_setup() {
 }
 
 src_prepare() {
+	default
+
 	local x
 	# missing: VPIC freerange libproj4 mrmpi sqlite utf8 verdict xmdf2 xmdf3
 	for x in constantly expat freetype hdf5 hyperlink incremental jpeg jsoncpp libharu libxml2 lz4 netcdf oggtheora png tiff Twisted txaio zlib ZopeInterface; do


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/vtk/, sci-libs/vtk/files/
@ 2020-06-06  9:42 Andreas Sturmlechner
  0 siblings, 0 replies; 19+ messages in thread
From: Andreas Sturmlechner @ 2020-06-06  9:42 UTC (permalink / raw
  To: gentoo-commits

commit:     64839f71f4892ca57ce5e36648b9a2b1c8a60822
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Jun  6 09:19:08 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Jun  6 09:41:50 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64839f71

sci-libs/vtk: Fix CMake detection of GCC 10

Thanks-to: Tiernan Hubble <tiernanhubble+gentoo <AT> gmail.com>
Closes: https://bugs.gentoo.org/723374
Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 sci-libs/vtk/files/vtk-8.2.0-gcc-10.patch | 16 ++++++++++++++++
 sci-libs/vtk/vtk-8.2.0.ebuild             |  1 +
 2 files changed, 17 insertions(+)

diff --git a/sci-libs/vtk/files/vtk-8.2.0-gcc-10.patch b/sci-libs/vtk/files/vtk-8.2.0-gcc-10.patch
new file mode 100644
index 00000000000..a903b037530
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-8.2.0-gcc-10.patch
@@ -0,0 +1,16 @@
+--- a/CMake/VTKGenerateExportHeader.cmake  2020-05-24 14:33:12.154603698 -0600
++++ b/CMake/VTKGenerateExportHeader.cmake  2020-05-24 14:33:34.864603776 -0600
+@@ -174,8 +174,12 @@
+     execute_process(COMMAND ${CMAKE_C_COMPILER} --version
+       OUTPUT_VARIABLE _gcc_version_info
+       ERROR_VARIABLE _gcc_version_info)
+-    string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*"
++    string(REGEX MATCH "[1-9][0-9]\\.[0-9]\\.[0-9]*"
+       _gcc_version "${_gcc_version_info}")
++    if(NOT _gcc_version)
++      string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*"
++        _gcc_version "${_gcc_version_info}")
++    endif()
+     # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
+     # patch level, handle this here:
+     if(NOT _gcc_version)
\ No newline at end of file

diff --git a/sci-libs/vtk/vtk-8.2.0.ebuild b/sci-libs/vtk/vtk-8.2.0.ebuild
index 1097c4df324..0538637cc2a 100644
--- a/sci-libs/vtk/vtk-8.2.0.ebuild
+++ b/sci-libs/vtk/vtk-8.2.0.ebuild
@@ -126,6 +126,7 @@ S="${WORKDIR}"/VTK-${PV}
 PATCHES=(
 	"${FILESDIR}"/${PN}-8.1.0-openmpi-4-compatibility.patch
 	"${FILESDIR}"/${P}-qt-5.15.patch # bug 726960
+	"${FILESDIR}"/${P}-gcc-10.patch # bug 723374
 )
 
 RESTRICT="test"


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/vtk/, sci-libs/vtk/files/
@ 2020-11-08 13:59 Sam James
  0 siblings, 0 replies; 19+ messages in thread
From: Sam James @ 2020-11-08 13:59 UTC (permalink / raw
  To: gentoo-commits

commit:     2b2feec8938382ff81a1c44c571d072c3ec52167
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Nov  8 13:59:29 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Nov  8 13:59:35 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b2feec8

sci-libs/vtk: fix build with >=media-libs/freetype-2.10.3

Closes: https://bugs.gentoo.org/751088
Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...8.2.0-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch | 18 ++++++++++++++++++
 sci-libs/vtk/vtk-8.2.0.ebuild                          |  1 +
 2 files changed, 19 insertions(+)

diff --git a/sci-libs/vtk/files/vtk-8.2.0-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch b/sci-libs/vtk/files/vtk-8.2.0-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch
new file mode 100644
index 00000000000..b4674873508
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-8.2.0-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch
@@ -0,0 +1,18 @@
+--- VTK-8.2.0/ThirdParty/freetype/vtk_freetype.h.in.orig	2019-01-30 18:15:13.000000000 +0100
++++ VTK-8.2.0/ThirdParty/freetype/vtk_freetype.h.in	2020-10-17 00:03:32.730820908 +0200
+@@ -20,6 +20,15 @@
+ 
+ #ifdef VTK_USE_SYSTEM_FREETYPE
+ # include <ft2build.h>
++/* FT_CALLBACK_DEF no longer exported since freetype-2.10.3 */
++/* has been moved to <freetype/internal/compiler-macros.h> */
++# ifndef FT_CALLBACK_DEF
++#  ifdef __cplusplus
++#   define FT_CALLBACK_DEF( x )  extern "C"  x
++#  else
++#   define FT_CALLBACK_DEF( x )  static  x
++#  endif
++# endif /* FT_CALLBACK_DEF */
+ #else
+ # include <vtkfreetype/include/ft2build.h>
+ #endif

diff --git a/sci-libs/vtk/vtk-8.2.0.ebuild b/sci-libs/vtk/vtk-8.2.0.ebuild
index b0aa1a26e40..5f74a4c99e4 100644
--- a/sci-libs/vtk/vtk-8.2.0.ebuild
+++ b/sci-libs/vtk/vtk-8.2.0.ebuild
@@ -129,6 +129,7 @@ PATCHES=(
 	"${FILESDIR}"/${P}-gcc-10.patch # bug 723374
 	"${FILESDIR}"/${P}-fno-common.patch # bug 721048
 	"${FILESDIR}"/${P}-py38.patch
+	"${FILESDIR}"/${P}-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch # bug #751088
 )
 
 RESTRICT="test"


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/vtk/, sci-libs/vtk/files/
@ 2020-12-15  2:13 Sam James
  0 siblings, 0 replies; 19+ messages in thread
From: Sam James @ 2020-12-15  2:13 UTC (permalink / raw
  To: gentoo-commits

commit:     767ff1a606565950d73c713ef498daaff12d6509
Author:     Aisha Tammy <gentoo <AT> aisha <DOT> cc>
AuthorDate: Sun Dec 13 16:59:35 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Dec 15 02:13:08 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=767ff1a6

sci-libs/vtk: fix finding pugixml

Closes: https://bugs.gentoo.org/758611
Package-Manager: Portage-3.0.11, Repoman-3.0.2
Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc>
Closes: https://github.com/gentoo/gentoo/pull/18640
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-libs/vtk/files/vtk-8.2.0-pugixml.patch |  13 ++
 sci-libs/vtk/vtk-8.2.0-r1.ebuild           | 347 +++++++++++++++++++++++++++++
 2 files changed, 360 insertions(+)

diff --git a/sci-libs/vtk/files/vtk-8.2.0-pugixml.patch b/sci-libs/vtk/files/vtk-8.2.0-pugixml.patch
new file mode 100644
index 00000000000..3c72bcf0003
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-8.2.0-pugixml.patch
@@ -0,0 +1,13 @@
+diff --git a/IO/CityGML/CMakeLists.txt b/IO/CityGML/CMakeLists.txt
+index ce979ba..555f205 100644
+--- a/IO/CityGML/CMakeLists.txt
++++ b/IO/CityGML/CMakeLists.txt
+@@ -5,7 +5,7 @@ vtk_module_library(vtkIOCityGML ${Module_SRCS})
+ if(VTK_USE_SYSTEM_PUGIXML AND NOT pugixml_INCLUDE_DIRS)
+   find_package(pugixml REQUIRED)
+   get_target_property(pugixml_INCLUDE_DIRS pugixml INTERFACE_INCLUDE_DIRECTORIES)
+-  get_target_property(pugixml_LIBRARIES pugixml LOCATION)
++  get_target_property(pugixml_LIBRARIES pugixml INTERFACE_LINK_LIBRARIES)
+   include_directories(${pugixml_INCLUDE_DIRS})
+   vtk_module_link_libraries(vtkIOCityGML LINK_PRIVATE ${pugixml_LIBRARIES})
+ endif()

diff --git a/sci-libs/vtk/vtk-8.2.0-r1.ebuild b/sci-libs/vtk/vtk-8.2.0-r1.ebuild
new file mode 100644
index 00000000000..c5fa5e5ead4
--- /dev/null
+++ b/sci-libs/vtk/vtk-8.2.0-r1.ebuild
@@ -0,0 +1,347 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+WEBAPP_OPTIONAL=yes
+WEBAPP_MANUAL_SLOT=yes
+
+# Short package version
+SPV="$(ver_cut 1-2)"
+inherit flag-o-matic java-pkg-opt-2 python-single-r1 qmake-utils toolchain-funcs cmake virtualx webapp
+
+DESCRIPTION="The Visualization Toolkit"
+HOMEPAGE="https://www.vtk.org/"
+SRC_URI="
+	https://www.vtk.org/files/release/${SPV}/VTK-${PV}.tar.gz
+	doc? ( https://www.vtk.org/files/release/${SPV}/vtkDocHtml-${PV}.tar.gz )
+	examples? (
+		https://www.vtk.org/files/release/${SPV}/VTKData-${PV}.tar.gz
+		https://www.vtk.org/files/release/${SPV}/VTKLargeData-${PV}.tar.gz
+	)"
+
+LICENSE="BSD LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
+IUSE="all-modules aqua boost doc examples ffmpeg gdal imaging java json mpi
+	odbc offscreen postgres python qt5 R rendering tbb tcl theora tk
+	video_cards_nvidia views web +X xdmf2"
+
+REQUIRED_USE="
+	all-modules? ( python xdmf2 boost )
+	java? ( qt5 )
+	python? ( ${PYTHON_REQUIRED_USE} )
+	tcl? ( rendering )
+	examples? ( python )
+	tk? ( tcl )
+	web? ( python )
+	^^ ( X aqua offscreen )"
+
+RDEPEND="
+	app-arch/lz4
+	dev-cpp/eigen
+	dev-db/sqlite
+	dev-libs/double-conversion:0=
+	dev-libs/expat
+	dev-libs/jsoncpp:=
+	dev-libs/libxml2:2
+	>=dev-libs/pugixml-1.11
+	>=media-libs/freetype-2.5.4
+	media-libs/glew:0=
+	>=media-libs/libharu-2.3.0-r2
+	media-libs/libpng:0=
+	media-libs/libtheora
+	media-libs/mesa
+	media-libs/tiff:0
+	sci-libs/exodusii
+	sci-libs/hdf5:=
+	sci-libs/netcdf:0=
+	sci-libs/netcdf-cxx:3
+	sys-libs/zlib
+	virtual/jpeg:0
+	virtual/opengl
+	x11-libs/libX11
+	x11-libs/libXmu
+	x11-libs/libXt
+	boost? ( dev-libs/boost:=[mpi?] )
+	examples? (
+		dev-qt/qtcore:5
+		dev-qt/qtgui:5
+	)
+	ffmpeg? ( media-video/ffmpeg )
+	gdal? ( sci-libs/gdal )
+	java? ( >=virtual/jdk-1.7:* )
+	mpi? (
+		virtual/mpi[cxx,romio]
+		$(python_gen_cond_dep '
+			python? ( dev-python/mpi4py[${PYTHON_MULTI_USEDEP}] )
+		')
+	)
+	odbc? ( dev-db/unixODBC )
+	offscreen? ( media-libs/mesa[osmesa] )
+	postgres? ( dev-db/postgresql:= )
+	python? (
+		${PYTHON_DEPS}
+		$(python_gen_cond_dep '
+			dev-python/sip[${PYTHON_MULTI_USEDEP}]
+		')
+	)
+	qt5? (
+		dev-qt/designer:5
+		dev-qt/qtcore:5
+		dev-qt/qtgui:5
+		dev-qt/qtopengl:5
+		dev-qt/qtsql:5
+		dev-qt/qtx11extras:5
+		$(python_gen_cond_dep '
+			python? ( dev-python/PyQt5[${PYTHON_MULTI_USEDEP}] )
+		')
+	)
+	R? ( dev-lang/R )
+	tbb? ( dev-cpp/tbb )
+	tcl? ( dev-lang/tcl:0= )
+	tk? ( dev-lang/tk:0= )
+	video_cards_nvidia? ( x11-drivers/nvidia-drivers[tools,static-libs] )
+	web? (
+		${WEBAPP_DEPEND}
+		$(python_gen_cond_dep '
+			dev-python/autobahn[${PYTHON_MULTI_USEDEP}]
+			dev-python/constantly[${PYTHON_MULTI_USEDEP}]
+			dev-python/hyperlink[${PYTHON_MULTI_USEDEP}]
+			dev-python/incremental[${PYTHON_MULTI_USEDEP}]
+			dev-python/six[${PYTHON_MULTI_USEDEP}]
+			dev-python/twisted[${PYTHON_MULTI_USEDEP}]
+			dev-python/txaio[${PYTHON_MULTI_USEDEP}]
+			dev-python/zope-interface[${PYTHON_MULTI_USEDEP}]
+		')
+	)
+	xdmf2? ( sci-libs/xdmf2 )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="doc? ( app-doc/doxygen )"
+
+S="${WORKDIR}"/VTK-${PV}
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-8.1.0-openmpi-4-compatibility.patch
+	"${FILESDIR}"/${P}-qt-5.15.patch # bug 726960
+	"${FILESDIR}"/${P}-gcc-10.patch # bug 723374
+	"${FILESDIR}"/${P}-fno-common.patch # bug 721048
+	"${FILESDIR}"/${P}-py38.patch
+	"${FILESDIR}"/${P}-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch # bug #751088
+	"${FILESDIR}"/${P}-pugixml.patch
+)
+
+RESTRICT="test"
+
+pkg_setup() {
+	use java && java-pkg-opt-2_pkg_setup
+	use python && python-single-r1_pkg_setup
+	use web && webapp_pkg_setup
+}
+
+src_prepare() {
+	cmake_src_prepare
+
+	local x
+	# missing: VPIC freerange libproj4 mrmpi sqlite utf8 verdict xmdf2 xmdf3
+	for x in expat freetype hdf5 jpeg jsoncpp libharu libxml2 lz4 netcdf png tiff zlib; do
+		ebegin "Dropping bundled ${x}"
+		rm -r ThirdParty/${x}/vtk${x} || die
+		eend $?
+	done
+
+	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
+}
+
+src_configure() {
+	# general configuration
+	local mycmakeargs=(
+		-Wno-dev
+		-DVTK_DIR="${S}"
+		-DVTK_INSTALL_LIBRARY_DIR=$(get_libdir)
+		-DVTK_INSTALL_PACKAGE_DIR="$(get_libdir)/cmake/${PN}-${SPV}"
+		-DVTK_INSTALL_DOC_DIR="${EPREFIX}/usr/share/doc/${PF}"
+		-DVTK_DATA_ROOT="${EPREFIX}/usr/share/${PN}/data"
+		-DVTK_CUSTOM_LIBRARY_SUFFIX=""
+		-DBUILD_SHARED_LIBS=ON
+		-DVTK_USE_SYSTEM_AUTOBAHN=ON
+		-DVTK_USE_SYSTEM_EXPAT=ON
+		-DVTK_USE_SYSTEM_FREETYPE=ON
+		-DVTK_USE_SYSTEM_FreeType=ON
+		# Use bundled gl2ps (bundled version is a patched version of 1.3.9. Post 1.3.9 versions should be compatible)
+		-DVTK_USE_SYSTEM_GL2PS=OFF
+		-DVTK_USE_SYSTEM_HDF5=ON
+		-DVTK_USE_SYSTEM_JPEG=ON
+		-DVTK_USE_SYSTEM_LIBPROJ=OFF
+		-DVTK_USE_SYSTEM_LIBXML2=ON
+		-DVTK_USE_SYSTEM_LibXml2=ON
+		-DVTK_USE_SYSTEM_NETCDF=ON
+		-DVTK_USE_SYSTEM_OGGTHEORA=ON
+		-DVTK_USE_SYSTEM_PNG=ON
+		-DVTK_USE_SYSTEM_TIFF=ON
+		-DVTK_USE_SYSTEM_TWISTED=ON
+		-DVTK_USE_SYSTEM_XDMF2=OFF
+		-DVTK_USE_SYSTEM_XDMF3=OFF
+		-DVTK_USE_SYSTEM_ZLIB=ON
+		-DVTK_USE_SYSTEM_ZOPE=ON
+		-DVTK_USE_SYSTEM_LIBRARIES=ON
+		# Use bundled diy2 (no gentoo package / upstream does not provide a Finddiy2.cmake or diy2Config.cmake / diy2-config.cmake)
+		-DVTK_USE_SYSTEM_DIY2=OFF
+		-DVTK_USE_GL2PS=ON
+		-DVTK_USE_LARGE_DATA=ON
+		-DVTK_USE_PARALLEL=ON
+		-DVTK_EXTRA_COMPILER_WARNINGS=ON
+		-DVTK_Group_StandAlone=ON
+		-DBUILD_DOCUMENTATION=$(usex doc)
+		-DBUILD_EXAMPLES=$(usex examples)
+		-DBUILD_VTK_BUILD_ALL_MODULES_FOR_TESTS=off
+		-DVTK_BUILD_ALL_MODULES=$(usex all-modules)
+		-DUSE_DOCUMENTATION_HTML_HELP=$(usex doc)
+		-DVTK_Group_Imaging=$(usex imaging)
+		-DVTK_Group_MPI=$(usex mpi)
+		-DVTK_Group_Rendering=$(usex rendering)
+		-DVTK_Group_Tk=$(usex tk)
+		-DVTK_Group_Views=$(usex views)
+		-DVTK_Group_Web=$(usex web)
+		-DVTK_SMP_IMPLEMENTATION_TYPE="$(usex tbb TBB Sequential)"
+		-DVTK_WWW_DIR="${ED}/${MY_HTDOCSDIR}"
+		-DVTK_WRAP_JAVA=$(usex java)
+		-DVTK_WRAP_PYTHON=$(usex python)
+		-DVTK_WRAP_PYTHON_SIP=$(usex python)
+		-DVTK_WRAP_TCL=$(usex tcl)
+		-DVTK_USE_BOOST=$(usex boost)
+		-DUSE_VTK_USE_BOOST=$(usex boost)
+		-DModule_vtkInfovisBoost=$(usex boost)
+		-DModule_vtkInfovisBoostGraphAlgorithms=$(usex boost)
+		-DVTK_USE_ODBC=$(usex odbc)
+		-DModule_vtkIOODBC=$(usex odbc)
+		-DVTK_USE_OFFSCREEN=$(usex offscreen)
+		-DVTK_OPENGL_HAS_OSMESA=$(usex offscreen)
+		-DVTK_USE_OGGTHEORA_ENCODER=$(usex theora)
+		-DVTK_USE_NVCONTROL=$(usex video_cards_nvidia)
+		-DModule_vtkFiltersStatisticsGnuR=$(usex R)
+		-DVTK_USE_X=$(usex X)
+	# IO
+		-DVTK_USE_FFMPEG_ENCODER=$(usex ffmpeg)
+		-DModule_vtkIOGDAL=$(usex gdal)
+		-DModule_vtkIOGeoJSON=$(usex json)
+		-DModule_vtkIOXdmf2=$(usex xdmf2)
+		-DBUILD_TESTING=$(usex examples)
+	# Apple stuff, does it really work?
+		-DVTK_USE_COCOA=$(usex aqua)
+	)
+
+	if use java; then
+		local javacargs=$(java-pkg_javac-args)
+		mycmakeargs+=( -DJAVAC_OPTIONS=${javacargs// /;} )
+	fi
+
+	if use mpi; then
+		mycmakeargs+=( -DVTK_USE_SYSTEM_MPI4PY=ON )
+	fi
+
+	if use python; then
+		mycmakeargs+=(
+			-DVTK_INSTALL_PYTHON_MODULE_DIR="$(python_get_sitedir)"
+			-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
+			-DPYTHON_LIBRARY="$(python_get_library_path)"
+			-DSIP_PYQT_DIR="${EPREFIX}/usr/share/sip"
+			-DSIP_INCLUDE_DIR="$(python_get_includedir)"
+			-DVTK_PYTHON_INCLUDE_DIR="$(python_get_includedir)"
+			-DVTK_PYTHON_LIBRARY="$(python_get_library_path)"
+			-DVTK_PYTHON_SETUP_ARGS:STRING="--prefix=${EPREFIX} --root=${D}"
+			-DVTK_USE_SYSTEM_SIX=ON
+		)
+	fi
+
+	if use qt5; then
+		mycmakeargs+=(
+			-DVTK_USE_QVTK=ON
+			-DVTK_USE_QVTK_OPENGL=ON
+			-DVTK_USE_QVTK_QTOPENGL=ON
+			-DQT_WRAP_CPP=ON
+			-DQT_WRAP_UI=ON
+			-DVTK_INSTALL_QT_DIR="$(basename $(qt5_get_libdir))/qt5/plugins/designer"
+			-DDESIRED_QT_VERSION=5
+			-DVTK_QT_VERSION=5
+			-DQT_MOC_EXECUTABLE="$(qt5_get_bindir)/moc"
+			-DQT_UIC_EXECUTABLE="$(qt5_get_bindir)/uic"
+			-DQT_INCLUDE_DIR="${EPREFIX}/usr/include/qt5"
+			-DQT_QMAKE_EXECUTABLE="$(qt5_get_bindir)/qmake"
+			-DVTK_Group_Qt:BOOL=ON
+			-DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebKitWidgets=ON
+		)
+	fi
+
+	if use R; then
+		mycmakeargs+=(
+			-DR_LIBRARY_BLAS=/usr/$(get_libdir)/R/lib/libR.so
+			-DR_LIBRARY_LAPACK=/usr/$(get_libdir)/R/lib/libR.so
+		)
+	fi
+
+	append-cppflags -D__STDC_CONSTANT_MACROS -D_UNICODE
+
+	use java && export JAVA_HOME="${EPREFIX}/etc/java-config-2/current-system-vm"
+
+	if use mpi; then
+		export CC=mpicc
+		export CXX=mpicxx
+		export FC=mpif90
+		export F90=mpif90
+		export F77=mpif77
+	fi
+
+	cmake_src_configure
+}
+
+src_install() {
+	use web && webapp_src_preinst
+
+	cmake_src_install
+
+	use java && java-pkg_regjar "${ED}"/usr/$(get_libdir)/${PN}.jar
+
+	# Stop web page images from being compressed
+	use doc && docompress -x /usr/share/doc/${PF}/doxygen
+
+	if use tcl; then
+		# install Tcl docs
+		docinto vtk_tcl
+		docinto .
+	fi
+
+	# 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
+	fi
+
+	# environment
+	cat >> "${T}"/40${PN} <<- EOF || die
+		VTK_DATA_ROOT=${EPREFIX}/usr/share/${PN}/data
+		VTK_DIR=${EPREFIX}/usr/$(get_libdir)/${PN}-${SPV}
+		VTKHOME=${EPREFIX}/usr
+		EOF
+	doenvd "${T}"/40${PN}
+
+	use web && webapp_src_install
+}
+
+# webapp.eclass exports these but we want it optional #534036
+pkg_postinst() {
+	use web && webapp_pkg_postinst
+}
+
+pkg_prerm() {
+	use web && webapp_pkg_prerm
+}


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/vtk/, sci-libs/vtk/files/
@ 2021-05-31 11:40 Sam James
  0 siblings, 0 replies; 19+ messages in thread
From: Sam James @ 2021-05-31 11:40 UTC (permalink / raw
  To: gentoo-commits

commit:     0e3674e78cc315bd0f9adf266dc2b9259b149ac6
Author:     Bernd Waibel <waebbl <AT> gmail <DOT> com>
AuthorDate: Tue Feb  2 07:12:25 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May 31 11:37:59 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e3674e7

sci-libs/vtk: bump to 9.0.1

Closes: https://bugs.gentoo.org/723744
Package-Manager: Portage-3.0.19, Repoman-3.0.3
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-libs/vtk/Manifest                              |   4 +
 ...r-compute_arch-if-CUDA-toolkit-11-is-used.patch |  32 ++
 sci-libs/vtk/metadata.xml                          |  13 +-
 sci-libs/vtk/vtk-9.0.1.ebuild                      | 531 +++++++++++++++++++++
 4 files changed, 579 insertions(+), 1 deletion(-)

diff --git a/sci-libs/vtk/Manifest b/sci-libs/vtk/Manifest
index 2ea60d8ea77..38838374c4f 100644
--- a/sci-libs/vtk/Manifest
+++ b/sci-libs/vtk/Manifest
@@ -1,4 +1,8 @@
 DIST VTK-8.2.0.tar.gz 35511819 BLAKE2B 908ed9377d75da6d0bd84de0078ba90a1e9396fcc906ca2981102e2c79d9d3ba4b1297f98682cd2802c7c04f9dbec32ee70740e645c44180befd765f7cda34a6 SHA512 521bd4dabedbc24b0e80a314a34ecd7554b04af28a7973245e3a9cf99a09b995d1b8ac42305c8e53369f226a0a6da3cdb29105ba2c90b46492736ef717760286
+DIST VTK-9.0.1.tar.gz 34687900 BLAKE2B 2c1cc2a35eb6f05d23ec49d8c3c8d787134ce840f940d948da1e03d6875c15e2660c52776218fc3dbccf77959d9affaef051cba14991e6dd150ef5d50b5ae2eb SHA512 eb2508e2409ad302cc5db65282a9c1ff4477ac8a93e0fee898ad8f0974d72decc7d5d444dc825a3c2f7952ebf59853616097ebe0d134649cab0d49a9619065bf
 DIST VTKData-8.2.0.tar.gz 304287875 BLAKE2B 0292d84be40e11203326dcb1bf45f4a6ad2a785968130d4868a230f1cfbdcb600d0c03d4dae3519e2737dc7a964f29c51500c91b3da4291069608dd80a2bce45 SHA512 517d0f6dfdb0c61f59df933f06d3a28c8a48ea684aaff311456213fe493e2a20128886144325fc4edfa376b2d375a2dae6c60ad6e3d5d2f4a7b0ac1d8545c87b
+DIST VTKData-9.0.1.tar.gz 413680549 BLAKE2B 2804f8261763553408c1de8b0d47091875a262cf670604289879253922932f260d4ce8d1586e9b2a8ef3a1286c90e8a61c6472fafcddbd9b40090818eb310d49 SHA512 2fc418a6e15bd4e30ce181bb209c39666982645dbdbe2d6491683497662b72712689e58cf54b7af91865d0e3d0cb3f9ab66606b02964d57bf88d769d292dd938
 DIST VTKLargeData-8.2.0.tar.gz 247522878 BLAKE2B 68dc90548604fbbb8419f2b400aea5d26599b48208b4104f41eaa90f99483689cd928cb00e3a7def396d65db2f03c9294d132854a27af74f66eb118c8319c4ce SHA512 8a7ea3d5870b1e4ccb31c77b4c270d00208349da1b2938e957210db3ec1449b678c66edc2faee1d4514aca6d725f642abc91e10ab0c151f6743cad1c53485588
+DIST VTKLargeData-9.0.1.tar.gz 247522733 BLAKE2B a1d603f7560cf2cd7d1f355fd30fa5b638f2559259f09a6cbbe80da8c2937b1c50cfa2c3b2c6adf99b5bbf537678f817e44bc72962f36364913ae6cc524ae8a8 SHA512 b3303d633f063a6f3bfcc61b441f445611ff7cff6f006c77d8452eb5a3af89a18b2a1201a2dbd230af085b9e45b9abb70319d2f41db0f1e19c632286e7b02ec2
 DIST vtkDocHtml-8.2.0.tar.gz 132516675 BLAKE2B 8651a3793f3326dee36c5ae8a280b00943067f973115697f34770eefd42b5534a7d7e439e7745b32c5fa83daf5a5292b854792d18951af236d0aa77c3aa2b564 SHA512 45e198bde82948d1d8e47a8bdb64a2792c2bfdfc0d939ffe40ded79092d7ac5f497008c00c805baa09d27eabb419cdf0787eee1caf2ac44c5e8759ecf709a317
+DIST vtkDocHtml-9.0.1.tar.gz 138707547 BLAKE2B 1493d21a41b5f8fd43c3503cb4f98905c6d8d0c39e3245a97141bb1baa59ef0054b52595b48fe2b1c1579b02da0dd1f660e5ef7fefd3c7a9cfdbed42f923a234 SHA512 9997fb73ab46d28f107f5a7ef31a86f6948cd3ff88184fd4f1b0cc14dff1b8b6395e420ae2b2a42e772b90b84d8e077cc4543b8b8c9495481c3f8271949f11e4

diff --git a/sci-libs/vtk/files/vtk-9.0.1-0001-fix-kepler-compute_arch-if-CUDA-toolkit-11-is-used.patch b/sci-libs/vtk/files/vtk-9.0.1-0001-fix-kepler-compute_arch-if-CUDA-toolkit-11-is-used.patch
new file mode 100644
index 00000000000..2514dac6356
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.0.1-0001-fix-kepler-compute_arch-if-CUDA-toolkit-11-is-used.patch
@@ -0,0 +1,32 @@
+From 33d9b7ded14ce36e3f63810f3403623ee5c2059c Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Sun, 10 Jan 2021 20:29:56 +0100
+Subject: [PATCH] fix kepler compute_arch if CUDA toolkit >=11 is used.
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+---
+ .../vtkm/vtkvtkm/vtk-m/CMake/VTKmDeviceAdapters.cmake     | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake/VTKmDeviceAdapters.cmake b/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake/VTKmDeviceAdapters.cmake
+index ff0b2581..e565e783 100644
+--- a/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake/VTKmDeviceAdapters.cmake
++++ b/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake/VTKmDeviceAdapters.cmake
+@@ -229,8 +229,12 @@ if(VTKm_ENABLE_CUDA)
+     if(VTKm_CUDA_Architecture STREQUAL "fermi")
+       set(arch_flags --generate-code=arch=compute_20,code=sm_20)
+     elseif(VTKm_CUDA_Architecture STREQUAL "kepler")
+-      set(arch_flags --generate-code=arch=compute_30,code=sm_30
+-                     --generate-code=arch=compute_35,code=sm_35)
++      if(CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 11.0)
++        set(arch_flags --generate-code=arch=compute_30,code=sm_30
++                       --generate-code=arch=compute_35,code=sm_35)
++      else()
++        set(arch_flags --generate-code=arch=compute_35,code=sm_35)
++      endif()
+     elseif(VTKm_CUDA_Architecture STREQUAL "maxwell")
+       set(arch_flags --generate-code=arch=compute_50,code=sm_50)
+     elseif(VTKm_CUDA_Architecture STREQUAL "pascal")
+-- 
+2.30.0
+

diff --git a/sci-libs/vtk/metadata.xml b/sci-libs/vtk/metadata.xml
index 6c1a962488c..b7fedcbd916 100644
--- a/sci-libs/vtk/metadata.xml
+++ b/sci-libs/vtk/metadata.xml
@@ -1,17 +1,28 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-  <maintainer type="project">
+  <maintainer type="project" proxied="proxy">
     <email>sci@gentoo.org</email>
     <name>Gentoo Science Project</name>
   </maintainer>
+  <maintainer type="person" proxied="yes">
+    <email>waebbl-gentoo@posteo.net</email>
+    <name>Bernd Waibel</name>
+  </maintainer>
+  <maintainer type="project" proxied="proxy">
+    <email>proxy-maint@gentoo.org</email>
+    <description>Gentoo Proxy Maintainers</description>
+  </maintainer>
   <use>
     <flag name="all-modules">Build all modules</flag>
     <flag name="boost">Add support for boost</flag>
+    <flag name="cuda">Add support for CUDA</flag>
     <flag name="gdal">Support for gdal formated data</flag>
     <flag name="imaging">Building Imaging modules</flag>
     <flag name="json">Support for json formatted data</flag>
+    <flag name="kits">Build kits in addition to modules</flag>
     <flag name="offscreen">Offscreen rendering through OSMesa</flag>
+    <flag name="pegtl">Use pegtl to build parsers</flag>
     <flag name="rendering">Building Redering modules</flag>
     <flag name="tbb">Use <pkg>dev-cpp/tbb</pkg> to handle smp support</flag>
     <flag name="views">Building Views modules</flag>

diff --git a/sci-libs/vtk/vtk-9.0.1.ebuild b/sci-libs/vtk/vtk-9.0.1.ebuild
new file mode 100644
index 00000000000..bf7a3ba0a1b
--- /dev/null
+++ b/sci-libs/vtk/vtk-9.0.1.ebuild
@@ -0,0 +1,531 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# TODO:
+# - add USE flag for remote modules? Those modules can be downloaded
+#	properly before building.
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+WEBAPP_OPTIONAL=yes
+WEBAPP_MANUAL_SLOT=yes
+
+inherit check-reqs cmake cuda flag-o-matic java-pkg-opt-2 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
+	https://www.vtk.org/files/release/${MY_PV}/VTKData-${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 )
+	test? (
+		https://www.vtk.org/files/release/${MY_PV}/VTKLargeData-${PV}.tar.gz
+	)
+"
+S="${WORKDIR}/VTK-${PV}"
+
+LICENSE="BSD LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
+# Note: external xdmf2 has no recognized target
+IUSE="+X all-modules boost cuda doc examples ffmpeg gdal imaging java
+	+json kits mpi mysql odbc offscreen openmp pegtl postgres python
+	qt5 +rendering tbb theora tk video_cards_nvidia views web"
+
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="
+	all-modules? ( boost ffmpeg gdal imaging mysql odbc postgres qt5 rendering theora views )
+	cuda? ( X )
+	java? ( rendering )
+	python? ( ${PYTHON_REQUIRED_USE} )
+	qt5? ( X rendering )
+	tk? ( X rendering python )
+	web? ( python )
+"
+
+RDEPEND="
+	app-arch/lz4
+	app-arch/xz-utils
+	dev-db/sqlite
+	dev-cpp/eigen[cuda?,openmp?]
+	dev-libs/double-conversion:=
+	dev-libs/expat
+	dev-libs/icu:=
+	dev-libs/libxml2:2
+	dev-libs/pugixml
+	media-libs/freetype
+	media-libs/libogg
+	media-libs/libpng
+	media-libs/libtheora
+	media-libs/tiff
+	sci-libs/hdf5:=[mpi=]
+	sci-libs/kissfft[openmp?]
+	sci-libs/netcdf:=[mpi=]
+	sys-libs/zlib
+	virtual/jpeg
+	all-modules? ( sci-geosciences/liblas[gdal] )
+	boost? ( dev-libs/boost:=[mpi?] )
+	cuda? ( dev-util/nvidia-cuda-toolkit:= )
+	ffmpeg? ( media-video/ffmpeg:= )
+	gdal? ( sci-libs/gdal:= )
+	java? ( >=virtual/jdk-1.8:* )
+	json? ( dev-libs/jsoncpp:= )
+	mpi? (
+		sci-libs/h5part
+		sys-cluster/openmpi[cxx,romio]
+	)
+	mysql? ( dev-db/mariadb-connector-c )
+	odbc? ( dev-db/unixODBC )
+	offscreen? ( media-libs/mesa[osmesa] )
+	postgres? ( dev-db/postgresql:= )
+	python? ( ${PYTHON_DEPS} )
+	qt5? (
+		dev-qt/qtcore:5
+		dev-qt/qtsql:5
+		dev-qt/qtwidgets:5
+	)
+	rendering? (
+		media-libs/freeglut
+		media-libs/glew:=
+		sci-libs/proj:=
+		virtual/opengl
+		x11-libs/gl2ps
+	)
+	tbb? ( dev-cpp/tbb )
+	tk? ( dev-lang/tk:= )
+	video_cards_nvidia? ( x11-drivers/nvidia-drivers[tools,static-libs] )
+	views? (
+		x11-libs/libICE
+		x11-libs/libXext
+	)
+	web? ( ${WEBAPP_DEPEND} )
+	$(python_gen_cond_dep '
+		python? (
+			boost? ( dev-libs/boost:=[mpi?,python?,${PYTHON_MULTI_USEDEP}] )
+			gdal? ( sci-libs/gdal:=[python?,${PYTHON_MULTI_USEDEP}] )
+			mpi? ( dev-python/mpi4py[${PYTHON_MULTI_USEDEP}] )
+		)
+	')
+"
+DEPEND="
+	${RDEPEND}
+	dev-libs/jsoncpp
+	dev-libs/utfcpp
+	pegtl? ( <dev-libs/pegtl-3 )
+"
+BDEPEND="
+	mpi? ( app-admin/chrpath )
+	openmp? (
+		|| (
+			sys-devel/gcc[openmp(+)]
+			sys-devel/clang-runtime[openmp(+)]
+		)
+	)
+"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-0001-fix-kepler-compute_arch-if-CUDA-toolkit-11-is-used.patch
+	"${FILESDIR}"/${PN}-8.2.0-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch
+)
+
+DOCS=( CONTRIBUTING.md README.md )
+
+CHECKREQS_DISK_BUILD="3G"
+
+pkg_pretend() {
+	if use examples; then
+		CHECKREQS_DISK_BUILD="4G"
+	fi
+	if use cuda; then
+		# NOTE: This should actually equal to (number of build jobs)*7G,
+		# as any of the cuda compile tasks can take up 7G!
+		# 10.2 GiB install directory, 6.4 GiB build directory with max. USE flags
+		CHECKREQS_MEMORY="7G"
+		CHECKREQS_DISK_BUILD="14G"
+	fi
+	check-reqs_pkg_setup
+}
+
+pkg_setup() {
+	if use examples; then
+		CHECKREQS_DISK_BUILD="4G"
+	fi
+	if use cuda; then
+		CHECKREQS_MEMORY="7G"
+		CHECKREQS_DISK_BUILD="14G"
+	fi
+	check-reqs_pkg_setup
+
+	use java && java-pkg-opt-2_pkg_setup
+	use python && python-single-r1_pkg_setup
+	use web && webapp_pkg_setup
+}
+
+src_prepare() {
+	# If we have system libraries available use these and delete
+	# the respecting files in ${S}/ThirdParty to save some space.
+	# Note: libharu is omitted: vtk needs an updated version (2.4.0)
+	# Note: no valid xdmf2 targets are found for system xdmf2
+	# Note: no valid target found for h5part and mpi4py
+	# TODO: diy2 exodusII h5part libharu verdict vpic vtkm xdmf2 xdmf3 zfp
+	local -a DROPS=( doubleconversion eigen expat freetype gl2ps glew
+		hdf5 jpeg jsoncpp libproj libxml2 lz4 lzma netcdf ogg png pugixml
+		sqlite theora tiff utf8 zlib )
+	use pegtl && DROPS+=( pegtl )
+
+	local x
+	for x in ${DROPS[@]}; do
+		ebegin "Dropping bundled ${x}"
+		rm -r ThirdParty/${x}/vtk${x} || die
+		eend $?
+	done
+	unset x
+
+	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
+
+	if use test; then
+		if use java; then
+			eapply "${FILESDIR}/${P}-0004-disable-failing-java-test.patch"
+		fi
+		if use examples; then
+			eapply "${FILESDIR}/${P}-0005-disable-failing-tests.patch"
+		fi
+	fi
+
+	cmake_src_prepare
+
+	if use cuda; then
+		cuda_add_sandbox -w
+		cuda_src_prepare
+	fi
+
+	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 ../../VTK-${PV}/.ExternalData/README.rst . || die
+		ln -sf ../../VTK-${PV}/.ExternalData/SHA512 . || die
+		popd >/dev/null || die
+		eend "$?"
+	fi
+}
+
+src_configure() {
+	local mycmakeargs=(
+# TODO: defaults for some variables to consider as USE flags
+#		-DVTK_ANDROID_BUILD=OFF
+#		-DVTK_BUILD_COMPILE_TOOLS_ONLY=OFF
+#		-DVTK_ENABLE_LOGGING=ON
+#		-DVTK_ENABLE_REMOTE_MODULES=ON
+#		-DVTK_INSTALL_SDK=ON
+#		-DVTK_IOS_BUILD=OFF
+#		-DVTK_LEGACY_REMOVE=OFF
+#		-DVTK_LEGACY_SILENT=OFF
+#		-DVTK_WHEEL_BUILD=OFF
+
+		-DVTK_BUILD_ALL_MODULES=$(usex all-modules ON OFF)
+		# we use the pre-built documentation and install these with USE=doc
+		-DVTK_BUILD_DOCUMENTATION=OFF
+		-DVTK_BUILD_EXAMPLES=$(usex examples ON OFF)
+
+		-DVTK_ENABLE_KITS=$(usex kits ON OFF)
+		# default to ON: USE flag for this?
+		-DVTK_ENABLE_REMOTE_MODULES=OFF
+
+		-DVTK_DATA_STORE="${S}/.ExternalData"
+
+		# Use upstream default, where USE flags are not given.
+		# Passing "DONT_WANT" will restrict building of modules from
+		# those groups and will severly limit the built libraries.
+		# Exceptions are MPI, where the default is "DONT_WANT" and
+		# StandAlone using "WANT".
+		-DVTK_GROUP_ENABLE_Imaging=$(usex imaging "WANT" "DEFAULT")
+		-DVTK_GROUP_ENABLE_Qt=$(usex qt5 "WANT" "DEFAULT")
+		-DVTK_GROUP_ENABLE_Rendering=$(usex rendering "WANT" "DEFAULT")
+		-DVTK_GROUP_ENABLE_StandAlone="WANT"
+		-DVTK_GROUP_ENABLE_Views=$(usex views "WANT" "DEFAULT")
+		-DVTK_GROUP_ENABLE_Web=$(usex web "WANT" "DEFAULT")
+
+		-DVTK_MODULE_ENABLE_VTK_vtkm="WANT"
+		-DVTK_MODULE_ENABLE_VTK_AcceleratorsVTKm="WANT"
+
+		-DVTK_PYTHON_VERSION="3"
+		-DVTK_RELOCATABLE_INSTALL=ON
+
+		-DVTK_USE_CUDA=$(usex cuda ON OFF)
+		# use system libraries where possible
+		-DVTK_USE_EXTERNAL=ON
+		-DVTK_USE_MPI=$(usex mpi ON OFF)
+		-DVTK_USE_TK=$(usex tk ON OFF)
+		-DVTK_USE_X=$(usex X ON OFF)
+
+		-DVTK_VERSIONED_INSTALL=ON
+
+		-DVTK_WRAP_JAVA=$(usex java ON OFF)
+		-DVTK_WRAP_PYTHON=$(usex python ON OFF)
+	)
+
+	if use examples || use test; then
+		mycmakeargs+=( -DVTK_USE_LARGE_DATA=ON )
+	fi
+
+	if ! use java && ! use python; then
+		# defaults to ON
+		mycmakeargs+=( -DVTK_ENABLE_WRAPPING=OFF )
+	fi
+
+	if use boost; then
+		mycmakeargs+=(
+			-DVTK_MODULE_ENABLE_VTK_InfovisBoost="WANT"
+			-DVTK_MODULE_ENABLE_VTK_InfovisBoostGraphAlgorithms="WANT"
+		)
+	fi
+
+	if use cuda; then
+		mycmakeargs+=( -DVTKm_CUDA_Architecture="native" )
+	fi
+
+	if use ffmpeg; then
+		mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_IOFFMPEG="WANT" )
+	fi
+
+	if use gdal; then
+		mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_GeovisGDAL="WANT" )
+	fi
+
+	if use java; then
+		mycmakeargs+=(
+			-DCMAKE_INSTALL_JARDIR="share/${PN}"
+			-DVTK_ENABLE_WRAPPING=ON
+		)
+	fi
+
+	if use json; then
+		mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_IOGeoJSON="WANT" )
+	fi
+
+	if use mpi; then
+		mycmakeargs+=(
+			-DVTK_GROUP_ENABLE_MPI="WANT"
+			-DVTK_MODULE_ENABLE_VTK_IOH5part="WANT"
+			-DVTK_MODULE_ENABLE_VTK_IOParallel="WANT"
+			-DVTK_MODULE_ENABLE_VTK_IOParallelNetCDF="WANT"
+			-DVTK_MODULE_ENABLE_VTK_IOParallelXML="WANT"
+			-DVTK_MODULE_ENABLE_VTK_ParallelMPI="WANT"
+			-DVTK_MODULE_ENABLE_VTK_RenderingParallel="WANT"
+			-DVTK_MODULE_ENABLE_VTK_h5part="WANT"
+			-DVTKm_ENABLE_MPI=ON
+		)
+		if use python; then
+			mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_ParallelMPI4Py="WANT" )
+		fi
+	fi
+
+	if use mysql; then
+		mycmakeargs+=(
+			-DVTK_MODULE_ENABLE_VTK_IOMySQL="WANT"
+			-DVTK_MODULE_ENABLE_VTK_IOSQL="WANT"
+		)
+	fi
+
+	if use odbc; then
+		mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_IOODBC="WANT" )
+	fi
+
+	if use offscreen; then
+		mycmakeargs+=(
+			-DVTK_OPENGL_HAS_OSMESA=ON
+			-DVTK_DEFAULT_RENDER_WINDOW_OFFSCREEN=ON
+			-DVTK_DEFAULT_RENDER_WINDOW_HEADLESS=ON
+		)
+	fi
+
+	if use openmp; then
+		if use tbb; then
+			einfo "NOTE: You have specified both openmp and tbb USE flags."
+			einfo "NOTE: Tbb will take precedence. Disabling OpenMP"
+			# Sequential is default SMP implementation, nothing special to do
+		else
+			mycmakeargs+=(
+				-DVTK_SMP_IMPLEMENTATION_TYPE="OpenMP"
+				-DVTKm_ENABLE_OPENMP=ON
+			)
+		fi
+	fi
+
+	if use pegtl; then
+		mycmakeargs+=( -DVTK_MODULE_USE_EXTERNAL_VTK_pegtl=ON )
+	else
+		mycmakeargs+=( -DVTK_MODULE_USE_EXTERNAL_VTK_pegtl=OFF )
+	fi
+
+	if use postgres; then
+		mycmakeargs+=(
+			-DVTK_MODULE_ENABLE_VTK_IOPostgreSQL="WANT"
+			-DVTK_MODULE_ENABLE_VTK_IOSQL="WANT"
+		)
+	fi
+
+	if use python; then
+		mycmakeargs+=(
+			-DVTK_ENABLE_WRAPPING=ON
+			-DPython3_EXECUTABLE="${PYTHON}"
+			-DVTK_PYTHON_SITE_PACKAGES_SUFFIX="lib/${EPYTHON}/site-packages"
+		)
+	fi
+
+	if use qt5; then
+		mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_GUISupportQt="WANT" )
+		if use mysql || use postgres; then
+			mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_GUISupportQtSQL="WANT" )
+		fi
+		if use rendering; then
+			mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_RenderingQt="WANT" )
+		fi
+		if use views; then
+			mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_ViewsQt="WANT" )
+		fi
+	fi
+
+	if use rendering || use web || use all-modules; then
+		# needs patched version
+		mycmakeargs+=( -DVTK_MODULE_USE_EXTERNAL_VTK_libharu=OFF )
+	fi
+
+	if use rendering; then
+		mycmakeargs+=(
+			-DVTK_MODULE_ENABLE_VTK_IOExportGL2PS="WANT"
+			-DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps=ON
+			-DVTK_MODULE_USE_EXTERNAL_VTK_glew=ON
+			-DVTK_MODULE_USE_EXTERNAL_VTK_libproj=ON
+		)
+	fi
+
+	if use tbb; then
+		mycmakeargs+=(
+			-DVTK_SMP_IMPLEMENTATION_TYPE="TBB"
+			-DVTKm_ENABLE_TBB=ON
+		)
+	fi
+
+	if use test; then
+		ewarn "Testing requires VTK_FORBID_DOWNLOADS=OFF by upstream."
+		ewarn "Care has been taken to pre-download all required files."
+		ewarn "In case you find missing files, please inform me."
+		mycmakeargs+=(
+			-DVTK_BUILD_TESTING=ON
+			-DVTK_DATA_EXCLUDE_FROM_ALL=ON
+			-DVTK_FORBID_DOWNLOADS=OFF
+		)
+	else
+		mycmakeargs+=(
+			-DVTK_BUILD_TESTING=OFF
+			-DVTK_FORBID_DOWNLOADS=ON
+		)
+	fi
+
+	if use theora; then
+		mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_IOOggTheora="WANT" )
+	fi
+
+	if use all-modules; then
+		mycmakeargs+=(
+			-DVTK_ENABLE_OSPRAY=OFF
+			-DVTK_MODULE_ENABLE_VTK_DomainsMicroscopy="DONT_WANT"
+			-DVTK_MODULE_ENABLE_VTK_FiltersOpenTURNS="DONT_WANT"
+			-DVTK_MODULE_ENABLE_VTK_IOADIOS2="DONT_WANT"
+			-DVTK_MODULE_ENABLE_VTK_IOPDAL="DONT_WANT"
+			-DVTK_MODULE_ENABLE_VTK_MomentInvariants="DONT_WANT"
+			-DVTK_MODULE_ENABLE_VTK_PoissonReconstruction="DONT_WANT"
+			-DVTK_MODULE_ENABLE_VTK_Powercrust="DONT_WANT"
+			-DVTK_MODULE_ENABLE_VTK_RenderingOpenVR="DONT_WANT"
+			-DVTK_MODULE_ENABLE_VTK_SignedTensor="DONT_WANT"
+			-DVTK_MODULE_ENABLE_VTK_SplineDrivenImageSlicer="DONT_WANT"
+			-DVTK_MODULE_ENABLE_VTK_vtkDICOM="DONT_WANT"
+			-DVTK_MODULE_USE_EXTERNAL_vtkkissfft=ON
+		)
+	fi
+
+	use java && export JAVA_HOME="${EPREFIX}/etc/java-config-2/current-system-vm"
+
+	if use mpi; then
+		export CC=mpicc
+		export CXX=mpicxx
+		export FC=mpif90
+		export F90=mpif90
+		export F77=mpif77
+	fi
+
+	cmake_src_configure
+}
+
+src_test() {
+	nonfatal virtx cmake_src_test
+}
+
+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
+
+	# with MPI runpath's are not deleted properly
+	if use mpi; then
+		chrpath -d "${ED}"/usr/$(get_libdir)/*.so.${PV} || die
+	fi
+
+	use python && python_optimize
+
+	# environment
+	cat >> "${T}"/40${PN} <<- EOF || die
+		VTK_DATA_ROOT=${EPREFIX}/usr/share/${PN}/data
+		VTK_DIR=${EPREFIX}/usr/$(get_libdir)/${PN}
+		VTKHOME=${EPREFIX}/usr
+		EOF
+	doenvd "${T}"/40${PN}
+
+	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
+}


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/vtk/, sci-libs/vtk/files/
@ 2021-05-31 11:40 Sam James
  0 siblings, 0 replies; 19+ messages in thread
From: Sam James @ 2021-05-31 11:40 UTC (permalink / raw
  To: gentoo-commits

commit:     0980511b01c8aeba0da6936228433088c33c7298
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon May 31 11:37:07 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May 31 11:38:01 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0980511b

sci-libs/vtk: add various GCC 11 fixes

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../vtk/files/vtk-9.0.1-limits-include-gcc11.patch | 84 ++++++++++++++++++++++
 sci-libs/vtk/vtk-9.0.1.ebuild                      |  1 +
 2 files changed, 85 insertions(+)

diff --git a/sci-libs/vtk/files/vtk-9.0.1-limits-include-gcc11.patch b/sci-libs/vtk/files/vtk-9.0.1-limits-include-gcc11.patch
new file mode 100644
index 00000000000..5473378512f
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.0.1-limits-include-gcc11.patch
@@ -0,0 +1,84 @@
+From c7d6a8d81367a4ed92163c059aa3181386eabc24 Mon Sep 17 00:00:00 2001
+From: Ben Boeckel <ben.boeckel@kitware.com>
+Date: Mon, 3 May 2021 11:55:27 -0400
+Subject: [PATCH] vtkDataArrayPrivate: include <limits> for std::numeric_limits
+
+See: #18194
+---
+ Common/Core/vtkDataArrayPrivate.txx | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Common/Core/vtkDataArrayPrivate.txx b/Common/Core/vtkDataArrayPrivate.txx
+index eb366f1c6d0..6709f7f3ac1 100644
+--- a/Common/Core/vtkDataArrayPrivate.txx
++++ b/Common/Core/vtkDataArrayPrivate.txx
+@@ -24,6 +24,7 @@
+ #include <algorithm>
+ #include <array>
+ #include <cassert> // for assert()
++#include <limits>
+ #include <vector>
+ 
+ namespace vtkDataArrayPrivate
+-- 
+GitLab
+diff --git a/Common/Core/vtkGenericDataArrayLookupHelper.h b/Common/Core/vtkGenericDataArrayLookupHelper.h
+index f278e27..de6d842 100644
+--- a/Common/Core/vtkGenericDataArrayLookupHelper.h
++++ b/Common/Core/vtkGenericDataArrayLookupHelper.h
+@@ -25,6 +25,7 @@
+ #include "vtkIdList.h"
+ #include <algorithm>
+ #include <cmath>
++#include <limits>
+ #include <unordered_map>
+ #include <vector>
+ 
+diff --git a/Common/DataModel/vtkPiecewiseFunction.cxx b/Common/DataModel/vtkPiecewiseFunction.cxx
+index c75935fd..9459ce90 100644
+--- a/Common/DataModel/vtkPiecewiseFunction.cxx
++++ b/Common/DataModel/vtkPiecewiseFunction.cxx
+@@ -22,6 +22,7 @@
+ #include <cassert>
+ #include <cmath>
+ #include <iterator>
++#include <limits>
+ #include <set>
+ #include <vector>
+ 
+diff --git a/Rendering/Core/vtkColorTransferFunction.cxx b/Rendering/Core/vtkColorTransferFunction.cxx
+index 40504e5..125597b 100644
+--- a/Rendering/Core/vtkColorTransferFunction.cxx
++++ b/Rendering/Core/vtkColorTransferFunction.cxx
+@@ -21,6 +21,7 @@
+ #include <algorithm>
+ #include <cmath>
+ #include <iterator>
++#include <limits>
+ #include <set>
+ #include <vector>
+ 
+diff --git a/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx b/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx
+index 9944db6..01a1517 100644
+--- a/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx
++++ b/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx
+@@ -28,6 +28,7 @@
+ #include "vtkHyperTreeGridNonOrientedCursor.h"
+ 
+ #include <cmath>
++#include <limits>
+ 
+ vtkStandardNewMacro(vtkHyperTreeGridThreshold);
+ 
+diff --git a/Common/DataModel/Testing/Cxx/UnitTestLine.cxx b/Common/DataModel/Testing/Cxx/UnitTestLine.cxx
+index 7823d61..02f627d 100644
+--- a/Common/DataModel/Testing/Cxx/UnitTestLine.cxx
++++ b/Common/DataModel/Testing/Cxx/UnitTestLine.cxx
+@@ -14,6 +14,7 @@
+ =========================================================================*/
+ 
+ #include <cmath>
++#include <limits>
+ 
+ #include "vtkLine.h"
+ #include "vtkMath.h"

diff --git a/sci-libs/vtk/vtk-9.0.1.ebuild b/sci-libs/vtk/vtk-9.0.1.ebuild
index bf7a3ba0a1b..848e2fce63d 100644
--- a/sci-libs/vtk/vtk-9.0.1.ebuild
+++ b/sci-libs/vtk/vtk-9.0.1.ebuild
@@ -132,6 +132,7 @@ BDEPEND="
 PATCHES=(
 	"${FILESDIR}"/${P}-0001-fix-kepler-compute_arch-if-CUDA-toolkit-11-is-used.patch
 	"${FILESDIR}"/${PN}-8.2.0-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch
+	"${FILESDIR}"/${PN}-9.0.1-limits-include-gcc11.patch
 )
 
 DOCS=( CONTRIBUTING.md README.md )


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/vtk/, sci-libs/vtk/files/
@ 2021-12-03 22:38 Vadim Misbakh-Soloviov
  0 siblings, 0 replies; 19+ messages in thread
From: Vadim Misbakh-Soloviov @ 2021-12-03 22:38 UTC (permalink / raw
  To: gentoo-commits

commit:     4893345530421b0d6168b5278d57d69fc08f7fdf
Author:     Vadim Misbakh-Soloviov <mva <AT> gentoo <DOT> org>
AuthorDate: Fri Dec  3 22:34:45 2021 +0000
Commit:     Vadim Misbakh-Soloviov <mva <AT> gentoo <DOT> org>
CommitDate: Fri Dec  3 22:37:31 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48933455

sci-libs/vtk: fix build with new deps versions

  Mostly backported upstream patches (from 9.1.0 and post-9.1).
  Also, some patches (like CUDA-11.5) was provided by
  Vyacheclav Perestoronin <perestoronin <AT> gmail.com>
  and slightly adapted by me.

  Actually, there is already PR for 9.1.0, which have most of this
  compatibility issues fixed, but I bump 9.0.3 to work with them in case
  if there is some revdeps still not compatible with 9.1 API/ABI.

Bug: https://bugs.gentoo.org/827310
Package-Manager: Portage-3.0.28, Repoman-3.0.1
Signed-off-by: Vadim Misbakh-Soloviov <mva <AT> gentoo.org>

 sci-libs/vtk/files/vtk-9.0.3-TBB-2021.04-fix.patch | 229 ++++++
 sci-libs/vtk/files/vtk-9.0.3-cuda-11.5.0.patch     |  25 +
 ...addr-in-wrappers-upstream-commit-55c74ed3.patch |  88 +++
 sci-libs/vtk/files/vtk-9.0.3-pegtl-3.patch         |  75 ++
 ...0.3-proj-api-fix-upstream-commit-03256388.patch | 163 ++++
 .../files/vtk-9.0.3-tbb-fix-for-bundled-vtkm.patch | 504 ++++++++++++
 .../vtk/files/vtk-9.0.3-use-std-atomic-part1.patch | 811 ++++++++++++++++++++
 .../vtk/files/vtk-9.0.3-use-std-atomic-part2.patch | 851 +++++++++++++++++++++
 sci-libs/vtk/vtk-9.0.3-r4.ebuild                   | 557 ++++++++++++++
 9 files changed, 3303 insertions(+)

diff --git a/sci-libs/vtk/files/vtk-9.0.3-TBB-2021.04-fix.patch b/sci-libs/vtk/files/vtk-9.0.3-TBB-2021.04-fix.patch
new file mode 100644
index 000000000000..2927368a7fdc
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.0.3-TBB-2021.04-fix.patch
@@ -0,0 +1,229 @@
+Patch is based on following upstream commits:
+
+56cf03534c58a21f3cea608e4f53b7e7e00670fc by Mickael PHILIT <mickey.phy@gmail.com>
+ded89c1e3a025874bfd69feb6c67fa21d6af36d4 by Mickael PHILIT <mickey.phy@gmail.com>
+3e5313e71c35aaeabfd4e65e090031716460d35e by Timothée Couble <timothee.couble@kitware.com>
+
+Backported by Vyacheslav Perestoronin <perestoronin@gmail.com>
+
+Adapted by Vadim Misbakh-Soloviov <mva@gentoo.org>
+
+--- a/CMake/FindTBB.cmake
++++ b/CMake/FindTBB.cmake
+@@ -424,12 +424,18 @@ findpkg_finish(TBB_MALLOC_PROXY tbbmalloc_proxy)
+ #=============================================================================
+ #parse all the version numbers from tbb
+ if(NOT TBB_VERSION)
+-
+- #only read the start of the file
+- file(STRINGS
++  if (EXISTS "${TBB_INCLUDE_DIR}/oneapi/tbb/version.h")
++    file(STRINGS
++      "${TBB_INCLUDE_DIR}/oneapi/tbb/version.h"
++      TBB_VERSION_CONTENTS
++      REGEX "VERSION")
++  else()
++    #only read the start of the file
++    file(STRINGS
+       "${TBB_INCLUDE_DIR}/tbb/tbb_stddef.h"
+       TBB_VERSION_CONTENTS
+       REGEX "VERSION")
++  endif()
+ 
+   string(REGEX REPLACE
+     ".*#define TBB_VERSION_MAJOR ([0-9]+).*" "\\1"
+--- a/Common/Core/SMP/TBB/vtkSMPTools.cxx
++++ b/Common/Core/SMP/TBB/vtkSMPTools.cxx
+@@ -22,47 +22,50 @@
+ #define __TBB_NO_IMPLICIT_LINKAGE 1
+ #endif
+ 
+-#include <tbb/task_scheduler_init.h>
++#include <tbb/task_arena.h>
+ 
+ #ifdef _MSC_VER
+ #pragma pop_macro("__TBB_NO_IMPLICIT_LINKAGE")
+ #endif
+ 
+-struct vtkSMPToolsInit
+-{
+-  tbb::task_scheduler_init Init;
+-
+-  vtkSMPToolsInit(int numThreads)
+-    : Init(numThreads)
+-  {
+-  }
+-};
+-
+-static bool vtkSMPToolsInitialized = 0;
+-static int vtkTBBNumSpecifiedThreads = 0;
++static tbb::task_arena taskArena;
+ static vtkSimpleCriticalSection vtkSMPToolsCS;
+ 
+ //--------------------------------------------------------------------------------
+ void vtkSMPTools::Initialize(int numThreads)
+ {
+   vtkSMPToolsCS.Lock();
+-  if (!vtkSMPToolsInitialized)
++
++  // If numThreads <= 0, don't create a task_arena
++  // and let TBB do the default thing.
++  if (numThreads > 0 && numThreads != taskArena.max_concurrency())
+   {
+-    // If numThreads <= 0, don't create a task_scheduler_init
+-    // and let TBB do the default thing.
+-    if (numThreads > 0)
++    if (taskArena.is_active())
+     {
+-      static vtkSMPToolsInit aInit(numThreads);
+-      vtkTBBNumSpecifiedThreads = numThreads;
++      taskArena.terminate();
+     }
+-    vtkSMPToolsInitialized = true;
++    taskArena.initialize(numThreads);
+   }
++
+   vtkSMPToolsCS.Unlock();
+ }
+ 
+ //--------------------------------------------------------------------------------
+ int vtkSMPTools::GetEstimatedNumberOfThreads()
+ {
+-  return vtkTBBNumSpecifiedThreads ? vtkTBBNumSpecifiedThreads
+-                                   : tbb::task_scheduler_init::default_num_threads();
++  return taskArena.max_concurrency();
++}
++
++//------------------------------------------------------------------------------
++void vtk::detail::smp::vtkSMPTools_Impl_For_TBB(vtkIdType first, vtkIdType last, vtkIdType grain,
++  ExecuteFunctorPtrType functorExecuter, void* functor)
++{
++  if (taskArena.is_active())
++  {
++    taskArena.execute([&] { functorExecuter(functor, first, last, grain); });
++  }
++  else
++  {
++    functorExecuter(functor, first, last, grain);
++  }
+ }
+--- a/Common/Core/SMP/TBB/vtkSMPToolsInternal.h.in
++++ b/Common/Core/SMP/TBB/vtkSMPToolsInternal.h.in
+@@ -12,7 +12,8 @@
+      PURPOSE.  See the above copyright notice for more information.
+ 
+ =========================================================================*/
+-#include "vtkNew.h"
++
++#include "vtkCommonCoreModule.h" // For export macro
+ 
+ #ifdef _MSC_VER
+ #  pragma push_macro("__TBB_NO_IMPLICIT_LINKAGE")
+@@ -34,6 +35,10 @@
+ namespace smp
+ {
+ 
++typedef void (*ExecuteFunctorPtrType)(void*, vtkIdType, vtkIdType, vtkIdType);
++void VTKCOMMONCORE_EXPORT vtkSMPTools_Impl_For_TBB(vtkIdType first, vtkIdType last, vtkIdType grain,
++  ExecuteFunctorPtrType functorExecuter, void* functor);
++
+ //--------------------------------------------------------------------------------
+ template <typename T>
+ class FuncCall
+@@ -43,22 +48,22 @@
+   void operator=(const FuncCall&) = delete;
+ 
+ public:
+-  void operator() (const tbb::blocked_range<vtkIdType>& r) const
+-  {
+-      o.Execute(r.begin(), r.end());
++  void operator()(const tbb::blocked_range<vtkIdType>& r) const {
++    o.Execute(r.begin(), r.end());
+   }
+ 
+-  FuncCall (T& _o) : o(_o)
++  FuncCall(T& _o)
++    : o(_o)
+   {
+   }
+ };
+ 
+ //--------------------------------------------------------------------------------
+ template <typename FunctorInternal>
+-void vtkSMPTools_Impl_For(
+-  vtkIdType first, vtkIdType last, vtkIdType grain,
+-  FunctorInternal& fi)
++void ExecuteFunctor(void* functor, vtkIdType first, vtkIdType last, vtkIdType grain)
+ {
++  FunctorInternal& fi = *reinterpret_cast<FunctorInternal*>(functor);
++
+   vtkIdType n = last - first;
+   if (!n)
+   {
+@@ -66,32 +71,37 @@
+   }
+   if (grain > 0)
+   {
+-    tbb::parallel_for(tbb::blocked_range<vtkIdType>(first, last, grain), FuncCall<FunctorInternal>(fi));
++    tbb::parallel_for(
++      tbb::blocked_range<vtkIdType>(first, last, grain), FuncCall<FunctorInternal>(fi));
+   }
+   else
+   {
+-    tbb::parallel_for(tbb::blocked_range<vtkIdType>(first, last), FuncCall<FunctorInternal>(fi));
++    tbb::parallel_for(
++      tbb::blocked_range<vtkIdType>(first, last), FuncCall<FunctorInternal>(fi));
+   }
+ }
+ 
+ //--------------------------------------------------------------------------------
+-template<typename RandomAccessIterator>
+-void vtkSMPTools_Impl_Sort(RandomAccessIterator begin,
+-                                  RandomAccessIterator end)
++template <typename FunctorInternal>
++void vtkSMPTools_Impl_For(vtkIdType first, vtkIdType last, vtkIdType grain, FunctorInternal& fi)
++{
++  vtkSMPTools_Impl_For_TBB(first, last, grain, ExecuteFunctor<FunctorInternal>, &fi);
++}
++
++//--------------------------------------------------------------------------------
++template <typename RandomAccessIterator>
++void vtkSMPTools_Impl_Sort(RandomAccessIterator begin, RandomAccessIterator end)
+ {
+   tbb::parallel_sort(begin, end);
+ }
+ 
+ //--------------------------------------------------------------------------------
+-template<typename RandomAccessIterator, typename Compare>
+-void vtkSMPTools_Impl_Sort(RandomAccessIterator begin,
+-                                  RandomAccessIterator end,
+-                                  Compare comp)
++template <typename RandomAccessIterator, typename Compare>
++void vtkSMPTools_Impl_Sort(RandomAccessIterator begin, RandomAccessIterator end, Compare comp)
+ {
+   tbb::parallel_sort(begin, end, comp);
+ }
+ 
+-
+-}//namespace smp
+-}//namespace detail
+-}//namespace vtk
++} // namespace smp
++} // namespace detail
++} // namespace vtk
+--- a/Common/Core/vtkSMPTools.h
++++ b/Common/Core/vtkSMPTools.h
+@@ -228,11 +228,8 @@ public:
+    * Initialize the underlying libraries for execution. This is
+    * not required as it is automatically called before the first
+    * execution of any parallel code. However, it can be used to
+-   * control the maximum number of threads used when the back-end
+-   * supports it (currently Simple and TBB only). Make sure to call
+-   * it before any other parallel operation.
+-   * When using Kaapi, use the KAAPI_CPUCOUNT env. variable to control
+-   * the number of threads used in the thread pool.
++   * control the maximum number of threads used. Make sure to call
++   * it before the parallel operation.
+    */
+   static void Initialize(int numThreads = 0);
+ 

diff --git a/sci-libs/vtk/files/vtk-9.0.3-cuda-11.5.0.patch b/sci-libs/vtk/files/vtk-9.0.3-cuda-11.5.0.patch
new file mode 100644
index 000000000000..dc0094516f21
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.0.3-cuda-11.5.0.patch
@@ -0,0 +1,25 @@
+This patch was sent by Vyacheslav Perestoronin <perestoronin@gmail.com>
+
+Declared purpose is to make VTK to build with CUDA-11.5 release.
+
+--- a/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/internal/brigand.hpp
++++ b/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/internal/brigand.hpp
+@@ -1057,18 +1057,6 @@
+         {
+             using type = S<L, Ls...>;
+         };
+-        template <typename L1, typename L2, typename... Ls>
+-        struct find<true, false, L1, L2, Ls...> : find<true, F<Ts..., L2>::value, L2, Ls...>
+-        {
+-        };
+-        template <typename L0, typename L1, typename L2, typename L3, typename L4, typename L5,
+-                  typename L6, typename L7, typename L8,
+-                  typename... Ls>
+-        struct find<false, false, L0, L1, L2, L3, L4, L5, L6, L7, L8, Ls...>
+-            : find<true, F<Ts..., L8>::value, L8, Ls...>
+-        {
+-        };
+-
+ #ifndef BRIGAND_COMP_CUDA
+         template <typename L1, typename L2, typename L3, typename L4, typename L5, typename L6,
+                   typename L7, typename L8, typename L9, typename L10, typename L11, typename L12,

diff --git a/sci-libs/vtk/files/vtk-9.0.3-fix-gcc10-return-local-addr-in-wrappers-upstream-commit-55c74ed3.patch b/sci-libs/vtk/files/vtk-9.0.3-fix-gcc10-return-local-addr-in-wrappers-upstream-commit-55c74ed3.patch
new file mode 100644
index 000000000000..6ac2f7c2a6bc
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.0.3-fix-gcc10-return-local-addr-in-wrappers-upstream-commit-55c74ed3.patch
@@ -0,0 +1,88 @@
+From 55c74ed3854736cc6cb43fd242f1db5249aea5e4 Mon Sep 17 00:00:00 2001
+From: David Gobbi <david.gobbi@gmail.com>
+Date: Fri, 29 May 2020 10:24:16 -0600
+Subject: [PATCH] Fix gcc10 return-local-addr warning in wrappers
+
+There was a warning from gcc10 because it thought a stack-allocated
+array variable was being returned.
+---
+ Wrapping/Tools/vtkParseExtras.c     | 10 +++++-----
+ Wrapping/Tools/vtkParsePreprocess.c | 27 ++++++++++++++++-----------
+ 2 files changed, 21 insertions(+), 16 deletions(-)
+
+diff --git a/Wrapping/Tools/vtkParseExtras.c b/Wrapping/Tools/vtkParseExtras.c
+index 88a73c15d8d..853ed135f6f 100644
+--- a/Wrapping/Tools/vtkParseExtras.c
++++ b/Wrapping/Tools/vtkParseExtras.c
+@@ -251,13 +251,13 @@ static const char* vtkparse_string_replace(
+     if (any_replaced)
+     {
+       /* return a string that was allocated with malloc */
+-      if (result == result_store)
++      tmp = (char*)malloc(strlen(result) + 1);
++      strcpy(tmp, result);
++      cp = tmp;
++      if (result != result_store)
+       {
+-        tmp = (char*)malloc(strlen(result) + 1);
+-        strcpy(tmp, result);
+-        result = tmp;
++        free(result);
+       }
+-      cp = result;
+     }
+   }
+ 
+diff --git a/Wrapping/Tools/vtkParsePreprocess.c b/Wrapping/Tools/vtkParsePreprocess.c
+index 4f30cfa2cb5..bd2e7cbb116 100644
+--- a/Wrapping/Tools/vtkParsePreprocess.c
++++ b/Wrapping/Tools/vtkParsePreprocess.c
+@@ -4405,14 +4405,16 @@ const char* vtkParsePreprocess_ExpandMacro(
+     }
+     return macro->Definition;
+   }
+-
+-  if (rp == stack_rp)
++  else
+   {
+-    rp = (char*)malloc(strlen(stack_rp) + 1);
+-    strcpy(rp, stack_rp);
++    char* tmp = (char*)malloc(strlen(rp) + 1);
++    strcpy(tmp, rp);
++    if (rp != stack_rp)
++    {
++      free(rp);
++    }
++    return tmp;
+   }
+-
+-  return rp;
+ }
+ 
+ /**
+@@ -4631,14 +4633,17 @@ const char* vtkParsePreprocess_ProcessString(PreprocessInfo* info, const char* t
+       }
+       return tp;
+     }
+-    if (rp == stack_rp)
++    else
+     {
+-      rp = (char*)malloc(strlen(stack_rp) + 1);
+-      strcpy(rp, stack_rp);
++      char* tmp = (char*)malloc(strlen(rp) + 1);
++      strcpy(tmp, rp);
++      if (rp != stack_rp)
++      {
++        free(rp);
++      }
++      return tmp;
+     }
+   }
+-
+-  return rp;
+ }
+ 
+ /**
+-- 
+GitLab
+

diff --git a/sci-libs/vtk/files/vtk-9.0.3-pegtl-3.patch b/sci-libs/vtk/files/vtk-9.0.3-pegtl-3.patch
new file mode 100644
index 000000000000..a7c41231f4b1
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.0.3-pegtl-3.patch
@@ -0,0 +1,75 @@
+Based on patch from Zoltán Fridrich <zfridric@redhat.com>
+Reworked by Vyacheslav Perestoronin <perestoronin@gmail.com>
+Little fixes by Vadim Misbakh-Soloviov <mva@gentoo.org>
+
+--- a/IO/MotionFX/vtkMotionFXCFGGrammar.h
++++ b/IO/MotionFX/vtkMotionFXCFGGrammar.h
+@@ -23,7 +23,12 @@
+ 
+ // for debugging
+ // clang-format off
++#if TAO_PEGTL_VERSION_MAJOR >= 3
++#include VTK_PEGTL(pegtl/contrib/trace.hpp)
++#else
+ #include VTK_PEGTL(pegtl/contrib/tracer.hpp)
++#endif
++
+ // clang-format on
+ 
+ namespace MotionFX
+--- a/IO/MotionFX/vtkMotionFXCFGReader.cxx
++++ b/IO/MotionFX/vtkMotionFXCFGReader.cxx
+@@ -1014,14 +1014,24 @@
+     if (this->isOrientation)
+     {
+       std::vector<double> numbers;
++#if TAO_PEGTL_VERSION_MAJOR >= 3
++      tao::pegtl::complete_trace<MotionFX::OrientationsPositionFile::Grammar,
++        Actions::PositionFile::action>(in, numbers, this->positions);
++#else
+       tao::pegtl::parse<MotionFX::OrientationsPositionFile::Grammar,
+         Actions::PositionFile::action /*, tao::pegtl::tracer*/>(in, numbers, this->positions);
++#endif
+     }
+     else
+     {
+       std::vector<double> numbers;
++#if TAO_PEGTL_VERSION_MAJOR >= 3
++      tao::pegtl::complete_trace<MotionFX::LegacyPositionFile::Grammar,
++        Actions::PositionFile::action>(in, numbers, this->positions);
++#else
+       tao::pegtl::parse<MotionFX::LegacyPositionFile::Grammar,
+         Actions::PositionFile::action /*, tao::pegtl::tracer*/>(in, numbers, this->positions);
++#endif
+     }
+     return true;
+   }
+-  catch (const tao::pegtl::input_error& e)
++  catch (const std::filesystem::filesystem_error& e)
+   {
+     vtkGenericWarningMacro("PositionFileMotion::read_position_file failed: " << e.what());
+   }
+@@ -1050,7 +1060,11 @@
+   {
+     tao::pegtl::read_input<> in(filename);
+     Actions::CFG::ActiveState state(this->Motions);
++#if TAO_PEGTL_VERSION_MAJOR >= 3
++    tao::pegtl::complete_trace<MotionFX::CFG::Grammar, Actions::CFG::action>(in, state);
++#else
+     tao::pegtl::parse<MotionFX::CFG::Grammar, Actions::CFG::action>(in, state);
++#endif
+     if (this->Motions.size() == 0)
+     {
+       vtkGenericWarningMacro(
+@@ -1061,7 +1075,11 @@
+       if (getenv("MOTIONFX_DEBUG_GRAMMAR") != nullptr)
+       {
+         tao::pegtl::read_input<> in2(filename);
++#if TAO_PEGTL_VERSION_MAJOR >= 3
++        tao::pegtl::complete_trace<MotionFX::CFG::Grammar, tao::pegtl::nothing>(in2);
++#else
+         tao::pegtl::parse<MotionFX::CFG::Grammar, tao::pegtl::nothing, tao::pegtl::tracer>(in2);
++#endif
+       }
+       return false;
+     }

diff --git a/sci-libs/vtk/files/vtk-9.0.3-proj-api-fix-upstream-commit-03256388.patch b/sci-libs/vtk/files/vtk-9.0.3-proj-api-fix-upstream-commit-03256388.patch
new file mode 100644
index 000000000000..1431ae04a5af
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.0.3-proj-api-fix-upstream-commit-03256388.patch
@@ -0,0 +1,163 @@
+Almost original commit patch.
+Slightly modified (to make it apply on top of 9.0.3 release tarball) by
+Vadim Misbakh-Soloviov <mva@gentoo.org>
+
+Modified part is last 3 lines in the second hunk of first file:
+```
+}
+else
+{
+```
+
+Original commit patch had a bit different code there, while 9.0.3 has this.
+
+---
+From 0325638832e35c8c8c6fc96e2c1d887aeea3dd43 Mon Sep 17 00:00:00 2001
+From: Julien Schueller <schueller@phimeca.com>
+Date: Mon, 8 Mar 2021 10:57:46 +0100
+Subject: [PATCH] Geovis: Use proj>=5 api
+
+Closes #18130
+---
+ Geovis/Core/vtkGeoProjection.cxx    | 17 ++++++++++++++++-
+ Geovis/Core/vtkGeoTransform.cxx     | 28 ++++++++++++++--------------
+ ThirdParty/libproj/vtk_libproj.h.in |  7 +------
+ 3 files changed, 31 insertions(+), 21 deletions(-)
+
+diff --git a/Geovis/Core/vtkGeoProjection.cxx b/Geovis/Core/vtkGeoProjection.cxx
+index 7ff6526a5d3..0a0d06eba19 100644
+--- a/Geovis/Core/vtkGeoProjection.cxx
++++ b/Geovis/Core/vtkGeoProjection.cxx
+@@ -121,7 +121,11 @@ vtkGeoProjection::~vtkGeoProjection()
+   this->SetPROJ4String(nullptr);
+   if (this->Projection)
+   {
++#if PROJ_VERSION_MAJOR >= 5
++    proj_destroy(this->Projection);
++#else
+     pj_free(this->Projection);
++#endif
+   }
+   delete this->Internals;
+   this->Internals = nullptr;
+@@ -185,13 +189,21 @@ int vtkGeoProjection::UpdateProjection()
+ 
+   if (this->Projection)
+   {
++#if PROJ_VERSION_MAJOR >= 5
++    proj_destroy(this->Projection);
++#else
+     pj_free(this->Projection);
++#endif
+     this->Projection = nullptr;
+   }
+ 
+   if (this->PROJ4String && strlen(this->PROJ4String))
+   {
++#if PROJ_VERSION_MAJOR >= 5
++    this->Projection = proj_create(PJ_DEFAULT_CTX, this->PROJ4String);
++#else
+     this->Projection = pj_init_plus(this->PROJ4String);
++#endif
+   }
+   else
+   {
+@@ -234,8 +246,11 @@ int vtkGeoProjection::UpdateProjection()
+       stringHolder[i] = param.str();
+       pjArgs[3 + i] = stringHolder[i].c_str();
+     }
+-
++#if PROJ_VERSION_MAJOR >= 5
++    this->Projection = proj_create_argv(PJ_DEFAULT_CTX, argSize, const_cast<char**>(pjArgs));
++#else
+     this->Projection = pj_init(argSize, const_cast<char**>(pjArgs));
++#endif
+     delete[] pjArgs;
+   }
+   this->ProjectionMTime = this->GetMTime();
+diff --git a/Geovis/Core/vtkGeoTransform.cxx b/Geovis/Core/vtkGeoTransform.cxx
+index 5c2c74279de..1c99b6b11be 100644
+--- a/Geovis/Core/vtkGeoTransform.cxx
++++ b/Geovis/Core/vtkGeoTransform.cxx
+@@ -163,8 +163,12 @@ void vtkGeoTransform::InternalTransformPoints(double* x, vtkIdType numPts, int s
+   projPJ src = this->SourceProjection ? this->SourceProjection->GetProjection() : nullptr;
+   projPJ dst = this->DestinationProjection ? this->DestinationProjection->GetProjection() : nullptr;
+   int delta = stride - 2;
++#if PROJ_VERSION_MAJOR >= 5
++  PJ_COORD c, c_out;
++#else
+   projLP lp;
+   projXY xy;
++#endif
+   if (src)
+   {
+     // Convert from src system to lat/long using inverse of src transform
+@@ -172,17 +176,15 @@ void vtkGeoTransform::InternalTransformPoints(double* x, vtkIdType numPts, int s
+     for (vtkIdType i = 0; i < numPts; ++i)
+     {
+ #if PROJ_VERSION_MAJOR >= 5
+-      xy.x = coord[0];
+-      xy.y = coord[1];
++      c.xy.x = coord[0];
++      c.xy.y = coord[1];
++      c_out = proj_trans(src, PJ_INV, c);
++      coord[0] = c_out.lp.lam;
++      coord[1] = c_out.lp.phi;
+ #else
+       xy.u = coord[0];
+       xy.v = coord[1];
+-#endif
+       lp = pj_inv(xy, src);
+-#if PROJ_VERSION_MAJOR >= 5
+-      coord[0] = lp.lam;
+-      coord[1] = lp.phi;
+-#else
+       coord[0] = lp.u;
+       coord[1] = lp.v;
+ #endif
+@@ -208,17 +210,15 @@ void vtkGeoTransform::InternalTransformPoints(double* x, vtkIdType numPts, int s
+     for (vtkIdType i = 0; i < numPts; ++i)
+     {
+ #if PROJ_VERSION_MAJOR >= 5
+-      lp.lam = coord[0];
+-      lp.phi = coord[1];
++      c.lp.lam = coord[0];
++      c.lp.phi = coord[1];
++      c_out = proj_trans(src, PJ_FWD, c);
++      coord[0] = c_out.xy.x;
++      coord[1] = c_out.xy.y;
+ #else
+       lp.u = coord[0];
+       lp.v = coord[1];
+-#endif
+       xy = pj_fwd(lp, dst);
+-#if PROJ_VERSION_MAJOR >= 5
+-      coord[0] = xy.x;
+-      coord[1] = xy.y;
+-#else
+       coord[0] = xy.u;
+       coord[1] = xy.v;
+ #endif
+diff --git a/ThirdParty/libproj/vtk_libproj.h.in b/ThirdParty/libproj/vtk_libproj.h.in
+index 4d8ffc3c5d5..c4182c4db2b 100644
+--- a/ThirdParty/libproj/vtk_libproj.h.in
++++ b/ThirdParty/libproj/vtk_libproj.h.in
+@@ -28,14 +28,9 @@
+ #if VTK_MODULE_USE_EXTERNAL_vtklibproj
+ # if VTK_LibPROJ_MAJOR_VERSION >= 5
+ #  include <proj.h>
+-# endif
+-# if VTK_LibPROJ_MAJOR_VERSION < 6
++# else
+ #  include <projects.h>
+ # endif
+-# if VTK_LibPROJ_MAJOR_VERSION >= 6
+-#  define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H 1
+-# endif
+-# include <proj_api.h>
+ # include <geodesic.h>
+ #else
+ # include <vtklibproj/src/projects.h>
+-- 
+GitLab
+

diff --git a/sci-libs/vtk/files/vtk-9.0.3-tbb-fix-for-bundled-vtkm.patch b/sci-libs/vtk/files/vtk-9.0.3-tbb-fix-for-bundled-vtkm.patch
new file mode 100644
index 000000000000..f2e1e39d6315
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.0.3-tbb-fix-for-bundled-vtkm.patch
@@ -0,0 +1,504 @@
+Patch was backported by Vadim Misbakh-Soloviov <mva@gentoo.org> from vtk-m repo.
+
+Paths was changed to be relative to ${S}.
+
+Also, some spaces in removed header (tonot be detected as reversed).
+
+---
+From 904e784e895229d675cd7b3b43a963fdc5813ac8 Mon Sep 17 00:00:00 2001
+From: Kenneth Moreland <morelandkd@ornl.gov>
+Date: Fri, 4 Jun 2021 09:30:52 -0600
+Subject: [PATCH] Remove TBB parallel_sort patch
+
+Years ago we discovered a problem with TBB's parallel sort, which we
+patch in our local repo and submitted a change to TBB, which has been
+accepted.
+
+The code to decide whether to use our parallel_sort patch does not work
+with the latest versions of TBB because it requires including a header
+that changed names to get the TBB version.
+
+We no longer support any TBB version with this bug, so just remove the
+patch from VTK-m.
+---
+ vtkm/cont/tbb/internal/CMakeLists.txt  |   1 -
+ vtkm/cont/tbb/internal/FunctorsTBB.h   |  10 +-
+ vtkm/cont/tbb/internal/parallel_sort.h | 273 -------------------------
+ 3 files changed, 1 insertion(+), 283 deletions(-)
+ delete mode 100644 vtkm/cont/tbb/internal/parallel_sort.h
+
+diff --git a/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb/internal/CMakeLists.txt b/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb/internal/CMakeLists.txt
+index 1283307be..ffbf1e845 100644
+--- a/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb/internal/CMakeLists.txt
++++ b/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb/internal/CMakeLists.txt
+@@ -25,7 +25,6 @@ endif()
+ 
+ vtkm_declare_headers(${headers}
+    ParallelSortTBB.hxx
+-   parallel_sort.h
+    )
+ 
+ #These sources need to always be built
+diff --git a/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb/internal/FunctorsTBB.h b/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb/internal/FunctorsTBB.h
+index dc988f7f8..c538c2240 100644
+--- a/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb/internal/FunctorsTBB.h
++++ b/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb/internal/FunctorsTBB.h
+@@ -38,15 +38,6 @@ VTKM_THIRDPARTY_PRE_INCLUDE
+ // correct settings so that we don't clobber any existing function
+ #include <vtkm/internal/Windows.h>
+ 
+-#include <tbb/tbb_stddef.h>
+-#if (TBB_VERSION_MAJOR == 4) && (TBB_VERSION_MINOR == 2)
+-//we provide an patched implementation of tbb parallel_sort
+-//that fixes ADL for std::swap. This patch has been submitted to Intel
+-//and is fixed in TBB 4.2 update 2.
+-#include <vtkm/cont/tbb/internal/parallel_sort.h>
+-#else
+-#include <tbb/parallel_sort.h>
+-#endif
+ 
+ #include <numeric>
+ #include <tbb/blocked_range.h>
+@@ -54,6 +45,7 @@ VTKM_THIRDPARTY_PRE_INCLUDE
+ #include <tbb/parallel_for.h>
+ #include <tbb/parallel_reduce.h>
+ #include <tbb/parallel_scan.h>
++#include <tbb/parallel_sort.h>
+ #include <tbb/partitioner.h>
+ #include <tbb/tick_count.h>
+ 
+diff --git a/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb/internal/parallel_sort.h b/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb/internal/parallel_sort.h
+deleted file mode 100644
+index 3451a369f..000000000
+--- a/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb/internal/parallel_sort.h
++++ /dev/null
+@@ -1,273 +0,0 @@
+-/*
+-    Copyright 2005-2013 Intel Corporation.  All Rights Reserved.
+-
+-    This file is part of Threading Building Blocks.
+-
+-    Threading Building Blocks is free software; you can redistribute it
+-    and/or modify it under the terms of the GNU General Public License
+-    version 2 as published by the Free Software Foundation.
+-
+-    Threading Building Blocks is distributed in the hope that it will be
+-    useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+-    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-    GNU General Public License for more details.
+-
+-    You should have received a copy of the GNU General Public License
+-    along with Threading Building Blocks; if not, write to the Free Software
+-    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+-
+-    As a special exception, you may use this file as part of a free software
+-    library without restriction.  Specifically, if other files instantiate
+-    templates or use macros or inline functions from this file, or you compile
+-    this file and link it with other files to produce an executable, this
+-    file does not by itself cause the resulting executable to be covered by
+-    the GNU General Public License.  This exception does not however
+-    invalidate any other reasons why the executable file might be covered by
+-    the GNU General Public License.
+-*/
+-
+-#ifndef __TBB_parallel_sort_H
+-#define __TBB_parallel_sort_H
+-
+-#include <tbb/blocked_range.h>
+-#include <tbb/parallel_for.h>
+-
+-#include <algorithm>
+-#include <functional>
+-#include <iterator>
+-
+-namespace tbb
+-{
+-
+-//! @cond INTERNAL
+-namespace internal
+-{
+-
+-//! Range used in quicksort to split elements into subranges based on a value.
+-/** The split operation selects a splitter and places all elements less than or equal
+-    to the value in the first range and the remaining elements in the second range.
+-    @ingroup algorithms */
+-template <typename RandomAccessIterator, typename Compare>
+-class quick_sort_range : private no_assign
+-{
+-
+-  inline size_t median_of_three(const RandomAccessIterator& array,
+-                                size_t l,
+-                                size_t m,
+-                                size_t r) const
+-  {
+-    return comp(array[l], array[m])
+-      ? (comp(array[m], array[r]) ? m : (comp(array[l], array[r]) ? r : l))
+-      : (comp(array[r], array[m]) ? m : (comp(array[r], array[l]) ? r : l));
+-  }
+-
+-  inline size_t pseudo_median_of_nine(const RandomAccessIterator& array,
+-                                      const quick_sort_range& range) const
+-  {
+-    size_t offset = range.size / 8u;
+-    return median_of_three(array,
+-                           median_of_three(array, 0, offset, offset * 2),
+-                           median_of_three(array, offset * 3, offset * 4, offset * 5),
+-                           median_of_three(array, offset * 6, offset * 7, range.size - 1));
+-  }
+-
+-public:
+-  static const size_t grainsize = 500;
+-  const Compare& comp;
+-  RandomAccessIterator begin;
+-  size_t size;
+-
+-  quick_sort_range(RandomAccessIterator begin_, size_t size_, const Compare& comp_)
+-    : comp(comp_)
+-    , begin(begin_)
+-    , size(size_)
+-  {
+-  }
+-
+-  bool empty() const { return size == 0; }
+-  bool is_divisible() const { return size >= grainsize; }
+-
+-  quick_sort_range(quick_sort_range& range, split)
+-    : comp(range.comp)
+-  {
+-    using std::swap;
+-    RandomAccessIterator array = range.begin;
+-    RandomAccessIterator key0 = range.begin;
+-    size_t m = pseudo_median_of_nine(array, range);
+-    if (m)
+-      swap(array[0], array[m]);
+-
+-    size_t i = 0;
+-    size_t j = range.size;
+-    // Partition interval [i+1,j-1] with key *key0.
+-    for (;;)
+-    {
+-      __TBB_ASSERT(i < j, nullptr);
+-      // Loop must terminate since array[l]==*key0.
+-      do
+-      {
+-        --j;
+-        __TBB_ASSERT(i <= j, "bad ordering relation?");
+-      } while (comp(*key0, array[j]));
+-      do
+-      {
+-        __TBB_ASSERT(i <= j, nullptr);
+-        if (i == j)
+-          goto partition;
+-        ++i;
+-      } while (comp(array[i], *key0));
+-      if (i == j)
+-        goto partition;
+-      swap(array[i], array[j]);
+-    }
+-  partition:
+-    // Put the partition key were it belongs
+-    swap(array[j], *key0);
+-    // array[l..j) is less or equal to key.
+-    // array(j..r) is greater or equal to key.
+-    // array[j] is equal to key
+-    i = j + 1;
+-    begin = array + i;
+-    size = range.size - i;
+-    range.size = j;
+-  }
+-};
+-
+-#if __TBB_TASK_GROUP_CONTEXT
+-//! Body class used to test if elements in a range are presorted
+-/** @ingroup algorithms */
+-template <typename RandomAccessIterator, typename Compare>
+-class quick_sort_pretest_body : internal::no_assign
+-{
+-  const Compare& comp;
+-
+-public:
+-  quick_sort_pretest_body(const Compare& _comp)
+-    : comp(_comp)
+-  {
+-  }
+-
+-  void operator()(const blocked_range<RandomAccessIterator>& range) const
+-  {
+-    task& my_task = task::self();
+-    RandomAccessIterator my_end = range.end();
+-
+-    int i = 0;
+-    for (RandomAccessIterator k = range.begin(); k != my_end; ++k, ++i)
+-    {
+-      if (i % 64 == 0 && my_task.is_cancelled())
+-        break;
+-
+-      // The k-1 is never out-of-range because the first chunk starts at begin+serial_cutoff+1
+-      if (comp(*(k), *(k - 1)))
+-      {
+-        my_task.cancel_group_execution();
+-        break;
+-      }
+-    }
+-  }
+-};
+-#endif /* __TBB_TASK_GROUP_CONTEXT */
+-
+-//! Body class used to sort elements in a range that is smaller than the grainsize.
+-/** @ingroup algorithms */
+-template <typename RandomAccessIterator, typename Compare>
+-struct quick_sort_body
+-{
+-  void operator()(const quick_sort_range<RandomAccessIterator, Compare>& range) const
+-  {
+-    //SerialQuickSort( range.begin, range.size, range.comp );
+-    std::sort(range.begin, range.begin + range.size, range.comp);
+-  }
+-};
+-
+-//! Wrapper method to initiate the sort by calling parallel_for.
+-/** @ingroup algorithms */
+-template <typename RandomAccessIterator, typename Compare>
+-void parallel_quick_sort(RandomAccessIterator begin, RandomAccessIterator end, const Compare& comp)
+-{
+-#if __TBB_TASK_GROUP_CONTEXT
+-  task_group_context my_context;
+-  const int serial_cutoff = 9;
+-
+-  __TBB_ASSERT(begin + serial_cutoff < end, "min_parallel_size is smaller than serial cutoff?");
+-  RandomAccessIterator k;
+-  for (k = begin; k != begin + serial_cutoff; ++k)
+-  {
+-    if (comp(*(k + 1), *k))
+-    {
+-      goto do_parallel_quick_sort;
+-    }
+-  }
+-
+-  parallel_for(blocked_range<RandomAccessIterator>(k + 1, end),
+-               quick_sort_pretest_body<RandomAccessIterator, Compare>(comp),
+-               auto_partitioner(),
+-               my_context);
+-
+-  if (my_context.is_group_execution_cancelled())
+-  do_parallel_quick_sort:
+-#endif /* __TBB_TASK_GROUP_CONTEXT */
+-  parallel_for(quick_sort_range<RandomAccessIterator, Compare>(begin, end - begin, comp),
+-               quick_sort_body<RandomAccessIterator, Compare>(),
+-               auto_partitioner());
+-}
+-
+-} // namespace internal
+-//! @endcond
+-
+-//! @cond INTERNAL
+-/** \page parallel_sort_iter_req Requirements on iterators for parallel_sort
+-    Requirements on value type \c T of \c RandomAccessIterator for \c parallel_sort:
+-    - \code void swap( T& x, T& y ) \endcode        Swaps \c x and \c y
+-    - \code bool Compare::operator()( const T& x, const T& y ) \endcode
+-                                                    True if x comes before y;
+-**/
+-
+-/** \name parallel_sort
+-    See also requirements on \ref parallel_sort_iter_req "iterators for parallel_sort". **/
+-//@{
+-
+-//! Sorts the data in [begin,end) using the given comparator
+-/** The compare function object is used for all comparisons between elements during sorting.
+-    The compare object must define a bool operator() function.
+-    @ingroup algorithms **/
+-//! @endcond
+-template <typename RandomAccessIterator, typename Compare>
+-void parallel_sort(RandomAccessIterator begin, RandomAccessIterator end, const Compare& comp)
+-{
+-  const int min_parallel_size = 500;
+-  if (end > begin)
+-  {
+-    if (end - begin < min_parallel_size)
+-    {
+-      std::sort(begin, end, comp);
+-    }
+-    else
+-    {
+-      internal::parallel_quick_sort(begin, end, comp);
+-    }
+-  }
+-}
+-
+-//! Sorts the data in [begin,end) with a default comparator \c std::less<RandomAccessIterator>
+-/** @ingroup algorithms **/
+-template <typename RandomAccessIterator>
+-inline void parallel_sort(RandomAccessIterator begin, RandomAccessIterator end)
+-{
+-  parallel_sort(
+-    begin, end, std::less<typename std::iterator_traits<RandomAccessIterator>::value_type>());
+-}
+-
+-//! Sorts the data in the range \c [begin,end) with a default comparator \c std::less<T>
+-/** @ingroup algorithms **/
+-template <typename T>
+-inline void parallel_sort(T* begin, T* end)
+-{
+-  parallel_sort(begin, end, std::less<T>());
+-}
+-//@}
+-
+-} // namespace tbb
+-
+-#endif
+-- 
+GitLab
+
+From 97a2408fc4a24eed8eaeb38f36315b4306e54f58 Mon Sep 17 00:00:00 2001
+From: Robert Maynard <robert.maynard@kitware.com>
+Date: Mon, 1 Jun 2020 16:58:02 -0400
+Subject: [PATCH] Correct warnings for using TBB 2020 deprecated functions
+
+---
+ vtkm/cont/tbb/internal/ParallelSortTBB.cxx | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb/internal/ParallelSortTBB.cxx b/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb/internal/ParallelSortTBB.cxx
+index 3076b3a9c..9243017e6 100644
+--- a/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb/internal/ParallelSortTBB.cxx
++++ b/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb/internal/ParallelSortTBB.cxx
+@@ -54,7 +54,7 @@
+ #include <vtkm/internal/Windows.h>
+ 
+ #include <tbb/task.h>
+-#include <tbb/tbb_thread.h>
++#include <thread>
+ 
+ #if defined(VTKM_MSVC)
+ #pragma pop_macro("__TBB_NO_IMPLICITLINKAGE")
+@@ -69,7 +69,7 @@ namespace tbb
+ namespace sort
+ {
+ 
+-const size_t MAX_CORES = ::tbb::tbb_thread::hardware_concurrency();
++const size_t MAX_CORES = std::thread::hardware_concurrency();
+ 
+ // Simple TBB task wrapper around a generic functor.
+ template <typename FunctorType>
+-- 
+GitLab
+
+From 1eea0bee122fa3ef47cc488d97f82e008d69c8bd Mon Sep 17 00:00:00 2001
+From: Kenneth Moreland <morelandkd@ornl.gov>
+Date: Fri, 4 Jun 2021 09:34:30 -0600
+Subject: [PATCH] Use TBB task_group for radix sort
+
+TBB 2020 introduced a new class called `task_group`. TBB 2021 removed
+the old class `task` as its functionality was replaced by `task_group`.
+Our parallel radix sort for TBB was implemented using `task`s, so change
+it to use `task_group` (which actually cleans up the code a bit).
+---
+ vtkm/cont/internal/ParallelRadixSort.h     |  2 +-
+ vtkm/cont/tbb/internal/ParallelSortTBB.cxx | 35 ++++++++++++++++++++--
+ 2 files changed, 33 insertions(+), 4 deletions(-)
+
+diff --git a/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/internal/ParallelRadixSort.h b/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/internal/ParallelRadixSort.h
+index 7604aacd7..cca8f6b72 100644
+--- a/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/internal/ParallelRadixSort.h
++++ b/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/internal/ParallelRadixSort.h
+@@ -485,7 +485,7 @@ struct RunTask
+   }
+ 
+   template <typename ThreaderData = void*>
+-  void operator()(ThreaderData tData = nullptr)
++  void operator()(ThreaderData tData = nullptr) const
+   {
+     size_t num_nodes_at_current_height = (size_t)pow(2, (double)binary_tree_height_);
+     if (num_threads_ <= num_nodes_at_current_height)
+diff --git a/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb/internal/ParallelSortTBB.cxx b/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb/internal/ParallelSortTBB.cxx
+index 9243017e6..d99406954 100644
+--- a/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb/internal/ParallelSortTBB.cxx
++++ b/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb/internal/ParallelSortTBB.cxx
+@@ -53,7 +53,7 @@
+ // correct settings so that we don't clobber any existing function
+ #include <vtkm/internal/Windows.h>
+ 
+-#include <tbb/task.h>
++#include <tbb/tbb.h>
+ #include <thread>
+ 
+ #if defined(VTKM_MSVC)
+@@ -71,6 +71,7 @@ namespace sort
+ 
+ const size_t MAX_CORES = std::thread::hardware_concurrency();
+ 
++#if TBB_VERSION_MAJOR < 2020
+ // Simple TBB task wrapper around a generic functor.
+ template <typename FunctorType>
+ struct TaskWrapper : public ::tbb::task
+@@ -94,7 +95,7 @@ struct RadixThreaderTBB
+   size_t GetAvailableCores() const { return MAX_CORES; }
+ 
+   template <typename TaskType>
+-  void RunParentTask(TaskType task)
++  void RunParentTask(TaskType task) const
+   {
+     using Task = TaskWrapper<TaskType>;
+     Task& root = *new (::tbb::task::allocate_root()) Task(task);
+@@ -102,7 +103,7 @@ struct RadixThreaderTBB
+   }
+ 
+   template <typename TaskType>
+-  void RunChildTasks(TaskWrapper<TaskType>* wrapper, TaskType left, TaskType right)
++  void RunChildTasks(TaskWrapper<TaskType>* wrapper, TaskType left, TaskType right) const
+   {
+     using Task = TaskWrapper<TaskType>;
+     ::tbb::empty_task& p = *new (wrapper->allocate_continuation())::tbb::empty_task();
+@@ -115,6 +116,34 @@ struct RadixThreaderTBB
+   }
+ };
+ 
++#else // TBB_VERSION_MAJOR >= 2020
++
++// In TBB version 2020, the task class was deprecated. Instead, we use the simpler task_group.
++
++struct RadixThreaderTBB
++{
++  std::shared_ptr<::tbb::task_group> TaskGroup =
++    std::shared_ptr<::tbb::task_group>(new ::tbb::task_group);
++
++  size_t GetAvailableCores() const { return MAX_CORES; }
++
++  template <typename TaskType>
++  void RunParentTask(TaskType task) const
++  {
++    this->TaskGroup->run_and_wait(task);
++    // All tasks should be complete at this point.
++  }
++
++  template <typename TaskType>
++  void RunChildTasks(void*, TaskType left, TaskType right) const
++  {
++    this->TaskGroup->run(left);
++    this->TaskGroup->run(right);
++  }
++};
++
++#endif
++
+ VTKM_INSTANTIATE_RADIX_SORT_FOR_THREADER(RadixThreaderTBB)
+ }
+ }
+diff --git a/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb/internal/ParallelSortTBB.cxx b/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb/internal/ParallelSortTBB.cxx
+index d99406954..73db80ed6 100644
+--- a/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb/internal/ParallelSortTBB.cxx
++++ b/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb/internal/ParallelSortTBB.cxx
+@@ -53,7 +53,13 @@
+ // correct settings so that we don't clobber any existing function
+ #include <vtkm/internal/Windows.h>
+ 
++#if TBB_VERSION_MAJOR >= 2020
++#include <tbb/task.h>
++#include <tbb/task_group.h>
++#else
+ #include <tbb/tbb.h>
++#endif
++
+ #include <thread>
+ 
+ #if defined(VTKM_MSVC)

diff --git a/sci-libs/vtk/files/vtk-9.0.3-use-std-atomic-part1.patch b/sci-libs/vtk/files/vtk-9.0.3-use-std-atomic-part1.patch
new file mode 100644
index 000000000000..ee52c32e53fe
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.0.3-use-std-atomic-part1.patch
@@ -0,0 +1,811 @@
+This is a bit packported upstream commit patch, that removes vtkAtomic
+and switches codebase to use std::atomic. This patch is kinda required
+for patchset for supporting modern versions of dev-cpp/tbb.
+
+Patch backported by Vadim Misbakh-Solovov <mva@gentoo.org>
+
+Original patch url: https://gitlab.kitware.com/vtk/vtk/-/commit/4ca62d8c73.patch
+
+--- a/Common/Core/CMakeLists.txt
++++ b/Common/Core/CMakeLists.txt
+@@ -266,7 +266,6 @@ set(headers
+   vtkArchiver.h
+   vtkArrayIteratorIncludes.h
+   vtkAssume.h
+-  vtkAtomicTypeConcepts.h
+   vtkAutoInit.h
+   vtkBuffer.h
+   vtkCollectionRange.h
+--- a/Common/Core/SMP/OpenMP/vtkAtomic.cxx
++++ /dev/null
+@@ -1,173 +0,0 @@
+-/*=========================================================================
+-
+-  Program:   Visualization Toolkit
+-  Module:    vtkAtomic.cxx
+-
+-  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
+-  All rights reserved.
+-  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
+-
+-     This software is distributed WITHOUT ANY WARRANTY; without even
+-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+-     PURPOSE.  See the above copyright notice for more information.
+-
+-=========================================================================*/
+-
+-#include "vtkAtomic.h"
+-
+-namespace detail
+-{
+-
+-vtkTypeInt64 AtomicOps<8>::AddAndFetch(vtkTypeInt64* ref, vtkTypeInt64 val)
+-{
+-  vtkTypeInt64 result;
+-#pragma omp atomic capture
+-  {
+-    (*ref) += val;
+-    result = *ref;
+-  }
+-#pragma omp flush
+-  return result;
+-}
+-
+-vtkTypeInt64 AtomicOps<8>::SubAndFetch(vtkTypeInt64* ref, vtkTypeInt64 val)
+-{
+-  vtkTypeInt64 result;
+-#pragma omp atomic capture
+-  {
+-    (*ref) -= val;
+-    result = *ref;
+-  }
+-#pragma omp flush
+-  return result;
+-}
+-
+-vtkTypeInt64 AtomicOps<8>::PreIncrement(vtkTypeInt64* ref)
+-{
+-  vtkTypeInt64 result;
+-#pragma omp atomic capture
+-  result = ++(*ref);
+-#pragma omp flush
+-  return result;
+-}
+-
+-vtkTypeInt64 AtomicOps<8>::PreDecrement(vtkTypeInt64* ref)
+-{
+-  vtkTypeInt64 result;
+-#pragma omp atomic capture
+-  result = --(*ref);
+-#pragma omp flush
+-  return result;
+-}
+-
+-vtkTypeInt64 AtomicOps<8>::PostIncrement(vtkTypeInt64* ref)
+-{
+-  vtkTypeInt64 result;
+-#pragma omp atomic capture
+-  result = (*ref)++;
+-#pragma omp flush
+-  return result;
+-}
+-
+-vtkTypeInt64 AtomicOps<8>::PostDecrement(vtkTypeInt64* ref)
+-{
+-  vtkTypeInt64 result;
+-#pragma omp atomic capture
+-  result = (*ref)--;
+-#pragma omp flush
+-  return result;
+-}
+-
+-vtkTypeInt64 AtomicOps<8>::Load(const vtkTypeInt64* ref)
+-{
+-  vtkTypeInt64 result;
+-#pragma omp flush
+-#pragma omp atomic read
+-  result = *ref;
+-  return result;
+-}
+-
+-void AtomicOps<8>::Store(vtkTypeInt64* ref, vtkTypeInt64 val)
+-{
+-#pragma omp atomic write
+-  *ref = val;
+-#pragma omp flush
+-}
+-
+-vtkTypeInt32 AtomicOps<4>::AddAndFetch(vtkTypeInt32* ref, vtkTypeInt32 val)
+-{
+-  vtkTypeInt32 result;
+-#pragma omp atomic capture
+-  {
+-    (*ref) += val;
+-    result = *ref;
+-  }
+-#pragma omp flush
+-  return result;
+-}
+-
+-vtkTypeInt32 AtomicOps<4>::SubAndFetch(vtkTypeInt32* ref, vtkTypeInt32 val)
+-{
+-  vtkTypeInt32 result;
+-#pragma omp atomic capture
+-  {
+-    (*ref) -= val;
+-    result = *ref;
+-  }
+-#pragma omp flush
+-  return result;
+-}
+-
+-vtkTypeInt32 AtomicOps<4>::PreIncrement(vtkTypeInt32* ref)
+-{
+-  vtkTypeInt32 result;
+-#pragma omp atomic capture
+-  result = ++(*ref);
+-#pragma omp flush
+-  return result;
+-}
+-
+-vtkTypeInt32 AtomicOps<4>::PreDecrement(vtkTypeInt32* ref)
+-{
+-  vtkTypeInt32 result;
+-#pragma omp atomic capture
+-  result = --(*ref);
+-#pragma omp flush
+-  return result;
+-}
+-
+-vtkTypeInt32 AtomicOps<4>::PostIncrement(vtkTypeInt32* ref)
+-{
+-  vtkTypeInt32 result;
+-#pragma omp atomic capture
+-  result = (*ref)++;
+-#pragma omp flush
+-  return result;
+-}
+-
+-vtkTypeInt32 AtomicOps<4>::PostDecrement(vtkTypeInt32* ref)
+-{
+-  vtkTypeInt32 result;
+-#pragma omp atomic capture
+-  result = (*ref)--;
+-#pragma omp flush
+-  return result;
+-}
+-
+-vtkTypeInt32 AtomicOps<4>::Load(const vtkTypeInt32* ref)
+-{
+-  vtkTypeInt32 result;
+-#pragma omp flush
+-#pragma omp atomic read
+-  result = *ref;
+-  return result;
+-}
+-
+-void AtomicOps<4>::Store(vtkTypeInt32* ref, vtkTypeInt32 val)
+-{
+-#pragma omp atomic write
+-  *ref = val;
+-#pragma omp flush
+-}
+-
+-}
+--- a/Common/Core/SMP/OpenMP/vtkAtomic.h.in
++++ /dev/null
+@@ -1,293 +0,0 @@
+-/*=========================================================================
+-
+-  Program:   Visualization Toolkit
+-  Module:    vtkAtomic.h
+-
+-  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
+-  All rights reserved.
+-  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
+-
+-     This software is distributed WITHOUT ANY WARRANTY; without even
+-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+-     PURPOSE.  See the above copyright notice for more information.
+-
+-=========================================================================*/
+-// .NAME vtkAtomic -
+-// .SECTION Description
+-
+-#ifndef vtkAtomic_h
+-#define vtkAtomic_h
+-
+-#include "vtkCommonCoreModule.h" // For export macro
+-#include "vtkAtomicTypeConcepts.h"
+-#include "vtkSystemIncludes.h"
+-
+-#include <cstddef>
+-
+-
+-#ifndef __VTK_WRAP__
+-namespace detail
+-{
+-
+-template <size_t size> class AtomicOps;
+-
+-template <> class VTKCOMMONCORE_EXPORT AtomicOps<8>
+-{
+-public:
+-  typedef vtkTypeInt64 atomic_type;
+-
+-  static vtkTypeInt64 AddAndFetch(vtkTypeInt64 *ref, vtkTypeInt64 val);
+-  static vtkTypeInt64 SubAndFetch(vtkTypeInt64 *ref, vtkTypeInt64 val);
+-  static vtkTypeInt64 PreIncrement(vtkTypeInt64 *ref);
+-  static vtkTypeInt64 PreDecrement(vtkTypeInt64 *ref);
+-  static vtkTypeInt64 PostIncrement(vtkTypeInt64 *ref);
+-  static vtkTypeInt64 PostDecrement(vtkTypeInt64 *ref);
+-  static vtkTypeInt64 Load(const vtkTypeInt64 *ref);
+-  static void Store(vtkTypeInt64 *ref, vtkTypeInt64 val);
+-};
+-
+-template <> class VTKCOMMONCORE_EXPORT AtomicOps<4>
+-{
+-public:
+-  typedef vtkTypeInt32 atomic_type;
+-
+-  static vtkTypeInt32 AddAndFetch(vtkTypeInt32 *ref, vtkTypeInt32 val);
+-  static vtkTypeInt32 SubAndFetch(vtkTypeInt32 *ref, vtkTypeInt32 val);
+-  static vtkTypeInt32 PreIncrement(vtkTypeInt32 *ref);
+-  static vtkTypeInt32 PreDecrement(vtkTypeInt32 *ref);
+-  static vtkTypeInt32 PostIncrement(vtkTypeInt32 *ref);
+-  static vtkTypeInt32 PostDecrement(vtkTypeInt32 *ref);
+-  static vtkTypeInt32 Load(const vtkTypeInt32 *ref);
+-  static void Store(vtkTypeInt32 *ref, vtkTypeInt32 val);
+-};
+-
+-} // detail
+-#endif // __VTK_WRAP__
+-
+-
+-template <typename T> class vtkAtomic : private vtk::atomic::detail::IntegralType<T>
+-{
+-private:
+-  typedef detail::AtomicOps<sizeof(T)> Impl;
+-
+-public:
+-  vtkAtomic() : Atomic(0)
+-  {
+-  }
+-
+-  vtkAtomic(T val) : Atomic(static_cast<typename Impl::atomic_type>(val))
+-  {
+-  }
+-
+-  vtkAtomic(const vtkAtomic<T> &atomic)
+-    : Atomic(static_cast<typename Impl::atomic_type>(atomic.load()))
+-  {
+-  }
+-
+-  T operator++()
+-  {
+-    return static_cast<T>(Impl::PreIncrement(&this->Atomic));
+-  }
+-
+-  T operator++(int)
+-  {
+-    return static_cast<T>(Impl::PostIncrement(&this->Atomic));
+-  }
+-
+-  T operator--()
+-  {
+-    return static_cast<T>(Impl::PreDecrement(&this->Atomic));
+-  }
+-
+-  T operator--(int)
+-  {
+-    return static_cast<T>(Impl::PostDecrement(&this->Atomic));
+-  }
+-
+-  T operator+=(T val)
+-  {
+-    return static_cast<T>(Impl::AddAndFetch(&this->Atomic,
+-      static_cast<typename Impl::atomic_type>(val)));
+-  }
+-
+-  T operator-=(T val)
+-  {
+-    return static_cast<T>(Impl::SubAndFetch(&this->Atomic,
+-      static_cast<typename Impl::atomic_type>(val)));
+-  }
+-
+-  operator T() const
+-  {
+-    return static_cast<T>(Impl::Load(&this->Atomic));
+-  }
+-
+-  T operator=(T val)
+-  {
+-    Impl::Store(&this->Atomic, static_cast<typename Impl::atomic_type>(val));
+-    return val;
+-  }
+-
+-  vtkAtomic<T>& operator=(const vtkAtomic<T> &atomic)
+-  {
+-    this->store(atomic.load());
+-    return *this;
+-  }
+-
+-  T load() const
+-  {
+-    return static_cast<T>(Impl::Load(&this->Atomic));
+-  }
+-
+-  void store(T val)
+-  {
+-    Impl::Store(&this->Atomic, static_cast<typename Impl::atomic_type>(val));
+-  }
+-
+-private:
+-  typename Impl::atomic_type Atomic;
+-};
+-
+-
+-template <typename T> class vtkAtomic<T*>
+-{
+-private:
+-  typedef detail::AtomicOps<sizeof(T*)> Impl;
+-
+-public:
+-  vtkAtomic() : Atomic(0)
+-  {
+-  }
+-
+-  vtkAtomic(T* val)
+-    : Atomic(reinterpret_cast<typename Impl::atomic_type>(val))
+-  {
+-  }
+-
+-  vtkAtomic(const vtkAtomic<T*> &atomic)
+-    : Atomic(reinterpret_cast<typename Impl::atomic_type>(atomic.load()))
+-  {
+-  }
+-
+-  T* operator++()
+-  {
+-    return reinterpret_cast<T*>(Impl::AddAndFetch(&this->Atomic, sizeof(T)));
+-  }
+-
+-  T* operator++(int)
+-  {
+-    T* val = reinterpret_cast<T*>(Impl::AddAndFetch(&this->Atomic, sizeof(T)));
+-    return --val;
+-  }
+-
+-  T* operator--()
+-  {
+-    return reinterpret_cast<T*>(Impl::SubAndFetch(&this->Atomic, sizeof(T)));
+-  }
+-
+-  T* operator--(int)
+-  {
+-    T* val = reinterpret_cast<T*>(Impl::AddAndFetch(&this->Atomic, sizeof(T)));
+-    return ++val;
+-  }
+-
+-  T* operator+=(std::ptrdiff_t val)
+-  {
+-    return reinterpret_cast<T*>(Impl::AddAndFetch(&this->Atomic,
+-                                                  val * sizeof(T)));
+-  }
+-
+-  T* operator-=(std::ptrdiff_t val)
+-  {
+-    return reinterpret_cast<T*>(Impl::SubAndFetch(&this->Atomic,
+-                                                  val * sizeof(T)));
+-  }
+-
+-  operator T*() const
+-  {
+-    return reinterpret_cast<T*>(Impl::Load(&this->Atomic));
+-  }
+-
+-  T* operator=(T* val)
+-  {
+-    Impl::Store(&this->Atomic,
+-                reinterpret_cast<typename Impl::atomic_type>(val));
+-    return val;
+-  }
+-
+-  vtkAtomic<T*>& operator=(const vtkAtomic<T*> &atomic)
+-  {
+-    this->store(atomic.load());
+-    return *this;
+-  }
+-
+-  T* load() const
+-  {
+-    return reinterpret_cast<T*>(Impl::Load(&this->Atomic));
+-  }
+-
+-  void store(T* val)
+-  {
+-    Impl::Store(&this->Atomic,
+-                reinterpret_cast<typename Impl::atomic_type>(val));
+-  }
+-
+-private:
+-  typename Impl::atomic_type Atomic;
+-};
+-
+-
+-template <> class vtkAtomic<void*>
+-{
+-private:
+-  typedef detail::AtomicOps<sizeof(void*)> Impl;
+-
+-public:
+-  vtkAtomic() : Atomic(0)
+-  {
+-  }
+-
+-  vtkAtomic(void* val)
+-    : Atomic(reinterpret_cast<Impl::atomic_type>(val))
+-  {
+-  }
+-
+-  vtkAtomic(const vtkAtomic<void*> &atomic)
+-    : Atomic(reinterpret_cast<Impl::atomic_type>(atomic.load()))
+-  {
+-  }
+-
+-  operator void*() const
+-  {
+-    return reinterpret_cast<void*>(Impl::Load(&this->Atomic));
+-  }
+-
+-  void* operator=(void* val)
+-  {
+-    Impl::Store(&this->Atomic,
+-                reinterpret_cast<Impl::atomic_type>(val));
+-    return val;
+-  }
+-
+-  vtkAtomic<void*>& operator=(const vtkAtomic<void*> &atomic)
+-  {
+-    this->store(atomic.load());
+-    return *this;
+-  }
+-
+-  void* load() const
+-  {
+-    return reinterpret_cast<void*>(Impl::Load(&this->Atomic));
+-  }
+-
+-  void store(void* val)
+-  {
+-    Impl::Store(&this->Atomic,
+-                reinterpret_cast<Impl::atomic_type>(val));
+-  }
+-
+-private:
+-  Impl::atomic_type Atomic;
+-};
+-
+-#endif
+-// VTK-HeaderTest-Exclude: vtkAtomic.h
+--- a/Common/Core/SMP/OpenMP/vtkSMPThreadLocalImpl.h.in
++++ b/Common/Core/SMP/OpenMP/vtkSMPThreadLocalImpl.h.in
+@@ -33,7 +33,6 @@
+ #define vtkSMPThreadLocalImpl_h
+ 
+ #include "vtkCommonCoreModule.h" // For export macro
+-#include "vtkAtomic.h"
+ #include "vtkConfigure.h"
+ #include "vtkSystemIncludes.h"
+ 
+ #include <atomic>
+@@ -49,7 +49,7 @@ typedef void* StoragePointerType;
+ 
+ struct Slot
+ {
+-  vtkAtomic<ThreadIdType> ThreadId;
++  std::atomic<ThreadIdType> ThreadId;
+   omp_lock_t ModifyLock;
+   StoragePointerType Storage;
+ 
+@@ -66,7 +66,7 @@ private:
+ struct HashTableArray
+ {
+   size_t Size, SizeLg;
+-  vtkAtomic<size_t> NumberOfEntries;
++  std::atomic<size_t> NumberOfEntries;
+   Slot *Slots;
+   HashTableArray *Prev;
+ 
+@@ -90,8 +90,8 @@ public:
+   size_t Size() const;
+ 
+ private:
+-  vtkAtomic<HashTableArray*> Root;
+-  vtkAtomic<size_t> Count;
++  std::atomic<HashTableArray*> Root;
++  std::atomic<size_t> Count;
+ 
+   friend class ThreadSpecificStorageIterator;
+ };
+--- a/Common/Core/SMP/Sequential/vtkAtomic.cxx
++++ /dev/null
+@@ -1,278 +0,0 @@
+-/*=========================================================================
+-
+-  Program:   Visualization Toolkit
+-  Module:    vtkAtomic.cxx
+-
+-  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
+-  All rights reserved.
+-  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
+-
+-     This software is distributed WITHOUT ANY WARRANTY; without even
+-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+-     PURPOSE.  See the above copyright notice for more information.
+-
+-=========================================================================*/
+-
+-#include "vtkAtomic.h"
+-
+-#if !defined(VTK_GCC_ATOMICS_32) && !defined(VTK_APPLE_ATOMICS_32) &&                              \
+-  !defined(VTK_WINDOWS_ATOMICS_32)
+-#define VTK_LOCK_BASED_ATOMICS_32
+-#endif
+-
+-#if !defined(VTK_GCC_ATOMICS_64) && !defined(VTK_APPLE_ATOMICS_64) &&                              \
+-  !defined(VTK_WINDOWS_ATOMICS_64)
+-#define VTK_LOCK_BASED_ATOMICS_64
+-#endif
+-
+-#if defined(VTK_WINDOWS_ATOMICS_32) || defined(VTK_WINDOWS_ATOMICS_64)
+-#include "vtkWindows.h"
+-#endif
+-
+-#if defined(VTK_LOCK_BASED_ATOMICS_32) || defined(VTK_LOCK_BASED_ATOMICS_64)
+-
+-#include "vtkSimpleCriticalSection.h"
+-
+-class CriticalSectionGuard
+-{
+-public:
+-  CriticalSectionGuard(vtkSimpleCriticalSection& cs)
+-    : CriticalSection(cs)
+-  {
+-    this->CriticalSection.Lock();
+-  }
+-
+-  ~CriticalSectionGuard() { this->CriticalSection.Unlock(); }
+-
+-private:
+-  // not copyable
+-  CriticalSectionGuard(const CriticalSectionGuard&);
+-  void operator=(const CriticalSectionGuard&);
+-
+-  vtkSimpleCriticalSection& CriticalSection;
+-};
+-
+-#if defined(VTK_LOCK_BASED_ATOMICS_64)
+-detail::AtomicOps<8>::atomic_type::atomic_type(vtkTypeInt64 init)
+-  : var(init)
+-{
+-  this->csec = new vtkSimpleCriticalSection;
+-}
+-
+-detail::AtomicOps<8>::atomic_type::~atomic_type()
+-{
+-  delete this->csec;
+-}
+-#endif
+-
+-#if defined(VTK_LOCK_BASED_ATOMICS_32)
+-detail::AtomicOps<4>::atomic_type::atomic_type(vtkTypeInt32 init)
+-  : var(init)
+-{
+-  this->csec = new vtkSimpleCriticalSection;
+-}
+-
+-detail::AtomicOps<4>::atomic_type::~atomic_type()
+-{
+-  delete this->csec;
+-}
+-#endif
+-
+-#endif // VTK_LOCK_BASED_ATOMICS
+-
+-namespace detail
+-{
+-
+-#if defined(VTK_WINDOWS_ATOMICS_64) || defined(VTK_LOCK_BASED_ATOMICS_64)
+-
+-vtkTypeInt64 AtomicOps<8>::AddAndFetch(atomic_type* ref, vtkTypeInt64 val)
+-{
+-#if defined(VTK_WINDOWS_ATOMICS_64)
+-#if defined(VTK_HAS_INTERLOCKEDADD)
+-  return InterlockedAdd64(ref, val);
+-#else
+-  return InterlockedExchangeAdd64(ref, val) + val;
+-#endif
+-#else
+-  CriticalSectionGuard csg(*ref->csec);
+-  return ref->var += val;
+-#endif
+-}
+-
+-vtkTypeInt64 AtomicOps<8>::SubAndFetch(atomic_type* ref, vtkTypeInt64 val)
+-{
+-#if defined(VTK_WINDOWS_ATOMICS_64)
+-#if defined(VTK_HAS_INTERLOCKEDADD)
+-  return InterlockedAdd64(ref, -val);
+-#else
+-  return InterlockedExchangeAdd64(ref, -val) - val;
+-#endif
+-#else
+-  CriticalSectionGuard csg(*ref->csec);
+-  return ref->var -= val;
+-#endif
+-}
+-
+-vtkTypeInt64 AtomicOps<8>::PreIncrement(atomic_type* ref)
+-{
+-#if defined(VTK_WINDOWS_ATOMICS_64)
+-  return InterlockedIncrement64(ref);
+-#else
+-  CriticalSectionGuard csg(*ref->csec);
+-  return ++(ref->var);
+-#endif
+-}
+-
+-vtkTypeInt64 AtomicOps<8>::PreDecrement(atomic_type* ref)
+-{
+-#if defined(VTK_WINDOWS_ATOMICS_64)
+-  return InterlockedDecrement64(ref);
+-#else
+-  CriticalSectionGuard csg(*ref->csec);
+-  return --(ref->var);
+-#endif
+-}
+-
+-vtkTypeInt64 AtomicOps<8>::PostIncrement(atomic_type* ref)
+-{
+-#if defined(VTK_WINDOWS_ATOMICS_64)
+-  vtkTypeInt64 val = InterlockedIncrement64(ref);
+-  return --val;
+-#else
+-  CriticalSectionGuard csg(*ref->csec);
+-  return (ref->var)++;
+-#endif
+-}
+-
+-vtkTypeInt64 AtomicOps<8>::PostDecrement(atomic_type* ref)
+-{
+-#if defined(VTK_WINDOWS_ATOMICS_64)
+-  vtkTypeInt64 val = InterlockedDecrement64(ref);
+-  return ++val;
+-#else
+-  CriticalSectionGuard csg(*ref->csec);
+-  return (ref->var)--;
+-#endif
+-}
+-
+-vtkTypeInt64 AtomicOps<8>::Load(const atomic_type* ref)
+-{
+-#if defined(VTK_WINDOWS_ATOMICS_64)
+-  vtkTypeInt64 val;
+-  InterlockedExchange64(&val, *ref);
+-  return val;
+-#else
+-  CriticalSectionGuard csg(*ref->csec);
+-  return ref->var;
+-#endif
+-}
+-
+-void AtomicOps<8>::Store(atomic_type* ref, vtkTypeInt64 val)
+-{
+-#if defined(VTK_WINDOWS_ATOMICS_64)
+-  InterlockedExchange64(ref, val);
+-#else
+-  CriticalSectionGuard csg(*ref->csec);
+-  ref->var = val;
+-#endif
+-}
+-
+-#endif // defined(VTK_WINDOWS_ATOMICS_64) || defined(VTK_LOCK_BASED_ATOMICS_64)
+-
+-#if defined(VTK_WINDOWS_ATOMICS_32) || defined(VTK_LOCK_BASED_ATOMICS_32)
+-
+-vtkTypeInt32 AtomicOps<4>::AddAndFetch(atomic_type* ref, vtkTypeInt32 val)
+-{
+-#if defined(VTK_WINDOWS_ATOMICS_32)
+-#if defined(VTK_HAS_INTERLOCKEDADD)
+-  return InterlockedAdd(reinterpret_cast<long*>(ref), val);
+-#else
+-  return InterlockedExchangeAdd(reinterpret_cast<long*>(ref), val) + val;
+-#endif
+-#else
+-  CriticalSectionGuard csg(*ref->csec);
+-  return ref->var += val;
+-#endif
+-}
+-
+-vtkTypeInt32 AtomicOps<4>::SubAndFetch(atomic_type* ref, vtkTypeInt32 val)
+-{
+-#if defined(VTK_WINDOWS_ATOMICS_32)
+-#if defined(VTK_HAS_INTERLOCKEDADD)
+-  return InterlockedAdd(reinterpret_cast<long*>(ref), -val);
+-#else
+-  return InterlockedExchangeAdd(reinterpret_cast<long*>(ref), -val) - val;
+-#endif
+-#else
+-  CriticalSectionGuard csg(*ref->csec);
+-  return ref->var -= val;
+-#endif
+-}
+-
+-vtkTypeInt32 AtomicOps<4>::PreIncrement(atomic_type* ref)
+-{
+-#if defined(VTK_WINDOWS_ATOMICS_32)
+-  return InterlockedIncrement(reinterpret_cast<long*>(ref));
+-#else
+-  CriticalSectionGuard csg(*ref->csec);
+-  return ++(ref->var);
+-#endif
+-}
+-
+-vtkTypeInt32 AtomicOps<4>::PreDecrement(atomic_type* ref)
+-{
+-#if defined(VTK_WINDOWS_ATOMICS_32)
+-  return InterlockedDecrement(reinterpret_cast<long*>(ref));
+-#else
+-  CriticalSectionGuard csg(*ref->csec);
+-  return --(ref->var);
+-#endif
+-}
+-
+-vtkTypeInt32 AtomicOps<4>::PostIncrement(atomic_type* ref)
+-{
+-#if defined(VTK_WINDOWS_ATOMICS_32)
+-  vtkTypeInt32 val = InterlockedIncrement(reinterpret_cast<long*>(ref));
+-  return --val;
+-#else
+-  CriticalSectionGuard csg(*ref->csec);
+-  return (ref->var)++;
+-#endif
+-}
+-
+-vtkTypeInt32 AtomicOps<4>::PostDecrement(atomic_type* ref)
+-{
+-#if defined(VTK_WINDOWS_ATOMICS_32)
+-  vtkTypeInt32 val = InterlockedDecrement(reinterpret_cast<long*>(ref));
+-  return ++val;
+-#else
+-  CriticalSectionGuard csg(*ref->csec);
+-  return (ref->var)--;
+-#endif
+-}
+-
+-vtkTypeInt32 AtomicOps<4>::Load(const atomic_type* ref)
+-{
+-#if defined(VTK_WINDOWS_ATOMICS_32)
+-  long val;
+-  InterlockedExchange(&val, *ref);
+-  return val;
+-#else
+-  CriticalSectionGuard csg(*ref->csec);
+-  return ref->var;
+-#endif
+-}
+-
+-void AtomicOps<4>::Store(atomic_type* ref, vtkTypeInt32 val)
+-{
+-#if defined(VTK_WINDOWS_ATOMICS_32)
+-  InterlockedExchange(reinterpret_cast<long*>(ref), val);
+-#else
+-  CriticalSectionGuard csg(*ref->csec);
+-  ref->var = val;
+-#endif
+-}
+-
+-#endif // defined(VTK_WINDOWS_ATOMICS_32) || defined(VTK_LOCK_BASED_ATOMICS_32)
+-
+-} // namespace detail

diff --git a/sci-libs/vtk/files/vtk-9.0.3-use-std-atomic-part2.patch b/sci-libs/vtk/files/vtk-9.0.3-use-std-atomic-part2.patch
new file mode 100644
index 000000000000..e2520af7748c
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.0.3-use-std-atomic-part2.patch
@@ -0,0 +1,851 @@
+--- a/Common/Core/SMP/Sequential/vtkAtomic.h.in
++++ /dev/null
+@@ -1,467 +0,0 @@
+-/*=========================================================================
+-
+-  Program:   Visualization Toolkit
+-  Module:    vtkAtomic.h
+-
+-  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
+-  All rights reserved.
+-  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
+-
+-     This software is distributed WITHOUT ANY WARRANTY; without even
+-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+-     PURPOSE.  See the above copyright notice for more information.
+-
+-=========================================================================*/
+-// .NAME vtkAtomic - Provides support for atomic integers
+-// .SECTION Description
+-// Objects of atomic types are C++ objects that are free from data races;
+-// that is, if one thread writes to an atomic object while another thread
+-// reads from it, the behavior is well-defined. vtkAtomic provides
+-// a subset of the std::atomic API and implementation for the following types,
+-// 32 bit signed and unsigned integers, 64 bit signed and unsigned integers,
+-// and pointers. For these types, vtkAtomic defines a
+-// number of operations that happen atomically - without interruption
+-// by another thread. Furthermore, these operations happen in a
+-// sequentially-consistent way and use full memory fences. This means
+-// that operations relating to atomic variables happen in the specified
+-// order and the results are made visible to other processing cores to
+-// guarantee proper sequential operation. Other memory access patterns
+-// supported by std::atomic are not currently supported.
+-//
+-// Note that when atomic operations are not available on a particular
+-// platform or compiler, mutexes, which are significantly slower, are used
+-// as a fallback.
+-
+-#ifndef vtkAtomic_h
+-#define vtkAtomic_h
+-
+-#include "vtkCommonCoreModule.h" // For export macro
+-#include "vtkAtomicTypeConcepts.h"
+-#include "vtkConfigure.h"
+-#include "vtkSystemIncludes.h"
+-#include "vtkType.h"
+-
+-#include <cstddef>
+-
+-#cmakedefine VTK_HAVE_ATOMIC_BUILTINS
+-
+-// Assume 64-bit atomic operations are not available on 32 bit platforms
+-#if defined(VTK_HAVE_ATOMIC_BUILTINS)
+-# define VTK_GCC_ATOMICS_32
+-# if VTK_SIZEOF_VOID_P == 8
+-#   define VTK_GCC_ATOMICS_64
+-# endif
+-#elif defined(_WIN32) && defined(_MSC_VER)
+-# define VTK_WINDOWS_ATOMICS_32
+-# if VTK_SIZEOF_VOID_P == 8
+-#   define VTK_WINDOWS_ATOMICS_64
+-# endif
+-#endif
+-
+-
+-#if defined(_WIN32) && defined(_MSC_VER)
+-//  disable warning about the padding due to alignment
+-# pragma warning(disable:4324)
+-# define VTK_ALIGN(X) __declspec(align(X))
+-#elif defined(__GNUC__) // gcc compatible compiler
+-# define VTK_ALIGN(X) __attribute__ ((aligned (X)))
+-#else
+-# define VTK_ALIGN(X)
+-#endif
+-
+-
+-class vtkSimpleCriticalSection;
+-
+-
+-#ifndef __VTK_WRAP__
+-namespace detail
+-{
+-
+-template <size_t size> class AtomicOps;
+-
+-#if defined(VTK_GCC_ATOMICS_64)
+-template <> class AtomicOps<8>
+-{
+-public:
+-  typedef vtkTypeInt64 VTK_ALIGN(8) atomic_type;
+-  typedef vtkTypeInt64 value_type;
+-
+-  static value_type AddAndFetch(value_type *ref, value_type val)
+-  {
+-    return __atomic_add_fetch(ref, val, __ATOMIC_SEQ_CST);
+-  }
+-
+-  static value_type SubAndFetch(value_type *ref, value_type val)
+-  {
+-    return __atomic_sub_fetch(ref, val, __ATOMIC_SEQ_CST);
+-  }
+-
+-  static value_type PreIncrement(value_type *ref)
+-  {
+-    return __atomic_add_fetch(ref, 1, __ATOMIC_SEQ_CST);
+-  }
+-
+-  static value_type PreDecrement(value_type *ref)
+-  {
+-    return __atomic_sub_fetch(ref, 1, __ATOMIC_SEQ_CST);
+-  }
+-
+-  static value_type PostIncrement(value_type *ref)
+-  {
+-    return __atomic_fetch_add(ref, 1, __ATOMIC_SEQ_CST);
+-  }
+-
+-  static value_type PostDecrement(value_type *ref)
+-  {
+-    return __atomic_fetch_sub(ref, 1, __ATOMIC_SEQ_CST);
+-  }
+-
+-  static value_type Load(const value_type *ref)
+-  {
+-    return __atomic_load_n(ref, __ATOMIC_SEQ_CST);
+-  }
+-
+-  static void Store(value_type *ref, value_type val)
+-  {
+-    __atomic_store_n(ref, val, __ATOMIC_SEQ_CST);
+-  }
+-};
+-
+-#else
+-
+-template <> class VTKCOMMONCORE_EXPORT AtomicOps<8>
+-{
+-public:
+-#if defined(VTK_WINDOWS_ATOMICS_64)
+-  typedef vtkTypeInt64 VTK_ALIGN(8) atomic_type;
+-#else
+-  struct VTKCOMMONCORE_EXPORT atomic_type
+-  {
+-    vtkTypeInt64 var;
+-    vtkSimpleCriticalSection *csec;
+-
+-    atomic_type(vtkTypeInt64 init);
+-    ~atomic_type();
+-  };
+-#endif
+-  typedef vtkTypeInt64 value_type;
+-
+-  static vtkTypeInt64 AddAndFetch(atomic_type *ref, vtkTypeInt64 val);
+-  static vtkTypeInt64 SubAndFetch(atomic_type *ref, vtkTypeInt64 val);
+-  static vtkTypeInt64 PreIncrement(atomic_type *ref);
+-  static vtkTypeInt64 PreDecrement(atomic_type *ref);
+-  static vtkTypeInt64 PostIncrement(atomic_type *ref);
+-  static vtkTypeInt64 PostDecrement(atomic_type *ref);
+-  static vtkTypeInt64 Load(const atomic_type *ref);
+-  static void Store(atomic_type *ref, vtkTypeInt64 val);
+-};
+-
+-#endif
+-
+-#if defined(VTK_GCC_ATOMICS_32)
+-template <> class AtomicOps<4>
+-{
+-public:
+-  typedef vtkTypeInt32 VTK_ALIGN(4) atomic_type;
+-  typedef vtkTypeInt32 value_type;
+-
+-  static value_type AddAndFetch(value_type *ref, value_type val)
+-  {
+-    return __atomic_add_fetch(ref, val, __ATOMIC_SEQ_CST);
+-  }
+-
+-  static value_type SubAndFetch(value_type *ref, value_type val)
+-  {
+-    return __atomic_sub_fetch(ref, val, __ATOMIC_SEQ_CST);
+-  }
+-
+-  static value_type PreIncrement(value_type *ref)
+-  {
+-    return __atomic_add_fetch(ref, 1, __ATOMIC_SEQ_CST);
+-  }
+-
+-  static value_type PreDecrement(value_type *ref)
+-  {
+-    return __atomic_sub_fetch(ref, 1, __ATOMIC_SEQ_CST);
+-  }
+-
+-  static value_type PostIncrement(value_type *ref)
+-  {
+-    return __atomic_fetch_add(ref, 1, __ATOMIC_SEQ_CST);
+-  }
+-
+-  static value_type PostDecrement(value_type *ref)
+-  {
+-    return __atomic_fetch_sub(ref, 1, __ATOMIC_SEQ_CST);
+-  }
+-
+-  static value_type Load(const value_type *ref)
+-  {
+-    return __atomic_load_n(ref, __ATOMIC_SEQ_CST);
+-  }
+-
+-  static void Store(value_type *ref, value_type val)
+-  {
+-    __atomic_store_n(ref, val, __ATOMIC_SEQ_CST);
+-  }
+-};
+-
+-#else
+-
+-template <> class VTKCOMMONCORE_EXPORT AtomicOps<4>
+-{
+-public:
+-#if defined(VTK_WINDOWS_ATOMICS_32)
+-  typedef vtkTypeInt32 VTK_ALIGN(4) atomic_type;
+-#else
+-  struct VTKCOMMONCORE_EXPORT atomic_type
+-  {
+-    vtkTypeInt32 var;
+-    vtkSimpleCriticalSection *csec;
+-
+-    atomic_type(vtkTypeInt32 init);
+-    ~atomic_type();
+-  };
+-#endif
+-  typedef vtkTypeInt32 value_type;
+-
+-  static vtkTypeInt32 AddAndFetch(atomic_type *ref, vtkTypeInt32 val);
+-  static vtkTypeInt32 SubAndFetch(atomic_type *ref, vtkTypeInt32 val);
+-  static vtkTypeInt32 PreIncrement(atomic_type *ref);
+-  static vtkTypeInt32 PreDecrement(atomic_type *ref);
+-  static vtkTypeInt32 PostIncrement(atomic_type *ref);
+-  static vtkTypeInt32 PostDecrement(atomic_type *ref);
+-  static vtkTypeInt32 Load(const atomic_type *ref);
+-  static void Store(atomic_type *ref, vtkTypeInt32 val);
+-};
+-
+-#endif
+-}
+-#endif // __VTK_WRAP__
+-
+-template <typename T> class vtkAtomic : private vtk::atomic::detail::IntegralType<T>
+-{
+-private:
+-  typedef detail::AtomicOps<sizeof(T)> Impl;
+-
+-public:
+-  vtkAtomic() : Atomic(0)
+-  {
+-  }
+-
+-  vtkAtomic(T val) : Atomic(static_cast<typename Impl::value_type>(val))
+-  {
+-  }
+-
+-  vtkAtomic(const vtkAtomic<T> &atomic)
+-    : Atomic(static_cast<typename Impl::value_type>(atomic.load()))
+-  {
+-  }
+-
+-  T operator++()
+-  {
+-    return static_cast<T>(Impl::PreIncrement(&this->Atomic));
+-  }
+-
+-  T operator++(int)
+-  {
+-    return static_cast<T>(Impl::PostIncrement(&this->Atomic));
+-  }
+-
+-  T operator--()
+-  {
+-    return static_cast<T>(Impl::PreDecrement(&this->Atomic));
+-  }
+-
+-  T operator--(int)
+-  {
+-    return static_cast<T>(Impl::PostDecrement(&this->Atomic));
+-  }
+-
+-  T operator+=(T val)
+-  {
+-    return static_cast<T>(Impl::AddAndFetch(&this->Atomic,
+-      static_cast<typename Impl::value_type>(val)));
+-  }
+-
+-  T operator-=(T val)
+-  {
+-    return static_cast<T>(Impl::SubAndFetch(&this->Atomic,
+-      static_cast<typename Impl::value_type>(val)));
+-  }
+-
+-  operator T() const
+-  {
+-    return static_cast<T>(Impl::Load(&this->Atomic));
+-  }
+-
+-  T operator=(T val)
+-  {
+-    Impl::Store(&this->Atomic, static_cast<typename Impl::value_type>(val));
+-    return val;
+-  }
+-
+-  vtkAtomic<T>& operator=(const vtkAtomic<T> &atomic)
+-  {
+-    this->store(atomic.load());
+-    return *this;
+-  }
+-
+-  T load() const
+-  {
+-    return static_cast<T>(Impl::Load(&this->Atomic));
+-  }
+-
+-  void store(T val)
+-  {
+-    Impl::Store(&this->Atomic, static_cast<typename Impl::value_type>(val));
+-  }
+-
+-private:
+-  typename Impl::atomic_type Atomic;
+-};
+-
+-
+-template <typename T> class vtkAtomic<T*>
+-{
+-private:
+-  typedef detail::AtomicOps<sizeof(T*)> Impl;
+-
+-public:
+-  vtkAtomic() : Atomic(0)
+-  {
+-  }
+-
+-  vtkAtomic(T* val)
+-    : Atomic(reinterpret_cast<typename Impl::value_type>(val))
+-  {
+-  }
+-
+-  vtkAtomic(const vtkAtomic<T*> &atomic)
+-    : Atomic(reinterpret_cast<typename Impl::value_type>(atomic.load()))
+-  {
+-  }
+-
+-  T* operator++()
+-  {
+-    return reinterpret_cast<T*>(Impl::AddAndFetch(&this->Atomic, sizeof(T)));
+-  }
+-
+-  T* operator++(int)
+-  {
+-    T* val = reinterpret_cast<T*>(Impl::AddAndFetch(&this->Atomic, sizeof(T)));
+-    return --val;
+-  }
+-
+-  T* operator--()
+-  {
+-    return reinterpret_cast<T*>(Impl::SubAndFetch(&this->Atomic, sizeof(T)));
+-  }
+-
+-  T* operator--(int)
+-  {
+-    T* val = reinterpret_cast<T*>(Impl::AddAndFetch(&this->Atomic, sizeof(T)));
+-    return ++val;
+-  }
+-
+-  T* operator+=(std::ptrdiff_t val)
+-  {
+-    return reinterpret_cast<T*>(Impl::AddAndFetch(&this->Atomic,
+-                                                  val * sizeof(T)));
+-  }
+-
+-  T* operator-=(std::ptrdiff_t val)
+-  {
+-    return reinterpret_cast<T*>(Impl::SubAndFetch(&this->Atomic,
+-                                                  val * sizeof(T)));
+-  }
+-
+-  operator T*() const
+-  {
+-    return reinterpret_cast<T*>(Impl::Load(&this->Atomic));
+-  }
+-
+-  T* operator=(T* val)
+-  {
+-    Impl::Store(&this->Atomic,
+-                reinterpret_cast<typename Impl::value_type>(val));
+-    return val;
+-  }
+-
+-  vtkAtomic<T*>& operator=(const vtkAtomic<T*> &atomic)
+-  {
+-    this->store(atomic.load());
+-    return *this;
+-  }
+-
+-  T* load() const
+-  {
+-    return reinterpret_cast<T*>(Impl::Load(&this->Atomic));
+-  }
+-
+-  void store(T* val)
+-  {
+-    Impl::Store(&this->Atomic,
+-                reinterpret_cast<typename Impl::value_type>(val));
+-  }
+-
+-private:
+-  typename Impl::atomic_type Atomic;
+-};
+-
+-
+-template <> class vtkAtomic<void*>
+-{
+-private:
+-  typedef detail::AtomicOps<sizeof(void*)> Impl;
+-
+-public:
+-  vtkAtomic() : Atomic(0)
+-  {
+-  }
+-
+-  vtkAtomic(void* val)
+-    : Atomic(reinterpret_cast<Impl::value_type>(val))
+-  {
+-  }
+-
+-  vtkAtomic(const vtkAtomic<void*> &atomic)
+-    : Atomic(reinterpret_cast<Impl::value_type>(atomic.load()))
+-  {
+-  }
+-
+-  operator void*() const
+-  {
+-    return reinterpret_cast<void*>(Impl::Load(&this->Atomic));
+-  }
+-
+-  void* operator=(void* val)
+-  {
+-    Impl::Store(&this->Atomic,
+-                reinterpret_cast<Impl::value_type>(val));
+-    return val;
+-  }
+-
+-  vtkAtomic<void*>& operator=(const vtkAtomic<void*> &atomic)
+-  {
+-    this->store(atomic.load());
+-    return *this;
+-  }
+-
+-  void* load() const
+-  {
+-    return reinterpret_cast<void*>(Impl::Load(&this->Atomic));
+-  }
+-
+-  void store(void* val)
+-  {
+-    Impl::Store(&this->Atomic,
+-                reinterpret_cast<Impl::value_type>(val));
+-  }
+-
+-private:
+-  Impl::atomic_type Atomic;
+-};
+-
+-#endif
+-// VTK-HeaderTest-Exclude: vtkAtomic.h
+--- a/Common/Core/SMP/TBB/vtkAtomic.h.in
++++ /dev/null
+@@ -1,247 +0,0 @@
+- /*=========================================================================
+-
+-  Program:   Visualization Toolkit
+-  Module:    vtkAtomic.h
+-
+-  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
+-  All rights reserved.
+-  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
+-
+-     This software is distributed WITHOUT ANY WARRANTY; without even
+-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+-     PURPOSE.  See the above copyright notice for more information.
+-
+-=========================================================================*/
+-// .NAME vtkAtomic -
+-// .SECTION Description
+-
+-#ifndef vtkAtomic_h
+-#define vtkAtomic_h
+-
+-#include "vtkAtomicTypeConcepts.h"
+-
+-#ifdef _MSC_VER
+-#  pragma push_macro("__TBB_NO_IMPLICIT_LINKAGE")
+-#  define __TBB_NO_IMPLICIT_LINKAGE 1
+-#endif
+-
+-#include <tbb/atomic.h>
+-
+-#ifdef _MSC_VER
+-#  pragma pop_macro("__TBB_NO_IMPLICIT_LINKAGE")
+-#endif
+-
+-#include <cstddef>
+-
+-
+-template <typename T> class vtkAtomic : private vtk::atomic::detail::IntegralType<T>
+-{
+-public:
+-  vtkAtomic()
+-  {
+-    this->Atomic = 0;
+-  }
+-
+-  vtkAtomic(T val)
+-  {
+-    this->Atomic = val;
+-  }
+-
+-  vtkAtomic(const vtkAtomic<T> &atomic)
+-  {
+-    this->Atomic = atomic.Atomic;
+-  }
+-
+-  T operator++()
+-  {
+-    return ++this->Atomic;
+-  }
+-
+-  T operator++(int)
+-  {
+-    return this->Atomic++;
+-  }
+-
+-  T operator--()
+-  {
+-    return --this->Atomic;
+-  }
+-
+-  T operator--(int)
+-  {
+-    return this->Atomic--;
+-  }
+-
+-  T operator+=(T val)
+-  {
+-    return this->Atomic += val;
+-  }
+-
+-  T operator-=(T val)
+-  {
+-    return this->Atomic -= val;
+-  }
+-
+-  operator T() const
+-  {
+-    return this->Atomic;
+-  }
+-
+-  T operator=(T val)
+-  {
+-    this->Atomic = val;
+-    return val;
+-  }
+-
+-  vtkAtomic<T>& operator=(const vtkAtomic<T> &atomic)
+-  {
+-    this->Atomic = atomic.Atomic;
+-    return *this;
+-  }
+-
+-  T load() const
+-  {
+-    return this->Atomic;
+-  }
+-
+-  void store(T val)
+-  {
+-    this->Atomic = val;
+-  }
+-
+-private:
+-  tbb::atomic<T> Atomic;
+-};
+-
+-
+-template <typename T> class vtkAtomic<T*>
+-{
+-public:
+-  vtkAtomic()
+-  {
+-    this->Atomic = 0;
+-  }
+-
+-  vtkAtomic(T* val)
+-  {
+-    this->Atomic = val;
+-  }
+-
+-  vtkAtomic(const vtkAtomic<T*> &atomic)
+-  {
+-    this->Atomic = atomic.Atomic;
+-  }
+-
+-  T* operator++()
+-  {
+-    return ++this->Atomic;
+-  }
+-
+-  T* operator++(int)
+-  {
+-    return this->Atomic++;
+-  }
+-
+-  T* operator--()
+-  {
+-    return --this->Atomic;
+-  }
+-
+-  T* operator--(int)
+-  {
+-    return this->Atomic--;
+-  }
+-
+-  T* operator+=(std::ptrdiff_t val)
+-  {
+-    return this->Atomic += val;
+-  }
+-
+-  T* operator-=(std::ptrdiff_t val)
+-  {
+-    return this->Atomic -= val;
+-  }
+-
+-  operator T*() const
+-  {
+-    return this->Atomic;
+-  }
+-
+-  T* operator=(T* val)
+-  {
+-    this->Atomic = val;
+-    return val;
+-  }
+-
+-  vtkAtomic<T*>& operator=(const vtkAtomic<T*> &atomic)
+-  {
+-    this->Atomic = atomic.Atomic;
+-    return *this;
+-  }
+-
+-  T* load() const
+-  {
+-    return this->Atomic;
+-  }
+-
+-  void store(T* val)
+-  {
+-    this->Atomic = val;
+-  }
+-
+-private:
+-  tbb::atomic<T*> Atomic;
+-};
+-
+-
+-template <> class vtkAtomic<void*>
+-{
+-public:
+-  vtkAtomic()
+-  {
+-    this->Atomic = 0;
+-  }
+-
+-  vtkAtomic(void* val)
+-  {
+-    this->Atomic = val;
+-  }
+-
+-  vtkAtomic(const vtkAtomic<void*> &atomic)
+-  {
+-    this->Atomic = atomic.Atomic;
+-  }
+-
+-  operator void*() const
+-  {
+-    return this->Atomic;
+-  }
+-
+-  void* operator=(void* val)
+-  {
+-    this->Atomic = val;
+-    return val;
+-  }
+-
+-  vtkAtomic<void*>& operator=(const vtkAtomic<void*> &atomic)
+-  {
+-    this->Atomic = atomic.Atomic;
+-    return *this;
+-  }
+-
+-  void* load() const
+-  {
+-    return this->Atomic;
+-  }
+-
+-  void store(void* val)
+-  {
+-    this->Atomic = val;
+-  }
+-
+-private:
+-  tbb::atomic<void*> Atomic;
+-};
+-
+-#endif
+-// VTK-HeaderTest-Exclude: vtkAtomic.h
+--- a/Common/Core/vtkAtomicTypeConcepts.h
++++ /dev/null
+@@ -1,48 +0,0 @@
+-/*=========================================================================
+-
+-  Program:   Visualization Toolkit
+-  Module:    vtkAtomicTypeConcepts.h
+-
+-  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
+-  All rights reserved.
+-  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
+-
+-     This software is distributed WITHOUT ANY WARRANTY; without even
+-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+-     PURPOSE.  See the above copyright notice for more information.
+-
+-=========================================================================*/
+-
+-#ifndef vtkAtomicTypeConcepts_h
+-#define vtkAtomicTypeConcepts_h
+-
+-#include <limits>
+-
+-namespace vtk
+-{
+-namespace atomic
+-{
+-namespace detail
+-{
+-
+-template <bool>
+-struct CompileTimeCheck;
+-template <>
+-struct CompileTimeCheck<true>
+-{
+-};
+-
+-template <typename T>
+-struct IntegralType
+-{
+-  CompileTimeCheck<std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::is_integer &&
+-    (sizeof(T) == 4 || sizeof(T) == 8)>
+-    c;
+-};
+-
+-} // detail
+-} // atomic
+-} // vtk
+-
+-#endif
+-// VTK-HeaderTest-Exclude: vtkAtomicTypeConcepts.h
+--- a/Common/Core/vtkSMPSelection.cmake
++++ b/Common/Core/vtkSMPSelection.cmake
+@@ -25,7 +25,6 @@ if (VTK_SMP_IMPLEMENTATION_TYPE STREQUAL "TBB")
+   list(APPEND vtk_smp_sources
+     "${vtk_smp_implementation_dir}/vtkSMPTools.cxx")
+   list(APPEND vtk_smp_headers_to_configure
+-    vtkAtomic.h
+     vtkSMPToolsInternal.h
+     vtkSMPThreadLocal.h)
+ 
+@@ -46,14 +45,6 @@ elseif (VTK_SMP_IMPLEMENTATION_TYPE STREQUAL "OpenMP")
+ 
+   if (OpenMP_CXX_SPEC_DATE AND NOT "${OpenMP_CXX_SPEC_DATE}" LESS "201107")
+     set(vtk_smp_use_default_atomics OFF)
+-    list(APPEND vtk_smp_sources
+-      "${vtk_smp_implementation_dir}/vtkAtomic.cxx")
+-    list(APPEND vtk_smp_headers_to_configure
+-      vtkAtomic.h)
+-
+-    set_source_files_properties(vtkAtomic.cxx
+-      PROPERITES
+-        COMPILE_FLAGS "${OpenMP_CXX_FLAGS}")
+   else()
+     message(WARNING
+       "Required OpenMP version (3.1) for atomics not detected. Using default "
+@@ -74,29 +65,7 @@ if (vtk_smp_use_default_atomics)
+ 
+   include("${CMAKE_CURRENT_SOURCE_DIR}/vtkTestBuiltins.cmake")
+ 
+-  set(vtkAtomic_defines)
+-
+-  # Check for atomic functions
+-  if (WIN32)
+-    check_symbol_exists(InterlockedAdd "windows.h" VTK_HAS_INTERLOCKEDADD)
+-
+-    if (VTK_HAS_INTERLOCKEDADD)
+-      list(APPEND vtkAtomic_defines "VTK_HAS_INTERLOCKEDADD")
+-    endif ()
+-  endif()
+-
+-  set_source_files_properties(vtkAtomic.cxx
+-    PROPERITES
+-      COMPILE_DEFINITIONS "${vtkAtomic_defines}")
+-
+   set(vtk_atomics_default_impl_dir "${CMAKE_CURRENT_SOURCE_DIR}/SMP/Sequential")
+-  list(APPEND vtk_smp_sources
+-    "${vtk_atomics_default_impl_dir}/vtkAtomic.cxx")
+-  configure_file(
+-    "${vtk_atomics_default_impl_dir}/vtkAtomic.h.in"
+-    "${CMAKE_CURRENT_BINARY_DIR}/vtkAtomic.h")
+-  list(APPEND vtk_smp_headers
+-    "${CMAKE_CURRENT_BINARY_DIR}/vtkAtomic.h")
+ endif()
+ 
+ foreach (vtk_smp_header IN LISTS vtk_smp_headers_to_configure)
+--- a/Common/Core/vtkTimeStamp.cxx
++++ b/Common/Core/vtkTimeStamp.cxx
+@@ -47,10 +47,8 @@ void vtkTimeStamp::Modified()
+   //
+   // The last solution has been decided to have the smallest downside of these.
+   //
+-  //  static const vtkAtomicUIntXX* GlobalTimeStamp = new vtkAtomicUIntXX(0);
+-  //
+   // Good luck!
+-#if defined(VTK_USE_64BIT_TIMESTAMPS) || VTK_SIZEOF_VOID_P == 8
++#if defined(VTK_USE_64BIT_TIMESTAMPS) || (VTK_SIZEOF_VOID_P == 8)
+   static std::atomic<uint64_t> GlobalTimeStamp(0U);
+ #else
+   static std::atomic<uint32_t> GlobalTimeStamp(0U);
+--- /dev/null
++++ b/Documentation/release/dev/vtkAtomicRemoved.md
+@@ -0,0 +1,4 @@
++## Removed vtkAtomic in favor of C++11 std::atomic
++
++- Removed vtkAtomic in favor of C++11 std::atomic
++- vtkAtomic.h and vtkAtomicTypeConcepts.h are no longer installed
+-- 
+GitLab
+
+

diff --git a/sci-libs/vtk/vtk-9.0.3-r4.ebuild b/sci-libs/vtk/vtk-9.0.3-r4.ebuild
new file mode 100644
index 000000000000..02c39405f389
--- /dev/null
+++ b/sci-libs/vtk/vtk-9.0.3-r4.ebuild
@@ -0,0 +1,557 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# TODO:
+# - add USE flag for remote modules? Those modules can be downloaded
+#	properly before building.
+
+PYTHON_COMPAT=( python3_{8..10} )
+WEBAPP_OPTIONAL=yes
+WEBAPP_MANUAL_SLOT=yes
+
+inherit check-reqs cmake cuda flag-o-matic java-pkg-opt-2 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
+	https://www.vtk.org/files/release/${MY_PV}/VTKData-${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 )
+	test? (
+		https://www.vtk.org/files/release/${MY_PV}/VTKLargeData-${PV}.tar.gz
+	)
+"
+S="${WORKDIR}/VTK-${PV}"
+
+LICENSE="BSD LGPL-2"
+SLOT="0/${MY_PV}"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
+# Note: external xdmf2 has no recognized target
+IUSE="+X all-modules boost cuda doc examples ffmpeg gdal imaging java
+	+json kits mpi mysql odbc offscreen openmp pegtl postgres python
+	qt5 +rendering tbb theora tk video_cards_nvidia views web"
+
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="
+	all-modules? ( boost ffmpeg gdal imaging mysql odbc postgres qt5 rendering theora views )
+	cuda? ( X video_cards_nvidia )
+	java? ( rendering )
+	python? ( ${PYTHON_REQUIRED_USE} )
+	qt5? ( X rendering )
+	tk? ( X rendering python )
+	web? ( python )
+"
+
+RDEPEND="
+	app-arch/lz4
+	app-arch/xz-utils
+	dev-db/sqlite
+	dev-cpp/eigen[cuda?,openmp?]
+	dev-libs/double-conversion:=
+	dev-libs/expat
+	dev-libs/icu:=
+	dev-libs/libxml2:2
+	dev-libs/pugixml
+	media-libs/freetype
+	media-libs/libogg
+	media-libs/libpng
+	media-libs/libtheora
+	media-libs/tiff
+	<sci-libs/hdf5-1.12:=[mpi=]
+	sci-libs/kissfft[openmp?]
+	sci-libs/netcdf:=[mpi=]
+	sys-libs/zlib
+	virtual/jpeg
+	all-modules? ( sci-geosciences/liblas[gdal] )
+	boost? ( dev-libs/boost:=[mpi?] )
+	cuda? ( dev-util/nvidia-cuda-toolkit:= )
+	ffmpeg? ( media-video/ffmpeg:= )
+	gdal? ( sci-libs/gdal:= )
+	java? ( >=virtual/jdk-1.8:* )
+	json? ( dev-libs/jsoncpp:= )
+	mpi? (
+		sci-libs/h5part
+		sys-cluster/openmpi[cxx,romio]
+	)
+	mysql? ( dev-db/mariadb-connector-c )
+	odbc? ( dev-db/unixODBC )
+	offscreen? ( media-libs/mesa[osmesa] )
+	postgres? ( dev-db/postgresql:= )
+	python? ( ${PYTHON_DEPS} )
+	qt5? (
+		dev-qt/qtcore:5
+		dev-qt/qtsql:5
+		dev-qt/qtwidgets:5
+	)
+	rendering? (
+		media-libs/freeglut
+		media-libs/glew:=
+		sci-libs/proj:=
+		virtual/opengl
+		x11-libs/gl2ps
+	)
+	tbb? ( <dev-cpp/tbb-2022 )
+	tk? ( dev-lang/tk:= )
+	video_cards_nvidia? ( x11-drivers/nvidia-drivers[tools,static-libs] )
+	views? (
+		x11-libs/libICE
+		x11-libs/libXext
+	)
+	web? ( ${WEBAPP_DEPEND} )
+	$(python_gen_cond_dep '
+		python? (
+			boost? ( dev-libs/boost:=[mpi?,python?,${PYTHON_USEDEP}] )
+			gdal? ( sci-libs/gdal:=[python?,${PYTHON_USEDEP}] )
+			mpi? ( dev-python/mpi4py[${PYTHON_USEDEP}] )
+		)
+	')
+"
+DEPEND="
+	${RDEPEND}
+	dev-libs/jsoncpp
+	dev-libs/utfcpp
+	pegtl? ( dev-libs/pegtl )
+"
+BDEPEND="
+	mpi? ( app-admin/chrpath )
+	openmp? (
+		|| (
+			sys-devel/gcc[openmp(+)]
+			sys-devel/clang-runtime[openmp(+)]
+		)
+	)
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-9.0.1-0001-fix-kepler-compute_arch-if-CUDA-toolkit-11-is-used.patch
+	"${FILESDIR}"/${PN}-8.2.0-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch
+	"${FILESDIR}"/${PN}-9.0.1-limits-include-gcc11.patch
+	"${FILESDIR}"/${P}-TBB-2021.04-fix.patch
+	"${FILESDIR}"/${P}-proj-api-fix-upstream-commit-03256388.patch
+	"${FILESDIR}"/${P}-pegtl-3.patch
+	"${FILESDIR}"/${P}-cuda-11.5.0.patch
+	"${FILESDIR}"/${P}-fix-gcc10-return-local-addr-in-wrappers-upstream-commit-55c74ed3.patch
+	"${FILESDIR}"/${P}-use-std-atomic-part1.patch
+	"${FILESDIR}"/${P}-use-std-atomic-part2.patch
+	"${FILESDIR}"/${P}-tbb-fix-for-bundled-vtkm.patch
+)
+
+DOCS=( CONTRIBUTING.md README.md )
+
+CHECKREQS_DISK_BUILD="3G"
+
+pkg_pretend() {
+	if use examples; then
+		CHECKREQS_DISK_BUILD="4G"
+	fi
+	if use cuda; then
+		# NOTE: This should actually equal to (number of build jobs)*7G,
+		# as any of the cuda compile tasks can take up 7G!
+		# 10.2 GiB install directory, 6.4 GiB build directory with max. USE flags
+		CHECKREQS_MEMORY="7G"
+		CHECKREQS_DISK_BUILD="14G"
+	fi
+	check-reqs_pkg_setup
+}
+
+pkg_setup() {
+	if use examples; then
+		CHECKREQS_DISK_BUILD="4G"
+	fi
+	if use cuda; then
+		CHECKREQS_MEMORY="7G"
+		CHECKREQS_DISK_BUILD="14G"
+	fi
+	check-reqs_pkg_setup
+
+	use java && java-pkg-opt-2_pkg_setup
+	use python && python-single-r1_pkg_setup
+	use web && webapp_pkg_setup
+}
+
+src_prepare() {
+	# If we have system libraries available use these and delete
+	# the respecting files in ${S}/ThirdParty to save some space.
+	# Note: libharu is omitted: vtk needs an updated version (2.4.0)
+	# Note: no valid xdmf2 targets are found for system xdmf2
+	# Note: no valid target found for h5part and mpi4py
+	# TODO: diy2 exodusII h5part libharu verdict vpic vtkm xdmf2 xdmf3 zfp
+	local -a DROPS=( doubleconversion eigen expat freetype gl2ps glew
+		hdf5 jpeg jsoncpp libproj libxml2 lz4 lzma netcdf ogg png pugixml
+		sqlite theora tiff utf8 zlib )
+	use pegtl && DROPS+=( pegtl )
+
+	local x
+	for x in ${DROPS[@]}; do
+		ebegin "Dropping bundled ${x}"
+		rm -r ThirdParty/${x}/vtk${x} || die
+		eend $?
+	done
+	unset x
+
+	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 cuda; then
+		cuda_add_sandbox -w
+		cuda_src_prepare
+	fi
+
+	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 ../../VTK-${PV}/.ExternalData/README.rst . || die
+		ln -sf ../../VTK-${PV}/.ExternalData/SHA512 . || die
+		popd >/dev/null || die
+		eend "$?"
+	fi
+}
+
+src_configure() {
+	local mycmakeargs=(
+# TODO: defaults for some variables to consider as USE flags
+#		-DVTK_ANDROID_BUILD=OFF
+#		-DVTK_BUILD_COMPILE_TOOLS_ONLY=OFF
+#		-DVTK_ENABLE_LOGGING=ON
+#		-DVTK_ENABLE_REMOTE_MODULES=ON
+#		-DVTK_INSTALL_SDK=ON
+#		-DVTK_IOS_BUILD=OFF
+#		-DVTK_LEGACY_REMOVE=OFF
+#		-DVTK_LEGACY_SILENT=OFF
+#		-DVTK_WHEEL_BUILD=OFF
+
+		-DVTK_BUILD_ALL_MODULES=$(usex all-modules ON OFF)
+		# we use the pre-built documentation and install these with USE=doc
+		-DVTK_BUILD_DOCUMENTATION=OFF
+		-DVTK_BUILD_EXAMPLES=$(usex examples ON OFF)
+
+		-DVTK_ENABLE_KITS=$(usex kits ON OFF)
+		# default to ON: USE flag for this?
+		-DVTK_ENABLE_REMOTE_MODULES=OFF
+
+		-DVTK_DATA_STORE="${S}/.ExternalData"
+
+		# Use upstream default, where USE flags are not given.
+		# Passing "DONT_WANT" will restrict building of modules from
+		# those groups and will severly limit the built libraries.
+		# Exceptions are MPI, where the default is "DONT_WANT" and
+		# StandAlone using "WANT".
+		-DVTK_GROUP_ENABLE_Imaging=$(usex imaging "WANT" "DEFAULT")
+		-DVTK_GROUP_ENABLE_Qt=$(usex qt5 "WANT" "DEFAULT")
+		-DVTK_GROUP_ENABLE_Rendering=$(usex rendering "WANT" "DEFAULT")
+		-DVTK_GROUP_ENABLE_StandAlone="WANT"
+		-DVTK_GROUP_ENABLE_Views=$(usex views "WANT" "DEFAULT")
+		-DVTK_GROUP_ENABLE_Web=$(usex web "WANT" "DEFAULT")
+
+		-DVTK_MODULE_ENABLE_VTK_vtkm="WANT"
+		-DVTK_MODULE_ENABLE_VTK_AcceleratorsVTKm="WANT"
+
+		-DVTK_PYTHON_VERSION="3"
+		-DVTK_RELOCATABLE_INSTALL=ON
+
+		-DVTK_USE_CUDA=$(usex cuda ON OFF)
+		# use system libraries where possible
+		-DVTK_USE_EXTERNAL=ON
+		-DVTK_USE_MPI=$(usex mpi ON OFF)
+		-DVTK_USE_TK=$(usex tk ON OFF)
+		-DVTK_USE_X=$(usex X ON OFF)
+
+		-DVTK_VERSIONED_INSTALL=ON
+
+		-DVTK_WRAP_JAVA=$(usex java ON OFF)
+		-DVTK_WRAP_PYTHON=$(usex python ON OFF)
+	)
+
+	if use examples || use test; then
+		mycmakeargs+=( -DVTK_USE_LARGE_DATA=ON )
+	fi
+
+	if ! use java && ! use python; then
+		# defaults to ON
+		mycmakeargs+=( -DVTK_ENABLE_WRAPPING=OFF )
+	fi
+
+	if use boost; then
+		mycmakeargs+=(
+			-DVTK_MODULE_ENABLE_VTK_InfovisBoost="WANT"
+			-DVTK_MODULE_ENABLE_VTK_InfovisBoostGraphAlgorithms="WANT"
+		)
+	fi
+
+	if use cuda; then
+		local cuda_arch=
+		case ${VTK_CUDA_ARCH:-native} in
+			# we ignore fermi arch, because current nvidia-cuda-toolkit-11*
+			# no longer supports it
+			kepler|maxwell|pascal|volta|turing|ampere|all)
+				cuda_arch=${VTK_CUDA_ARCH}
+				;;
+			native)
+				ewarn "If auto detection fails for you, please try and export the"
+				ewarn "VTK_CUDA_ARCH environment variable to one of the common arch"
+				ewarn "names: kepler, maxwell, pascal, volta, turing, ampere or all."
+				cuda_arch=native
+				;;
+			*)
+				eerror "Please properly set the VTK_CUDA_ARCH environment variable to"
+				eerror "one of: kepler, maxwell, pascal, volta, turing, ampere, all"
+				die "Invalid CUDA architecture given: '${VTK_CUDA_ARCH}'!"
+				;;
+		esac
+		ewarn "Using CUDA architecture '${cuda_arch}'"
+
+		mycmakeargs+=( -DVTKm_CUDA_Architecture=${cuda_arch} )
+	fi
+
+	if use ffmpeg; then
+		mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_IOFFMPEG="WANT" )
+	fi
+
+	if use gdal; then
+		mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_GeovisGDAL="WANT" )
+	fi
+
+	if use java; then
+		mycmakeargs+=(
+			-DCMAKE_INSTALL_JARDIR="share/${PN}"
+			-DVTK_ENABLE_WRAPPING=ON
+		)
+	fi
+
+	if use json; then
+		mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_IOGeoJSON="WANT" )
+	fi
+
+	if use mpi; then
+		mycmakeargs+=(
+			-DVTK_GROUP_ENABLE_MPI="WANT"
+			-DVTK_MODULE_ENABLE_VTK_IOH5part="WANT"
+			-DVTK_MODULE_ENABLE_VTK_IOParallel="WANT"
+			-DVTK_MODULE_ENABLE_VTK_IOParallelNetCDF="WANT"
+			-DVTK_MODULE_ENABLE_VTK_IOParallelXML="WANT"
+			-DVTK_MODULE_ENABLE_VTK_ParallelMPI="WANT"
+			-DVTK_MODULE_ENABLE_VTK_RenderingParallel="WANT"
+			-DVTK_MODULE_ENABLE_VTK_h5part="WANT"
+			-DVTKm_ENABLE_MPI=ON
+		)
+		if use python; then
+			mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_ParallelMPI4Py="WANT" )
+		fi
+	fi
+
+	if use mysql; then
+		mycmakeargs+=(
+			-DVTK_MODULE_ENABLE_VTK_IOMySQL="WANT"
+			-DVTK_MODULE_ENABLE_VTK_IOSQL="WANT"
+		)
+	fi
+
+	if use odbc; then
+		mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_IOODBC="WANT" )
+	fi
+
+	if use offscreen; then
+		mycmakeargs+=(
+			-DVTK_OPENGL_HAS_OSMESA=ON
+			-DVTK_DEFAULT_RENDER_WINDOW_OFFSCREEN=ON
+			-DVTK_DEFAULT_RENDER_WINDOW_HEADLESS=ON
+		)
+	fi
+
+	if use openmp; then
+		if use tbb; then
+			einfo "NOTE: You have specified both openmp and tbb USE flags."
+			einfo "NOTE: Tbb will take precedence. Disabling OpenMP"
+			# Sequential is default SMP implementation, nothing special to do
+		else
+			mycmakeargs+=(
+				-DVTK_SMP_IMPLEMENTATION_TYPE="OpenMP"
+				-DVTKm_ENABLE_OPENMP=ON
+			)
+		fi
+	fi
+
+	if use pegtl; then
+		mycmakeargs+=( -DVTK_MODULE_USE_EXTERNAL_VTK_pegtl=ON )
+	else
+		mycmakeargs+=( -DVTK_MODULE_USE_EXTERNAL_VTK_pegtl=OFF )
+	fi
+
+	if use postgres; then
+		mycmakeargs+=(
+			-DVTK_MODULE_ENABLE_VTK_IOPostgreSQL="WANT"
+			-DVTK_MODULE_ENABLE_VTK_IOSQL="WANT"
+		)
+	fi
+
+	if use python; then
+		mycmakeargs+=(
+			-DVTK_ENABLE_WRAPPING=ON
+			-DPython3_EXECUTABLE="${PYTHON}"
+			-DVTK_PYTHON_SITE_PACKAGES_SUFFIX="lib/${EPYTHON}/site-packages"
+		)
+	fi
+
+	if use qt5; then
+		mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_GUISupportQt="WANT" )
+		if use mysql || use postgres; then
+			mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_GUISupportQtSQL="WANT" )
+		fi
+		if use rendering; then
+			mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_RenderingQt="WANT" )
+		fi
+		if use views; then
+			mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_ViewsQt="WANT" )
+		fi
+	fi
+
+	if use rendering || use web || use all-modules; then
+		# needs patched version
+		mycmakeargs+=( -DVTK_MODULE_USE_EXTERNAL_VTK_libharu=OFF )
+	fi
+
+	if use rendering; then
+		mycmakeargs+=(
+			-DVTK_MODULE_ENABLE_VTK_IOExportGL2PS="WANT"
+			-DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps=ON
+			-DVTK_MODULE_USE_EXTERNAL_VTK_glew=ON
+			-DVTK_MODULE_USE_EXTERNAL_VTK_libproj=ON
+		)
+	fi
+
+	if use tbb; then
+		mycmakeargs+=(
+			-DVTK_SMP_IMPLEMENTATION_TYPE="TBB"
+			-DVTKm_ENABLE_TBB=ON
+		)
+	fi
+
+	if use test; then
+		ewarn "Testing requires VTK_FORBID_DOWNLOADS=OFF by upstream."
+		ewarn "Care has been taken to pre-download all required files."
+		ewarn "In case you find missing files, please inform me."
+		mycmakeargs+=(
+			-DVTK_BUILD_TESTING=ON
+			-DVTK_DATA_EXCLUDE_FROM_ALL=ON
+			-DVTK_FORBID_DOWNLOADS=OFF
+		)
+	else
+		mycmakeargs+=(
+			-DVTK_BUILD_TESTING=OFF
+			-DVTK_FORBID_DOWNLOADS=ON
+		)
+	fi
+
+	if use theora; then
+		mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_IOOggTheora="WANT" )
+	fi
+
+	if use all-modules; then
+		mycmakeargs+=(
+			-DVTK_ENABLE_OSPRAY=OFF
+			-DVTK_MODULE_ENABLE_VTK_DomainsMicroscopy="DONT_WANT"
+			-DVTK_MODULE_ENABLE_VTK_FiltersOpenTURNS="DONT_WANT"
+			-DVTK_MODULE_ENABLE_VTK_IOADIOS2="DONT_WANT"
+			-DVTK_MODULE_ENABLE_VTK_IOPDAL="DONT_WANT"
+			-DVTK_MODULE_ENABLE_VTK_MomentInvariants="DONT_WANT"
+			-DVTK_MODULE_ENABLE_VTK_PoissonReconstruction="DONT_WANT"
+			-DVTK_MODULE_ENABLE_VTK_Powercrust="DONT_WANT"
+			-DVTK_MODULE_ENABLE_VTK_RenderingOpenVR="DONT_WANT"
+			-DVTK_MODULE_ENABLE_VTK_SignedTensor="DONT_WANT"
+			-DVTK_MODULE_ENABLE_VTK_SplineDrivenImageSlicer="DONT_WANT"
+			-DVTK_MODULE_ENABLE_VTK_vtkDICOM="DONT_WANT"
+			-DVTK_MODULE_USE_EXTERNAL_vtkkissfft=ON
+		)
+	fi
+
+	use java && export JAVA_HOME="${EPREFIX}/etc/java-config-2/current-system-vm"
+
+	if use mpi; then
+		export CC=mpicc
+		export CXX=mpicxx
+		export FC=mpif90
+		export F90=mpif90
+		export F77=mpif77
+	fi
+
+	cmake_src_configure
+}
+
+src_test() {
+	nonfatal virtx cmake_src_test
+}
+
+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
+
+	# with MPI runpath's are not deleted properly
+	if use mpi; then
+		chrpath -d "${ED}"/usr/$(get_libdir)/*.so.${PV} || die
+	fi
+
+	use python && python_optimize
+
+	# environment
+	cat >> "${T}"/40${PN} <<- EOF || die
+		VTK_DATA_ROOT=${EPREFIX}/usr/share/${PN}/data
+		VTK_DIR=${EPREFIX}/usr/$(get_libdir)/${PN}
+		VTKHOME=${EPREFIX}/usr
+		EOF
+	doenvd "${T}"/40${PN}
+
+	use web && webapp_src_install
+
+	# Temporary!
+	# Avoid collision with paraview.
+	# bug #793221
+	rm -rf "${ED}"/usr/share/vtkm-1.5/VTKm{LICENSE.txt,README.md} || die
+}
+
+# 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
+}


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/vtk/, sci-libs/vtk/files/
@ 2022-02-21 23:24 Sam James
  0 siblings, 0 replies; 19+ messages in thread
From: Sam James @ 2022-02-21 23:24 UTC (permalink / raw
  To: gentoo-commits

commit:     1a1324aa105beed8878503f55dd6783255127de0
Author:     Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net>
AuthorDate: Thu Jan 20 16:55:55 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Feb 21 23:23:29 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a1324aa

sci-libs/vtk: drop 8.2.0

Only one package, sci-libs/oce, which is masked for last-riting, depends
on this version.
Won't build with ffmpeg-5.

Bug: https://bugs.gentoo.org/831595
Bug: https://bugs.gentoo.org/832625
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net>
Closes: https://github.com/gentoo/gentoo/pull/23886
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-libs/vtk/Manifest                              |   4 -
 .../files/vtk-8.1.0-openmpi-4-compatibility.patch  |  14 -
 ...01-fix-library-installation-dir-for-xdmf3.patch |  57 ----
 sci-libs/vtk/files/vtk-8.2.0-fno-common.patch      |  40 ---
 sci-libs/vtk/files/vtk-8.2.0-gcc-10.patch          |  16 -
 sci-libs/vtk/files/vtk-8.2.0-pugixml.patch         |  12 -
 sci-libs/vtk/files/vtk-8.2.0-py38.patch            | 175 ----------
 sci-libs/vtk/files/vtk-8.2.0-qt-5.15.patch         |  37 --
 sci-libs/vtk/metadata.xml                          |   1 -
 sci-libs/vtk/vtk-8.2.0-r6.ebuild                   | 375 ---------------------
 10 files changed, 731 deletions(-)

diff --git a/sci-libs/vtk/Manifest b/sci-libs/vtk/Manifest
index d345d4831ee0..52b37377441f 100644
--- a/sci-libs/vtk/Manifest
+++ b/sci-libs/vtk/Manifest
@@ -1,14 +1,10 @@
-DIST VTK-8.2.0.tar.gz 35511819 BLAKE2B 908ed9377d75da6d0bd84de0078ba90a1e9396fcc906ca2981102e2c79d9d3ba4b1297f98682cd2802c7c04f9dbec32ee70740e645c44180befd765f7cda34a6 SHA512 521bd4dabedbc24b0e80a314a34ecd7554b04af28a7973245e3a9cf99a09b995d1b8ac42305c8e53369f226a0a6da3cdb29105ba2c90b46492736ef717760286
 DIST VTK-9.0.3.tar.gz 34684378 BLAKE2B 6862ab2df95bbefe9d3970757af6521cfa874476f6ee8e64c4e6e279f2e0cbb8a8299bc3b0b8bb9b7254d01a169644e7927b67b11b2ce934ddc87bce0a9e4c26 SHA512 00528011f9206444d09fc6cea05c46930745bb70ea02be6244ab3eb510ae82af772157c025157b1761dc4c6a9ab538b57f814c03a708f30aa3598a421fdc6ae2
 DIST VTK-9.1.0.tar.gz 47871165 BLAKE2B 68cebc0879737a519b53e73f198356208b047c301d38ee2d62b9a14539cdb9aa76bd7174baa29592c7b1cfd1cc9700d01e98519a207d67a232d16ad37295ac31 SHA512 b2c4be8795fa082e0776e6ffdb9a3fd88dbb235841a8369a34ebe26cf4c5fcb1610fcca987be314510629da3edc74ee76c0ce2cc88d5ef4b099ac550ac892b0a
-DIST VTKData-8.2.0.tar.gz 304287875 BLAKE2B 0292d84be40e11203326dcb1bf45f4a6ad2a785968130d4868a230f1cfbdcb600d0c03d4dae3519e2737dc7a964f29c51500c91b3da4291069608dd80a2bce45 SHA512 517d0f6dfdb0c61f59df933f06d3a28c8a48ea684aaff311456213fe493e2a20128886144325fc4edfa376b2d375a2dae6c60ad6e3d5d2f4a7b0ac1d8545c87b
 DIST VTKData-9.0.3.tar.gz 413854066 BLAKE2B 84c2fa0ae5df8567cc06022262fe3ea1202c553168757c94aa4a0a258360deccdf349d474c2f6585fc2054ee8e0468df4c80ec835cecf6b2391efa639f479eaa SHA512 28ab2ecb32860d820f736e9ceb4345bcd03471f0a35b90f8c9ccbe05454f7a95a4de3c99bae2f4b9db87a27ef8fe50159cd283f5e921f4e6e69b06a50a0570c6
 DIST VTKData-9.1.0.tar.gz 590185633 BLAKE2B 7451d57bc507571afa8a8f9ba541010e1924849759f228318b6390aabb07a68341b84b38b82cd504844194544c569b040c9fad1858e6e35e172e4e18000d338e SHA512 134a8dd2b029d3a4959b601987e68a0caa5d050532655b6786b5b67dfc77d3639628b2b957511f8998e63864c247c501a11a6aed248c762f13e860d878778e1a
 DIST VTKDataFiles-9.1.0.tar.gz 605163184 BLAKE2B 968e2fed1e17bb57da4f8dd38e17e128779e50dfce81fc31c6ef75a2f3fe46675dd77ab7343b609998b8ddd3927e256d1ea4117c2719ad76f61db435b5f1c34f SHA512 f56ebd087753e2d2805e2f5954197de4e9933ec90648956780525d83149277a7bca42ce376c4355a53fca71ec78510fed155955af71b70e1b26de27851252e36
-DIST VTKLargeData-8.2.0.tar.gz 247522878 BLAKE2B 68dc90548604fbbb8419f2b400aea5d26599b48208b4104f41eaa90f99483689cd928cb00e3a7def396d65db2f03c9294d132854a27af74f66eb118c8319c4ce SHA512 8a7ea3d5870b1e4ccb31c77b4c270d00208349da1b2938e957210db3ec1449b678c66edc2faee1d4514aca6d725f642abc91e10ab0c151f6743cad1c53485588
 DIST VTKLargeData-9.0.3.tar.gz 247523270 BLAKE2B f4011292957454da5d8c9e515bcd0972af4299cef3928098d745be96559a1e0080297871c6e11fdd98498c8786a30a6674bc650368adcbcdbc6260e0938d21a1 SHA512 ebd6cb5f2935b77961dd68d0c0da2ea5ab900cec8c2eb641c785a604c65702e40a3e44d32bf3f2acfce9ec28dd89f41bf29f93a4f89d5b36c713f3743d7125b1
 DIST VTKLargeData-9.1.0.tar.gz 247517666 BLAKE2B 1b47829ad51f246ff26c8b6d16c9fa431e53ca33fec99e8aa78ee156a82e4b3351e32ee36674d9d345f346efad085ae1e2d3186a144911d2210a31a259e69f1f SHA512 0760dfd4e92bbfec10fec9d783f548a8ca5464b1a1744dfa575d4ed4592756335dbfcf28249d2da964aa6b41933ff1ac98458e4a32484ee4bb91b5e7cfaa78c9
 DIST VTKLargeDataFiles-9.1.0.tar.gz 247504557 BLAKE2B a05892347a1a5cf5cb0df3f1c1d94efcdb68c28bcd0391617602565fddc4277ac44accec6f1b3ae2822a860f3d5f5642a56e36171b5d81bef137561182051d08 SHA512 10abc287256c7ec5fb7114f4054eda5cde1b75a8d2bbe70375fb96d31b7c4164be936489ce2fc9b5c33225f494d9b7f5f7bed648828661b17d6f66acb70eeddc
-DIST vtkDocHtml-8.2.0.tar.gz 132516675 BLAKE2B 8651a3793f3326dee36c5ae8a280b00943067f973115697f34770eefd42b5534a7d7e439e7745b32c5fa83daf5a5292b854792d18951af236d0aa77c3aa2b564 SHA512 45e198bde82948d1d8e47a8bdb64a2792c2bfdfc0d939ffe40ded79092d7ac5f497008c00c805baa09d27eabb419cdf0787eee1caf2ac44c5e8759ecf709a317
 DIST vtkDocHtml-9.0.3.tar.gz 132650096 BLAKE2B 45fc1a6942df3e79e500a552c3b3cda2099b9451191559d471e3a2e785a8c52b2c6273cfd2cc4a3f3f65582e607d9414475f58d243fde96a4f985bed479e53db SHA512 9b5fef43f3c2b92aa1fe6a9ba9458d6677874b09b167654db7f26df6feffdc34ed1a8fb4e59d64b75625063a774af77fe57f275903602a5f7daa74e1a2e71800
 DIST vtkDocHtml-9.1.0.tar.gz 152767166 BLAKE2B 9163b6b1bf55810a310ca8bc211e067827b1f9907efd2a378363d8e6296d4bf07b25371b66c00cab3576fb06f0cb63fdf2ffea044033e2c42e9087819a3736ba SHA512 036daba5eb6503b5eb3e9323a4ab3ea0f27c09d8fef411dd2ed154c24d5a37d9f19d57db07576c8af404bfdb7178e95b137a3c27bfedb3f9cb72c04f717da80a

diff --git a/sci-libs/vtk/files/vtk-8.1.0-openmpi-4-compatibility.patch b/sci-libs/vtk/files/vtk-8.1.0-openmpi-4-compatibility.patch
deleted file mode 100644
index 267c1d91b0cb..000000000000
--- a/sci-libs/vtk/files/vtk-8.1.0-openmpi-4-compatibility.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/ThirdParty/mpi4py/vtkmpi4py/src/lib-mpi/config/openmpi.h b/ThirdParty/mpi4py/vtkmpi4py/src/lib-mpi/config/openmpi.h
-index 3173831..e8ee74b 100644
---- a/ThirdParty/mpi4py/vtkmpi4py/src/lib-mpi/config/openmpi.h
-+++ b/ThirdParty/mpi4py/vtkmpi4py/src/lib-mpi/config/openmpi.h
-@@ -141,4 +141,9 @@
- 
- #endif
- 
-+ #if OMPI_NUMVERSION >= 40000
-+ #undef  PyMPI_HAVE_MPI_LB
-+ #undef  PyMPI_HAVE_MPI_UB
-+ #endif /* OMPI >= 4.0.0 */
-+
- #endif /* !PyMPI_CONFIG_OPENMPI_H */

diff --git a/sci-libs/vtk/files/vtk-8.2.0-0001-fix-library-installation-dir-for-xdmf3.patch b/sci-libs/vtk/files/vtk-8.2.0-0001-fix-library-installation-dir-for-xdmf3.patch
deleted file mode 100644
index d03cab326f4f..000000000000
--- a/sci-libs/vtk/files/vtk-8.2.0-0001-fix-library-installation-dir-for-xdmf3.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 3aad9ec6004b7e3a82817f2f1e2840fc5f07c050 Mon Sep 17 00:00:00 2001
-From: Bernd Waibel <waebbl-gentoo@posteo.net>
-Date: Thu, 3 Jun 2021 13:13:38 +0200
-Subject: [PATCH] fix library installation dir for xdmf3
-
-Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
----
- ThirdParty/xdmf3/vtkxdmf3/core/CMakeLists.txt | 14 +++++++-------
- 1 file changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/ThirdParty/xdmf3/vtkxdmf3/core/CMakeLists.txt b/ThirdParty/xdmf3/vtkxdmf3/core/CMakeLists.txt
-index 86d688f8..7d009dfe 100644
---- a/ThirdParty/xdmf3/vtkxdmf3/core/CMakeLists.txt
-+++ b/ThirdParty/xdmf3/vtkxdmf3/core/CMakeLists.txt
-@@ -269,10 +269,10 @@ endif()
- 
- if(UNIX)
-     if (BUILD_SHARED_LIBS)
--      set(XDMFCORE_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib/libXdmfCore.so
-+      set(XDMFCORE_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/libXdmfCore.so
-           PARENT_SCOPE)
-     else()
--      set(XDMFCORE_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib/libXdmfCore.a
-+      set(XDMFCORE_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/libXdmfCore.a
-           PARENT_SCOPE)
-     endif()
- endif()
-@@ -297,13 +297,13 @@ if (NOT XDMF_INSTALL_NO_DEVELOPMENT)
- endif()
- install(TARGETS XdmfCore
-   RUNTIME DESTINATION bin
--  LIBRARY DESTINATION lib
--  ARCHIVE DESTINATION lib)
-+  LIBRARY DESTINATION lib${LIB_SUFFIX}
-+  ARCHIVE DESTINATION lib${LIB_SUFFIX})
- if (XDMF_STATIC_AND_SHARED AND BUILD_SHARED_LIBS)
-   install(TARGETS XdmfCore_Static
-     RUNTIME DESTINATION bin
--    LIBRARY DESTINATION lib
--    ARCHIVE DESTINATION lib)
-+    LIBRARY DESTINATION lib${LIB_SUFFIX}
-+    ARCHIVE DESTINATION lib${LIB_SUFFIX})
- endif ()
- 
- if (Boost_FOUND)
-@@ -329,7 +329,7 @@ set(XdmfCore_INCLUDE_DIRS
-   CACHE INTERNAL "")
- 
- set(XDMF_INCLUDE_DIRS ${CMAKE_INSTALL_PREFIX}/include PARENT_SCOPE)
--set(XDMF_LIBRARIES ${XDMF_LIBRARIES} ${CMAKE_INSTALL_PREFIX}/lib)
-+set(XDMF_LIBRARIES ${XDMF_LIBRARIES} ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
- set(XDMF_DIR ${CMAKE_INSTALL_PREFIX} PARENT_SCOPE)
- set(XDMF_BINARIES ${XDMF_BINARIES} ${CMAKE_INSTALL_PREFIX}/bin)
- 
--- 
-2.31.1
-

diff --git a/sci-libs/vtk/files/vtk-8.2.0-fno-common.patch b/sci-libs/vtk/files/vtk-8.2.0-fno-common.patch
deleted file mode 100644
index d7268ef7566b..000000000000
--- a/sci-libs/vtk/files/vtk-8.2.0-fno-common.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From a9079bdccbb2165583d6773a5ed848427e2a38a8 Mon Sep 17 00:00:00 2001
-From: Seacas Upstream <kwrobot@kitware.com>
-Date: Tue, 28 Jan 2020 09:13:38 -0500
-Subject: [PATCH] exodusII 2020-01-28 (d97eb08d)
-
-Code extracted from:
-
-    https://gitlab.kitware.com/third-party/seacas.git
-
-at commit d97eb08d79e87c82facfae39bc75deb60c0a2d83 (for/vtk-20200128-7.24f-v2019-12-18).
----
- ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c | 2 +-
- ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c   | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c b/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c
-index 8d5d6734f0..ef439618da 100644
---- a/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c
-+++ b/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c
-@@ -216,5 +216,5 @@ int ex_create_par_int(const char *path, int cmode, int *comp_ws, int *io_ws, MPI
-  * Prevent warning in some versions of ranlib(1) because the object
-  * file has no symbols.
-  */
--const char exodus_unused_symbol_dummy_1;
-+const char exodus_unused_symbol_dummy_ex_create_par;
- #endif
-diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c b/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c
-index b2faa22c29..9df4818767 100644
---- a/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c
-+++ b/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c
-@@ -459,5 +459,5 @@ int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float
-  * Prevent warning in some versions of ranlib(1) because the object
-  * file has no symbols.
-  */
--const char exodus_unused_symbol_dummy_1;
-+const char exodus_unused_symbol_dummy_ex_open_par;
- #endif
--- 
-2.26.2
-

diff --git a/sci-libs/vtk/files/vtk-8.2.0-gcc-10.patch b/sci-libs/vtk/files/vtk-8.2.0-gcc-10.patch
deleted file mode 100644
index a903b0375304..000000000000
--- a/sci-libs/vtk/files/vtk-8.2.0-gcc-10.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/CMake/VTKGenerateExportHeader.cmake  2020-05-24 14:33:12.154603698 -0600
-+++ b/CMake/VTKGenerateExportHeader.cmake  2020-05-24 14:33:34.864603776 -0600
-@@ -174,8 +174,12 @@
-     execute_process(COMMAND ${CMAKE_C_COMPILER} --version
-       OUTPUT_VARIABLE _gcc_version_info
-       ERROR_VARIABLE _gcc_version_info)
--    string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*"
-+    string(REGEX MATCH "[1-9][0-9]\\.[0-9]\\.[0-9]*"
-       _gcc_version "${_gcc_version_info}")
-+    if(NOT _gcc_version)
-+      string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*"
-+        _gcc_version "${_gcc_version_info}")
-+    endif()
-     # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
-     # patch level, handle this here:
-     if(NOT _gcc_version)
\ No newline at end of file

diff --git a/sci-libs/vtk/files/vtk-8.2.0-pugixml.patch b/sci-libs/vtk/files/vtk-8.2.0-pugixml.patch
deleted file mode 100644
index d890f696388d..000000000000
--- a/sci-libs/vtk/files/vtk-8.2.0-pugixml.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-https://bugs.gentoo.org/758611
---- a/IO/CityGML/CMakeLists.txt
-+++ b/IO/CityGML/CMakeLists.txt
-@@ -5,7 +5,4 @@ vtk_module_library(vtkIOCityGML ${Module_SRCS})
- if(VTK_USE_SYSTEM_PUGIXML AND NOT pugixml_INCLUDE_DIRS)
-   find_package(pugixml REQUIRED)
--  get_target_property(pugixml_INCLUDE_DIRS pugixml INTERFACE_INCLUDE_DIRECTORIES)
--  get_target_property(pugixml_LIBRARIES pugixml LOCATION)
--  include_directories(${pugixml_INCLUDE_DIRS})
--  vtk_module_link_libraries(vtkIOCityGML LINK_PRIVATE ${pugixml_LIBRARIES})
-+  vtk_module_link_libraries(vtkIOCityGML LINK_PRIVATE pugixml::pugixml)
- endif()

diff --git a/sci-libs/vtk/files/vtk-8.2.0-py38.patch b/sci-libs/vtk/files/vtk-8.2.0-py38.patch
deleted file mode 100644
index c4c235dafd3f..000000000000
--- a/sci-libs/vtk/files/vtk-8.2.0-py38.patch
+++ /dev/null
@@ -1,175 +0,0 @@
-From 257b9d7b18d5f3db3fe099dc18f230e23f7dfbab Mon Sep 17 00:00:00 2001
-From: David Gobbi <david.gobbi@gmail.com>
-Date: Tue, 20 Aug 2019 17:02:24 -0600
-Subject: [PATCH] Compatibility for Python 3.8
-
-The PyTypeObject struct was modified in Python 3.8, this change is
-required to avoid compile errors.
----
- .../PythonInterpreter/vtkPythonStdStreamCaptureHelper.h   | 6 ++++++
- Wrapping/PythonCore/PyVTKMethodDescriptor.cxx             | 2 +-
- Wrapping/PythonCore/PyVTKNamespace.cxx                    | 2 +-
- Wrapping/PythonCore/PyVTKReference.cxx                    | 8 ++++----
- Wrapping/PythonCore/PyVTKTemplate.cxx                     | 2 +-
- Wrapping/PythonCore/vtkPythonCompatibility.h              | 8 +++++++-
- Wrapping/Tools/vtkWrapPythonClass.c                       | 2 +-
- Wrapping/Tools/vtkWrapPythonEnum.c                        | 2 +-
- Wrapping/Tools/vtkWrapPythonType.c                        | 2 +-
- 9 files changed, 23 insertions(+), 11 deletions(-)
-
-diff --git a/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h b/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h
-index b1c12c83de..14ccfbe928 100644
---- a/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h
-+++ b/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h
-@@ -140,6 +140,12 @@ static PyTypeObject vtkPythonStdStreamCaptureHelperType = {
- #if PY_VERSION_HEX >= 0x03040000
-   0, // tp_finalize
- #endif
-+#if PY_VERSION_HEX >= 0x03080000
-+  0, // tp_vectorcall
-+#if PY_VERSION_HEX < 0x03090000
-+  0, // tp_print
-+#endif
-+#endif
- };
- 
- static PyObject* vtkWrite(PyObject* self, PyObject* args)
-diff --git a/Wrapping/PythonCore/PyVTKMethodDescriptor.cxx b/Wrapping/PythonCore/PyVTKMethodDescriptor.cxx
-index 2b0d443537..3840038498 100644
---- a/Wrapping/PythonCore/PyVTKMethodDescriptor.cxx
-+++ b/Wrapping/PythonCore/PyVTKMethodDescriptor.cxx
-@@ -186,7 +186,7 @@ PyTypeObject PyVTKMethodDescriptor_Type = {
-   sizeof(PyMethodDescrObject),           // tp_basicsize
-   0,                                     // tp_itemsize
-   PyVTKMethodDescriptor_Delete,          // tp_dealloc
--  nullptr,                               // tp_print
-+  0,                                     // tp_vectorcall_offset
-   nullptr,                               // tp_getattr
-   nullptr,                               // tp_setattr
-   nullptr,                               // tp_compare
-diff --git a/Wrapping/PythonCore/PyVTKNamespace.cxx b/Wrapping/PythonCore/PyVTKNamespace.cxx
-index 71ee2a3516..5cf5bfbe6b 100644
---- a/Wrapping/PythonCore/PyVTKNamespace.cxx
-+++ b/Wrapping/PythonCore/PyVTKNamespace.cxx
-@@ -49,7 +49,7 @@ PyTypeObject PyVTKNamespace_Type = {
-   0,                                     // tp_basicsize
-   0,                                     // tp_itemsize
-   PyVTKNamespace_Delete,                 // tp_dealloc
--  nullptr,                               // tp_print
-+  0,                                     // tp_vectorcall_offset
-   nullptr,                               // tp_getattr
-   nullptr,                               // tp_setattr
-   nullptr,                               // tp_compare
-diff --git a/Wrapping/PythonCore/PyVTKReference.cxx b/Wrapping/PythonCore/PyVTKReference.cxx
-index 943ac71080..b7104091c0 100644
---- a/Wrapping/PythonCore/PyVTKReference.cxx
-+++ b/Wrapping/PythonCore/PyVTKReference.cxx
-@@ -1010,7 +1010,7 @@ PyTypeObject PyVTKReference_Type = {
-   sizeof(PyVTKReference),                // tp_basicsize
-   0,                                     // tp_itemsize
-   PyVTKReference_Delete,                 // tp_dealloc
--  nullptr,                               // tp_print
-+  0,                                     // tp_vectorcall_offset
-   nullptr,                               // tp_getattr
-   nullptr,                               // tp_setattr
-   nullptr,                               // tp_compare
-@@ -1067,7 +1067,7 @@ PyTypeObject PyVTKNumberReference_Type = {
-   sizeof(PyVTKReference),                // tp_basicsize
-   0,                                     // tp_itemsize
-   PyVTKReference_Delete,                 // tp_dealloc
--  nullptr,                               // tp_print
-+  0,                                     // tp_vectorcall_offset
-   nullptr,                               // tp_getattr
-   nullptr,                               // tp_setattr
-   nullptr,                               // tp_compare
-@@ -1124,7 +1124,7 @@ PyTypeObject PyVTKStringReference_Type = {
-   sizeof(PyVTKReference),                // tp_basicsize
-   0,                                     // tp_itemsize
-   PyVTKReference_Delete,                 // tp_dealloc
--  nullptr,                               // tp_print
-+  0,                                     // tp_vectorcall_offset
-   nullptr,                               // tp_getattr
-   nullptr,                               // tp_setattr
-   nullptr,                               // tp_compare
-@@ -1181,7 +1181,7 @@ PyTypeObject PyVTKTupleReference_Type = {
-   sizeof(PyVTKReference),                // tp_basicsize
-   0,                                     // tp_itemsize
-   PyVTKReference_Delete,                 // tp_dealloc
--  nullptr,                               // tp_print
-+  0,                                     // tp_vectorcall_offset
-   nullptr,                               // tp_getattr
-   nullptr,                               // tp_setattr
-   nullptr,                               // tp_compare
-diff --git a/Wrapping/PythonCore/PyVTKTemplate.cxx b/Wrapping/PythonCore/PyVTKTemplate.cxx
-index be200985b3..340fe7953b 100644
---- a/Wrapping/PythonCore/PyVTKTemplate.cxx
-+++ b/Wrapping/PythonCore/PyVTKTemplate.cxx
-@@ -268,7 +268,7 @@ PyTypeObject PyVTKTemplate_Type = {
-   0,                                     // tp_basicsize
-   0,                                     // tp_itemsize
-   nullptr,                               // tp_dealloc
--  nullptr,                               // tp_print
-+  0,                                     // tp_vectorcall_offset
-   nullptr,                               // tp_getattr
-   nullptr,                               // tp_setattr
-   nullptr,                               // tp_compare
-diff --git a/Wrapping/PythonCore/vtkPythonCompatibility.h b/Wrapping/PythonCore/vtkPythonCompatibility.h
-index 4a767844a6..be208faeef 100644
---- a/Wrapping/PythonCore/vtkPythonCompatibility.h
-+++ b/Wrapping/PythonCore/vtkPythonCompatibility.h
-@@ -64,7 +64,13 @@
- #endif
- 
- // PyTypeObject compatibility
--#if PY_VERSION_HEX >= 0x03040000
-+#if PY_VERSION_HEX >= 0x03090000
-+#define VTK_WRAP_PYTHON_SUPPRESS_UNINITIALIZED \
-+  0, 0, 0, 0,
-+#elif PY_VERSION_HEX >= 0x03080000
-+#define VTK_WRAP_PYTHON_SUPPRESS_UNINITIALIZED \
-+  0, 0, 0, 0, 0,
-+#elif PY_VERSION_HEX >= 0x03040000
- #define VTK_WRAP_PYTHON_SUPPRESS_UNINITIALIZED \
-   0, 0, 0,
- #else
-diff --git a/Wrapping/Tools/vtkWrapPythonClass.c b/Wrapping/Tools/vtkWrapPythonClass.c
-index b1e45f8e80..4d558ea081 100644
---- a/Wrapping/Tools/vtkWrapPythonClass.c
-+++ b/Wrapping/Tools/vtkWrapPythonClass.c
-@@ -521,7 +521,7 @@ void vtkWrapPython_GenerateObjectType(
-     "  sizeof(PyVTKObject), // tp_basicsize\n"
-     "  0, // tp_itemsize\n"
-     "  PyVTKObject_Delete, // tp_dealloc\n"
--    "  nullptr, // tp_print\n"
-+    "  0, // tp_vectorcall_offset\n"
-     "  nullptr, // tp_getattr\n"
-     "  nullptr, // tp_setattr\n"
-     "  nullptr, // tp_compare\n"
-diff --git a/Wrapping/Tools/vtkWrapPythonEnum.c b/Wrapping/Tools/vtkWrapPythonEnum.c
-index b933702242..1249362854 100644
---- a/Wrapping/Tools/vtkWrapPythonEnum.c
-+++ b/Wrapping/Tools/vtkWrapPythonEnum.c
-@@ -145,7 +145,7 @@ void vtkWrapPython_GenerateEnumType(
-     "  sizeof(PyIntObject), // tp_basicsize\n"
-     "  0, // tp_itemsize\n"
-     "  nullptr, // tp_dealloc\n"
--    "  nullptr, // tp_print\n"
-+    "  0, // tp_vectorcall_offset\n"
-     "  nullptr, // tp_getattr\n"
-     "  nullptr, // tp_setattr\n"
-     "  nullptr, // tp_compare\n"
-diff --git a/Wrapping/Tools/vtkWrapPythonType.c b/Wrapping/Tools/vtkWrapPythonType.c
-index 744cb1b9d3..0a1375e541 100644
---- a/Wrapping/Tools/vtkWrapPythonType.c
-+++ b/Wrapping/Tools/vtkWrapPythonType.c
-@@ -709,7 +709,7 @@ void vtkWrapPython_GenerateSpecialType(
-     "  sizeof(PyVTKSpecialObject), // tp_basicsize\n"
-     "  0, // tp_itemsize\n"
-     "  Py%s_Delete, // tp_dealloc\n"
--    "  nullptr, // tp_print\n"
-+    "  0, // tp_vectorcall_offset\n"
-     "  nullptr, // tp_getattr\n"
-     "  nullptr, // tp_setattr\n"
-     "  nullptr, // tp_compare\n"
--- 
-2.21.0

diff --git a/sci-libs/vtk/files/vtk-8.2.0-qt-5.15.patch b/sci-libs/vtk/files/vtk-8.2.0-qt-5.15.patch
deleted file mode 100644
index d5a02ca75929..000000000000
--- a/sci-libs/vtk/files/vtk-8.2.0-qt-5.15.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 797f28697d5ba50c1fa2bc5596af626a3c277826 Mon Sep 17 00:00:00 2001
-From: "Andrew J. P. Maclean" <andrew.amaclean@gmail.com>
-Date: Wed, 27 May 2020 15:27:15 +1000
-Subject: [PATCH] Qt 5.15 needs the include file QPainterPath
-
----
- Rendering/Qt/vtkQtLabelRenderStrategy.cxx | 1 +
- Rendering/Qt/vtkQtStringToImage.cxx       | 1 +
- 2 files changed, 2 insertions(+)
-
-diff --git a/Rendering/Qt/vtkQtLabelRenderStrategy.cxx b/Rendering/Qt/vtkQtLabelRenderStrategy.cxx
-index afda585cca..eca65c64cd 100644
---- a/Rendering/Qt/vtkQtLabelRenderStrategy.cxx
-+++ b/Rendering/Qt/vtkQtLabelRenderStrategy.cxx
-@@ -41,6 +41,7 @@
- #include <QImage>
- #include <QMap>
- #include <QPainter>
-+#include <QPainterPath>
- #include <QPair>
- #include <QPixmap>
- #include <QTextDocument>
-diff --git a/Rendering/Qt/vtkQtStringToImage.cxx b/Rendering/Qt/vtkQtStringToImage.cxx
-index 659c71570e..fbb9b78f05 100644
---- a/Rendering/Qt/vtkQtStringToImage.cxx
-+++ b/Rendering/Qt/vtkQtStringToImage.cxx
-@@ -30,6 +30,7 @@
- #include <QFontMetrics>
- #include <QImage>
- #include <QPainter>
-+#include <QPainterPath>
- #include <QPixmap>
- #include <QString>
- #include <QTextDocument>
--- 
-2.26.2
-

diff --git a/sci-libs/vtk/metadata.xml b/sci-libs/vtk/metadata.xml
index 78fb93f57d22..50a77432780d 100644
--- a/sci-libs/vtk/metadata.xml
+++ b/sci-libs/vtk/metadata.xml
@@ -27,6 +27,5 @@
     <flag name="tbb">Use <pkg>dev-cpp/tbb</pkg> to handle smp support</flag>
     <flag name="views">Building Views modules</flag>
     <flag name="web">Install web component</flag>
-    <flag name="R">Enable support for dev-lang/R</flag>
   </use>
 </pkgmetadata>

diff --git a/sci-libs/vtk/vtk-8.2.0-r6.ebuild b/sci-libs/vtk/vtk-8.2.0-r6.ebuild
deleted file mode 100644
index 6cbd67167e03..000000000000
--- a/sci-libs/vtk/vtk-8.2.0-r6.ebuild
+++ /dev/null
@@ -1,375 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8,9} )
-WEBAPP_OPTIONAL=yes
-WEBAPP_MANUAL_SLOT=yes
-
-# Short package version
-MY_PV="$(ver_cut 1-2)"
-inherit flag-o-matic java-pkg-opt-2 python-single-r1 qmake-utils toolchain-funcs cmake virtualx webapp
-
-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}/VTKData-${PV}.tar.gz
-		https://www.vtk.org/files/release/${MY_PV}/VTKLargeData-${PV}.tar.gz
-	)"
-
-LICENSE="BSD LGPL-2"
-SLOT="0/${MY_PV}"
-KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="all-modules aqua boost doc examples ffmpeg gdal imaging java json mpi
-	mysql odbc offscreen postgres python qt5 R rendering tbb tcl theora tk
-	video_cards_nvidia views web +X"
-
-REQUIRED_USE="
-	all-modules? ( boost ffmpeg gdal mpi mysql odbc postgres python qt5 )
-	java? ( qt5 )
-	python? ( ${PYTHON_REQUIRED_USE} )
-	tcl? ( rendering )
-	examples? ( python )
-	tk? ( tcl )
-	web? ( python )
-	^^ ( X aqua offscreen )"
-
-RDEPEND="
-	app-arch/lz4
-	dev-cpp/eigen
-	dev-db/sqlite
-	dev-libs/double-conversion:0=
-	dev-libs/expat
-	dev-libs/jsoncpp:=
-	dev-libs/libxml2:2
-	>=dev-libs/pugixml-1.11
-	>=media-libs/freetype-2.5.4
-	media-libs/glew:0=
-	>=media-libs/libharu-2.3.0-r2
-	media-libs/libpng:0=
-	media-libs/libtheora
-	media-libs/mesa
-	media-libs/tiff:0
-	sci-libs/exodusii
-	sci-libs/hdf5:=
-	sci-libs/netcdf:0=
-	sci-libs/netcdf-cxx:3
-	sys-libs/zlib
-	virtual/jpeg:0
-	virtual/opengl
-	x11-libs/libX11
-	x11-libs/libXmu
-	x11-libs/libXt
-	all-modules? (
-		!sci-libs/xdmf2
-		<dev-libs/pegtl-3
-		sci-libs/kissfft
-	)
-	boost? ( dev-libs/boost:=[mpi?] )
-	examples? (
-		dev-qt/qtcore:5
-		dev-qt/qtgui:5
-	)
-	ffmpeg? ( media-video/ffmpeg )
-	gdal? ( sci-libs/gdal )
-	java? ( >=virtual/jdk-1.8:* )
-	mpi? (
-		virtual/mpi[cxx,romio]
-		$(python_gen_cond_dep '
-			python? ( dev-python/mpi4py[${PYTHON_USEDEP}] )
-		')
-	)
-	mysql? ( dev-db/mysql-connector-c )
-	odbc? ( dev-db/unixODBC )
-	offscreen? ( media-libs/mesa[osmesa] )
-	postgres? ( dev-db/postgresql:= )
-	python? (
-		${PYTHON_DEPS}
-		$(python_gen_cond_dep '
-			dev-python/sip:5[${PYTHON_USEDEP}]
-		')
-	)
-	qt5? (
-		dev-qt/designer:5
-		dev-qt/qtcore:5
-		dev-qt/qtgui:5
-		dev-qt/qtopengl:5
-		dev-qt/qtsql:5
-		dev-qt/qtx11extras:5
-		$(python_gen_cond_dep '
-			python? ( dev-python/PyQt5[${PYTHON_USEDEP}] )
-		')
-	)
-	R? ( dev-lang/R )
-	tbb? ( <dev-cpp/tbb-2021:= )
-	tcl? ( dev-lang/tcl:0= )
-	tk? ( dev-lang/tk:0= )
-	video_cards_nvidia? ( x11-drivers/nvidia-drivers[tools,static-libs] )
-	web? (
-		${WEBAPP_DEPEND}
-		$(python_gen_cond_dep '
-			dev-python/autobahn[${PYTHON_USEDEP}]
-			dev-python/constantly[${PYTHON_USEDEP}]
-			dev-python/hyperlink[${PYTHON_USEDEP}]
-			dev-python/incremental[${PYTHON_USEDEP}]
-			dev-python/six[${PYTHON_USEDEP}]
-			dev-python/twisted[${PYTHON_USEDEP}]
-			dev-python/txaio[${PYTHON_USEDEP}]
-			dev-python/zope-interface[${PYTHON_USEDEP}]
-		')
-	)
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	doc? ( app-doc/doxygen )
-	mpi? ( app-admin/chrpath )
-"
-
-S="${WORKDIR}"/VTK-${PV}
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-8.1.0-openmpi-4-compatibility.patch
-	"${FILESDIR}"/${P}-qt-5.15.patch # bug 726960
-	"${FILESDIR}"/${P}-gcc-10.patch # bug 723374
-	"${FILESDIR}"/${P}-fno-common.patch # bug 721048
-	"${FILESDIR}"/${P}-py38.patch
-	"${FILESDIR}"/${P}-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch # bug #751088
-	"${FILESDIR}"/${P}-pugixml.patch
-	"${FILESDIR}"/${P}-0001-fix-library-installation-dir-for-xdmf3.patch
-)
-
-RESTRICT="test"
-
-pkg_setup() {
-	use java && java-pkg-opt-2_pkg_setup
-	use python && python-single-r1_pkg_setup
-	use web && webapp_pkg_setup
-}
-
-src_prepare() {
-	cmake_src_prepare
-
-	local x
-	# missing: VPIC freerange libproj4 mrmpi sqlite utf8 verdict xmdf2 xmdf3 zfp
-	for x in expat freetype hdf5 jpeg jsoncpp kissfft libharu libxml2 lz4 netcdf pugixml png tiff zlib; do
-		ebegin "Dropping bundled ${x}"
-		rm -r ThirdParty/${x}/vtk${x} || die
-		eend $?
-	done
-
-	sed -i -e '/add_subdirectory(vtkpugixml)/d' ThirdParty/pugixml/CMakeLists.txt || die
-	sed -i -e '/vtk_target_export(vtkpugixml)/d' ThirdParty/pugixml/CMakeLists.txt || die
-
-	# my_bool is no longer used in MySQL and MariaDB isn't supported in vtk-8
-	sed -e 's/my_bool/bool/' -i IO/MySQL/vtkMySQL{Database,Query}.cxx || die
-
-	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
-}
-
-src_configure() {
-	# general configuration
-	local mycmakeargs=(
-		-Wno-dev
-		-DVTK_DIR="${S}"
-		-DVTK_INSTALL_LIBRARY_DIR=$(get_libdir)
-		-DVTK_INSTALL_PACKAGE_DIR="$(get_libdir)/cmake/${PN}-${MY_PV}"
-		-DVTK_INSTALL_DOC_DIR="${EPREFIX}/usr/share/doc/${PF}"
-		-DVTK_DATA_ROOT="${EPREFIX}/usr/share/${PN}/data"
-		-DVTK_CUSTOM_LIBRARY_SUFFIX=""
-		-DBUILD_SHARED_LIBS=ON
-		-DVTK_USE_SYSTEM_AUTOBAHN=ON
-		-DVTK_USE_SYSTEM_EXPAT=ON
-		-DVTK_USE_SYSTEM_FREETYPE=ON
-		-DVTK_USE_SYSTEM_FreeType=ON
-		# Use bundled gl2ps (bundled version is a patched version of 1.3.9. Post 1.3.9 versions should be compatible)
-		-DVTK_USE_SYSTEM_GL2PS=OFF
-		-DVTK_USE_SYSTEM_HDF5=ON
-		-DVTK_USE_SYSTEM_JPEG=ON
-		-DVTK_USE_SYSTEM_LIBPROJ=OFF
-		-DVTK_USE_SYSTEM_LIBXML2=ON
-		-DVTK_USE_SYSTEM_LibXml2=ON
-		-DVTK_USE_SYSTEM_NETCDF=ON
-		-DVTK_USE_SYSTEM_OGGTHEORA=ON
-		-DVTK_USE_SYSTEM_PUGIXML=ON
-		-DVTK_USE_SYSTEM_PNG=ON
-		-DVTK_USE_SYSTEM_TIFF=ON
-		-DVTK_USE_SYSTEM_TWISTED=ON
-		-DVTK_USE_SYSTEM_XDMF2=OFF
-		-DVTK_USE_SYSTEM_XDMF3=OFF
-		-DVTK_USE_SYSTEM_ZLIB=ON
-		-DVTK_USE_SYSTEM_ZOPE=ON
-		-DVTK_USE_SYSTEM_LIBRARIES=ON
-		# Use bundled diy2 (no gentoo package / upstream does not provide a Finddiy2.cmake or diy2Config.cmake / diy2-config.cmake)
-		-DVTK_USE_SYSTEM_DIY2=OFF
-		-DVTK_USE_GL2PS=ON
-		-DVTK_USE_LARGE_DATA=ON
-		-DVTK_USE_PARALLEL=ON
-		-DVTK_EXTRA_COMPILER_WARNINGS=ON
-		-DVTK_Group_StandAlone=ON
-		-DBUILD_DOCUMENTATION=$(usex doc)
-		-DBUILD_EXAMPLES=$(usex examples)
-		-DBUILD_VTK_BUILD_ALL_MODULES_FOR_TESTS=off
-		-DVTK_BUILD_ALL_MODULES=$(usex all-modules)
-		-DUSE_DOCUMENTATION_HTML_HELP=$(usex doc)
-		-DVTK_Group_Imaging=$(usex imaging)
-		-DVTK_Group_MPI=$(usex mpi)
-		-DVTK_Group_Rendering=$(usex rendering)
-		-DVTK_Group_Tk=$(usex tk)
-		-DVTK_Group_Views=$(usex views)
-		-DVTK_Group_Web=$(usex web)
-		-DVTK_SMP_IMPLEMENTATION_TYPE="$(usex tbb TBB Sequential)"
-		-DVTK_WWW_DIR="${EPREFIX}/${MY_HTDOCSDIR}"
-		-DVTK_WRAP_JAVA=$(usex java)
-		-DVTK_WRAP_PYTHON=$(usex python)
-		-DVTK_WRAP_PYTHON_SIP=$(usex python)
-		-DVTK_WRAP_TCL=$(usex tcl)
-		-DVTK_USE_BOOST=$(usex boost)
-		-DUSE_VTK_USE_BOOST=$(usex boost)
-		-DModule_vtkInfovisBoost=$(usex boost)
-		-DModule_vtkInfovisBoostGraphAlgorithms=$(usex boost)
-		-DVTK_USE_ODBC=$(usex odbc)
-		-DModule_vtkIOODBC=$(usex odbc)
-		-DVTK_USE_OFFSCREEN=$(usex offscreen)
-		-DVTK_OPENGL_HAS_OSMESA=$(usex offscreen)
-		-DVTK_USE_OGGTHEORA_ENCODER=$(usex theora)
-		-DVTK_USE_NVCONTROL=$(usex video_cards_nvidia)
-		-DModule_vtkFiltersStatisticsGnuR=$(usex R)
-		-DVTK_USE_X=$(usex X)
-	# IO
-		-DVTK_USE_FFMPEG_ENCODER=$(usex ffmpeg)
-		-DModule_vtkIOGDAL=$(usex gdal)
-		-DModule_vtkIOGeoJSON=$(usex json)
-		-DModule_vtkIOXdmf2=$(usex all-modules)
-		-DBUILD_TESTING=$(usex examples)
-	# Apple stuff, does it really work?
-		-DVTK_USE_COCOA=$(usex aqua)
-	)
-
-	if use all-modules; then
-		mycmakeargs+=(
-			-DVTK_MODULE_USE_EXTERNAL_VTK_pegtl=ON
-			# we don't have a package for zfp yet
-			-DVTK_USE_SYSTEM_ZFP=OFF
-		)
-	fi
-
-	if use java; then
-		local javacargs=$(java-pkg_javac-args)
-		mycmakeargs+=( -DJAVAC_OPTIONS=${javacargs// /;} )
-	fi
-
-	if use mpi; then
-		mycmakeargs+=( -DVTK_USE_SYSTEM_MPI4PY=ON )
-	fi
-
-	if use python; then
-		mycmakeargs+=(
-			-DVTK_INSTALL_PYTHON_MODULES_DIR="$(python_get_sitedir)"
-			-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
-			-DPYTHON_LIBRARY="$(python_get_library_path)"
-			-DSIP_PYQT_DIR="${EPREFIX}/usr/share/sip"
-			-DSIP_INCLUDE_DIR="$(python_get_includedir)"
-			-DVTK_PYTHON_INCLUDE_DIR="$(python_get_includedir)"
-			-DVTK_PYTHON_LIBRARY="$(python_get_library_path)"
-			-DVTK_USE_SYSTEM_SIX=ON
-		)
-	fi
-
-	if use qt5; then
-		mycmakeargs+=(
-			-DVTK_USE_QVTK=ON
-			-DVTK_USE_QVTK_OPENGL=ON
-			-DVTK_USE_QVTK_QTOPENGL=ON
-			-DQT_WRAP_CPP=ON
-			-DQT_WRAP_UI=ON
-			-DVTK_INSTALL_QT_DIR="$(basename $(qt5_get_libdir))/qt5/plugins/designer"
-			-DDESIRED_QT_VERSION=5
-			-DVTK_QT_VERSION=5
-			-DQT_MOC_EXECUTABLE="$(qt5_get_bindir)/moc"
-			-DQT_UIC_EXECUTABLE="$(qt5_get_bindir)/uic"
-			-DQT_INCLUDE_DIR="${EPREFIX}/usr/include/qt5"
-			-DQT_QMAKE_EXECUTABLE="$(qt5_get_bindir)/qmake"
-			-DVTK_Group_Qt:BOOL=ON
-			-DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebKitWidgets=ON
-		)
-	fi
-
-	if use R; then
-		mycmakeargs+=(
-			-DR_LIBRARY_BLAS=/usr/$(get_libdir)/R/lib/libR.so
-			-DR_LIBRARY_LAPACK=/usr/$(get_libdir)/R/lib/libR.so
-		)
-	fi
-
-	append-cppflags -D__STDC_CONSTANT_MACROS -D_UNICODE
-
-	use java && export JAVA_HOME="${EPREFIX}/etc/java-config-2/current-system-vm"
-
-	if use mpi; then
-		export CC=mpicc
-		export CXX=mpicxx
-		export FC=mpif90
-		export F90=mpif90
-		export F77=mpif77
-	fi
-
-	cmake_src_configure
-}
-
-src_install() {
-	use web && webapp_src_preinst
-
-	cmake_src_install
-
-	use java && java-pkg_regjar "${ED}"/usr/$(get_libdir)/${PN}.jar
-
-	# Stop web page images from being compressed
-	use doc && docompress -x /usr/share/doc/${PF}/doxygen
-
-	# 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
-	fi
-
-	# with MPI, rpaths are not deleted properly
-	if use mpi; then
-		chrpath -d "${ED}"/usr/$(get_libdir)/*.so* || die
-		chrpath -d "${ED}"/usr/bin/* || die
-		if use python; then
-			chrpath -d "${ED}"/$(python_get_sitedir)/vtkmodules/*.so || die
-		fi
-	fi
-
-	use python && python_optimize
-
-	# environment
-	cat >> "${T}"/40${PN} <<- EOF || die
-		VTK_DATA_ROOT=${EPREFIX}/usr/share/${PN}/data
-		VTK_DIR=${EPREFIX}/usr/$(get_libdir)/${PN}-${MY_PV}
-		VTKHOME=${EPREFIX}/usr
-		EOF
-	doenvd "${T}"/40${PN}
-
-	use web && webapp_src_install
-}
-
-# webapp.eclass exports these but we want it optional #534036
-pkg_postinst() {
-	use web && webapp_pkg_postinst
-}
-
-pkg_prerm() {
-	use web && webapp_pkg_prerm
-}


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/vtk/, sci-libs/vtk/files/
@ 2022-04-02 13:06 Andreas Sturmlechner
  0 siblings, 0 replies; 19+ messages in thread
From: Andreas Sturmlechner @ 2022-04-02 13:06 UTC (permalink / raw
  To: gentoo-commits

commit:     587997a8ddffe39ddb1ce4c3874d6b0d4082f4d9
Author:     Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net>
AuthorDate: Thu Mar 31 15:36:00 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Apr  2 13:05:39 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=587997a8

sci-libs/vtk: find qt binaries with qt-5.15.3

Use the path for qmake as a reference for finding the path to Qt binaries
with Qt 5.15.3 and no qtchooser installed.

Committer-comment: undo unnecessary revbump for build fix.

Closes: https://bugs.gentoo.org/836343
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net>
Closes: https://github.com/gentoo/gentoo/pull/24831
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/vtk-9.1.0-adjust-to-find-binaries.patch  | 25 ++++++++++++++++++++++
 sci-libs/vtk/vtk-9.1.0.ebuild                      |  1 +
 2 files changed, 26 insertions(+)

diff --git a/sci-libs/vtk/files/vtk-9.1.0-adjust-to-find-binaries.patch b/sci-libs/vtk/files/vtk-9.1.0-adjust-to-find-binaries.patch
new file mode 100644
index 000000000000..10d6d251ebf3
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.1.0-adjust-to-find-binaries.patch
@@ -0,0 +1,25 @@
+From e59b8ff7b83cd6a58c226cb4f5d9661bcb29002b Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Thu, 31 Mar 2022 08:05:17 +0200
+Subject: [PATCH] adjust to find binaries
+
+Add compatibility for qt-5.15.3 with no qtchooser installed. QtCore exports
+Qt5::{qmake,moc,rcc} which we use to get the path for binaries.
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+--- a/GUISupport/QtQuick/qml/CMakeLists.txt
++++ b/GUISupport/QtQuick/qml/CMakeLists.txt
+@@ -60,8 +60,8 @@ file(GENERATE
+ # Generate the qmltypes file for the VTK QML plugin
+ 
+ # First, find the qmlplugindump executable
+-get_target_property(qt_core_location "Qt${vtk_qt_major_version}::Core" LOCATION)
+-get_filename_component(qt_bin_dir "${qt_core_location}" PATH)
++get_target_property(qt_qmake_location "Qt${vtk_qt_major_version}::qmake" LOCATION)
++get_filename_component(qt_bin_dir "${qt_qmake_location}" PATH)
+ if (APPLE)
+   get_filename_component(qt_bin_dir "${qt_bin_dir}" PATH)
+ endif ()
+-- 
+2.35.1
+

diff --git a/sci-libs/vtk/vtk-9.1.0.ebuild b/sci-libs/vtk/vtk-9.1.0.ebuild
index 7be370c13c6a..9a6ebbdaac51 100644
--- a/sci-libs/vtk/vtk-9.1.0.ebuild
+++ b/sci-libs/vtk/vtk-9.1.0.ebuild
@@ -143,6 +143,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-9.0.1-0001-fix-kepler-compute_arch-if-CUDA-toolkit-11-is-used.patch
 	"${FILESDIR}"/${PN}-8.2.0-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch
 	"${FILESDIR}"/${PN}-9.0.3-IO-FFMPEG-support-FFmpeg-5.0-API-changes.patch
+	"${FILESDIR}"/${P}-adjust-to-find-binaries.patch
 )
 
 DOCS=( CONTRIBUTING.md README.md )


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/vtk/, sci-libs/vtk/files/
@ 2022-06-26  7:09 Sam James
  0 siblings, 0 replies; 19+ messages in thread
From: Sam James @ 2022-06-26  7:09 UTC (permalink / raw
  To: gentoo-commits

commit:     d699c8995b81d8cd0be7d051485af755d25cdf11
Author:     Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net>
AuthorDate: Sat Jun 18 10:29:13 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun 26 07:09:32 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d699c899

sci-libs/vtk: fix build against netcdf-4.9.0

Closes: https://bugs.gentoo.org/851594
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net>
Closes: https://github.com/gentoo/gentoo/pull/25954
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...-avoid-naming-collision-with-netcdf-4.9.0.patch | 26 ++++++++++++++++++++++
 sci-libs/vtk/vtk-9.1.0-r2.ebuild                   |  1 +
 2 files changed, 27 insertions(+)

diff --git a/sci-libs/vtk/files/vtk-9.1.0-avoid-naming-collision-with-netcdf-4.9.0.patch b/sci-libs/vtk/files/vtk-9.1.0-avoid-naming-collision-with-netcdf-4.9.0.patch
new file mode 100644
index 000000000000..7549c240ee51
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.1.0-avoid-naming-collision-with-netcdf-4.9.0.patch
@@ -0,0 +1,26 @@
+https://bugs.gentoo.org/851594
+
+From b155e9716a1cf4a03948c01f49c4097e466da4f0 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Mon, 20 Jun 2022 07:07:19 +0200
+Subject: [PATCH] avoid naming collision with netcdf-4.9.0
+
+The identifier has already been #defined with netcdf-4.9.0. To avoid
+conflicts guard the declaration.
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+--- a/ThirdParty/exodusII/vtkexodusII/src/ex_utils.c
++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_utils.c
+@@ -1770,7 +1770,9 @@ void ex__compress_variable(int exoid, int varid, int type)
+         */
+ 
+         /* const int NC_SZIP_EC = 4; */ /* Selects entropy coding method for szip. */
++#ifndef NC_SZIP_NN
+         const int NC_SZIP_NN = 32;      /* Selects nearest neighbor coding method for szip. */
++#endif
+         /* Even and between 4 and 32; typical values are 8, 10, 16, 32 */
+         const int SZIP_PIXELS_PER_BLOCK =
+             file->compression_level == 0 ? 32 : file->compression_level;
+-- 
+2.35.1
+

diff --git a/sci-libs/vtk/vtk-9.1.0-r2.ebuild b/sci-libs/vtk/vtk-9.1.0-r2.ebuild
index 13d7663c5bbf..1e80b96b80b4 100644
--- a/sci-libs/vtk/vtk-9.1.0-r2.ebuild
+++ b/sci-libs/vtk/vtk-9.1.0-r2.ebuild
@@ -144,6 +144,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-8.2.0-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch
 	"${FILESDIR}"/${PN}-9.0.3-IO-FFMPEG-support-FFmpeg-5.0-API-changes.patch
 	"${FILESDIR}"/${P}-adjust-to-find-binaries.patch
+	"${FILESDIR}"/${P}-avoid-naming-collision-with-netcdf-4.9.0.patch
 )
 
 DOCS=( CONTRIBUTING.md README.md )


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/vtk/, sci-libs/vtk/files/
@ 2022-12-12  6:09 Joonas Niilola
  0 siblings, 0 replies; 19+ messages in thread
From: Joonas Niilola @ 2022-12-12  6:09 UTC (permalink / raw
  To: gentoo-commits

commit:     588025882a58b613f5ef08e02b96efbb7d4c7445
Author:     Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net>
AuthorDate: Thu Sep 29 05:18:39 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Mon Dec 12 06:08:29 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=58802588

sci-libs/vtk: add 9.2.2

- add a new function to check memory and disk space requirements
- don't drop bundled external libraries, it's only a few MB which are freed
	through this and upstream does a good job to avoid automagic deps
- request more modules to build explicitly depending on USE flag settings
- don't export CC and friends with USE=mpi, package builds fine with gcc and still
	links to MPI libraries
- add USE flag to build vtk-m optional

Bug: https://bugs.gentoo.org/793221
Bug: https://bugs.gentoo.org/835659
Bug: https://bugs.gentoo.org/880759
Closes: https://bugs.gentoo.org/820593
Closes: https://bugs.gentoo.org/827310
Closes: https://bugs.gentoo.org/846374
Closes: https://bugs.gentoo.org/874798
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net>
Closes: https://github.com/gentoo/gentoo/pull/28250
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 sci-libs/vtk/Manifest                              |   6 +
 .../vtk-9.2.2-VTKm-respect-user-CXXFLAGS.patch     |  81 +++
 ...9.2.2-link-with-glut-library-for-freeglut.patch |  18 +
 ...metryFilter-add-missing-mutex-header-file.patch |  20 +
 sci-libs/vtk/metadata.xml                          |  11 +-
 sci-libs/vtk/vtk-9.2.2.ebuild                      | 728 +++++++++++++++++++++
 6 files changed, 863 insertions(+), 1 deletion(-)

diff --git a/sci-libs/vtk/Manifest b/sci-libs/vtk/Manifest
index 52b37377441f..2ee625c9b35b 100644
--- a/sci-libs/vtk/Manifest
+++ b/sci-libs/vtk/Manifest
@@ -1,10 +1,16 @@
 DIST VTK-9.0.3.tar.gz 34684378 BLAKE2B 6862ab2df95bbefe9d3970757af6521cfa874476f6ee8e64c4e6e279f2e0cbb8a8299bc3b0b8bb9b7254d01a169644e7927b67b11b2ce934ddc87bce0a9e4c26 SHA512 00528011f9206444d09fc6cea05c46930745bb70ea02be6244ab3eb510ae82af772157c025157b1761dc4c6a9ab538b57f814c03a708f30aa3598a421fdc6ae2
 DIST VTK-9.1.0.tar.gz 47871165 BLAKE2B 68cebc0879737a519b53e73f198356208b047c301d38ee2d62b9a14539cdb9aa76bd7174baa29592c7b1cfd1cc9700d01e98519a207d67a232d16ad37295ac31 SHA512 b2c4be8795fa082e0776e6ffdb9a3fd88dbb235841a8369a34ebe26cf4c5fcb1610fcca987be314510629da3edc74ee76c0ce2cc88d5ef4b099ac550ac892b0a
+DIST VTK-9.2.2.tar.gz 53801737 BLAKE2B 345538004a1b147f8a6812e30b6e31bdfba27d13c47e3c659ef6eb51224aa6015a44e6aaabbc6d1b127691592b4727a51c952dc565d1a12f2eddedd1536af58b SHA512 11b8203a4efaac0cda9ea46acf58c0d88c18f55bfd52e284f74ef313646913d194d3885da9d9fa7222d926502522505bfdf9d719f8c09790dab1315e2161610a
 DIST VTKData-9.0.3.tar.gz 413854066 BLAKE2B 84c2fa0ae5df8567cc06022262fe3ea1202c553168757c94aa4a0a258360deccdf349d474c2f6585fc2054ee8e0468df4c80ec835cecf6b2391efa639f479eaa SHA512 28ab2ecb32860d820f736e9ceb4345bcd03471f0a35b90f8c9ccbe05454f7a95a4de3c99bae2f4b9db87a27ef8fe50159cd283f5e921f4e6e69b06a50a0570c6
 DIST VTKData-9.1.0.tar.gz 590185633 BLAKE2B 7451d57bc507571afa8a8f9ba541010e1924849759f228318b6390aabb07a68341b84b38b82cd504844194544c569b040c9fad1858e6e35e172e4e18000d338e SHA512 134a8dd2b029d3a4959b601987e68a0caa5d050532655b6786b5b67dfc77d3639628b2b957511f8998e63864c247c501a11a6aed248c762f13e860d878778e1a
+DIST VTKData-9.2.2.tar.gz 593767482 BLAKE2B 65df8f96eaca9ada44f807bd4ff5efe569dde726105c7aa260c4f0ed3b8c19303b7781e0628a759cdf68b314155ac0d125403f27ee38eefd47336a8eed235851 SHA512 54d33ba24c9adfef2de17f26aa68b53f61f32e50d92bd1b0ddd75b1818d864af9a4d7fa7cb55297839bd2e50c2a7d12a18695151db32f7f59fbbd2ec9169e7b8
 DIST VTKDataFiles-9.1.0.tar.gz 605163184 BLAKE2B 968e2fed1e17bb57da4f8dd38e17e128779e50dfce81fc31c6ef75a2f3fe46675dd77ab7343b609998b8ddd3927e256d1ea4117c2719ad76f61db435b5f1c34f SHA512 f56ebd087753e2d2805e2f5954197de4e9933ec90648956780525d83149277a7bca42ce376c4355a53fca71ec78510fed155955af71b70e1b26de27851252e36
+DIST VTKDataFiles-9.2.2.tar.gz 608752734 BLAKE2B b33bcec704e0db3ad0de958fbeca1adc1b904279b46a43a5abcd45a7df96138d4d3b76cb21af3aa48c0dd18d05987bdf58476fa945b59ed5b90ad6f2e386926f SHA512 75430127212fdf210fb98d278b0163b4ed09f567fd1b80fcf80ea1cf2709e41f785912b20591712f71ad7ede9e12e23e358b4889963bccfe66cf8c48a7f70e11
 DIST VTKLargeData-9.0.3.tar.gz 247523270 BLAKE2B f4011292957454da5d8c9e515bcd0972af4299cef3928098d745be96559a1e0080297871c6e11fdd98498c8786a30a6674bc650368adcbcdbc6260e0938d21a1 SHA512 ebd6cb5f2935b77961dd68d0c0da2ea5ab900cec8c2eb641c785a604c65702e40a3e44d32bf3f2acfce9ec28dd89f41bf29f93a4f89d5b36c713f3743d7125b1
 DIST VTKLargeData-9.1.0.tar.gz 247517666 BLAKE2B 1b47829ad51f246ff26c8b6d16c9fa431e53ca33fec99e8aa78ee156a82e4b3351e32ee36674d9d345f346efad085ae1e2d3186a144911d2210a31a259e69f1f SHA512 0760dfd4e92bbfec10fec9d783f548a8ca5464b1a1744dfa575d4ed4592756335dbfcf28249d2da964aa6b41933ff1ac98458e4a32484ee4bb91b5e7cfaa78c9
+DIST VTKLargeData-9.2.2.tar.gz 247523477 BLAKE2B a17f2e5499efb469162f2face7e5fb0cb559302d0ede75b3b0602036aba80d248895450c5da65198a4bed0a9a0d70e6b2a22e18447d7bab04b8277cb943ebd79 SHA512 4ee1f0b4dac929f7335d2a23ad56ddddaa8ebba34c547c18883418f56fb285fba38ffbfd5124ab428b6e19e87a916ba0858ae227af453519c1cbd5598fe6ccf6
 DIST VTKLargeDataFiles-9.1.0.tar.gz 247504557 BLAKE2B a05892347a1a5cf5cb0df3f1c1d94efcdb68c28bcd0391617602565fddc4277ac44accec6f1b3ae2822a860f3d5f5642a56e36171b5d81bef137561182051d08 SHA512 10abc287256c7ec5fb7114f4054eda5cde1b75a8d2bbe70375fb96d31b7c4164be936489ce2fc9b5c33225f494d9b7f5f7bed648828661b17d6f66acb70eeddc
+DIST VTKLargeDataFiles-9.2.2.tar.gz 247507138 BLAKE2B af593595b0b681a91e491a9fcab748d1d2ba2949d3da728eab60e94810d1d550ad66318d3f66ec170c020212b95e7273dd530fcf243eaebbe0255f589098b74a SHA512 0c919e1b425da5f77af1dec4f83c993387e95f84a8273ded4d2486c3fd171cf3a4f5cb7a80e722200cc44a19bf1fdc358fcea48c4c741d9a5f5fc6086e4c602c
 DIST vtkDocHtml-9.0.3.tar.gz 132650096 BLAKE2B 45fc1a6942df3e79e500a552c3b3cda2099b9451191559d471e3a2e785a8c52b2c6273cfd2cc4a3f3f65582e607d9414475f58d243fde96a4f985bed479e53db SHA512 9b5fef43f3c2b92aa1fe6a9ba9458d6677874b09b167654db7f26df6feffdc34ed1a8fb4e59d64b75625063a774af77fe57f275903602a5f7daa74e1a2e71800
 DIST vtkDocHtml-9.1.0.tar.gz 152767166 BLAKE2B 9163b6b1bf55810a310ca8bc211e067827b1f9907efd2a378363d8e6296d4bf07b25371b66c00cab3576fb06f0cb63fdf2ffea044033e2c42e9087819a3736ba SHA512 036daba5eb6503b5eb3e9323a4ab3ea0f27c09d8fef411dd2ed154c24d5a37d9f19d57db07576c8af404bfdb7178e95b137a3c27bfedb3f9cb72c04f717da80a
+DIST vtkDocHtml-9.2.2.tar.gz 158843945 BLAKE2B 682206834319d22d4ffe9bb7f5d20828274cbc7fc14b8215afeddf4783d07f61dab84d0562b002b76306551d20ceac904763168b29dfe1eb429fe8d0e0f3ebda SHA512 d03ed66c5ace0d8c7698a17574f7a44ca2a5361397508d2080812e6cc894fce566c3b552687b8af31e3eb25511d7ad0b98b33044f327e3b5a03451ee2e50cff0

diff --git a/sci-libs/vtk/files/vtk-9.2.2-VTKm-respect-user-CXXFLAGS.patch b/sci-libs/vtk/files/vtk-9.2.2-VTKm-respect-user-CXXFLAGS.patch
new file mode 100644
index 000000000000..c47bced20f22
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.2.2-VTKm-respect-user-CXXFLAGS.patch
@@ -0,0 +1,81 @@
+From 225a077898eb714e5ecb80255796aa70625e6cea Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Sat, 12 Nov 2022 02:01:35 +0100
+Subject: [PATCH] VTKm respect user CXXFLAGS
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+--- a/Accelerators/Vtkm/Core/CMakeLists.txt
++++ b/Accelerators/Vtkm/Core/CMakeLists.txt
+@@ -79,6 +79,16 @@ if (TARGET vtkm::cuda)
+   vtk_module_set_properties(VTK::AcceleratorsVTKmCore
+     LANGUAGE CUDA
+     CUDA_SEPARABLE_COMPILATION ON)
++
++  string(STRIP ${CMAKE_CXX_FLAGS} _cmake_cxx_flags)
++  string(REPLACE " " ";" cmake_cxx_flags_list ${_cmake_cxx_flags})
++  set(cxx_flags -Wall)
++  foreach(cmake_cxx_flag ${cmake_cxx_flags_list})
++    list(APPEND cxx_flags $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=${cmake_cxx_flag}>)
++  endforeach()
++  vtk_module_compile_options(VTK::AcceleratorsVTKmCore
++    PUBLIC
++      ${cxx_flags})
+ endif()
+ 
+ if (MSVC)
+--- a/Accelerators/Vtkm/DataModel/CMakeLists.txt
++++ b/Accelerators/Vtkm/DataModel/CMakeLists.txt
+@@ -89,6 +89,16 @@ if (TARGET vtkm::cuda)
+ 
+   vtk_module_compile_options(VTK::AcceleratorsVTKmDataModel
+     PUBLIC $<$<COMPILE_LANGUAGE:CUDA>:-Xcudafe --diag_suppress=extra_semicolon>)
++
++  string(STRIP ${CMAKE_CXX_FLAGS} _cmake_cxx_flags)
++  string(REPLACE " " ";" cmake_cxx_flags_list ${_cmake_cxx_flags})
++  set(cxx_flags -Wall)
++  foreach(cmake_cxx_flag ${cmake_cxx_flags_list})
++    list(APPEND cxx_flags $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=${cmake_cxx_flag}>)
++  endforeach()
++  vtk_module_compile_options(VTK::AcceleratorsVTKmDataModel
++    PUBLIC
++      ${cxx_flags})
+ endif ()
+ 
+ if (MSVC)
+--- a/Accelerators/Vtkm/Filters/CMakeLists.txt
++++ b/Accelerators/Vtkm/Filters/CMakeLists.txt
+@@ -138,6 +138,16 @@ if (TARGET vtkm::cuda)
+ 
+   vtk_module_compile_options(VTK::AcceleratorsVTKmFilters
+     PUBLIC $<$<COMPILE_LANGUAGE:CUDA>:-Xcudafe --diag_suppress=extra_semicolon>)
++
++  string(STRIP ${CMAKE_CXX_FLAGS} _cmake_cxx_flags)
++  string(REPLACE " " ";" cmake_cxx_flags_list ${_cmake_cxx_flags})
++  set(cxx_flags -Wall)
++  foreach(cmake_cxx_flag ${cmake_cxx_flags_list})
++    list(APPEND cxx_flags $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=${cmake_cxx_flag}>)
++  endforeach()
++  vtk_module_compile_options(VTK::AcceleratorsVTKmFilters
++    PUBLIC
++      ${cxx_flags})
+ endif ()
+ 
+ if (MSVC)
+--- a/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake/VTKmCompilerFlags.cmake
++++ b/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake/VTKmCompilerFlags.cmake
+@@ -126,6 +126,12 @@ elseif(VTKM_COMPILER_IS_ICC)
+ elseif(VTKM_COMPILER_IS_GNU OR VTKM_COMPILER_IS_CLANG)
+   set(cxx_flags -Wall -Wcast-align -Wextra -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wunused -fno-common -Wno-unused-function)
+   set(cuda_flags -Xcompiler=-Wall,-Wcast-align,-Wpointer-arith,-Wformat,-Wformat-security,-Wshadow,-fno-common,-Wunused,-Wno-unknown-pragmas,-Wno-unused-local-typedefs,-Wno-unused-function)
++  string(STRIP ${CMAKE_CXX_FLAGS} _cmake_cxx_flags)
++  string(REPLACE " " ";" cmake_cxx_flags_list ${_cmake_cxx_flags})
++  foreach(elem ${cmake_cxx_flags_list})
++    list(PREPEND cxx_flags ${elem})
++    list(PREPEND cuda_flags -Xcompiler=${elem})
++  endforeach()
+ 
+   #Clang does not support the -Wchar-subscripts flag for warning if an array
+   #subscript has a char type.
+-- 
+2.38.1
+

diff --git a/sci-libs/vtk/files/vtk-9.2.2-link-with-glut-library-for-freeglut.patch b/sci-libs/vtk/files/vtk-9.2.2-link-with-glut-library-for-freeglut.patch
new file mode 100644
index 000000000000..39b7e7ab0f15
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.2.2-link-with-glut-library-for-freeglut.patch
@@ -0,0 +1,18 @@
+From 801654a5f1c3991ff9bb3ea5798afdd252d214b6 Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Mon, 21 Nov 2022 15:35:58 +0100
+Subject: [PATCH] link with glut library for freeglut
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+--- a/Rendering/External/Testing/Cxx/CMakeLists.txt
++++ b/Rendering/External/Testing/Cxx/CMakeLists.txt
+@@ -12,5 +12,5 @@ if(NOT APPLE)
+ 
+   vtk_test_cxx_executable(vtkRenderingExternalCxxTests tests)
+   target_link_libraries(vtkRenderingExternalCxxTests PRIVATE
+-    ${GLUT_LIBRARY})
++    ${GLUT_LIBRARIES})
+ endif()
+-- 
+2.38.1
+

diff --git a/sci-libs/vtk/files/vtk-9.2.2-vtkGeometryFilter-add-missing-mutex-header-file.patch b/sci-libs/vtk/files/vtk-9.2.2-vtkGeometryFilter-add-missing-mutex-header-file.patch
new file mode 100644
index 000000000000..287d804847bb
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.2.2-vtkGeometryFilter-add-missing-mutex-header-file.patch
@@ -0,0 +1,20 @@
+From https://gitlab.kitware.com/vtk/vtk/-/commit/57767732c4d54db89004c685022ac828bb51eccd
+
+From 57767732c4d54db89004c685022ac828bb51eccd Mon Sep 17 00:00:00 2001
+From: Andrew Bauer <bauer.andrew.c@gmail.com>
+Date: Wed, 27 Jul 2022 09:31:13 -0400
+Subject: [PATCH 033/614] vtkGeometryFilter: add missing mutex header file
+
+--- a/Filters/Geometry/vtkGeometryFilter.cxx
++++ b/Filters/Geometry/vtkGeometryFilter.cxx
+@@ -52,6 +52,7 @@
+ #include "vtkWedge.h"
+ 
+ #include <memory>
++#include <mutex>
+ 
+ vtkStandardNewMacro(vtkGeometryFilter);
+ vtkCxxSetObjectMacro(vtkGeometryFilter, Locator, vtkIncrementalPointLocator);
+-- 
+2.38.1
+

diff --git a/sci-libs/vtk/metadata.xml b/sci-libs/vtk/metadata.xml
index 104d25f0b118..d047994a2853 100644
--- a/sci-libs/vtk/metadata.xml
+++ b/sci-libs/vtk/metadata.xml
@@ -17,17 +17,26 @@
     <flag name="all-modules">Build all modules</flag>
     <flag name="boost">Add support for boost</flag>
     <flag name="cuda">Add support for CUDA</flag>
+    <flag name="freetype">Build support for font rendering</flag>
     <flag name="gdal">Support for gdal formated data</flag>
     <flag name="imaging">Building Imaging modules</flag>
     <flag name="json">Support for json formatted data</flag>
     <flag name="kits">Build kits in addition to modules</flag>
-    <flag name="logging">Enable the loguru logging module</flag>
+    <flag name="las">Build support for LiDAR files</flag>
+    <flag name="logging">Build the logging module</flag>
     <flag name="offscreen">Offscreen rendering through OSMesa</flag>
+    <flag name="openvdb">Build support to handle VDB data files</flag>
+    <flag name="pdal">Build support to handle point cloud data files</flag>
     <flag name="pegtl">Use pegtl to build parsers</flag>
     <flag name="qt6">Use Qt6 packages instead of Qt5</flag>
     <flag name="rendering">Building Redering modules</flag>
+    <flag name="sdl">Enable SDL2 support for rendering modules</flag>
     <flag name="tbb">Use <pkg>dev-cpp/tbb</pkg> to handle smp support</flag>
     <flag name="views">Building Views modules</flag>
+    <flag name="vtkm">Build the vtkm accelerations modules</flag>
     <flag name="web">Install web component</flag>
   </use>
+  <upstream>
+    <remote-id type="github">Kitware/VTK</remote-id>
+  </upstream>
 </pkgmetadata>

diff --git a/sci-libs/vtk/vtk-9.2.2.ebuild b/sci-libs/vtk/vtk-9.2.2.ebuild
new file mode 100644
index 000000000000..51c14eedf0a3
--- /dev/null
+++ b/sci-libs/vtk/vtk-9.2.2.ebuild
@@ -0,0 +1,728 @@
+# Copyright 1999-2022 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_{8..10} )
+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
+	https://www.vtk.org/files/release/${MY_PV}/VTKData-${PV}.tar.gz
+	https://www.vtk.org/files/release/${MY_PV}/VTKDataFiles-${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}/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 simplifiy these. Mostly the flags related to Groups.
+IUSE="all-modules boost cuda debug doc examples ffmpeg freetype gdal imaging
+	java las +logging mpi mysql odbc openmp openvdb pdal postgres python qt5
+	qt6 +rendering sdl tbb test +threads tk video_cards_nvidia views vtkm web"
+
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="
+	all-modules? (
+		boost ffmpeg freetype gdal imaging las mysql odbc openvdb pdal
+		postgres rendering views
+	)
+	cuda? ( video_cards_nvidia vtkm )
+	java? ( rendering )
+	python? ( ${PYTHON_REQUIRED_USE} )
+	qt5? ( rendering )
+	qt6? ( rendering )
+	sdl? ( rendering )
+	tk? ( python rendering )
+	web? ( python )
+"
+
+# for <pegtl-3 dependency see
+# https://discourse.vtk.org/t/compilation-errors-related-to-pegtl-proj/5929
+# 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-cpp/eigen
+	dev-cpp/nlohmann_json
+	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/pegtl-3
+	dev-libs/pugixml
+	dev-libs/utfcpp
+	media-libs/freetype
+	media-libs/libjpeg-turbo
+	>=media-libs/libharu-2.4.2:=
+	media-libs/libogg
+	media-libs/libpng:=
+	media-libs/libtheora
+	media-libs/tiff
+	>=sci-libs/cgnslib-4.1.1:=[hdf5,mpi=]
+	sci-libs/hdf5:=[mpi=]
+	sci-libs/proj:=
+	sci-libs/netcdf:=[mpi=]
+	sys-libs/zlib
+	boost? ( dev-libs/boost:=[mpi?] )
+	cuda? ( dev-util/nvidia-cuda-toolkit:= )
+	ffmpeg? ( media-video/ffmpeg:= )
+	freetype? ( media-libs/fontconfig )
+	gdal? ( sci-libs/gdal:= )
+	java? ( >=virtual/jdk-1.8:* )
+	las? ( sci-geosciences/liblas )
+	mpi? ( virtual/mpi[cxx,romio] )
+	mysql? ( dev-db/mariadb-connector-c )
+	odbc? ( dev-db/unixODBC )
+	openvdb? ( media-gfx/openvdb:= )
+	pdal? ( sci-libs/pdal:= )
+	postgres? ( dev-db/postgresql:= )
+	python? (
+		${PYTHON_DEPS}
+		$(python_gen_cond_dep 'mpi? ( dev-python/mpi4py[${PYTHON_USEDEP}] )')
+	)
+	qt5? (
+		dev-qt/qtcore:5
+		dev-qt/qtopengl:5
+		dev-qt/qtquickcontrols2:5
+		dev-qt/qtsql:5
+		dev-qt/qtwidgets:5
+	)
+	qt6? (
+		dev-qt/qtbase:6[gui,opengl,sql,widgets]
+		dev-qt/qtdeclarative:6[opengl]
+		dev-qt/qtshadertools:6
+		x11-libs/libxkbcommon
+	)
+	sdl? ( media-libs/libsdl2 )
+	rendering? (
+		media-libs/glew:=
+		virtual/opengl
+		x11-libs/gl2ps
+		x11-libs/libICE
+		x11-libs/libXcursor
+		x11-libs/libXext
+	)
+	tbb? ( dev-cpp/tbb:= )
+	tk? ( dev-lang/tk:= )
+	video_cards_nvidia? ( x11-drivers/nvidia-drivers[tools,static-libs] )
+	views? (
+		x11-libs/libICE
+		x11-libs/libXext
+	)
+	web? ( ${WEBAPP_DEPEND} )
+"
+
+# for <pegtl-3 dependency see
+# https://discourse.vtk.org/t/compilation-errors-related-to-pegtl-proj/5929
+DEPEND="
+	${RDEPEND}
+	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.2-vtkGeometryFilter-add-missing-mutex-header-file.patch
+	"${FILESDIR}"/${PN}-9.2.2-VTKm-respect-user-CXXFLAGS.patch
+	"${FILESDIR}"/${PN}-9.2.2-link-with-glut-library-for-freeglut.patch
+)
+
+DOCS=( CONTRIBUTING.md README.md )
+
+vtk_check_reqs() {
+	local dsk=4096
+	local mem=$(( $(usex cuda 7168 0) ))
+
+	dsk=$(( $(usex doc 3072 0) + ${dsk} ))
+	dsk=$(( $(usex examples 3072 0) + ${dsk} ))
+	dsk=$(( $(usex cuda 8192 0) + ${dsk} ))
+
+	# 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)")
+	else
+		if [[ -n "${MAKEOPTS}" ]]; then
+			jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
+		fi
+	fi
+	mem=$(( ${mem} * ${jobs} ))
+
+	use cuda && export CHECKREQS_MEMORY=${mem}M
+	export CHECKREQS_DISK_BUILD=${dsk}M
+
+	check-reqs_pkg_${EBUILD_PHASE}
+}
+
+pkg_pretend() {
+	[[ ${MERGE_TYPE} != binary ]] && has openmp && tc-check-openmp
+
+	if [[ $(tc-is-gcc) && $(gcc-majorversion) = 11 ]] && use cuda ; then
+		# FIXME: better use eerror?
+		ewarn "GCC 11 is know to fail building with CUDA support in some cases."
+		ewarn "See bug #820593"
+	fi
+
+	if use qt6 && use qt5; then
+		ewarn "Both qt5 and qt6 USE flags have been selected. Using qt5!"
+	fi
+
+	vtk_check_reqs
+}
+
+pkg_setup() {
+	[[ ${MERGE_TYPE} != binary ]] && has openmp && tc-check-openmp
+
+	if [[ $(tc-is-gcc) && $(gcc-majorversion) = 11 ]] && use cuda ; then
+		# FIXME: better use eerror?
+		ewarn "GCC 11 is know to fail building with CUDA support in some cases."
+		ewarn "See bug #820593"
+	fi
+
+	if use qt6 && use qt5; then
+		ewarn "Both qt5 and qt6 USE flags have been selected. Using qt5!"
+	fi
+
+	vtk_check_reqs
+
+	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
+# Note: no valid mpi4py target found with system library --> CHECK!!
+# TODO: cli11 (::guru), 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 cuda; then
+		cuda_add_sandbox -w
+		cuda_src_prepare
+	fi
+
+	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 ../../VTK-${PV}/.ExternalData/README.rst . || die
+		ln -sf ../../VTK-${PV}/.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_INSTALL_LICENSEDIR="share/${PN}/licenses"
+
+		-DVTK_ANDROID_BUILD=OFF
+		-DVTK_IOS_BUILD=OFF
+
+		-DVTK_BUILD_ALL_MODULES=$(usex all-modules ON OFF)
+		# we use the pre-built documentation and install these with USE=doc
+		-DVTK_BUILD_DOCUMENTATION=OFF
+		-DVTK_BUILD_EXAMPLES=$(usex examples ON OFF)
+
+		# no package in the tree: https://github.com/LLNL/conduit
+		-DVTK_ENABLE_CATALYST=OFF
+		-DVTK_ENABLE_KITS=OFF
+		-DVTK_ENABLE_LOGGING=$(usex logging ON OFF)
+		# defaults to ON: USE flag for this?
+		-DVTK_ENABLE_REMOTE_MODULES=OFF
+
+		-DVTK_GROUP_ENABLE_Imaging=$(usex imaging "YES" "DEFAULT")
+		-DVTK_GROUP_ENABLE_Rendering=$(usex rendering "YES" "DEFAULT")
+		-DVTK_GROUP_ENABLE_StandAlone="YES"
+		-DVTK_GROUP_ENABLE_Views=$(usex views "YES" "DEFAULT")
+		-DVTK_GROUP_ENABLE_Web=$(usex web "YES" "DEFAULT")
+
+		-DVTK_INSTALL_SDK=ON
+
+		-DVTK_MODULE_ENABLE_VTK_IOCGNSReader="WANT"
+		-DVTK_MODULE_ENABLE_VTK_IOExportPDF="WANT"
+		-DVTK_MODULE_ENABLE_VTK_IOLAS=$(usex las "WANT" "DEFAULT")
+		-DVTK_MODULE_ENABLE_VTK_IONetCDF="WANT"
+		-DVTK_MODULE_ENABLE_VTK_IOOggTheora="WANT"
+		-DVTK_MODULE_ENABLE_VTK_IOOpenVDB=$(usex openvdb "WANT" "DEFAULT")
+		-DVTK_MODULE_ENABLE_VTK_IOSQL="WANT" # sqlite
+		-DVTK_MODULE_ENABLE_VTK_IOPDAL=$(usex pdal "WANT" "DEFAULT")
+		-DVTK_MODULE_ENABLE_VTK_IOXML="WANT"
+		-DVTK_MODULE_ENABLE_VTK_IOXMLParser="WANT"
+		-DVTK_MODULE_ENABLE_VTK_RenderingFreeType=$(usex freetype "WANT" "DEFAULT")
+		-DVTK_MODULE_ENABLE_VTK_RenderingFreeTypeFontConfig=$(usex freetype "WANT" "DEFAULT")
+		-DVTK_MODULE_ENABLE_VTK_cgns="WANT"
+		-DVTK_MODULE_ENABLE_VTK_doubleconversion="WANT"
+		-DVTK_MODULE_ENABLE_VTK_eigen="WANT"
+		-DVTK_MODULE_ENABLE_VTK_expat="WANT"
+		-DVTK_MODULE_ENABLE_VTK_fmt="WANT"
+		-DVTK_MODULE_ENABLE_VTK_freetype="WANT"
+		-DVTK_MODULE_ENABLE_VTK_hdf5="WANT"
+		-DVTK_MODULE_ENABLE_VTK_jpeg="WANT"
+		-DVTK_MODULE_ENABLE_VTK_jsoncpp="WANT"
+		-DVTK_MODULE_ENABLE_VTK_libharu="WANT"
+		-DVTK_MODULE_ENABLE_VTK_libproj="WANT"
+		-DVTK_MODULE_ENABLE_VTK_libxml2="WANT"
+		-DVTK_MODULE_ENABLE_VTK_lz4="WANT"
+		-DVTK_MODULE_ENABLE_VTK_lzma="WANT"
+		-DVTK_MODULE_ENABLE_VTK_netcdf="WANT"
+		-DVTK_MODULE_ENABLE_VTK_nlohmannjson="WANT"
+		-DVTK_MODULE_ENABLE_VTK_ogg="WANT"
+		-DVTK_MODULE_ENABLE_VTK_pegtl="WANT"
+		-DVTK_MODULE_ENABLE_VTK_png="WANT"
+		-DVTK_MODULE_ENABLE_VTK_pugixml="WANT"
+		-DVTK_MODULE_ENABLE_VTK_sqlite="WANT"
+		-DVTK_MODULE_ENABLE_VTK_theora="WANT"
+		-DVTK_MODULE_ENABLE_VTK_tiff="WANT"
+		-DVTK_MODULE_ENABLE_VTK_utf8="WANT"
+		-DVTK_MODULE_ENABLE_VTK_vtkm=$(usex vtkm "WANT" "DEFAULT")
+		-DVTK_MODULE_ENABLE_VTK_zlib="WANT"
+
+		# not packaged in Gentoo
+		-DVTK_MODULE_USE_EXTERNAL_VTK_exprtk=OFF
+		-DVTK_MODULE_USE_EXTERNAL_VTK_ioss=OFF
+		-DVTK_MODULE_USE_EXTERNAL_VTK_verdict=OFF
+
+		-DVTK_RELOCATABLE_INSTALL=ON
+
+		-DVTK_SMP_ENABLE_OPENMP=$(usex openmp ON OFF)
+		-DVTK_SMP_ENABLE_STDTHREAD=$(usex threads ON OFF)
+		-DVTK_SMP_ENABLE_TBB=$(usex tbb ON OFF)
+
+		-DVTK_UNIFIED_INSTALL_TREE=ON
+
+		-DVTK_USE_CUDA=$(usex cuda ON OFF)
+		# 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 ON OFF)
+		-DVTK_USE_TK=$(usex tk ON OFF)
+		-DVTK_USE_X=ON
+
+		-DVTK_WHEEL_BUILD=OFF
+
+		-DVTK_WRAP_JAVA=$(usex java ON OFF)
+		-DVTK_WRAP_PYTHON=$(usex python ON OFF)
+	)
+
+	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"
+
+			# available in ::guru, so avoid  detection if installed
+			-DVTK_MODULE_USE_EXTERNAL_VTK_cli11=OFF
+		)
+	fi
+
+	if use boost; then
+		mycmakeargs+=(
+			-DVTK_MODULE_ENABLE_VTK_InfovisBoost="WANT"
+			-DVTK_MODULE_ENABLE_VTK_InfovisBoostGraphAlgorithms="WANT"
+		)
+	fi
+
+	# TODO: checks this on updates of nvidia-cuda-toolkit and update
+	# the list of available arches if necessary, i.e. add new arches
+	# once they are released at the end of the list before all.
+	# See https://en.wikipedia.org/wiki/CUDA#GPUs_supported
+	if use cuda; then
+		local cuda_arch=
+		case ${VTK_CUDA_ARCH:-native} in
+			# we ignore fermi arch, because current nvidia-cuda-toolkit-11*
+			# no longer supports it
+			kepler|maxwell|pascal|volta|turing|ampere|all)
+				cuda_arch=${VTK_CUDA_ARCH}
+				;;
+			native)
+				ewarn "If auto detection fails for you, please try and export the"
+				ewarn "VTK_CUDA_ARCH environment variable to one of the common arch"
+				ewarn "names: kepler, maxwell, pascal, volta, turing, ampere or all."
+				cuda_arch=native
+				;;
+			*)
+				eerror "Please properly set the VTK_CUDA_ARCH environment variable to"
+				eerror "one of: kepler, maxwell, pascal, volta, turing, ampere, all"
+				die "Invalid CUDA architecture given: '${VTK_CUDA_ARCH}'!"
+				;;
+		esac
+		ewarn "Using CUDA architecture '${cuda_arch}'"
+
+		mycmakeargs+=( -DVTKm_CUDA_Architecture=${cuda_arch} )
+	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="WANT" )
+		if use rendering; then
+			mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_RenderingFFMPEGOpenGL2="WANT" )
+		fi
+	fi
+
+	if use gdal; then
+		mycmakeargs+=(
+			-DVTK_MODULE_ENABLE_VTK_GeovisGDAL="WANT"
+			-DVTK_MODULE_ENABLE_VTK_IOGDAL="WANT"
+			-DVTK_MODULE_ENABLE_VTK_IOGeoJSON="WANT"
+		)
+	fi
+
+	if use imaging; then
+		mycmakeargs+=(
+			-DVTK_MODULE_ENABLE_VTK_ImagingColor="WANT"
+			-DVTK_MODULE_ENABLE_VTK_ImagingCore="WANT"
+			-DVTK_MODULE_ENABLE_VTK_ImagingFourier="WANT"
+			-DVTK_MODULE_ENABLE_VTK_ImagingGeneral="WANT"
+			-DVTK_MODULE_ENABLE_VTK_ImagingHybrid="WANT"
+			-DVTK_MODULE_ENABLE_VTK_ImagingMath="WANT"
+			-DVTK_MODULE_ENABLE_VTK_ImagingMorphological="WANT"
+			-DVTK_MODULE_ENABLE_VTK_ImagingOpenGL2="WANT"
+			-DVTK_MODULE_ENABLE_VTK_ImagingSources="WANT"
+			-DVTK_MODULE_ENABLE_VTK_ImagingStatistics="WANT"
+			-DVTK_MODULE_ENABLE_VTK_ImagingStencil="WANT"
+		)
+		use rendering && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_RenderingImage="WANT" )
+	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="WANT"
+		)
+	fi
+
+	if use mpi; then
+		mycmakeargs+=(
+			-DVTK_GROUP_ENABLE_MPI="YES"
+			-DVTK_MODULE_ENABLE_VTK_IOH5part="WANT"
+			-DVTK_MODULE_ENABLE_VTK_IOMPIParallel="WANT"
+			-DVTK_MODULE_ENABLE_VTK_IOParallel="WANT"
+			-DVTK_MODULE_ENABLE_VTK_IOParallelNetCDF="WANT"
+			-DVTK_MODULE_ENABLE_VTK_IOParallelXML="WANT"
+			-DVTK_MODULE_ENABLE_VTK_ParallelMPI="WANT"
+			-DVTK_MODULE_ENABLE_VTK_h5part="WANT"
+			-DVTK_MODULE_USE_EXTERNAL_VTK_verdict=OFF
+		)
+		use imaging && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_IOMPIImage="WANT" )
+		use python && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_ParallelMPI4Py="WANT" )
+		if use rendering; then
+			mycmakeargs+=(
+				-DVTK_MODULE_ENABLE_VTK_RenderingParallel="WANT"
+				-DVTK_MODULE_ENABLE_VTK_RenderingParallelLIC="WANT"
+			)
+		fi
+		use vtkm && mycmakeargs+=( -DVTKm_ENABLE_MPI=ON )
+	else
+		mycmakeargs+=( -DVTK_GROUP_ENABLE_MPI="NO" )
+	fi
+
+	use mysql && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_IOMySQL="WANT" )
+	use odbc && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_IOODBC="WANT" )
+	use openvdb && mycmakeargs+=( -DOpenVDB_CMAKE_PATH="${ESYSROOT}/usr/$(get_libdir)/cmake/OpenVDB" )
+	use postgres && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_IOPostgreSQL="WANT" )
+
+	if use python; then
+		mycmakeargs+=(
+			-DPython3_EXECUTABLE="${PYTHON}"
+			-DVTK_ENABLE_WRAPPING=ON
+			-DVTK_MODULE_ENABLE_VTK_Python="WANT"
+			-DVTK_MODULE_ENABLE_VTK_PythonInterpreter="WANT"
+			-DVTK_MODULE_ENABLE_VTK_WrappingPythonCore="WANT"
+			-DVTK_PYTHON_SITE_PACKAGES_SUFFIX="lib/${EPYTHON}/site-packages"
+		)
+		use rendering && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_PythonContext2D="WANT" )
+	fi
+
+	if use qt5 && use qt6; then
+		# prefer Qt5: https://wiki.gentoo.org/wiki/Project:qt/Policies
+		mycmakeargs+=(
+			-DCMAKE_INSTALL_QMLDIR="${EPREFIX}/usr/$(get_libdir)/qt5/qml"
+			-DVTK_QT_VERSION="5"
+		)
+	else
+		if use qt5; then
+			mycmakeargs+=(
+				-DCMAKE_INSTALL_QMLDIR="${EPREFIX}/usr/$(get_libdir)/qt5/qml"
+				-DVTK_QT_VERSION="5"
+			)
+		elif use qt6; then
+			mycmakeargs+=(
+				-DCMAKE_INSTALL_QMLDIR="${EPFREIX}/usr/$(get_libdir)/qt6/qml"
+				-DVTK_QT_VERSION="6"
+			)
+		else
+			mycmakeargs+=( -DVTK_GROUP_ENABLE_Qt="NO" )
+		fi
+	fi
+
+	if use qt5 || use qt6; then
+		mycmakeargs+=(
+			-DVTK_GROUP_ENABLE_Qt:STRING="YES"
+			-DVTK_MODULE_ENABLE_VTK_GUISupportQt="WANT"
+			-DVTK_MODULE_ENABLE_VTK_GUISupportQtQuick="WANT"
+		)
+		if use mysql || use postgres; then
+			mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_GUISupportQtSQL="WANT" )
+		fi
+		if use rendering; then
+			mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_RenderingQt="WANT" )
+		fi
+		if use views; then
+			mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_ViewsQt="WANT" )
+		fi
+	fi
+
+	if use rendering; then
+		mycmakeargs+=(
+			-DVTK_ENABLE_OSPRAY=OFF
+
+			-DVTK_MODULE_ENABLE_VTK_IOExportGL2PS="WANT"
+			-DVTK_MODULE_ENABLE_VTK_RenderingAnnotation="WANT"
+			-DVTK_MODULE_ENABLE_VTK_RenderingContext2D="WANT"
+			-DVTK_MODULE_ENABLE_VTK_RenderingContextOpenGL2="WANT"
+			-DVTK_MODULE_ENABLE_VTK_RenderingCore="WANT"
+			-DVTK_MODULE_ENABLE_VTK_RenderingExternal="WANT"
+			-DVTK_MODULE_ENABLE_VTK_RenderingGL2PSOpenGL2="WANT"
+			-DVTK_MODULE_ENABLE_VTK_RenderingHyperTreeGrid="WANT"
+			-DVTK_MODULE_ENABLE_VTK_RenderingLICOpenGL2="WANT"
+			-DVTK_MODULE_ENABLE_VTK_RenderingLOD="WANT"
+			-DVTK_MODULE_ENABLE_VTK_RenderingLabel="WANT"
+			-DVTK_MODULE_ENABLE_VTK_RenderingMatplotlib="WANT"
+			-DVTK_MODULE_ENABLE_VTK_RenderingOpenGL2="WANT"
+			-DVTK_MODULE_ENABLE_VTK_RenderingRayTracing="WANT"
+			-DVTK_MODULE_ENABLE_VTK_RenderingSceneGraph="WANT"
+			-DVTK_MODULE_ENABLE_VTK_RenderingUI="WANT"
+			-DVTK_MODULE_ENABLE_VTK_RenderingVolume="WANT"
+			-DVTK_MODULE_ENABLE_VTK_RenderingVolumeAMR="WANT"
+			-DVTK_MODULE_ENABLE_VTK_RenderingVolumeOpenGL2="WANT"
+			-DVTK_MODULE_ENABLE_VTK_gl2ps="WANT"
+			-DVTK_MODULE_ENABLE_VTK_glew="WANT"
+			-DVTK_MODULE_ENABLE_VTK_opengl="WANT"
+
+			-DVTK_USE_SDL2=$(usex sdl "YES" "NO")
+		)
+		use tk && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_RenderingTk="WANT" )
+		use views && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_ViewsContext2D="WANT" )
+		use web && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_RenderingVtkJS="WANT" )
+	fi
+
+	if use test; then
+		ewarn "Testing requires VTK_FORBID_DOWNLOADS=OFF by upstream."
+		ewarn "Care has been taken to pre-download all required files."
+		ewarn "In case you find missing files, please inform me."
+		mycmakeargs+=(
+			-DVTK_BUILD_TESTING=ON
+			-DVTK_FORBID_DOWNLOADS=OFF
+
+			# requested even if all use flags are off
+			-DVTK_MODULE_ENABLE_VTK_octree="WANT"
+			-DVTK_MODULE_ENABLE_VTK_ViewsCore="WANT"
+
+			# available in ::guru, so avoid  detection if installed
+			-DVTK_MODULE_USE_EXTERNAL_VTK_cli11=OFF
+		)
+	else
+		mycmakeargs+=(
+			-DVTK_BUILD_TESTING=OFF
+			-DVTK_FORBID_DOWNLOADS=ON
+		)
+	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 < stdpthread < 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
+		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="WANT"
+			-DVTK_MODULE_ENABLE_VTK_ViewsInfovis="WANT"
+		)
+	fi
+
+	if use vtkm; then
+		mycmakeargs+=(
+			-DVTK_MODULE_ENABLE_VTK_AcceleratorsVTKmCore="WANT"
+			-DVTK_MODULE_ENABLE_VTK_AcceleratorsVTKmDataModel="WANT"
+			-DVTK_MODULE_ENABLE_VTK_AcceleratorsVTKmFilters="WANT"
+
+#			-DVTKm_ENABLE_DEVELOPER_FLAGS=OFF
+#			-DVTKm_ENABLE_HDF5_IO=ON
+
+			-DVTKm_NO_INSTALL_README_LICENSE=ON # bug #793221
+			-DVTKm_Vectorization=native
+		)
+	fi
+
+	if use web; then
+		mycmakeargs+=(
+			-DVTK_MODULE_ENABLE_VTK_WebCore="WANT"
+			-DVTK_MODULE_ENABLE_VTK_WebGLExporter="WANT"
+		)
+		use python && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_WebPython="WANT" )
+	fi
+
+	use java && export JAVA_HOME="${EPREFIX}/etc/java-config-2/current-system-vm"
+
+# FIXME: looks like it's not needed, builts with USE=mpi and gcc
+#	if use mpi; then
+#		export CC=mpicc
+#		export CXX=mpicxx
+#		export FC=mpif90
+#		export F90=mpif90
+#		export F77=mpif77
+#	fi
+
+	cmake_src_configure
+}
+
+# FIXME: avoid nonfatal?
+# see https://github.com/gentoo/gentoo/pull/22878#discussion_r747204043
+src_test() {
+#	nonfatal virtx cmake_src_test
+	virtx cmake_src_test
+}
+
+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
+}


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/vtk/, sci-libs/vtk/files/
@ 2023-02-27 16:46 Joonas Niilola
  0 siblings, 0 replies; 19+ messages in thread
From: Joonas Niilola @ 2023-02-27 16:46 UTC (permalink / raw
  To: gentoo-commits

commit:     2ad7471df4b05d94ce984de1b54f6f2f8304ff34
Author:     Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net>
AuthorDate: Sun Feb 19 15:21:20 2023 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Mon Feb 27 16:46:53 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ad7471d

sci-libs/vtk: build against CUDA 12

Closes: https://bugs.gentoo.org/894646
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net>
Closes: https://github.com/gentoo/gentoo/pull/29664
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 ...k-9.2.5-Fix-compilation-error-with-CUDA-12.patch | 21 +++++++++++++++++++++
 sci-libs/vtk/vtk-9.2.5.ebuild                       |  1 +
 2 files changed, 22 insertions(+)

diff --git a/sci-libs/vtk/files/vtk-9.2.5-Fix-compilation-error-with-CUDA-12.patch b/sci-libs/vtk/files/vtk-9.2.5-Fix-compilation-error-with-CUDA-12.patch
new file mode 100644
index 000000000000..9b8583fa61e2
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.2.5-Fix-compilation-error-with-CUDA-12.patch
@@ -0,0 +1,21 @@
+https://894646.bugs.gentoo.org/attachment.cgi?id=851914
+https://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/2972/diffs
+
+From be96ea7d85fefcad876729377c1b73a295d1c732 Mon Sep 17 00:00:00 2001
+From: "Luke A. Guest" <laguest@archeia.com>
+Date: Thu, 16 Feb 2023 16:57:32 +0000
+Subject: [PATCH] Fix compilation error with CUDA 12.
+
+--- a/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/exec/cuda/internal/ExecutionPolicy.h
++++ b/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/exec/cuda/internal/ExecutionPolicy.h
+@@ -17,6 +17,7 @@
+ #include <vtkm/exec/cuda/internal/ThrustPatches.h>
+ VTKM_THIRDPARTY_PRE_INCLUDE
+ #include <thrust/execution_policy.h>
++#include <thrust/sort.h>
+ #include <thrust/system/cuda/execution_policy.h>
+ #include <thrust/system/cuda/memory.h>
+ VTKM_THIRDPARTY_POST_INCLUDE
+-- 
+2.39.1
+

diff --git a/sci-libs/vtk/vtk-9.2.5.ebuild b/sci-libs/vtk/vtk-9.2.5.ebuild
index 88721c38e704..eb117e951095 100644
--- a/sci-libs/vtk/vtk-9.2.5.ebuild
+++ b/sci-libs/vtk/vtk-9.2.5.ebuild
@@ -163,6 +163,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-9.2.2-link-with-glut-library-for-freeglut.patch
 	"${FILESDIR}"/${PN}-9.2.5-Add-include-cstdint-to-compile-with-gcc-13.patch
 	"${FILESDIR}"/${PN}-9.2.5-Add-include-cstdint-for-gcc-13.patch
+	"${FILESDIR}"/${PN}-9.2.5-Fix-compilation-error-with-CUDA-12.patch
 )
 
 DOCS=( CONTRIBUTING.md README.md )


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/vtk/, sci-libs/vtk/files/
@ 2023-05-03 22:23 Sam James
  0 siblings, 0 replies; 19+ messages in thread
From: Sam James @ 2023-05-03 22:23 UTC (permalink / raw
  To: gentoo-commits

commit:     86a9526ce8490c8689d8dad8c5c82a2f903e8ffa
Author:     Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net>
AuthorDate: Wed May  3 16:14:18 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed May  3 22:23:19 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=86a9526c

sci-libs/vtk: fix build with gcc-13

add upstream patch with gcc-13 related fixes

Closes: https://bugs.gentoo.org/905387
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net>
Closes: https://github.com/gentoo/gentoo/pull/30859
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../vtk-9.2.5-Add-include-cstdint-for-gcc-13.patch | 20 -------------
 ...ore-include-cstdint-to-compile-with-gcc13.patch | 33 ++++++++++++++++++++++
 sci-libs/vtk/vtk-9.2.5.ebuild                      |  2 +-
 3 files changed, 34 insertions(+), 21 deletions(-)

diff --git a/sci-libs/vtk/files/vtk-9.2.5-Add-include-cstdint-for-gcc-13.patch b/sci-libs/vtk/files/vtk-9.2.5-Add-include-cstdint-for-gcc-13.patch
deleted file mode 100644
index 3ab71521b6b5..000000000000
--- a/sci-libs/vtk/files/vtk-9.2.5-Add-include-cstdint-for-gcc-13.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-From 69351f357a82c0bb7f97f4f707962de3400760a8 Mon Sep 17 00:00:00 2001
-From: Bernd Waibel <waebbl-gentoo@posteo.net>
-Date: Sun, 29 Jan 2023 12:17:36 +0100
-Subject: [PATCH] Add #include <cstdint> for gcc-13
-
-Bug: https://gitlab.kitware.com/vtk/vtk/-/issues/18782
-Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
---- a/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h
-+++ b/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h
-@@ -50,6 +50,7 @@
- #include "vtkRenderingMatplotlibModule.h" // For export macro
- 
- #include <vector> // for std::vector
-+#include <cstdint> // for std::uint64_t
- 
- struct _object;
- typedef struct _object PyObject;
--- 
-2.39.1
-

diff --git a/sci-libs/vtk/files/vtk-9.2.5-More-include-cstdint-to-compile-with-gcc13.patch b/sci-libs/vtk/files/vtk-9.2.5-More-include-cstdint-to-compile-with-gcc13.patch
new file mode 100644
index 000000000000..356efbb4da9a
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.2.5-More-include-cstdint-to-compile-with-gcc13.patch
@@ -0,0 +1,33 @@
+https://bugs.gentoo.org/905387
+https://github.com/Kitware/VTK/commit/4d8283bcb460ff60d8df1b7b67b5db19876a5ca3
+
+From 890f7574f01cf58cb1522772a62ca07deb438479 Mon Sep 17 00:00:00 2001
+From: Mathieu Westphal <mathieu.westphal@kitware.com>
+Date: Thu, 23 Feb 2023 18:06:07 +0100
+Subject: [PATCH 1580/2105] More #include <cstdint> to compile with gcc13
+
+--- a/IO/PIO/PIOData.h
++++ b/IO/PIO/PIOData.h
+@@ -1,6 +1,7 @@
+ #if !defined(_PIODATA_H)
+ #define _PIODATA_H
+ 
++#include <cstdint>
+ #include <fstream>
+ #include <iostream>
+ #include <list>
+--- a/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h
++++ b/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h
+@@ -49,7 +49,8 @@
+ #include "vtkMathTextUtilities.h"
+ #include "vtkRenderingMatplotlibModule.h" // For export macro
+ 
+-#include <vector> // for std::vector
++#include <cstdint> // for std::uint64_t
++#include <vector>  // for std::vector
+ 
+ struct _object;
+ typedef struct _object PyObject;
+-- 
+2.40.1
+

diff --git a/sci-libs/vtk/vtk-9.2.5.ebuild b/sci-libs/vtk/vtk-9.2.5.ebuild
index e4fc6333d5f8..23a48458dd3a 100644
--- a/sci-libs/vtk/vtk-9.2.5.ebuild
+++ b/sci-libs/vtk/vtk-9.2.5.ebuild
@@ -162,8 +162,8 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-9.2.2-VTKm-respect-user-CXXFLAGS.patch
 	"${FILESDIR}"/${PN}-9.2.2-link-with-glut-library-for-freeglut.patch
 	"${FILESDIR}"/${PN}-9.2.5-Add-include-cstdint-to-compile-with-gcc-13.patch
-	"${FILESDIR}"/${PN}-9.2.5-Add-include-cstdint-for-gcc-13.patch
 	"${FILESDIR}"/${PN}-9.2.5-Fix-compilation-error-with-CUDA-12.patch
+	"${FILESDIR}"/${PN}-9.2.5-More-include-cstdint-to-compile-with-gcc13.patch
 )
 
 DOCS=( CONTRIBUTING.md README.md )


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/vtk/, sci-libs/vtk/files/
@ 2024-09-07 14:27 Sam James
  0 siblings, 0 replies; 19+ messages in thread
From: Sam James @ 2024-09-07 14:27 UTC (permalink / raw
  To: gentoo-commits

commit:     ebd71c0b8cd45077a7fda0d190e8f8fe887940ce
Author:     Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Sat Sep  7 11:25:05 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Sep  7 14:26:45 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ebd71c0b

sci-libs/vtk: drop 9.2.5-r2 9.2.6-r3

Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-libs/vtk/Manifest                              |  12 -
 .../vtk-9.2.2-VTKm-respect-user-CXXFLAGS.patch     |  81 ---
 ...9.2.2-link-with-glut-library-for-freeglut.patch |  18 -
 ...metryFilter-add-missing-mutex-header-file.patch |  20 -
 ...dd-include-cstdint-to-compile-with-gcc-13.patch |  30 -
 ...-9.2.5-Fix-compilation-error-with-CUDA-12.patch |  21 -
 ...ore-include-cstdint-to-compile-with-gcc13.patch |  33 -
 sci-libs/vtk/files/vtk-9.2.6-Java21.patch          |  15 -
 sci-libs/vtk/vtk-9.2.5-r2.ebuild                   | 746 --------------------
 sci-libs/vtk/vtk-9.2.6-r3.ebuild                   | 747 ---------------------
 10 files changed, 1723 deletions(-)

diff --git a/sci-libs/vtk/Manifest b/sci-libs/vtk/Manifest
index 51b1e50afdd1..778c263572f8 100644
--- a/sci-libs/vtk/Manifest
+++ b/sci-libs/vtk/Manifest
@@ -1,18 +1,6 @@
-DIST VTK-9.2.5.tar.gz 53807732 BLAKE2B 8d25ec8f23c12868b2321eca84644dbf44704e58b7b79b2fd3a1260f7a240a78e4007fd99633ba93359103afc8ec00c7fa84f62778aed3d3361e1774a87b5626 SHA512 b1f225fb2589449621fd32bb0fc3f4817478d972cdccf7a9a376f1c17e93d5bd0a0511cdaa8587568a4baac9dfa8b5ffb9041442e221cd98d8f55e9981b6fcbf
-DIST VTK-9.2.6.tar.gz 53810904 BLAKE2B e3f9736a9b38415e0edd4b4c4bfe83aa154221c3c2c582e527996f88386b1b4d7864ddd2a364c0e83596ff45902cb7cde548ac3a4eebe06c2e43925c2608c4d3 SHA512 f2328caae959d583299b7fd57205f3dd76f87c8c1ee78653e85d44cab085295bf7bf88b3f6a2b960a57df96ccb32049337ebccb067ecde6d84d25eda636196bc
 DIST VTK-9.3.0.tar.gz 99932810 BLAKE2B 59c2cdfe1c2525ac0f89df77a668783d928b55d2e72b42df45ea9b789da1bb150d52ce4108f2bc39cb8840cdd1998f57d3aedf96c72e402f6115d9efeebf4486 SHA512 2722dc8186779df1af5c534f26b20186ea33cb3bca2cef8cb333542b12e738382616e26e8d4d0341cb98c30403f8a896d77ddb04adb07e26d0d548c4a34b7d2f
-DIST VTKData-9.2.5.tar.gz 594016050 BLAKE2B 7f03f5640ee648275a9771f990f98a3b5dfee10c0e291b353e6f067a098d50e2653c577b7c9c4e19c1d554e14469968014d1dfe9e70a91ecbff75397a53c9be9 SHA512 c06264c10bf78943753e58b9cb034d56b65570995741020dc58d5703525cdd4842d680fb6e185fa8fc39b72225ea6b29d8d632c0327f4145a7e2b79f3f702ec3
-DIST VTKData-9.2.6.tar.gz 594029678 BLAKE2B b3d6990a8098d9bec02a031b6d804049ce649bcd58fbcd74001e893ba41159e49f4dea74c5957737098a39a399d347b3bc65db4feadf152dd3fb8e705da16eb4 SHA512 5c5f2b365777733180a63daff224da7055e1c2911eb5e4efda26e38b9ac01cb8e886cf7e71c45ac83347642caf1786e72bb469c22954ffbbb6e2c317fc6b4080
 DIST VTKData-9.3.0.tar.gz 612388942 BLAKE2B 66d73ddaf5f2ddf52cf5c6dda5a918a86ae630df207983534478c92a66c39e38b1f4abfb93900b36899a93ad0e26260763573e925bd128c1646a1bc3bef8c54d SHA512 385d609c2adc1746c073690b58a3fc25e496946c03f08e6c9e0a69ee406cee447e66d267986c3e5ba9006dd1cb0015b68134bb3c375ae41aef8f3b1e0d923d51
-DIST VTKDataFiles-9.2.5.tar.gz 609038837 BLAKE2B e6a5aa5a865664cf407914c9598497f6304b914748ce9d9145b5b7d53f5897b4056b6f7615bb8221c9a9747caf13ba632e21b060b1c8963bb7d6b257bb1da559 SHA512 c0cf7e0fb79f626e25946f1154d9e4c3e7ec995a823a01fc9638976f89af26ae8978a5b6c8a78d62f42f7f81b5fbe0cddc6afc5836c214f3dcaddb917a1ccc79
-DIST VTKDataFiles-9.2.6.tar.gz 609045751 BLAKE2B c8a4a8472dcc05f5b1d35c8f6923b4ed2e7adb593a3037ae7673a5e674583ef9ccc5bc1ec8cf29e87fd5b168c0bba5ed27b89c51fe2e5da432ef5d50e415af94 SHA512 f7c104641d25126956a50671934c10b25589e435d7cce6a5107c8dcf83a81f48ed3ae8a325b635f341a5a47579f9200689aa5eb34fe0d1c37acddfeedd33cd01
 DIST VTKDataFiles-9.3.0.tar.gz 628646039 BLAKE2B c2a4e875536c0b06f1edc8a8df17defbe1038067d7a04fc07e71ea49cad46139ef25f64d4b434a095ced16a7ff39d5346d34c528c099ea2e126c9f29afe92482 SHA512 c6788acfa790ce6b02aa5545fa4e411d00896b7542416c18b5e5955909f26a8fab9267e44db1c2a86f95f7a7f093695453f3fd0ec4e2c9a73449f9caf3fc09d5
-DIST VTKLargeData-9.2.5.tar.gz 247523496 BLAKE2B edc785e271ba605c730b9c8d9d62d2d95d818ebf18e4b20468c247187720a27897ecbf701e1eff61ba135545e6ea8f573ef120206813ee5ca11be33d8c5ff728 SHA512 7a994024aa42b48d3633cdcc528d89a2e7e07bcc47d01a0001578720dbc2eb991b90dc2f9caafe8f26a1f10185efb1bc2c0506f799da2b96e63ba08cb564117d
-DIST VTKLargeData-9.2.6.tar.gz 247521022 BLAKE2B ee6e5f627a5cb96aac6a53b7ff14d4a40f1e243a095c7d145412d899ab9d509af5a62ab889fc48c96ff78359443afbeecfa70cb937affdad7225071374b28bec SHA512 f0b71baa4e346746e186c6a0cc93588d227b91cd4993ee6afe15708006250b0b3aa9447822845e01432728c12af56c68a213831b6dc809807ca341ff6912f55f
 DIST VTKLargeData-9.3.0.tar.gz 247520869 BLAKE2B e01f3d0997d0b328d6c5909d6b891443c1246bdbc36aa978004a1d4bb2770f7923afed2c0d78f7844aae95e067425b9dd25a1c47601c8137ba0a8a958b708cab SHA512 d87eb0fb4ce27ae9f4363c54bb711e66c5d2dbcdf508cb5fae9fcc1574407df2816f29d20037297b834440cd8a54fcf8e1d6db14700054f057bff2fe48404d33
-DIST VTKLargeDataFiles-9.2.5.tar.gz 247506616 BLAKE2B 45cd462a11dfa65260a5aa178b2004636eb8ec000af9103fd2fc64ca55b0f607cdf39c40f5f0a9ef843b7b2e468e0f84a34dafb8b8655efce5c8d39c80961422 SHA512 da96e4f1d0e21bc597832d8cd0730dcdd8a8f7d6c1f41f74ec41a7a1d0b2a2d61e86bcb5fade7d3210b9d66cae975b537e25280767e37fe08e0965b3e98c1cae
-DIST VTKLargeDataFiles-9.2.6.tar.gz 247505945 BLAKE2B dafec016a17bc4371972e85fe95e5032f385ef090ca7f3cc4e060976798c18015e34d74aa008a0532a37b3a51df406886a1d70c2eae18f6092a1c16cc861a81a SHA512 5266d7761987d651e1185e7a8fcc556634e129bb2dab892f8bba0e408a950f38c3f96c521a2079bfdc16a6cefb7b4cebc0b63aea945c4f3f0b6a99c55d638197
 DIST VTKLargeDataFiles-9.3.0.tar.gz 247503839 BLAKE2B 68007af36148eaae43fc0fd75b9f8d3b165c977b7bc44efa4ce7077dc4977514f49a4d7d5e4a9e43fc9dec6562d741bdee5df87efa285b3361f865023da14f55 SHA512 f7def947ff492acbfdaa3d360064c42fdd3fedab27fd5d7bed1dbf8054b814cc8843ba0fed7078926648d1e8949235b877de97747be079ea478b79558975e6ea
-DIST vtkDocHtml-9.2.5.tar.gz 158865725 BLAKE2B ccfb6276955bda567e7f2b6fdc5e3e601766bae0314821c243a3d009e1557c5732bfbab59358670c4bc6cd598ba80c284971763e5279bc53c37d954ec30fcc03 SHA512 7901e9fb987ef3b88e8c507ecc7538b551c81d04a9cc65a84ff43b40dc1aeca2a694dd9842a030979a1370873b9fed0c8746a0634b486566086d7784a19181d6
-DIST vtkDocHtml-9.2.6.tar.gz 158833419 BLAKE2B 04686ee0373191fec454738b5e745f3f6d913120dd55727732ab31a021eeaf1395e6a39ee0e2a943c80dc9d32a929dacfc1325afad5a412964dabb4eda32c898 SHA512 e72cfda5cfeb3df0f915f6515bbd34bcb32052af940760cfb1c9845a5c0a81fae38837fb2e192eb95446cd27b65b37b79263f5396631e4665c9d8c57455dcf43
 DIST vtkDocHtml-9.3.0.tar.gz 165538725 BLAKE2B 27874998679090d5442ecb3a394b53db05a0215cfee9f912bd01af1d5567efc51b4f56dacb960401195da4f3d385b335bbefc922a45d0199c99d619df0941f08 SHA512 8bf9cc87c4653a65ccc39d88d70b421a7b4353986d380cbf558cbf6e8a96435695a5d54aa7ce5bb1240cb46ca0fd9225a51183a39d1af1101d3f2876a2afc10b

diff --git a/sci-libs/vtk/files/vtk-9.2.2-VTKm-respect-user-CXXFLAGS.patch b/sci-libs/vtk/files/vtk-9.2.2-VTKm-respect-user-CXXFLAGS.patch
deleted file mode 100644
index c47bced20f22..000000000000
--- a/sci-libs/vtk/files/vtk-9.2.2-VTKm-respect-user-CXXFLAGS.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From 225a077898eb714e5ecb80255796aa70625e6cea Mon Sep 17 00:00:00 2001
-From: Bernd Waibel <waebbl-gentoo@posteo.net>
-Date: Sat, 12 Nov 2022 02:01:35 +0100
-Subject: [PATCH] VTKm respect user CXXFLAGS
-
-Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
---- a/Accelerators/Vtkm/Core/CMakeLists.txt
-+++ b/Accelerators/Vtkm/Core/CMakeLists.txt
-@@ -79,6 +79,16 @@ if (TARGET vtkm::cuda)
-   vtk_module_set_properties(VTK::AcceleratorsVTKmCore
-     LANGUAGE CUDA
-     CUDA_SEPARABLE_COMPILATION ON)
-+
-+  string(STRIP ${CMAKE_CXX_FLAGS} _cmake_cxx_flags)
-+  string(REPLACE " " ";" cmake_cxx_flags_list ${_cmake_cxx_flags})
-+  set(cxx_flags -Wall)
-+  foreach(cmake_cxx_flag ${cmake_cxx_flags_list})
-+    list(APPEND cxx_flags $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=${cmake_cxx_flag}>)
-+  endforeach()
-+  vtk_module_compile_options(VTK::AcceleratorsVTKmCore
-+    PUBLIC
-+      ${cxx_flags})
- endif()
- 
- if (MSVC)
---- a/Accelerators/Vtkm/DataModel/CMakeLists.txt
-+++ b/Accelerators/Vtkm/DataModel/CMakeLists.txt
-@@ -89,6 +89,16 @@ if (TARGET vtkm::cuda)
- 
-   vtk_module_compile_options(VTK::AcceleratorsVTKmDataModel
-     PUBLIC $<$<COMPILE_LANGUAGE:CUDA>:-Xcudafe --diag_suppress=extra_semicolon>)
-+
-+  string(STRIP ${CMAKE_CXX_FLAGS} _cmake_cxx_flags)
-+  string(REPLACE " " ";" cmake_cxx_flags_list ${_cmake_cxx_flags})
-+  set(cxx_flags -Wall)
-+  foreach(cmake_cxx_flag ${cmake_cxx_flags_list})
-+    list(APPEND cxx_flags $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=${cmake_cxx_flag}>)
-+  endforeach()
-+  vtk_module_compile_options(VTK::AcceleratorsVTKmDataModel
-+    PUBLIC
-+      ${cxx_flags})
- endif ()
- 
- if (MSVC)
---- a/Accelerators/Vtkm/Filters/CMakeLists.txt
-+++ b/Accelerators/Vtkm/Filters/CMakeLists.txt
-@@ -138,6 +138,16 @@ if (TARGET vtkm::cuda)
- 
-   vtk_module_compile_options(VTK::AcceleratorsVTKmFilters
-     PUBLIC $<$<COMPILE_LANGUAGE:CUDA>:-Xcudafe --diag_suppress=extra_semicolon>)
-+
-+  string(STRIP ${CMAKE_CXX_FLAGS} _cmake_cxx_flags)
-+  string(REPLACE " " ";" cmake_cxx_flags_list ${_cmake_cxx_flags})
-+  set(cxx_flags -Wall)
-+  foreach(cmake_cxx_flag ${cmake_cxx_flags_list})
-+    list(APPEND cxx_flags $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=${cmake_cxx_flag}>)
-+  endforeach()
-+  vtk_module_compile_options(VTK::AcceleratorsVTKmFilters
-+    PUBLIC
-+      ${cxx_flags})
- endif ()
- 
- if (MSVC)
---- a/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake/VTKmCompilerFlags.cmake
-+++ b/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake/VTKmCompilerFlags.cmake
-@@ -126,6 +126,12 @@ elseif(VTKM_COMPILER_IS_ICC)
- elseif(VTKM_COMPILER_IS_GNU OR VTKM_COMPILER_IS_CLANG)
-   set(cxx_flags -Wall -Wcast-align -Wextra -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wunused -fno-common -Wno-unused-function)
-   set(cuda_flags -Xcompiler=-Wall,-Wcast-align,-Wpointer-arith,-Wformat,-Wformat-security,-Wshadow,-fno-common,-Wunused,-Wno-unknown-pragmas,-Wno-unused-local-typedefs,-Wno-unused-function)
-+  string(STRIP ${CMAKE_CXX_FLAGS} _cmake_cxx_flags)
-+  string(REPLACE " " ";" cmake_cxx_flags_list ${_cmake_cxx_flags})
-+  foreach(elem ${cmake_cxx_flags_list})
-+    list(PREPEND cxx_flags ${elem})
-+    list(PREPEND cuda_flags -Xcompiler=${elem})
-+  endforeach()
- 
-   #Clang does not support the -Wchar-subscripts flag for warning if an array
-   #subscript has a char type.
--- 
-2.38.1
-

diff --git a/sci-libs/vtk/files/vtk-9.2.2-link-with-glut-library-for-freeglut.patch b/sci-libs/vtk/files/vtk-9.2.2-link-with-glut-library-for-freeglut.patch
deleted file mode 100644
index 39b7e7ab0f15..000000000000
--- a/sci-libs/vtk/files/vtk-9.2.2-link-with-glut-library-for-freeglut.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-From 801654a5f1c3991ff9bb3ea5798afdd252d214b6 Mon Sep 17 00:00:00 2001
-From: Bernd Waibel <waebbl-gentoo@posteo.net>
-Date: Mon, 21 Nov 2022 15:35:58 +0100
-Subject: [PATCH] link with glut library for freeglut
-
-Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
---- a/Rendering/External/Testing/Cxx/CMakeLists.txt
-+++ b/Rendering/External/Testing/Cxx/CMakeLists.txt
-@@ -12,5 +12,5 @@ if(NOT APPLE)
- 
-   vtk_test_cxx_executable(vtkRenderingExternalCxxTests tests)
-   target_link_libraries(vtkRenderingExternalCxxTests PRIVATE
--    ${GLUT_LIBRARY})
-+    ${GLUT_LIBRARIES})
- endif()
--- 
-2.38.1
-

diff --git a/sci-libs/vtk/files/vtk-9.2.2-vtkGeometryFilter-add-missing-mutex-header-file.patch b/sci-libs/vtk/files/vtk-9.2.2-vtkGeometryFilter-add-missing-mutex-header-file.patch
deleted file mode 100644
index 287d804847bb..000000000000
--- a/sci-libs/vtk/files/vtk-9.2.2-vtkGeometryFilter-add-missing-mutex-header-file.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-From https://gitlab.kitware.com/vtk/vtk/-/commit/57767732c4d54db89004c685022ac828bb51eccd
-
-From 57767732c4d54db89004c685022ac828bb51eccd Mon Sep 17 00:00:00 2001
-From: Andrew Bauer <bauer.andrew.c@gmail.com>
-Date: Wed, 27 Jul 2022 09:31:13 -0400
-Subject: [PATCH 033/614] vtkGeometryFilter: add missing mutex header file
-
---- a/Filters/Geometry/vtkGeometryFilter.cxx
-+++ b/Filters/Geometry/vtkGeometryFilter.cxx
-@@ -52,6 +52,7 @@
- #include "vtkWedge.h"
- 
- #include <memory>
-+#include <mutex>
- 
- vtkStandardNewMacro(vtkGeometryFilter);
- vtkCxxSetObjectMacro(vtkGeometryFilter, Locator, vtkIncrementalPointLocator);
--- 
-2.38.1
-

diff --git a/sci-libs/vtk/files/vtk-9.2.5-Add-include-cstdint-to-compile-with-gcc-13.patch b/sci-libs/vtk/files/vtk-9.2.5-Add-include-cstdint-to-compile-with-gcc-13.patch
deleted file mode 100644
index 82bf19b6b07f..000000000000
--- a/sci-libs/vtk/files/vtk-9.2.5-Add-include-cstdint-to-compile-with-gcc-13.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-https://gitlab.kitware.com/vtk/vtk/-/merge-requests/9857
-
-From ef95422b62296e4c136917095eace14f48cefb82 Mon Sep 17 00:00:00 2001
-From: Laurent Rineau <laurent.rineau@cgal.org>
-Date: Tue, 17 Jan 2023 16:18:53 +0100
-Subject: [PATCH] Add #include <cstdint> to compile with gcc13
-
-The `vtkSEPReader` was introduced by MRs !4909 (from my former
-collaborator Maxime) and !4938. Then it was highly modified by
-!7516. The later MR is the one that introduced the uses of
-`std::uint8_t` and `std::uint32_t`.
-
-Those types needs the inclusion of `<cstdint>`.
---- a/IO/Image/vtkSEPReader.h
-+++ b/IO/Image/vtkSEPReader.h
-@@ -25,8 +25,9 @@
- #include "vtkImageAlgorithm.h"
- #include "vtkNew.h" // for ivars
- 
--#include <array>  // for std::array
--#include <string> // for std::string
-+#include <array>   // for std::array
-+#include <cstdint> // for std::uint8_t and std::uint32_t
-+#include <string>  // for std::string
- 
- namespace details
- {
--- 
-GitLab
-

diff --git a/sci-libs/vtk/files/vtk-9.2.5-Fix-compilation-error-with-CUDA-12.patch b/sci-libs/vtk/files/vtk-9.2.5-Fix-compilation-error-with-CUDA-12.patch
deleted file mode 100644
index 9b8583fa61e2..000000000000
--- a/sci-libs/vtk/files/vtk-9.2.5-Fix-compilation-error-with-CUDA-12.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-https://894646.bugs.gentoo.org/attachment.cgi?id=851914
-https://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/2972/diffs
-
-From be96ea7d85fefcad876729377c1b73a295d1c732 Mon Sep 17 00:00:00 2001
-From: "Luke A. Guest" <laguest@archeia.com>
-Date: Thu, 16 Feb 2023 16:57:32 +0000
-Subject: [PATCH] Fix compilation error with CUDA 12.
-
---- a/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/exec/cuda/internal/ExecutionPolicy.h
-+++ b/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/exec/cuda/internal/ExecutionPolicy.h
-@@ -17,6 +17,7 @@
- #include <vtkm/exec/cuda/internal/ThrustPatches.h>
- VTKM_THIRDPARTY_PRE_INCLUDE
- #include <thrust/execution_policy.h>
-+#include <thrust/sort.h>
- #include <thrust/system/cuda/execution_policy.h>
- #include <thrust/system/cuda/memory.h>
- VTKM_THIRDPARTY_POST_INCLUDE
--- 
-2.39.1
-

diff --git a/sci-libs/vtk/files/vtk-9.2.5-More-include-cstdint-to-compile-with-gcc13.patch b/sci-libs/vtk/files/vtk-9.2.5-More-include-cstdint-to-compile-with-gcc13.patch
deleted file mode 100644
index 356efbb4da9a..000000000000
--- a/sci-libs/vtk/files/vtk-9.2.5-More-include-cstdint-to-compile-with-gcc13.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-https://bugs.gentoo.org/905387
-https://github.com/Kitware/VTK/commit/4d8283bcb460ff60d8df1b7b67b5db19876a5ca3
-
-From 890f7574f01cf58cb1522772a62ca07deb438479 Mon Sep 17 00:00:00 2001
-From: Mathieu Westphal <mathieu.westphal@kitware.com>
-Date: Thu, 23 Feb 2023 18:06:07 +0100
-Subject: [PATCH 1580/2105] More #include <cstdint> to compile with gcc13
-
---- a/IO/PIO/PIOData.h
-+++ b/IO/PIO/PIOData.h
-@@ -1,6 +1,7 @@
- #if !defined(_PIODATA_H)
- #define _PIODATA_H
- 
-+#include <cstdint>
- #include <fstream>
- #include <iostream>
- #include <list>
---- a/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h
-+++ b/Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.h
-@@ -49,7 +49,8 @@
- #include "vtkMathTextUtilities.h"
- #include "vtkRenderingMatplotlibModule.h" // For export macro
- 
--#include <vector> // for std::vector
-+#include <cstdint> // for std::uint64_t
-+#include <vector>  // for std::vector
- 
- struct _object;
- typedef struct _object PyObject;
--- 
-2.40.1
-

diff --git a/sci-libs/vtk/files/vtk-9.2.6-Java21.patch b/sci-libs/vtk/files/vtk-9.2.6-Java21.patch
deleted file mode 100644
index b7b2e233cdb4..000000000000
--- a/sci-libs/vtk/files/vtk-9.2.6-Java21.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- 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")
- mark_as_advanced(VTK_JAVA_TARGET_VERSION)
- 
- if (VTK_JAVA_SOURCE_VERSION STREQUAL "<DEFAULT>")
--  set(VTK_JAVA_SOURCE_VERSION "1.7")
-+  set(VTK_JAVA_SOURCE_VERSION "1.8")
- endif ()
- if (VTK_JAVA_TARGET_VERSION STREQUAL "<DEFAULT>")
--  set(VTK_JAVA_TARGET_VERSION "1.7")
-+  set(VTK_JAVA_TARGET_VERSION "1.8")
- endif ()
- 
- set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_JARDIR}")

diff --git a/sci-libs/vtk/vtk-9.2.5-r2.ebuild b/sci-libs/vtk/vtk-9.2.5-r2.ebuild
deleted file mode 100644
index 4af7d8df0261..000000000000
--- a/sci-libs/vtk/vtk-9.2.5-r2.ebuild
+++ /dev/null
@@ -1,746 +0,0 @@
-# Copyright 1999-2024 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_{9..11} )
-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
-	https://www.vtk.org/files/release/${MY_PV}/VTKData-${PV}.tar.gz
-	https://www.vtk.org/files/release/${MY_PV}/VTKDataFiles-${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}/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 simplifiy these. Mostly the flags related to Groups.
-IUSE="all-modules boost cuda debug doc examples ffmpeg freetype gdal imaging
-	java las +logging mpi mysql odbc openmp openvdb pdal postgres python qt5
-	qt6 +rendering sdl tbb test +threads tk video_cards_nvidia views vtkm web"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="
-	all-modules? (
-		boost ffmpeg freetype gdal imaging las mysql odbc openvdb pdal
-		postgres rendering views
-	)
-	cuda? ( video_cards_nvidia vtkm )
-	java? ( rendering )
-	python? ( ${PYTHON_REQUIRED_USE} )
-	qt5? ( rendering )
-	qt6? ( rendering )
-	sdl? ( rendering )
-	tk? ( python rendering )
-	web? ( python )
-"
-
-# for <pegtl-3 dependency see
-# https://discourse.vtk.org/t/compilation-errors-related-to-pegtl-proj/5929
-# 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-cpp/eigen
-	dev-cpp/nlohmann_json
-	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/pegtl-3
-	dev-libs/pugixml
-	dev-libs/utfcpp
-	media-libs/freetype
-	media-libs/libjpeg-turbo
-	>=media-libs/libharu-2.4.2:=
-	media-libs/libogg
-	media-libs/libpng:=
-	media-libs/libtheora
-	media-libs/tiff:=
-	>=sci-libs/cgnslib-4.1.1:=[hdf5,mpi=]
-	sci-libs/hdf5:=[mpi=]
-	sci-libs/proj:=
-	sci-libs/netcdf:=[mpi=]
-	sys-libs/zlib
-	boost? ( dev-libs/boost:=[mpi?] )
-	cuda? ( dev-util/nvidia-cuda-toolkit:= )
-	ffmpeg? ( media-video/ffmpeg:= )
-	freetype? ( media-libs/fontconfig )
-	gdal? ( sci-libs/gdal:= )
-	java? ( >=virtual/jdk-1.8:* )
-	las? ( sci-geosciences/liblas )
-	mpi? ( virtual/mpi[cxx,romio] )
-	mysql? ( dev-db/mariadb-connector-c )
-	odbc? ( dev-db/unixODBC )
-	openvdb? ( media-gfx/openvdb:= )
-	pdal? ( <sci-libs/pdal-2.6.0:= )
-	postgres? ( dev-db/postgresql:= )
-	python? (
-		${PYTHON_DEPS}
-		$(python_gen_cond_dep 'mpi? ( dev-python/mpi4py[${PYTHON_USEDEP}] )')
-	)
-	qt5? (
-		dev-qt/qtcore:5
-		dev-qt/qtopengl:5
-		dev-qt/qtquickcontrols2:5
-		dev-qt/qtsql:5
-		dev-qt/qtwidgets:5
-	)
-	qt6? (
-		dev-qt/qtbase:6[gui,opengl,sql,widgets]
-		dev-qt/qtdeclarative:6[opengl]
-		dev-qt/qtshadertools:6
-		x11-libs/libxkbcommon
-	)
-	sdl? ( media-libs/libsdl2 )
-	rendering? (
-		media-libs/glew:=
-		virtual/opengl
-		x11-libs/gl2ps
-		x11-libs/libICE
-		x11-libs/libXcursor
-		x11-libs/libXext
-	)
-	tbb? ( dev-cpp/tbb:= )
-	tk? ( dev-lang/tk:= )
-	video_cards_nvidia? ( x11-drivers/nvidia-drivers[tools,static-libs] )
-	views? (
-		x11-libs/libICE
-		x11-libs/libXext
-	)
-	web? ( ${WEBAPP_DEPEND} )
-"
-
-# for <pegtl-3 dependency see
-# https://discourse.vtk.org/t/compilation-errors-related-to-pegtl-proj/5929
-DEPEND="
-	${RDEPEND}
-	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.2-vtkGeometryFilter-add-missing-mutex-header-file.patch
-	"${FILESDIR}"/${PN}-9.2.2-VTKm-respect-user-CXXFLAGS.patch
-	"${FILESDIR}"/${PN}-9.2.2-link-with-glut-library-for-freeglut.patch
-	"${FILESDIR}"/${PN}-9.2.5-Add-include-cstdint-to-compile-with-gcc-13.patch
-	"${FILESDIR}"/${PN}-9.2.5-Fix-compilation-error-with-CUDA-12.patch
-	"${FILESDIR}"/${PN}-9.2.5-More-include-cstdint-to-compile-with-gcc13.patch
-)
-
-DOCS=( CONTRIBUTING.md README.md )
-
-vtk_check_reqs() {
-	local dsk=4096
-	local mem=$(( $(usex cuda 7168 0) ))
-
-	dsk=$(( $(usex doc 3072 0) + ${dsk} ))
-	dsk=$(( $(usex examples 3072 0) + ${dsk} ))
-	dsk=$(( $(usex cuda 8192 0) + ${dsk} ))
-
-	# 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)")
-	else
-		if [[ -n "${MAKEOPTS}" ]]; then
-			jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
-		fi
-	fi
-	mem=$(( ${mem} * $(( ${jobs} > 4 ? 4 : ${jobs} )) ))
-
-	use cuda && export CHECKREQS_MEMORY=${mem}M
-	export CHECKREQS_DISK_BUILD=${dsk}M
-
-	check-reqs_pkg_${EBUILD_PHASE}
-}
-
-pkg_pretend() {
-	[[ ${MERGE_TYPE} != binary ]] && has openmp && tc-check-openmp
-
-	if [[ $(tc-is-gcc) && $(gcc-majorversion) = 11 ]] && use cuda ; then
-		# FIXME: better use eerror?
-		ewarn "GCC 11 is know to fail building with CUDA support in some cases."
-		ewarn "See bug #820593"
-	fi
-
-	if use qt6 && use qt5; then
-		ewarn "Both qt5 and qt6 USE flags have been selected. Using qt5!"
-	fi
-
-	# bug #835659
-	if use cuda; then
-		if [[ ${VTK_CUDA_ARCH} = native ]]; then
-			eerror "Using native CUDA arches is currently broken."
-			eerror "Please set it to one of the common arch names:"
-			eerror "kepler, maxwell, pascal, turing or ampere."
-			die "Please set VTK_CUDA_ARCH environment variable!"
-		fi
-	fi
-
-	vtk_check_reqs
-}
-
-pkg_setup() {
-	[[ ${MERGE_TYPE} != binary ]] && has openmp && tc-check-openmp
-
-	if [[ $(tc-is-gcc) && $(gcc-majorversion) = 11 ]] && use cuda ; then
-		# FIXME: better use eerror?
-		ewarn "GCC 11 is know to fail building with CUDA support in some cases."
-		ewarn "See bug #820593"
-	fi
-
-	if use qt6 && use qt5; then
-		ewarn "Both qt5 and qt6 USE flags have been selected. Using qt5!"
-	fi
-
-	# bug #835659
-	if use cuda; then
-		if [[ ${VTK_CUDA_ARCH} = native ]]; then
-			eerror "Using native CUDA arches is currently broken."
-			eerror "Please set it to one of the common arch names:"
-			eerror "kepler, maxwell, pascal, turing or ampere."
-			die "Please set VTK_CUDA_ARCH environment variable!"
-		fi
-	fi
-
-	vtk_check_reqs
-
-	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: cli11 (::guru), 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 cuda; then
-		cuda_add_sandbox -w
-		cuda_src_prepare
-	fi
-
-	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 ../../VTK-${PV}/.ExternalData/README.rst . || die
-		ln -sf ../../VTK-${PV}/.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_INSTALL_LICENSEDIR="share/${PN}/licenses"
-
-		-DVTK_ANDROID_BUILD=OFF
-		-DVTK_IOS_BUILD=OFF
-
-		-DVTK_BUILD_ALL_MODULES=$(usex all-modules ON OFF)
-		# we use the pre-built documentation and install these with USE=doc
-		-DVTK_BUILD_DOCUMENTATION=OFF
-		-DVTK_BUILD_EXAMPLES=$(usex examples ON OFF)
-
-		# no package in the tree: https://github.com/LLNL/conduit
-		-DVTK_ENABLE_CATALYST=OFF
-		-DVTK_ENABLE_KITS=OFF
-		-DVTK_ENABLE_LOGGING=$(usex logging ON OFF)
-		# defaults to ON: USE flag for this?
-		-DVTK_ENABLE_REMOTE_MODULES=OFF
-
-		# disable fetching files during build
-		-DVTK_FORBID_DOWNLOADS=ON
-
-		-DVTK_GROUP_ENABLE_Imaging=$(usex imaging "YES" "DEFAULT")
-		-DVTK_GROUP_ENABLE_Rendering=$(usex rendering "YES" "DEFAULT")
-		-DVTK_GROUP_ENABLE_StandAlone="YES"
-		-DVTK_GROUP_ENABLE_Views=$(usex views "YES" "DEFAULT")
-		-DVTK_GROUP_ENABLE_Web=$(usex web "YES" "DEFAULT")
-
-		-DVTK_INSTALL_SDK=ON
-
-		-DVTK_MODULE_ENABLE_VTK_IOCGNSReader="WANT"
-		-DVTK_MODULE_ENABLE_VTK_IOExportPDF="WANT"
-		-DVTK_MODULE_ENABLE_VTK_IOLAS=$(usex las "WANT" "DEFAULT")
-		-DVTK_MODULE_ENABLE_VTK_IONetCDF="WANT"
-		-DVTK_MODULE_ENABLE_VTK_IOOggTheora="WANT"
-		-DVTK_MODULE_ENABLE_VTK_IOOpenVDB=$(usex openvdb "WANT" "DEFAULT")
-		-DVTK_MODULE_ENABLE_VTK_IOSQL="WANT" # sqlite
-		-DVTK_MODULE_ENABLE_VTK_IOPDAL=$(usex pdal "WANT" "DEFAULT")
-		-DVTK_MODULE_ENABLE_VTK_IOXML="WANT"
-		-DVTK_MODULE_ENABLE_VTK_IOXMLParser="WANT"
-		-DVTK_MODULE_ENABLE_VTK_RenderingFreeType=$(usex freetype "WANT" "DEFAULT")
-		-DVTK_MODULE_ENABLE_VTK_RenderingFreeTypeFontConfig=$(usex freetype "WANT" "DEFAULT")
-		-DVTK_MODULE_ENABLE_VTK_cgns="WANT"
-		-DVTK_MODULE_ENABLE_VTK_doubleconversion="WANT"
-		-DVTK_MODULE_ENABLE_VTK_eigen="WANT"
-		-DVTK_MODULE_ENABLE_VTK_expat="WANT"
-		-DVTK_MODULE_ENABLE_VTK_fmt="WANT"
-		-DVTK_MODULE_ENABLE_VTK_freetype="WANT"
-		-DVTK_MODULE_ENABLE_VTK_hdf5="WANT"
-		-DVTK_MODULE_ENABLE_VTK_jpeg="WANT"
-		-DVTK_MODULE_ENABLE_VTK_jsoncpp="WANT"
-		-DVTK_MODULE_ENABLE_VTK_libharu="WANT"
-		-DVTK_MODULE_ENABLE_VTK_libproj="WANT"
-		-DVTK_MODULE_ENABLE_VTK_libxml2="WANT"
-		-DVTK_MODULE_ENABLE_VTK_lz4="WANT"
-		-DVTK_MODULE_ENABLE_VTK_lzma="WANT"
-		-DVTK_MODULE_ENABLE_VTK_netcdf="WANT"
-		-DVTK_MODULE_ENABLE_VTK_nlohmannjson="WANT"
-		-DVTK_MODULE_ENABLE_VTK_ogg="WANT"
-		-DVTK_MODULE_ENABLE_VTK_pegtl="WANT"
-		-DVTK_MODULE_ENABLE_VTK_png="WANT"
-		-DVTK_MODULE_ENABLE_VTK_pugixml="WANT"
-		-DVTK_MODULE_ENABLE_VTK_sqlite="WANT"
-		-DVTK_MODULE_ENABLE_VTK_theora="WANT"
-		-DVTK_MODULE_ENABLE_VTK_tiff="WANT"
-		-DVTK_MODULE_ENABLE_VTK_utf8="WANT"
-		-DVTK_MODULE_ENABLE_VTK_vtkm=$(usex vtkm "WANT" "DEFAULT")
-		-DVTK_MODULE_ENABLE_VTK_zlib="WANT"
-
-		# not packaged in Gentoo
-		-DVTK_MODULE_USE_EXTERNAL_VTK_exprtk=OFF
-		-DVTK_MODULE_USE_EXTERNAL_VTK_ioss=OFF
-		-DVTK_MODULE_USE_EXTERNAL_VTK_verdict=OFF
-
-		-DVTK_RELOCATABLE_INSTALL=ON
-
-		-DVTK_SMP_ENABLE_OPENMP=$(usex openmp ON OFF)
-		-DVTK_SMP_ENABLE_STDTHREAD=$(usex threads ON OFF)
-		-DVTK_SMP_ENABLE_TBB=$(usex tbb ON OFF)
-
-		-DVTK_UNIFIED_INSTALL_TREE=ON
-
-		-DVTK_USE_CUDA=$(usex cuda ON OFF)
-		# 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 ON OFF)
-		-DVTK_USE_TK=$(usex tk ON OFF)
-		-DVTK_USE_X=ON
-
-		-DVTK_WHEEL_BUILD=OFF
-
-		-DVTK_WRAP_JAVA=$(usex java ON OFF)
-		-DVTK_WRAP_PYTHON=$(usex python ON OFF)
-	)
-
-	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"
-
-			# available in ::guru, so avoid  detection if installed
-			-DVTK_MODULE_USE_EXTERNAL_VTK_cli11=OFF
-		)
-	fi
-
-	if use boost; then
-		mycmakeargs+=(
-			-DVTK_MODULE_ENABLE_VTK_InfovisBoost="WANT"
-			-DVTK_MODULE_ENABLE_VTK_InfovisBoostGraphAlgorithms="WANT"
-		)
-	fi
-
-	# TODO: checks this on updates of nvidia-cuda-toolkit and update
-	# the list of available arches if necessary, i.e. add new arches
-	# once they are released at the end of the list before all.
-	# See https://en.wikipedia.org/wiki/CUDA#GPUs_supported
-	# CUDA 11.8 supports Ada Lovelace and Hopper arches, but cmake,
-	# as of 3.25.1 doesn't recognize these keywords.
-	# FIXME: better use numbers than names?
-	if use cuda; then
-		local cuda_arch=
-		case ${VTK_CUDA_ARCH:-native} in
-			# we ignore fermi arch, because current nvidia-cuda-toolkit-11*
-			# no longer supports it
-			kepler|maxwell|pascal|volta|turing|ampere|all)
-				cuda_arch=${VTK_CUDA_ARCH}
-				;;
-#			native)
-#				ewarn "If auto detection fails for you, please try and export the"
-#				ewarn "VTK_CUDA_ARCH environment variable to one of the common arch"
-#				ewarn "names: kepler, maxwell, pascal, volta, turing, ampere or all."
-#				cuda_arch=native
-#				;;
-			*)
-				eerror "Please properly set the VTK_CUDA_ARCH environment variable to"
-				eerror "one of: kepler, maxwell, pascal, volta, turing, ampere, all"
-				die "Invalid CUDA architecture given: '${VTK_CUDA_ARCH}'!"
-				;;
-		esac
-		ewarn "Using CUDA architecture '${cuda_arch}'"
-
-		mycmakeargs+=( -DVTKm_CUDA_Architecture=${cuda_arch} )
-	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="WANT" )
-		if use rendering; then
-			mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_RenderingFFMPEGOpenGL2="WANT" )
-		fi
-	fi
-
-	if use gdal; then
-		mycmakeargs+=(
-			-DVTK_MODULE_ENABLE_VTK_GeovisGDAL="WANT"
-			-DVTK_MODULE_ENABLE_VTK_IOGDAL="WANT"
-			-DVTK_MODULE_ENABLE_VTK_IOGeoJSON="WANT"
-		)
-	fi
-
-	if use imaging; then
-		mycmakeargs+=(
-			-DVTK_MODULE_ENABLE_VTK_ImagingColor="WANT"
-			-DVTK_MODULE_ENABLE_VTK_ImagingCore="WANT"
-			-DVTK_MODULE_ENABLE_VTK_ImagingFourier="WANT"
-			-DVTK_MODULE_ENABLE_VTK_ImagingGeneral="WANT"
-			-DVTK_MODULE_ENABLE_VTK_ImagingHybrid="WANT"
-			-DVTK_MODULE_ENABLE_VTK_ImagingMath="WANT"
-			-DVTK_MODULE_ENABLE_VTK_ImagingMorphological="WANT"
-			-DVTK_MODULE_ENABLE_VTK_ImagingOpenGL2="WANT"
-			-DVTK_MODULE_ENABLE_VTK_ImagingSources="WANT"
-			-DVTK_MODULE_ENABLE_VTK_ImagingStatistics="WANT"
-			-DVTK_MODULE_ENABLE_VTK_ImagingStencil="WANT"
-		)
-		use rendering && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_RenderingImage="WANT" )
-	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="WANT"
-		)
-	fi
-
-	if use mpi; then
-		mycmakeargs+=(
-			-DVTK_GROUP_ENABLE_MPI="YES"
-			-DVTK_MODULE_ENABLE_VTK_IOH5part="WANT"
-			-DVTK_MODULE_ENABLE_VTK_IOMPIParallel="WANT"
-			-DVTK_MODULE_ENABLE_VTK_IOParallel="WANT"
-			-DVTK_MODULE_ENABLE_VTK_IOParallelNetCDF="WANT"
-			-DVTK_MODULE_ENABLE_VTK_IOParallelXML="WANT"
-			-DVTK_MODULE_ENABLE_VTK_ParallelMPI="WANT"
-			-DVTK_MODULE_ENABLE_VTK_h5part="WANT"
-			-DVTK_MODULE_USE_EXTERNAL_VTK_verdict=OFF
-		)
-		use imaging && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_IOMPIImage="WANT" )
-		use python && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_ParallelMPI4Py="WANT" )
-		if use rendering; then
-			mycmakeargs+=(
-				-DVTK_MODULE_ENABLE_VTK_RenderingParallel="WANT"
-				-DVTK_MODULE_ENABLE_VTK_RenderingParallelLIC="WANT"
-			)
-		fi
-		use vtkm && mycmakeargs+=( -DVTKm_ENABLE_MPI=ON )
-	else
-		mycmakeargs+=( -DVTK_GROUP_ENABLE_MPI="NO" )
-	fi
-
-	use mysql && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_IOMySQL="WANT" )
-	use odbc && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_IOODBC="WANT" )
-	use openvdb && mycmakeargs+=( -DOpenVDB_CMAKE_PATH="${ESYSROOT}/usr/$(get_libdir)/cmake/OpenVDB" )
-	use postgres && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_IOPostgreSQL="WANT" )
-
-	if use python; then
-		mycmakeargs+=(
-			-DPython3_EXECUTABLE="${PYTHON}"
-			-DVTK_ENABLE_WRAPPING=ON
-			-DVTK_MODULE_ENABLE_VTK_Python="WANT"
-			-DVTK_MODULE_ENABLE_VTK_PythonInterpreter="WANT"
-			-DVTK_MODULE_ENABLE_VTK_WrappingPythonCore="WANT"
-			-DVTK_PYTHON_SITE_PACKAGES_SUFFIX="lib/${EPYTHON}/site-packages"
-		)
-		use rendering && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_PythonContext2D="WANT" )
-	fi
-
-	if use qt5 && use qt6; then
-		# prefer Qt5: https://wiki.gentoo.org/wiki/Project:qt/Policies
-		mycmakeargs+=(
-			-DCMAKE_INSTALL_QMLDIR="${EPREFIX}/usr/$(get_libdir)/qt5/qml"
-			-DVTK_QT_VERSION="5"
-		)
-	else
-		if use qt5; then
-			mycmakeargs+=(
-				-DCMAKE_INSTALL_QMLDIR="${EPREFIX}/usr/$(get_libdir)/qt5/qml"
-				-DVTK_QT_VERSION="5"
-			)
-		elif use qt6; then
-			mycmakeargs+=(
-				-DCMAKE_INSTALL_QMLDIR="${EPFREIX}/usr/$(get_libdir)/qt6/qml"
-				-DVTK_QT_VERSION="6"
-			)
-		else
-			mycmakeargs+=( -DVTK_GROUP_ENABLE_Qt="NO" )
-		fi
-	fi
-
-	if use qt5 || use qt6; then
-		mycmakeargs+=(
-			-DVTK_GROUP_ENABLE_Qt:STRING="YES"
-			-DVTK_MODULE_ENABLE_VTK_GUISupportQt="WANT"
-			-DVTK_MODULE_ENABLE_VTK_GUISupportQtQuick="WANT"
-		)
-		if use mysql || use postgres; then
-			mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_GUISupportQtSQL="WANT" )
-		fi
-		if use rendering; then
-			mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_RenderingQt="WANT" )
-		fi
-		if use views; then
-			mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_ViewsQt="WANT" )
-		fi
-	fi
-
-	if use rendering; then
-		mycmakeargs+=(
-			-DVTK_ENABLE_OSPRAY=OFF
-
-			-DVTK_MODULE_ENABLE_VTK_IOExportGL2PS="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingAnnotation="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingContext2D="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingContextOpenGL2="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingCore="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingExternal="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingGL2PSOpenGL2="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingHyperTreeGrid="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingLICOpenGL2="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingLOD="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingLabel="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingMatplotlib="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingOpenGL2="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingRayTracing="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingSceneGraph="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingUI="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingVolume="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingVolumeAMR="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingVolumeOpenGL2="WANT"
-			-DVTK_MODULE_ENABLE_VTK_gl2ps="WANT"
-			-DVTK_MODULE_ENABLE_VTK_glew="WANT"
-			-DVTK_MODULE_ENABLE_VTK_opengl="WANT"
-
-			-DVTK_USE_SDL2=$(usex sdl "YES" "NO")
-		)
-		use tk && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_RenderingTk="WANT" )
-		use views && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_ViewsContext2D="WANT" )
-		use web && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_RenderingVtkJS="WANT" )
-	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=ON
-
-			# requested even if all use flags are off
-			-DVTK_MODULE_ENABLE_VTK_octree="WANT"
-			-DVTK_MODULE_ENABLE_VTK_ViewsCore="WANT"
-
-			# available in ::guru, so avoid  detection if installed
-			-DVTK_MODULE_USE_EXTERNAL_VTK_cli11=OFF
-		)
-	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 < stdpthread < 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
-		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="WANT"
-			-DVTK_MODULE_ENABLE_VTK_ViewsInfovis="WANT"
-		)
-	fi
-
-	if use vtkm; then
-		mycmakeargs+=(
-			-DVTK_MODULE_ENABLE_VTK_AcceleratorsVTKmCore="WANT"
-			-DVTK_MODULE_ENABLE_VTK_AcceleratorsVTKmDataModel="WANT"
-			-DVTK_MODULE_ENABLE_VTK_AcceleratorsVTKmFilters="WANT"
-
-			-DVTKm_NO_INSTALL_README_LICENSE=ON # bug #793221
-			-DVTKm_Vectorization=native
-		)
-	fi
-
-	if use web; then
-		mycmakeargs+=(
-			-DVTK_MODULE_ENABLE_VTK_WebCore="WANT"
-			-DVTK_MODULE_ENABLE_VTK_WebGLExporter="WANT"
-		)
-		use python && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_WebPython="WANT" )
-	fi
-
-	use java && export JAVA_HOME="${EPREFIX}/etc/java-config-2/current-system-vm"
-
-	cmake_src_configure
-}
-
-src_compile() {
-	use test && cmake_build VTKData
-	cmake_src_compile
-}
-
-# FIXME: avoid nonfatal?
-# see https://github.com/gentoo/gentoo/pull/22878#discussion_r747204043
-src_test() {
-#	nonfatal virtx cmake_src_test
-	virtx cmake_src_test
-}
-
-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
-}

diff --git a/sci-libs/vtk/vtk-9.2.6-r3.ebuild b/sci-libs/vtk/vtk-9.2.6-r3.ebuild
deleted file mode 100644
index 9520c47ec4fd..000000000000
--- a/sci-libs/vtk/vtk-9.2.6-r3.ebuild
+++ /dev/null
@@ -1,747 +0,0 @@
-# Copyright 1999-2024 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_{9..11} )
-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
-	https://www.vtk.org/files/release/${MY_PV}/VTKData-${PV}.tar.gz
-	https://www.vtk.org/files/release/${MY_PV}/VTKDataFiles-${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}/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 simplifiy these. Mostly the flags related to Groups.
-IUSE="all-modules boost cuda debug doc examples ffmpeg freetype gdal imaging
-	java las +logging mpi mysql odbc openmp openvdb pdal postgres python qt5
-	qt6 +rendering sdl tbb test +threads tk video_cards_nvidia views vtkm web"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="
-	all-modules? (
-		boost ffmpeg freetype gdal imaging las mysql odbc openvdb pdal
-		postgres rendering views
-	)
-	cuda? ( video_cards_nvidia vtkm )
-	java? ( rendering )
-	python? ( ${PYTHON_REQUIRED_USE} )
-	qt5? ( rendering )
-	qt6? ( rendering )
-	sdl? ( rendering )
-	tk? ( python rendering )
-	web? ( python )
-"
-
-# for <pegtl-3 dependency see
-# https://discourse.vtk.org/t/compilation-errors-related-to-pegtl-proj/5929
-# 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-cpp/eigen
-	dev-cpp/nlohmann_json
-	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/pegtl-3
-	dev-libs/pugixml
-	dev-libs/utfcpp
-	media-libs/freetype
-	media-libs/libjpeg-turbo
-	>=media-libs/libharu-2.4.2:=
-	media-libs/libogg
-	media-libs/libpng:=
-	media-libs/libtheora
-	media-libs/tiff:=
-	>=sci-libs/cgnslib-4.1.1:=[hdf5,mpi=]
-	sci-libs/hdf5:=[mpi=]
-	sci-libs/proj:=
-	sci-libs/netcdf:=[mpi=]
-	sys-libs/zlib
-	boost? ( dev-libs/boost:=[mpi?] )
-	cuda? ( dev-util/nvidia-cuda-toolkit:= )
-	ffmpeg? ( media-video/ffmpeg:= )
-	freetype? ( media-libs/fontconfig )
-	gdal? ( sci-libs/gdal:= )
-	java? ( >=virtual/jdk-1.8:* )
-	las? ( sci-geosciences/liblas )
-	mpi? ( virtual/mpi[cxx,romio] )
-	mysql? ( dev-db/mariadb-connector-c )
-	odbc? ( dev-db/unixODBC )
-	openvdb? ( media-gfx/openvdb:= )
-	pdal? ( <sci-libs/pdal-2.6.0:= )
-	postgres? ( dev-db/postgresql:= )
-	python? (
-		${PYTHON_DEPS}
-		$(python_gen_cond_dep 'mpi? ( dev-python/mpi4py[${PYTHON_USEDEP}] )')
-	)
-	qt5? (
-		dev-qt/qtcore:5
-		dev-qt/qtopengl:5
-		dev-qt/qtquickcontrols2:5
-		dev-qt/qtsql:5
-		dev-qt/qtwidgets:5
-	)
-	qt6? (
-		dev-qt/qtbase:6[gui,opengl,sql,widgets]
-		dev-qt/qtdeclarative:6[opengl]
-		dev-qt/qtshadertools:6
-		x11-libs/libxkbcommon
-	)
-	sdl? ( media-libs/libsdl2 )
-	rendering? (
-		media-libs/glew:=
-		virtual/opengl
-		x11-libs/gl2ps
-		x11-libs/libICE
-		x11-libs/libXcursor
-		x11-libs/libXext
-	)
-	tbb? ( dev-cpp/tbb:= )
-	tk? ( dev-lang/tk:= )
-	video_cards_nvidia? ( x11-drivers/nvidia-drivers[tools,static-libs] )
-	views? (
-		x11-libs/libICE
-		x11-libs/libXext
-	)
-	web? ( ${WEBAPP_DEPEND} )
-"
-
-# for <pegtl-3 dependency see
-# https://discourse.vtk.org/t/compilation-errors-related-to-pegtl-proj/5929
-DEPEND="
-	${RDEPEND}
-	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.2-vtkGeometryFilter-add-missing-mutex-header-file.patch
-	"${FILESDIR}"/${PN}-9.2.2-VTKm-respect-user-CXXFLAGS.patch
-	"${FILESDIR}"/${PN}-9.2.2-link-with-glut-library-for-freeglut.patch
-	"${FILESDIR}"/${PN}-9.2.5-Add-include-cstdint-to-compile-with-gcc-13.patch
-	"${FILESDIR}"/${PN}-9.2.5-Fix-compilation-error-with-CUDA-12.patch
-	"${FILESDIR}"/${PN}-9.2.5-More-include-cstdint-to-compile-with-gcc13.patch
-	"${FILESDIR}"/vtk-9.2.6-Java21.patch
-)
-
-DOCS=( CONTRIBUTING.md README.md )
-
-vtk_check_reqs() {
-	local dsk=4096
-	local mem=$(( $(usex cuda 7168 0) ))
-
-	dsk=$(( $(usex doc 3072 0) + ${dsk} ))
-	dsk=$(( $(usex examples 3072 0) + ${dsk} ))
-	dsk=$(( $(usex cuda 8192 0) + ${dsk} ))
-
-	# 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)")
-	else
-		if [[ -n "${MAKEOPTS}" ]]; then
-			jobs=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")
-		fi
-	fi
-	mem=$(( ${mem} * $(( ${jobs} > 4 ? 4 : ${jobs} )) ))
-
-	use cuda && export CHECKREQS_MEMORY=${mem}M
-	export CHECKREQS_DISK_BUILD=${dsk}M
-
-	check-reqs_pkg_${EBUILD_PHASE}
-}
-
-pkg_pretend() {
-	[[ ${MERGE_TYPE} != binary ]] && has openmp && tc-check-openmp
-
-	if [[ $(tc-is-gcc) && $(gcc-majorversion) = 11 ]] && use cuda ; then
-		# FIXME: better use eerror?
-		ewarn "GCC 11 is know to fail building with CUDA support in some cases."
-		ewarn "See bug #820593"
-	fi
-
-	if use qt6 && use qt5; then
-		ewarn "Both qt5 and qt6 USE flags have been selected. Using qt5!"
-	fi
-
-	# bug #835659
-	if use cuda; then
-		if [[ ${VTK_CUDA_ARCH} = native ]]; then
-			eerror "Using native CUDA arches is currently broken."
-			eerror "Please set it to one of the common arch names:"
-			eerror "kepler, maxwell, pascal, turing or ampere."
-			die "Please set VTK_CUDA_ARCH environment variable!"
-		fi
-	fi
-
-	vtk_check_reqs
-}
-
-pkg_setup() {
-	[[ ${MERGE_TYPE} != binary ]] && has openmp && tc-check-openmp
-
-	if [[ $(tc-is-gcc) && $(gcc-majorversion) = 11 ]] && use cuda ; then
-		# FIXME: better use eerror?
-		ewarn "GCC 11 is know to fail building with CUDA support in some cases."
-		ewarn "See bug #820593"
-	fi
-
-	if use qt6 && use qt5; then
-		ewarn "Both qt5 and qt6 USE flags have been selected. Using qt5!"
-	fi
-
-	# bug #835659
-	if use cuda; then
-		if [[ ${VTK_CUDA_ARCH} = native ]]; then
-			eerror "Using native CUDA arches is currently broken."
-			eerror "Please set it to one of the common arch names:"
-			eerror "kepler, maxwell, pascal, turing or ampere."
-			die "Please set VTK_CUDA_ARCH environment variable!"
-		fi
-	fi
-
-	vtk_check_reqs
-
-	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: cli11 (::guru), 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 cuda; then
-		cuda_add_sandbox -w
-		cuda_src_prepare
-	fi
-
-	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 ../../VTK-${PV}/.ExternalData/README.rst . || die
-		ln -sf ../../VTK-${PV}/.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_INSTALL_LICENSEDIR="share/${PN}/licenses"
-
-		-DVTK_ANDROID_BUILD=OFF
-		-DVTK_IOS_BUILD=OFF
-
-		-DVTK_BUILD_ALL_MODULES=$(usex all-modules ON OFF)
-		# we use the pre-built documentation and install these with USE=doc
-		-DVTK_BUILD_DOCUMENTATION=OFF
-		-DVTK_BUILD_EXAMPLES=$(usex examples ON OFF)
-
-		# no package in the tree: https://github.com/LLNL/conduit
-		-DVTK_ENABLE_CATALYST=OFF
-		-DVTK_ENABLE_KITS=OFF
-		-DVTK_ENABLE_LOGGING=$(usex logging ON OFF)
-		# defaults to ON: USE flag for this?
-		-DVTK_ENABLE_REMOTE_MODULES=OFF
-
-		# disable fetching files during build
-		-DVTK_FORBID_DOWNLOADS=ON
-
-		-DVTK_GROUP_ENABLE_Imaging=$(usex imaging "YES" "DEFAULT")
-		-DVTK_GROUP_ENABLE_Rendering=$(usex rendering "YES" "DEFAULT")
-		-DVTK_GROUP_ENABLE_StandAlone="YES"
-		-DVTK_GROUP_ENABLE_Views=$(usex views "YES" "DEFAULT")
-		-DVTK_GROUP_ENABLE_Web=$(usex web "YES" "DEFAULT")
-
-		-DVTK_INSTALL_SDK=ON
-
-		-DVTK_MODULE_ENABLE_VTK_IOCGNSReader="WANT"
-		-DVTK_MODULE_ENABLE_VTK_IOExportPDF="WANT"
-		-DVTK_MODULE_ENABLE_VTK_IOLAS=$(usex las "WANT" "DEFAULT")
-		-DVTK_MODULE_ENABLE_VTK_IONetCDF="WANT"
-		-DVTK_MODULE_ENABLE_VTK_IOOggTheora="WANT"
-		-DVTK_MODULE_ENABLE_VTK_IOOpenVDB=$(usex openvdb "WANT" "DEFAULT")
-		-DVTK_MODULE_ENABLE_VTK_IOSQL="WANT" # sqlite
-		-DVTK_MODULE_ENABLE_VTK_IOPDAL=$(usex pdal "WANT" "DEFAULT")
-		-DVTK_MODULE_ENABLE_VTK_IOXML="WANT"
-		-DVTK_MODULE_ENABLE_VTK_IOXMLParser="WANT"
-		-DVTK_MODULE_ENABLE_VTK_RenderingFreeType=$(usex freetype "WANT" "DEFAULT")
-		-DVTK_MODULE_ENABLE_VTK_RenderingFreeTypeFontConfig=$(usex freetype "WANT" "DEFAULT")
-		-DVTK_MODULE_ENABLE_VTK_cgns="WANT"
-		-DVTK_MODULE_ENABLE_VTK_doubleconversion="WANT"
-		-DVTK_MODULE_ENABLE_VTK_eigen="WANT"
-		-DVTK_MODULE_ENABLE_VTK_expat="WANT"
-		-DVTK_MODULE_ENABLE_VTK_fmt="WANT"
-		-DVTK_MODULE_ENABLE_VTK_freetype="WANT"
-		-DVTK_MODULE_ENABLE_VTK_hdf5="WANT"
-		-DVTK_MODULE_ENABLE_VTK_jpeg="WANT"
-		-DVTK_MODULE_ENABLE_VTK_jsoncpp="WANT"
-		-DVTK_MODULE_ENABLE_VTK_libharu="WANT"
-		-DVTK_MODULE_ENABLE_VTK_libproj="WANT"
-		-DVTK_MODULE_ENABLE_VTK_libxml2="WANT"
-		-DVTK_MODULE_ENABLE_VTK_lz4="WANT"
-		-DVTK_MODULE_ENABLE_VTK_lzma="WANT"
-		-DVTK_MODULE_ENABLE_VTK_netcdf="WANT"
-		-DVTK_MODULE_ENABLE_VTK_nlohmannjson="WANT"
-		-DVTK_MODULE_ENABLE_VTK_ogg="WANT"
-		-DVTK_MODULE_ENABLE_VTK_pegtl="WANT"
-		-DVTK_MODULE_ENABLE_VTK_png="WANT"
-		-DVTK_MODULE_ENABLE_VTK_pugixml="WANT"
-		-DVTK_MODULE_ENABLE_VTK_sqlite="WANT"
-		-DVTK_MODULE_ENABLE_VTK_theora="WANT"
-		-DVTK_MODULE_ENABLE_VTK_tiff="WANT"
-		-DVTK_MODULE_ENABLE_VTK_utf8="WANT"
-		-DVTK_MODULE_ENABLE_VTK_vtkm=$(usex vtkm "WANT" "DEFAULT")
-		-DVTK_MODULE_ENABLE_VTK_zlib="WANT"
-
-		# not packaged in Gentoo
-		-DVTK_MODULE_USE_EXTERNAL_VTK_exprtk=OFF
-		-DVTK_MODULE_USE_EXTERNAL_VTK_ioss=OFF
-		-DVTK_MODULE_USE_EXTERNAL_VTK_verdict=OFF
-
-		-DVTK_RELOCATABLE_INSTALL=ON
-
-		-DVTK_SMP_ENABLE_OPENMP=$(usex openmp ON OFF)
-		-DVTK_SMP_ENABLE_STDTHREAD=$(usex threads ON OFF)
-		-DVTK_SMP_ENABLE_TBB=$(usex tbb ON OFF)
-
-		-DVTK_UNIFIED_INSTALL_TREE=ON
-
-		-DVTK_USE_CUDA=$(usex cuda ON OFF)
-		# 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 ON OFF)
-		-DVTK_USE_TK=$(usex tk ON OFF)
-		-DVTK_USE_X=ON
-
-		-DVTK_WHEEL_BUILD=OFF
-
-		-DVTK_WRAP_JAVA=$(usex java ON OFF)
-		-DVTK_WRAP_PYTHON=$(usex python ON OFF)
-	)
-
-	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"
-
-			# available in ::guru, so avoid  detection if installed
-			-DVTK_MODULE_USE_EXTERNAL_VTK_cli11=OFF
-		)
-	fi
-
-	if use boost; then
-		mycmakeargs+=(
-			-DVTK_MODULE_ENABLE_VTK_InfovisBoost="WANT"
-			-DVTK_MODULE_ENABLE_VTK_InfovisBoostGraphAlgorithms="WANT"
-		)
-	fi
-
-	# TODO: checks this on updates of nvidia-cuda-toolkit and update
-	# the list of available arches if necessary, i.e. add new arches
-	# once they are released at the end of the list before all.
-	# See https://en.wikipedia.org/wiki/CUDA#GPUs_supported
-	# CUDA 11.8 supports Ada Lovelace and Hopper arches, but cmake,
-	# as of 3.25.1 doesn't recognize these keywords.
-	# FIXME: better use numbers than names?
-	if use cuda; then
-		local cuda_arch=
-		case ${VTK_CUDA_ARCH:-native} in
-			# we ignore fermi arch, because current nvidia-cuda-toolkit-11*
-			# no longer supports it
-			kepler|maxwell|pascal|volta|turing|ampere|all)
-				cuda_arch=${VTK_CUDA_ARCH}
-				;;
-#			native)
-#				ewarn "If auto detection fails for you, please try and export the"
-#				ewarn "VTK_CUDA_ARCH environment variable to one of the common arch"
-#				ewarn "names: kepler, maxwell, pascal, volta, turing, ampere or all."
-#				cuda_arch=native
-#				;;
-			*)
-				eerror "Please properly set the VTK_CUDA_ARCH environment variable to"
-				eerror "one of: kepler, maxwell, pascal, volta, turing, ampere, all"
-				die "Invalid CUDA architecture given: '${VTK_CUDA_ARCH}'!"
-				;;
-		esac
-		ewarn "Using CUDA architecture '${cuda_arch}'"
-
-		mycmakeargs+=( -DVTKm_CUDA_Architecture=${cuda_arch} )
-	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="WANT" )
-		if use rendering; then
-			mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_RenderingFFMPEGOpenGL2="WANT" )
-		fi
-	fi
-
-	if use gdal; then
-		mycmakeargs+=(
-			-DVTK_MODULE_ENABLE_VTK_GeovisGDAL="WANT"
-			-DVTK_MODULE_ENABLE_VTK_IOGDAL="WANT"
-			-DVTK_MODULE_ENABLE_VTK_IOGeoJSON="WANT"
-		)
-	fi
-
-	if use imaging; then
-		mycmakeargs+=(
-			-DVTK_MODULE_ENABLE_VTK_ImagingColor="WANT"
-			-DVTK_MODULE_ENABLE_VTK_ImagingCore="WANT"
-			-DVTK_MODULE_ENABLE_VTK_ImagingFourier="WANT"
-			-DVTK_MODULE_ENABLE_VTK_ImagingGeneral="WANT"
-			-DVTK_MODULE_ENABLE_VTK_ImagingHybrid="WANT"
-			-DVTK_MODULE_ENABLE_VTK_ImagingMath="WANT"
-			-DVTK_MODULE_ENABLE_VTK_ImagingMorphological="WANT"
-			-DVTK_MODULE_ENABLE_VTK_ImagingOpenGL2="WANT"
-			-DVTK_MODULE_ENABLE_VTK_ImagingSources="WANT"
-			-DVTK_MODULE_ENABLE_VTK_ImagingStatistics="WANT"
-			-DVTK_MODULE_ENABLE_VTK_ImagingStencil="WANT"
-		)
-		use rendering && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_RenderingImage="WANT" )
-	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="WANT"
-		)
-	fi
-
-	if use mpi; then
-		mycmakeargs+=(
-			-DVTK_GROUP_ENABLE_MPI="YES"
-			-DVTK_MODULE_ENABLE_VTK_IOH5part="WANT"
-			-DVTK_MODULE_ENABLE_VTK_IOMPIParallel="WANT"
-			-DVTK_MODULE_ENABLE_VTK_IOParallel="WANT"
-			-DVTK_MODULE_ENABLE_VTK_IOParallelNetCDF="WANT"
-			-DVTK_MODULE_ENABLE_VTK_IOParallelXML="WANT"
-			-DVTK_MODULE_ENABLE_VTK_ParallelMPI="WANT"
-			-DVTK_MODULE_ENABLE_VTK_h5part="WANT"
-			-DVTK_MODULE_USE_EXTERNAL_VTK_verdict=OFF
-		)
-		use imaging && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_IOMPIImage="WANT" )
-		use python && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_ParallelMPI4Py="WANT" )
-		if use rendering; then
-			mycmakeargs+=(
-				-DVTK_MODULE_ENABLE_VTK_RenderingParallel="WANT"
-				-DVTK_MODULE_ENABLE_VTK_RenderingParallelLIC="WANT"
-			)
-		fi
-		use vtkm && mycmakeargs+=( -DVTKm_ENABLE_MPI=ON )
-	else
-		mycmakeargs+=( -DVTK_GROUP_ENABLE_MPI="NO" )
-	fi
-
-	use mysql && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_IOMySQL="WANT" )
-	use odbc && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_IOODBC="WANT" )
-	use openvdb && mycmakeargs+=( -DOpenVDB_CMAKE_PATH="${ESYSROOT}/usr/$(get_libdir)/cmake/OpenVDB" )
-	use postgres && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_IOPostgreSQL="WANT" )
-
-	if use python; then
-		mycmakeargs+=(
-			-DPython3_EXECUTABLE="${PYTHON}"
-			-DVTK_ENABLE_WRAPPING=ON
-			-DVTK_MODULE_ENABLE_VTK_Python="WANT"
-			-DVTK_MODULE_ENABLE_VTK_PythonInterpreter="WANT"
-			-DVTK_MODULE_ENABLE_VTK_WrappingPythonCore="WANT"
-			-DVTK_PYTHON_SITE_PACKAGES_SUFFIX="lib/${EPYTHON}/site-packages"
-		)
-		use rendering && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_PythonContext2D="WANT" )
-	fi
-
-	if use qt5 && use qt6; then
-		# prefer Qt5: https://wiki.gentoo.org/wiki/Project:qt/Policies
-		mycmakeargs+=(
-			-DCMAKE_INSTALL_QMLDIR="${EPREFIX}/usr/$(get_libdir)/qt5/qml"
-			-DVTK_QT_VERSION="5"
-		)
-	else
-		if use qt5; then
-			mycmakeargs+=(
-				-DCMAKE_INSTALL_QMLDIR="${EPREFIX}/usr/$(get_libdir)/qt5/qml"
-				-DVTK_QT_VERSION="5"
-			)
-		elif use qt6; then
-			mycmakeargs+=(
-				-DCMAKE_INSTALL_QMLDIR="${EPFREIX}/usr/$(get_libdir)/qt6/qml"
-				-DVTK_QT_VERSION="6"
-			)
-		else
-			mycmakeargs+=( -DVTK_GROUP_ENABLE_Qt="NO" )
-		fi
-	fi
-
-	if use qt5 || use qt6; then
-		mycmakeargs+=(
-			-DVTK_GROUP_ENABLE_Qt:STRING="YES"
-			-DVTK_MODULE_ENABLE_VTK_GUISupportQt="WANT"
-			-DVTK_MODULE_ENABLE_VTK_GUISupportQtQuick="WANT"
-		)
-		if use mysql || use postgres; then
-			mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_GUISupportQtSQL="WANT" )
-		fi
-		if use rendering; then
-			mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_RenderingQt="WANT" )
-		fi
-		if use views; then
-			mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_ViewsQt="WANT" )
-		fi
-	fi
-
-	if use rendering; then
-		mycmakeargs+=(
-			-DVTK_ENABLE_OSPRAY=OFF
-
-			-DVTK_MODULE_ENABLE_VTK_IOExportGL2PS="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingAnnotation="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingContext2D="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingContextOpenGL2="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingCore="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingExternal="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingGL2PSOpenGL2="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingHyperTreeGrid="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingLICOpenGL2="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingLOD="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingLabel="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingMatplotlib="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingOpenGL2="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingRayTracing="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingSceneGraph="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingUI="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingVolume="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingVolumeAMR="WANT"
-			-DVTK_MODULE_ENABLE_VTK_RenderingVolumeOpenGL2="WANT"
-			-DVTK_MODULE_ENABLE_VTK_gl2ps="WANT"
-			-DVTK_MODULE_ENABLE_VTK_glew="WANT"
-			-DVTK_MODULE_ENABLE_VTK_opengl="WANT"
-
-			-DVTK_USE_SDL2=$(usex sdl "YES" "NO")
-		)
-		use tk && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_RenderingTk="WANT" )
-		use views && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_ViewsContext2D="WANT" )
-		use web && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_RenderingVtkJS="WANT" )
-	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=ON
-
-			# requested even if all use flags are off
-			-DVTK_MODULE_ENABLE_VTK_octree="WANT"
-			-DVTK_MODULE_ENABLE_VTK_ViewsCore="WANT"
-
-			# available in ::guru, so avoid  detection if installed
-			-DVTK_MODULE_USE_EXTERNAL_VTK_cli11=OFF
-		)
-	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 < stdpthread < 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
-		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="WANT"
-			-DVTK_MODULE_ENABLE_VTK_ViewsInfovis="WANT"
-		)
-	fi
-
-	if use vtkm; then
-		mycmakeargs+=(
-			-DVTK_MODULE_ENABLE_VTK_AcceleratorsVTKmCore="WANT"
-			-DVTK_MODULE_ENABLE_VTK_AcceleratorsVTKmDataModel="WANT"
-			-DVTK_MODULE_ENABLE_VTK_AcceleratorsVTKmFilters="WANT"
-
-			-DVTKm_NO_INSTALL_README_LICENSE=ON # bug #793221
-			-DVTKm_Vectorization=native
-		)
-	fi
-
-	if use web; then
-		mycmakeargs+=(
-			-DVTK_MODULE_ENABLE_VTK_WebCore="WANT"
-			-DVTK_MODULE_ENABLE_VTK_WebGLExporter="WANT"
-		)
-		use python && mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_WebPython="WANT" )
-	fi
-
-	use java && export JAVA_HOME="${EPREFIX}/etc/java-config-2/current-system-vm"
-
-	cmake_src_configure
-}
-
-src_compile() {
-	use test && cmake_build VTKData
-	cmake_src_compile
-}
-
-# FIXME: avoid nonfatal?
-# see https://github.com/gentoo/gentoo/pull/22878#discussion_r747204043
-src_test() {
-#	nonfatal virtx cmake_src_test
-	virtx cmake_src_test
-}
-
-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
-}


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/vtk/, sci-libs/vtk/files/
@ 2024-09-08 13:51 Sam James
  0 siblings, 0 replies; 19+ messages in thread
From: Sam James @ 2024-09-08 13:51 UTC (permalink / raw
  To: gentoo-commits

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

sci-libs/vtk: revbump to backport expat fix from 9.3.1

The underlaying issue is only present in IOXMLParser which we uncondionally
build but is only required by paraview. Which bundles it's own vtk.

https://gitlab.kitware.com/vtk/vtk/-/issues/19258
https://discourse.paraview.org/t/i-cannot-read-a-vtp-file-i-could-open-yesterday-can-someone-try-to-open-it/13938/4

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

 sci-libs/vtk/files/vtk-9.3.0-r1-expat-2.6.0.patch  | 72 ++++++++++++++++++++++
 .../{vtk-9.3.0-r2.ebuild => vtk-9.3.0-r3.ebuild}   |  1 +
 2 files changed, 73 insertions(+)

diff --git a/sci-libs/vtk/files/vtk-9.3.0-r1-expat-2.6.0.patch b/sci-libs/vtk/files/vtk-9.3.0-r1-expat-2.6.0.patch
new file mode 100644
index 000000000000..ac519f98aa63
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-9.3.0-r1-expat-2.6.0.patch
@@ -0,0 +1,72 @@
+From 3efa07ad277efe5c1d11a2ef2b907c095f68bbef Mon Sep 17 00:00:00 2001
+From: Ben Boeckel <ben.boeckel@kitware.com>
+Date: Mon, 15 Apr 2024 22:22:22 -0400
+Subject: [PATCH] vtkXMLDataParser: track `AppendedData` state explicitly
+
+Newer `libexpat` doesn't like being given the appended data after the
+artificially ended document anymore. Avoid pushing it through to its
+parser.
+
+(cherry picked from commit db8f9efca220c9d16a30958e179abae3379d0011)
+
+Fixes: #19258
+---
+ IO/XMLParser/vtkXMLDataParser.cxx | 6 +++++-
+ IO/XMLParser/vtkXMLDataParser.h   | 3 +++
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/IO/XMLParser/vtkXMLDataParser.cxx b/IO/XMLParser/vtkXMLDataParser.cxx
+index 1f6006d37c2..7d38092fdd7 100644
+--- a/IO/XMLParser/vtkXMLDataParser.cxx
++++ b/IO/XMLParser/vtkXMLDataParser.cxx
+@@ -36,6 +36,7 @@ vtkXMLDataParser::vtkXMLDataParser()
+   this->RootElement = nullptr;
+   this->AppendedDataPosition = 0;
+   this->AppendedDataMatched = 0;
++  this->AppendedDataFound = false;
+   this->DataStream = nullptr;
+   this->InlineDataStream = vtkBase64InputStream::New();
+   this->AppendedDataStream = vtkBase64InputStream::New();
+@@ -88,6 +89,7 @@ void vtkXMLDataParser::PrintSelf(ostream& os, vtkIndent indent)
+ {
+   this->Superclass::PrintSelf(os, indent);
+   os << indent << "AppendedDataPosition: " << this->AppendedDataPosition << "\n";
++  os << indent << "AppendedDataFound: " << this->AppendedDataFound << "\n";
+   if (this->RootElement)
+   {
+     this->RootElement->PrintXML(os, indent);
+@@ -214,7 +216,7 @@ int vtkXMLDataParser::ParsingComplete()
+   // If we have reached the appended data section, we stop parsing.
+   // This prevents the XML parser from having to walk over the entire
+   // appended data section.
+-  if (this->AppendedDataPosition)
++  if (this->AppendedDataPosition || this->AppendedDataFound)
+   {
+     return 1;
+   }
+@@ -433,6 +435,8 @@ int vtkXMLDataParser::ParseBuffer(const char* buffer, unsigned int count)
+     {
+       return 0;
+     }
++
++    this->AppendedDataFound = true;
+   }
+ 
+   return 1;
+diff --git a/IO/XMLParser/vtkXMLDataParser.h b/IO/XMLParser/vtkXMLDataParser.h
+index 1504a4d400b..142bf28327d 100644
+--- a/IO/XMLParser/vtkXMLDataParser.h
++++ b/IO/XMLParser/vtkXMLDataParser.h
+@@ -204,6 +204,9 @@ protected:
+   // How much of the string "<AppendedData" has been matched in input.
+   int AppendedDataMatched;
+ 
++  // Whether AppendedData has been dealt with or not.
++  bool AppendedDataFound;
++
+   // The byte order of the binary input.
+   int ByteOrder;
+ 
+-- 
+GitLab
+

diff --git a/sci-libs/vtk/vtk-9.3.0-r2.ebuild b/sci-libs/vtk/vtk-9.3.0-r3.ebuild
similarity index 99%
rename from sci-libs/vtk/vtk-9.3.0-r2.ebuild
rename to sci-libs/vtk/vtk-9.3.0-r3.ebuild
index fa67ba0e190f..3a522724f066 100644
--- a/sci-libs/vtk/vtk-9.3.0-r2.ebuild
+++ b/sci-libs/vtk/vtk-9.3.0-r3.ebuild
@@ -167,6 +167,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-9.3.0-ThrustPatches.patch"
 	"${FILESDIR}/${PN}-9.3.0-core-octree_node.txx.patch"
 	"${FILESDIR}/${PN}-9.3.0-ThirdParty-gcc15.patch"
+	"${FILESDIR}/${PN}-9.3.0-r1-expat-2.6.0.patch"
 )
 
 DOCS=( CONTRIBUTING.md README.md )


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2024-09-08 13:51 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-15  2:13 [gentoo-commits] repo/gentoo:master commit in: sci-libs/vtk/, sci-libs/vtk/files/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2024-09-08 13:51 Sam James
2024-09-07 14:27 Sam James
2023-05-03 22:23 Sam James
2023-02-27 16:46 Joonas Niilola
2022-12-12  6:09 Joonas Niilola
2022-06-26  7:09 Sam James
2022-04-02 13:06 Andreas Sturmlechner
2022-02-21 23:24 Sam James
2021-12-03 22:38 Vadim Misbakh-Soloviov
2021-05-31 11:40 Sam James
2021-05-31 11:40 Sam James
2020-11-08 13:59 Sam James
2020-06-06  9:42 Andreas Sturmlechner
2020-05-01 16:48 Matthias Maier
2017-07-06 13:37 Michael Palimaka
2017-07-06 12:49 Michael Palimaka
2017-06-02 14:59 Matthias Maier
2016-03-25 17:07 David Seifert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox