public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Joonas Niilola" <juippis@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/vtk/
Date: Tue, 14 Dec 2021 08:36:27 +0000 (UTC)	[thread overview]
Message-ID: <1639470976.6010f1d0f545b9ddf5f2ee3fd673332d8342821a.juippis@gentoo> (raw)

commit:     6010f1d0f545b9ddf5f2ee3fd673332d8342821a
Author:     Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net>
AuthorDate: Fri Nov  5 19:34:22 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Dec 14 08:36:16 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6010f1d0

sci-libs/vtk: bump to 9.1.0

Bug: https://bugs.gentoo.org/820593
Closes: https://bugs.gentoo.org/822780
Closes: https://bugs.gentoo.org/820521
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 sci-libs/vtk/Manifest         |   6 +
 sci-libs/vtk/vtk-9.1.0.ebuild | 596 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 602 insertions(+)

diff --git a/sci-libs/vtk/Manifest b/sci-libs/vtk/Manifest
index f9b3188226ed..d345d4831ee0 100644
--- a/sci-libs/vtk/Manifest
+++ b/sci-libs/vtk/Manifest
@@ -1,8 +1,14 @@
 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/vtk-9.1.0.ebuild b/sci-libs/vtk/vtk-9.1.0.ebuild
new file mode 100644
index 000000000000..0cc9587af0cf
--- /dev/null
+++ b/sci-libs/vtk/vtk-9.1.0.ebuild
@@ -0,0 +1,596 @@
+# 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.
+# - replace usex by usev once we bump to EAPI 8
+
+PYTHON_COMPAT=( python3_{8..10} )
+WEBAPP_OPTIONAL=yes
+WEBAPP_MANUAL_SLOT=yes
+
+inherit check-reqs cmake cuda 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
+	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, plus
+# maybe some flags related to Kits and a few other needed flags.
+IUSE="all-modules +boost cuda debug doc examples +ffmpeg +gdal imaging java
+	mpi mysql odbc openmp postgres python qt5 +rendering tbb test +threads
+	tk video_cards_nvidia views web"
+
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="
+	all-modules? ( boost ffmpeg gdal imaging mysql odbc postgres qt5 rendering views )
+	cuda? ( video_cards_nvidia )
+	java? ( rendering )
+	python? ( ${PYTHON_REQUIRED_USE} )
+	qt5? ( rendering )
+	tk? ( rendering python )
+	web? ( python )
+"
+
+RDEPEND="
+	app-arch/lz4:=
+	app-arch/xz-utils
+	dev-db/sqlite:3
+	dev-libs/double-conversion:=
+	dev-libs/expat
+	dev-libs/icu:=
+	dev-libs/jsoncpp:=
+	dev-libs/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/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:* )
+	mpi? (
+		media-libs/glew:=
+		sys-cluster/openmpi[cxx,romio]
+		virtual/opengl
+	)
+	mysql? ( dev-db/mariadb-connector-c )
+	odbc? ( dev-db/unixODBC )
+	postgres? ( dev-db/postgresql:= )
+	python? ( ${PYTHON_DEPS} )
+	qt5? (
+		dev-qt/qtcore:5
+		dev-qt/qtopengl:5
+		dev-qt/qtquickcontrols2:5
+		dev-qt/qtsql:5
+		dev-qt/qtwidgets:5
+	)
+	rendering? (
+		media-libs/freeglut
+		media-libs/glew:=
+		media-libs/libsdl2
+		sci-libs/proj:=
+		virtual/opengl
+		x11-libs/gl2ps
+		x11-libs/libXcursor
+	)
+	tbb? ( <dev-cpp/tbb-2021.4.0:= )
+	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-cpp/eigen
+	<dev-libs/pegtl-3
+	dev-libs/utfcpp
+"
+BDEPEND="
+	virtual/pkgconfig
+	mpi? ( app-admin/chrpath )
+	test? (
+		media-libs/glew
+		virtual/opengl
+		x11-libs/libXcursor
+	)
+"
+
+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
+)
+
+DOCS=( CONTRIBUTING.md README.md )
+
+# based on default settings
+CHECKREQS_DISK_BUILD="4G"
+# we want the EAPI 8 default
+CMAKE_BUILD_TYPE=RelWithDebInfo
+
+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 examples || use doc; then
+		CHECKREQS_DISK_BUILD="7G"
+	fi
+
+	if use examples && use doc; then
+		CHECKREQS_DISK_BUILD="10G"
+	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() {
+	[[ ${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 examples || use doc; then
+		CHECKREQS_DISK_BUILD="7G"
+	fi
+
+	if use examples && use doc; then
+			CHECKREQS_DISK_BUILD="10G"
+	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: 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: libharu is omitted: vtk needs an updated version (2.4.0)
+	# Note: fmt is ommited, >=libfmt-8.1.0 needed
+	# Note: cgns is ommited, >=cgnslib-4.1 needed
+	# Note: no valid mpi4py target found with system library
+	# TODO: cgns (4.1), cli11 (::guru), exprtk, ioss, libfmt (8.1.0)
+	local -a DROPS=( doubleconversion eigen expat freetype hdf5 jpeg jsoncpp
+		libxml2 lz4 lzma netcdf ogg pegtl png pugixml sqlite theora tiff utf8
+		zlib )
+	use rendering && DROPS+=( gl2ps glew libproj )
+
+	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() {
+# TODO: check these and consider to use them
+#	VTK_BUILD_SCALED_SOA_ARRAYS
+#	VTK_DISPATCH_{AOS,SOA,TYPED}_ARRAYS
+
+	local mycmakeargs=(
+		-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)
+
+		-DVTK_ENABLE_KITS=ON
+		# defaults to ON: USE flag for this?
+		-DVTK_ENABLE_REMOTE_MODULES=OFF
+
+		-DVTK_GROUP_ENABLE_Imaging=$(usex imaging "YES" "DONT_WANT")
+		-DVTK_GROUP_ENABLE_Qt=$(usex qt5 "YES" "DONT_WANT")
+		-DVTK_GROUP_ENABLE_Rendering=$(usex rendering "YES" "DONT_WANT")
+		-DVTK_GROUP_ENABLE_StandAlone="YES"
+		-DVTK_GROUP_ENABLE_Views=$(usex views "YES" "DONT_WANT")
+		-DVTK_GROUP_ENABLE_Web=$(usex web "YES" "DONT_WANT")
+
+		-DVTK_INSTALL_SDK=ON
+
+		-DVTK_MODULE_ENABLE_VTK_vtkm="WANT"
+		-DVTK_MODULE_ENABLE_VTK_IOGeoJSON="WANT"
+		-DVTK_MODULE_ENABLE_VTK_IOOggTheora="WANT"
+
+		# TODO: update one cgnslib-4.1.1 is packaged
+		-DVTK_MODULE_USE_EXTERNAL_VTK_cgns=OFF
+		# not packaged in Gentoo
+		-DVTK_MODULE_USE_EXTERNAL_VTK_exprtk=OFF
+		# TODO: update once libfmt-8.1.0 has been packaged
+		-DVTK_MODULE_USE_EXTERNAL_VTK_fmt=OFF
+		# not pacakged in Gentoo
+		-DVTK_MODULE_USE_EXTERNAL_VTK_ioss=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_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=ON
+
+		-DVTK_WRAP_JAVA=$(usex java ON OFF)
+		-DVTK_WRAP_PYTHON=$(usex python ON OFF)
+	)
+
+	if use all-modules; then
+		mycmakeargs+=(
+			-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="DONT_WANT"
+			-DVTK_MODULE_ENABLE_VTK_fides="DONT_WANT"
+			-DVTK_MODULE_ENABLE_VTK_FiltersOpenTURNS="DONT_WANT"
+			-DVTK_MODULE_ENABLE_VTK_IOADIOS2="DONT_WANT"
+			-DVTK_MODULE_ENABLE_VTK_IOFides="DONT_WANT"
+			-DVTK_MODULE_ENABLE_VTK_IOOpenVDB="DONT_WANT"
+			-DVTK_MODULE_ENABLE_VTK_IOPDAL="DONT_WANT"
+			-DVTK_MODULE_ENABLE_VTK_RenderingOpenVR="DONT_WANT"
+
+			# available in ::guru, so avoid  detection if installed
+			-DVTK_MODULE_USE_EXTERNAL_VTK_cli11=OFF
+		)
+	fi
+
+	# TODO: consider removing USE flags and enable by default
+	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_MODLE_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
+
+	# TODO: consider removing the USE flag and enable by default
+	if use ffmpeg; then
+		mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_IOFFMPEG="WANT" )
+	fi
+
+	# TODO: consider removing the USE flag and enable by default
+	if use gdal; then
+		mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_GeovisGDAL="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
+		)
+	fi
+
+	if use mpi; then
+		mycmakeargs+=(
+			-DVTK_GROUP_ENABLE_MPI="YES"
+			-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 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 test || 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" )
+	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
+
+			-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 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
+}
+
+# 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
+
+	# 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
+}


             reply	other threads:[~2021-12-14  8:36 UTC|newest]

Thread overview: 92+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-14  8:36 Joonas Niilola [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-09-07  9:15 [gentoo-commits] repo/gentoo:master commit in: sci-libs/vtk/ Sam James
2024-09-06 20:36 Eli Schwartz
2024-09-04 11:45 Sebastian Pipping
2024-06-01 17:23 Andrew Ammerlaan
2024-05-07 13:12 Andrew Ammerlaan
2024-05-07 12:52 Andrew Ammerlaan
2024-04-12 12:40 Andrew Ammerlaan
2024-04-11  9:54 Andrew Ammerlaan
2024-04-06  6:49 Arthur Zamarin
2024-03-16 16:19 Arthur Zamarin
2023-12-01  9:58 Andrew Ammerlaan
2023-11-16 15:11 Florian Schmaus
2023-06-28 21:11 Sam James
2023-06-28 21:11 Sam James
2023-03-04 13:51 Arthur Zamarin
2023-01-23  9:36 Andrew Ammerlaan
2023-01-23  9:36 Andrew Ammerlaan
2022-12-16  1:40 Sam James
2022-10-12 23:09 Sam James
2022-10-04 14:58 Joonas Niilola
2022-08-23 12:04 Andrew Ammerlaan
2022-06-26  8:49 Sam James
2022-06-26  7:11 Sam James
2022-05-19 12:12 Joonas Niilola
2022-05-18 16:58 Andrew Ammerlaan
2022-05-15 17:11 Andrew Ammerlaan
2022-04-06 17:30 Piotr Karbowski
2022-03-06  0:00 Sam James
2022-01-28  7:53 Sam James
2021-12-02  1:25 Sam James
2021-10-29 22:23 Sam James
2021-10-27 15:09 Sam James
2021-09-05  9:54 Andrew Ammerlaan
2021-08-27 20:23 Andrew Ammerlaan
2021-08-27 20:23 Andrew Ammerlaan
2021-08-02 20:52 Ionen Wolkens
2021-07-17 18:18 David Seifert
2021-07-07 20:05 Ionen Wolkens
2021-06-25 13:05 Andrew Ammerlaan
2021-06-25 13:05 Andrew Ammerlaan
2021-06-15 14:42 Sam James
2021-06-15 14:42 Sam James
2021-06-15 14:42 Sam James
2021-06-15 14:42 Sam James
2021-06-10  3:38 Sam James
2021-06-02  1:24 Sam James
2021-03-26  0:57 Michael Orlitzky
2021-02-22 18:57 Sam James
2020-12-27  0:48 Andreas Sturmlechner
2020-12-27  0:17 Andreas Sturmlechner
2020-12-26 23:46 Andreas Sturmlechner
2020-07-16  1:06 Sam James
2020-06-06 10:04 Andreas Sturmlechner
2020-06-06  9:42 Andreas Sturmlechner
2020-06-06  9:42 Andreas Sturmlechner
2020-06-06  9:42 Andreas Sturmlechner
2020-06-06  9:42 Andreas Sturmlechner
2020-06-05 21:53 Andreas K. Hüttel
2020-06-05 21:15 Andreas K. Hüttel
2020-05-12 15:34 Matthias Maier
2020-05-12  5:58 Matthias Maier
2020-05-01 17:58 Matthias Maier
2020-05-01 16:48 Matthias Maier
2020-05-01 16:48 Matthias Maier
2020-04-26 11:00 David Seifert
2020-04-05 19:47 Andreas Sturmlechner
2020-04-05 19:47 Andreas Sturmlechner
2020-02-26 16:56 Andreas Sturmlechner
2020-02-09 16:36 Michał Górny
2020-02-04 13:10 Michał Górny
2019-09-14 16:33 Richard Yao
2018-10-27 14:09 Pacho Ramos
2018-10-13 10:07 Mikle Kolyada
2018-09-09 19:10 Amy Liffey
2018-02-28 18:48 Mart Raudsepp
2018-01-30 18:44 Jonathan Scruggs
2018-01-24 19:53 David Seifert
2017-12-22 10:55 Michael Weber
2017-11-17 18:47 David Seifert
2017-11-06  1:58 Andreas Sturmlechner
2017-11-06  1:58 Andreas Sturmlechner
2017-11-06  1:58 Andreas Sturmlechner
2017-07-04 15:49 Agostino Sarubbo
2017-07-04 10:17 Agostino Sarubbo
2017-05-06 22:20 David Seifert
2017-01-26 20:12 David Seifert
2016-12-20 19:16 Tobias Klausmann
2016-11-06 20:15 David Seifert
2016-11-06 20:15 David Seifert
2016-09-07 18:00 Patrice Clement
2016-08-21 17:41 Pacho Ramos

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=1639470976.6010f1d0f545b9ddf5f2ee3fd673332d8342821a.juippis@gentoo \
    --to=juippis@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

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

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