From b62381b18b4bf2e919cbfbae11ebcad391e38e77 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 16 Dec 2022 03:35:12 +0000 Subject: gentoo auto-resync : 16:12:2022 - 03:35:12 --- sci-libs/vtk/Manifest | 6 +- sci-libs/vtk/vtk-9.0.3-r5.ebuild | 551 ----------------------------- sci-libs/vtk/vtk-9.0.3-r7.ebuild | 551 +++++++++++++++++++++++++++++ sci-libs/vtk/vtk-9.1.0-r4.ebuild | 629 --------------------------------- sci-libs/vtk/vtk-9.1.0-r6.ebuild | 629 +++++++++++++++++++++++++++++++++ sci-libs/vtk/vtk-9.2.2-r1.ebuild | 728 +++++++++++++++++++++++++++++++++++++++ sci-libs/vtk/vtk-9.2.2.ebuild | 728 --------------------------------------- 7 files changed, 1911 insertions(+), 1911 deletions(-) delete mode 100644 sci-libs/vtk/vtk-9.0.3-r5.ebuild create mode 100644 sci-libs/vtk/vtk-9.0.3-r7.ebuild delete mode 100644 sci-libs/vtk/vtk-9.1.0-r4.ebuild create mode 100644 sci-libs/vtk/vtk-9.1.0-r6.ebuild create mode 100644 sci-libs/vtk/vtk-9.2.2-r1.ebuild delete mode 100644 sci-libs/vtk/vtk-9.2.2.ebuild (limited to 'sci-libs/vtk') diff --git a/sci-libs/vtk/Manifest b/sci-libs/vtk/Manifest index b54774e0314b..11b98f67374a 100644 --- a/sci-libs/vtk/Manifest +++ b/sci-libs/vtk/Manifest @@ -24,7 +24,7 @@ DIST VTKLargeDataFiles-9.2.2.tar.gz 247507138 BLAKE2B af593595b0b681a91e491a9fca 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 -EBUILD vtk-9.0.3-r5.ebuild 14400 BLAKE2B 0d63f7c28132d1486ac3b14b680d7cf730ec1f4572105870fa3d52096982a9dbe4d05b3955b9f4d0114dae5668698a398619bc38bd27fe02e22ca90e2a2f0e1d SHA512 146892890bf9b28dd2d5a00e3ac406814439d87ab4803014a56fce3281b124c48b02e19492a56aa474a4f0f175e39355dc17f437a23603901b04db1cf88c117b -EBUILD vtk-9.1.0-r4.ebuild 17011 BLAKE2B b45849236f9a55cb45315bbc1ee0865c85d14d75f84aabdf6fe4a2998475e7f1259656f599d62a2ef08468d0cfc2a845b2cf7829b835f7523035e5c281d68b00 SHA512 373cd3daa26bbf4cbca5c6e0d8372894a0e472cb09027a6007dc70fe0d11d64c7d86ae0875655ae8862436c6c4b3b8dac42b133ce7625ce8e8f88f0e072eb198 -EBUILD vtk-9.2.2.ebuild 21896 BLAKE2B 5f83cb28c4590c6216d3d9154a3fcbc6a369d4cc6763e91b87e371508f3e7b9c9fcd3614fd759cd1ff30c154b15ce4fbde1a46274f194c1db95683b107317e15 SHA512 634721da186e0544f737390c16873dd5b06a5141f842a789fd0774cbb4cb8ffb95cc965ccbfb37be0db5dc25307ea3baed379c9d0f52a9a994c55609424e9c87 +EBUILD vtk-9.0.3-r7.ebuild 14402 BLAKE2B a5d04ea402a5b33d9b6cf6e47e5942ae100d8c25884a364fca94fe60e199c2ecc801e0a20ac6bf7c54e02bac1b9a1eaeec8ab48fb636029fceef3bb9ffaa93f5 SHA512 37d69e13c62cb4b36d1666d013e2a72b50e81ca0ac75d205d2ce8545ef9133ea5241dc476888322edce394eca9e7022c42f2870c8d5a8fba8091949962c5060f +EBUILD vtk-9.1.0-r6.ebuild 17013 BLAKE2B 2f53fc09561c70a19b6650e464718da4044d48d5de683a4aa04f8a90f4dcdcd45d04666a6c4cd51932655f0306167844ad2cc4cd8aab8708db053b6f722301d6 SHA512 d6d971feb027f125e15a18c157095f040a643a9b04ebe34f0cb1621c418abfde59e272a3d23e456bdd61be86150003b4584ea0db98c7a8bf84821799f6546d98 +EBUILD vtk-9.2.2-r1.ebuild 21898 BLAKE2B 94348d15e4fd7d3554c796809eb01551448cc9484fac0789be29fc5e4c7c1f6887af945e1b440aa3785ccfbe901be073a4eace273c9a613d056e3beb21a43ff5 SHA512 0ade2bf98e302630f09952ee2966d3783f5504e0986959f43b33b1a5e2f4881476231b0738f2e0c58bc649e7118b831feb2e7d98713b94a9643d711145e10b34 MISC metadata.xml 1953 BLAKE2B 35f57e027a7dd2baa4cc25d72441ea0b3a8e62604f548511da80b3bd5dfbf545020d89f32e3daf0264cb903a1ddfd2d35bd6050ccb106c3ebd1214cb0cf08623 SHA512 1866c59f60ee8637c3238d5faf5c51a3e3a40866a01304d6c325ab46744447ea45acf84e5538cef452fed381679c02e75437459004542f7b978af3741b47db29 diff --git a/sci-libs/vtk/vtk-9.0.3-r5.ebuild b/sci-libs/vtk/vtk-9.0.3-r5.ebuild deleted file mode 100644 index efc32fbb2b46..000000000000 --- a/sci-libs/vtk/vtk-9.0.3-r5.ebuild +++ /dev/null @@ -1,551 +0,0 @@ -# Copyright 1999-2022 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 ) - ^^ ( X offscreen ) -" - -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 - =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:= - /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_DEFAULT_RENDER_WINDOW_OFFSCREEN=ON - -DVTK_DEFAULT_RENDER_WINDOW_HEADLESS=ON - -DVTK_OPENGL_HAS_OSMESA=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 -} diff --git a/sci-libs/vtk/vtk-9.0.3-r7.ebuild b/sci-libs/vtk/vtk-9.0.3-r7.ebuild new file mode 100644 index 000000000000..1f00479cbf29 --- /dev/null +++ b/sci-libs/vtk/vtk-9.0.3-r7.ebuild @@ -0,0 +1,551 @@ +# Copyright 1999-2022 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 ) + ^^ ( X offscreen ) +" + +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:= + =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:= + /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_DEFAULT_RENDER_WINDOW_OFFSCREEN=ON + -DVTK_DEFAULT_RENDER_WINDOW_HEADLESS=ON + -DVTK_OPENGL_HAS_OSMESA=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 +} diff --git a/sci-libs/vtk/vtk-9.1.0-r4.ebuild b/sci-libs/vtk/vtk-9.1.0-r4.ebuild deleted file mode 100644 index f6730684bc66..000000000000 --- a/sci-libs/vtk/vtk-9.1.0-r4.ebuild +++ /dev/null @@ -1,629 +0,0 @@ -# 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 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 - logging mpi mysql odbc openmp postgres python qt5 qt6 +rendering tbb test - +threads tk video_cards_nvidia views web" - -RESTRICT="!test? ( test )" - -REQUIRED_USE=" - all-modules? ( - boost ffmpeg gdal imaging mysql odbc postgres rendering views - || ( qt5 qt6 ) - ) - cuda? ( video_cards_nvidia ) - java? ( rendering ) - python? ( ${PYTHON_REQUIRED_USE} ) - qt5? ( rendering ) - qt6? ( 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/libfmt-8.1.1:= - dev-libs/libxml2:2 - dev-libs/libzip:= - dev-libs/pugixml - media-libs/freetype - 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/netcdf:=[mpi=] - sys-libs/zlib - media-libs/libjpeg-turbo - 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 - ) - qt6? ( - dev-qt/qtbase:6[gui,opengl,sql,widgets] - dev-qt/qtdeclarative:6[opengl] - dev-qt/qtshadertools:6 - ) - rendering? ( - media-libs/freeglut - media-libs/glew:= - media-libs/libsdl2 - sci-libs/proj:= - virtual/opengl - x11-libs/gl2ps - x11-libs/libXcursor - ) - tbb? ( /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 - -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" "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_IOGeoJSON="WANT" - -DVTK_MODULE_ENABLE_VTK_IOOggTheora="WANT" - -DVTK_MODULE_ENABLE_VTK_fmt="YES" - -DVTK_MODULE_ENABLE_VTK_vtkm="WANT" - - # not packaged in Gentoo - -DVTK_MODULE_USE_EXTERNAL_VTK_exprtk=OFF - -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 && use qt6; then - # prefer Qt5: https://wiki.gentoo.org/wiki/Project:qt/Policies - mycmakeargs+=( - -DCMAKE_INSTALL_QMLDIR="/usr/$(get_libdir)/qt5/qml" - -DVTK_QT_VERSION="5" - ) - else - if use qt5; then - mycmakeargs+=( - -DCMAKE_INSTALL_QMLDIR="/usr/$(get_libdir)/qt5/qml" - -DVTK_QT_VERSION="5" - ) - elif use qt6; then - mycmakeargs+=( - -DCMAKE_INSTALL_QMLDIR="/usr/$(get_libdir)/qt6/qml" - -DVTK_QT_VERSION="6" - ) - else - mycmakeargs+=( -DVTK_GROUP_ENABLE_Qt="DONT_WANT" ) - fi - fi - - if use qt5 || use qt6; then - mycmakeargs+=( - -DVTK_GROUP_ENABLE_Qt:STRING="YES" - -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 - - 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 -} diff --git a/sci-libs/vtk/vtk-9.1.0-r6.ebuild b/sci-libs/vtk/vtk-9.1.0-r6.ebuild new file mode 100644 index 000000000000..a3a985ac0f80 --- /dev/null +++ b/sci-libs/vtk/vtk-9.1.0-r6.ebuild @@ -0,0 +1,629 @@ +# 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 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 + logging mpi mysql odbc openmp postgres python qt5 qt6 +rendering tbb test + +threads tk video_cards_nvidia views web" + +RESTRICT="!test? ( test )" + +REQUIRED_USE=" + all-modules? ( + boost ffmpeg gdal imaging mysql odbc postgres rendering views + || ( qt5 qt6 ) + ) + cuda? ( video_cards_nvidia ) + java? ( rendering ) + python? ( ${PYTHON_REQUIRED_USE} ) + qt5? ( rendering ) + qt6? ( 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/libfmt-8.1.1:= + dev-libs/libxml2:2 + dev-libs/libzip:= + dev-libs/pugixml + media-libs/freetype + 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/netcdf:=[mpi=] + sys-libs/zlib + media-libs/libjpeg-turbo + 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 + ) + qt6? ( + dev-qt/qtbase:6[gui,opengl,sql,widgets] + dev-qt/qtdeclarative:6[opengl] + dev-qt/qtshadertools:6 + ) + rendering? ( + media-libs/freeglut + media-libs/glew:= + media-libs/libsdl2 + sci-libs/proj:= + virtual/opengl + x11-libs/gl2ps + x11-libs/libXcursor + ) + tbb? ( /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 + -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" "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_IOGeoJSON="WANT" + -DVTK_MODULE_ENABLE_VTK_IOOggTheora="WANT" + -DVTK_MODULE_ENABLE_VTK_fmt="YES" + -DVTK_MODULE_ENABLE_VTK_vtkm="WANT" + + # not packaged in Gentoo + -DVTK_MODULE_USE_EXTERNAL_VTK_exprtk=OFF + -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 && use qt6; then + # prefer Qt5: https://wiki.gentoo.org/wiki/Project:qt/Policies + mycmakeargs+=( + -DCMAKE_INSTALL_QMLDIR="/usr/$(get_libdir)/qt5/qml" + -DVTK_QT_VERSION="5" + ) + else + if use qt5; then + mycmakeargs+=( + -DCMAKE_INSTALL_QMLDIR="/usr/$(get_libdir)/qt5/qml" + -DVTK_QT_VERSION="5" + ) + elif use qt6; then + mycmakeargs+=( + -DCMAKE_INSTALL_QMLDIR="/usr/$(get_libdir)/qt6/qml" + -DVTK_QT_VERSION="6" + ) + else + mycmakeargs+=( -DVTK_GROUP_ENABLE_Qt="DONT_WANT" ) + fi + fi + + if use qt5 || use qt6; then + mycmakeargs+=( + -DVTK_GROUP_ENABLE_Qt:STRING="YES" + -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 + + 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 +} diff --git a/sci-libs/vtk/vtk-9.2.2-r1.ebuild b/sci-libs/vtk/vtk-9.2.2-r1.ebuild new file mode 100644 index 000000000000..493462905cc9 --- /dev/null +++ b/sci-libs/vtk/vtk-9.2.2-r1.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 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 +} diff --git a/sci-libs/vtk/vtk-9.2.2.ebuild b/sci-libs/vtk/vtk-9.2.2.ebuild deleted file mode 100644 index 51c14eedf0a3..000000000000 --- a/sci-libs/vtk/vtk-9.2.2.ebuild +++ /dev/null @@ -1,728 +0,0 @@ -# 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 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 -} -- cgit v1.2.3