From fcc5224904648a8e6eb528d7603154160a20022f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 2 Feb 2022 01:39:05 +0000 Subject: gentoo resync : 02.02.2022 --- sci-libs/vtk/Manifest | 2 +- sci-libs/vtk/vtk-9.0.3-r3.ebuild | 549 -------------------------------------- sci-libs/vtk/vtk-9.0.3-r4.ebuild | 550 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 551 insertions(+), 550 deletions(-) delete mode 100644 sci-libs/vtk/vtk-9.0.3-r3.ebuild create mode 100644 sci-libs/vtk/vtk-9.0.3-r4.ebuild (limited to 'sci-libs/vtk') diff --git a/sci-libs/vtk/Manifest b/sci-libs/vtk/Manifest index b9f22caab02c..fa8d6c75d6b5 100644 --- a/sci-libs/vtk/Manifest +++ b/sci-libs/vtk/Manifest @@ -23,6 +23,6 @@ DIST vtkDocHtml-8.2.0.tar.gz 132516675 BLAKE2B 8651a3793f3326dee36c5ae8a280b0094 DIST vtkDocHtml-9.0.3.tar.gz 132650096 BLAKE2B 45fc1a6942df3e79e500a552c3b3cda2099b9451191559d471e3a2e785a8c52b2c6273cfd2cc4a3f3f65582e607d9414475f58d243fde96a4f985bed479e53db SHA512 9b5fef43f3c2b92aa1fe6a9ba9458d6677874b09b167654db7f26df6feffdc34ed1a8fb4e59d64b75625063a774af77fe57f275903602a5f7daa74e1a2e71800 DIST vtkDocHtml-9.1.0.tar.gz 152767166 BLAKE2B 9163b6b1bf55810a310ca8bc211e067827b1f9907efd2a378363d8e6296d4bf07b25371b66c00cab3576fb06f0cb63fdf2ffea044033e2c42e9087819a3736ba SHA512 036daba5eb6503b5eb3e9323a4ab3ea0f27c09d8fef411dd2ed154c24d5a37d9f19d57db07576c8af404bfdb7178e95b137a3c27bfedb3f9cb72c04f717da80a EBUILD vtk-8.2.0-r6.ebuild 10341 BLAKE2B f8fdb78d1181de56f455869a7e4244ae369c62aa682757628b62926d7bb6ce29efde32b3d0faa9cae2c7a2faa52d893941f8ca93b872e831e7a791aca8cc68ae SHA512 73100a10ab6f9b4d1ddaa7cfbb60d3b9c79b53d96c21b9541769306d540b1292986b1e4804cec07d86e80cbb1fb5fb2f4b4870183f1ca70637836a606ac38d14 -EBUILD vtk-9.0.3-r3.ebuild 14294 BLAKE2B 25b9deafd34226c2e97b5bf59261f97247f3d2c138c64e4fd764ed4cafbe466b46b418240ec816588e4035096e943701d67f7e3243f0605f76d7e6e57f97a6a6 SHA512 70d844fb50a2d2fba1037ff6c0b0a611da04cf5ae3898134936a4e3b50d148bb9893ff0bd14d186ffdff9e6bd1afdd1879df21e623a834a6502edfc3e9170233 +EBUILD vtk-9.0.3-r4.ebuild 14314 BLAKE2B 9b300b679f40871c9d89a670b8d5c5b4e2236d1f08ad94155ce8e7711f08530170decc5bde428948c0eeec66fb030d6a2d93a16902fa59fdae62d7dc3ead1508 SHA512 5103af524fd56b5d4f267f659757715b2e01529cae295c9bfd28236f7d04d4af3c04570183fae77eb672c3476b92393ae3a98ef90e38f91bfd33a6446a23e9cb EBUILD vtk-9.1.0.ebuild 16274 BLAKE2B 9239ae77537e00220fb84988be25c84baa55876fdd61e0d065111a841b2a80defc1c29a5e5af53600796fd9360be27d7fd0892ddfaa2363fcbe1f867cace40d2 SHA512 637b6e2511ee74416e61aaba1cb4283adb3d2ccf95f4ba461b8d9f0fc612fb429efa83cc1b7804d3ff2ece8d52bde866eb849c4ca7c74958630f22d167f84bf1 MISC metadata.xml 1405 BLAKE2B 0eadca65bf1cec673770c28b581491053bfd0f0834aee7c063e79fdc8e89ae161f74e97de4bbcdc1f80590284a004ae129f28b948d6efee0bd5d1c2ae1c3b26d SHA512 133b198af799dabfd1f4dad6ba27b27f8a2df728b46b94934ba3cb26c6a51dec8882e905f120ce1e5f55fbf8fda4ee9634c59280f7fd1f7bcd316e64f86aec60 diff --git a/sci-libs/vtk/vtk-9.0.3-r3.ebuild b/sci-libs/vtk/vtk-9.0.3-r3.ebuild deleted file mode 100644 index db7df9ecb55d..000000000000 --- a/sci-libs/vtk/vtk-9.0.3-r3.ebuild +++ /dev/null @@ -1,549 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -# TODO: -# - add USE flag for remote modules? Those modules can be downloaded -# properly before building. - -PYTHON_COMPAT=( python3_{8,9} ) -WEBAPP_OPTIONAL=yes -WEBAPP_MANUAL_SLOT=yes - -inherit check-reqs cmake cuda flag-o-matic java-pkg-opt-2 python-single-r1 toolchain-funcs virtualx webapp - -# Short package version -MY_PV="$(ver_cut 1-2)" - -DESCRIPTION="The Visualization Toolkit" -HOMEPAGE="https://www.vtk.org/" -SRC_URI=" - https://www.vtk.org/files/release/${MY_PV}/VTK-${PV}.tar.gz - https://www.vtk.org/files/release/${MY_PV}/VTKData-${PV}.tar.gz - doc? ( https://www.vtk.org/files/release/${MY_PV}/vtkDocHtml-${PV}.tar.gz ) - examples? ( https://www.vtk.org/files/release/${MY_PV}/VTKLargeData-${PV}.tar.gz ) - test? ( - https://www.vtk.org/files/release/${MY_PV}/VTKLargeData-${PV}.tar.gz - ) -" -S="${WORKDIR}/VTK-${PV}" - -LICENSE="BSD LGPL-2" -SLOT="0/${MY_PV}" -KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux" -# Note: external xdmf2 has no recognized target -IUSE="+X all-modules boost cuda doc examples ffmpeg gdal imaging java - +json kits mpi mysql odbc offscreen openmp pegtl postgres python - qt5 +rendering tbb theora tk video_cards_nvidia views web" - -RESTRICT="!test? ( test )" - -REQUIRED_USE=" - all-modules? ( boost ffmpeg gdal imaging mysql odbc postgres qt5 rendering theora views ) - cuda? ( X video_cards_nvidia ) - java? ( rendering ) - python? ( ${PYTHON_REQUIRED_USE} ) - qt5? ( X rendering ) - tk? ( X rendering python ) - web? ( python ) -" - -RDEPEND=" - app-arch/lz4 - app-arch/xz-utils - dev-db/sqlite - dev-cpp/eigen[cuda?,openmp?] - dev-libs/double-conversion:= - dev-libs/expat - dev-libs/icu:= - dev-libs/libxml2:2 - dev-libs/pugixml - media-libs/freetype - media-libs/libogg - media-libs/libpng - media-libs/libtheora - media-libs/tiff - =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_OPENGL_HAS_OSMESA=ON - -DVTK_DEFAULT_RENDER_WINDOW_OFFSCREEN=ON - -DVTK_DEFAULT_RENDER_WINDOW_HEADLESS=ON - ) - fi - - if use openmp; then - if use tbb; then - einfo "NOTE: You have specified both openmp and tbb USE flags." - einfo "NOTE: Tbb will take precedence. Disabling OpenMP" - # Sequential is default SMP implementation, nothing special to do - else - mycmakeargs+=( - -DVTK_SMP_IMPLEMENTATION_TYPE="OpenMP" - -DVTKm_ENABLE_OPENMP=ON - ) - fi - fi - - if use pegtl; then - mycmakeargs+=( -DVTK_MODULE_USE_EXTERNAL_VTK_pegtl=ON ) - else - mycmakeargs+=( -DVTK_MODULE_USE_EXTERNAL_VTK_pegtl=OFF ) - fi - - if use postgres; then - mycmakeargs+=( - -DVTK_MODULE_ENABLE_VTK_IOPostgreSQL="WANT" - -DVTK_MODULE_ENABLE_VTK_IOSQL="WANT" - ) - fi - - if use python; then - mycmakeargs+=( - -DVTK_ENABLE_WRAPPING=ON - -DPython3_EXECUTABLE="${PYTHON}" - -DVTK_PYTHON_SITE_PACKAGES_SUFFIX="lib/${EPYTHON}/site-packages" - ) - fi - - if use qt5; then - mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_GUISupportQt="WANT" ) - if use mysql || use postgres; then - mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_GUISupportQtSQL="WANT" ) - fi - if use rendering; then - mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_RenderingQt="WANT" ) - fi - if use views; then - mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_ViewsQt="WANT" ) - fi - fi - - if use rendering || use web || use all-modules; then - # needs patched version - mycmakeargs+=( -DVTK_MODULE_USE_EXTERNAL_VTK_libharu=OFF ) - fi - - if use rendering; then - mycmakeargs+=( - -DVTK_MODULE_ENABLE_VTK_IOExportGL2PS="WANT" - -DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps=ON - -DVTK_MODULE_USE_EXTERNAL_VTK_glew=ON - -DVTK_MODULE_USE_EXTERNAL_VTK_libproj=ON - ) - fi - - if use tbb; then - mycmakeargs+=( - -DVTK_SMP_IMPLEMENTATION_TYPE="TBB" - -DVTKm_ENABLE_TBB=ON - ) - fi - - if use test; then - ewarn "Testing requires VTK_FORBID_DOWNLOADS=OFF by upstream." - ewarn "Care has been taken to pre-download all required files." - ewarn "In case you find missing files, please inform me." - mycmakeargs+=( - -DVTK_BUILD_TESTING=ON - -DVTK_DATA_EXCLUDE_FROM_ALL=ON - -DVTK_FORBID_DOWNLOADS=OFF - ) - else - mycmakeargs+=( - -DVTK_BUILD_TESTING=OFF - -DVTK_FORBID_DOWNLOADS=ON - ) - fi - - if use theora; then - mycmakeargs+=( -DVTK_MODULE_ENABLE_VTK_IOOggTheora="WANT" ) - fi - - if use all-modules; then - mycmakeargs+=( - -DVTK_ENABLE_OSPRAY=OFF - -DVTK_MODULE_ENABLE_VTK_DomainsMicroscopy="DONT_WANT" - -DVTK_MODULE_ENABLE_VTK_FiltersOpenTURNS="DONT_WANT" - -DVTK_MODULE_ENABLE_VTK_IOADIOS2="DONT_WANT" - -DVTK_MODULE_ENABLE_VTK_IOPDAL="DONT_WANT" - -DVTK_MODULE_ENABLE_VTK_MomentInvariants="DONT_WANT" - -DVTK_MODULE_ENABLE_VTK_PoissonReconstruction="DONT_WANT" - -DVTK_MODULE_ENABLE_VTK_Powercrust="DONT_WANT" - -DVTK_MODULE_ENABLE_VTK_RenderingOpenVR="DONT_WANT" - -DVTK_MODULE_ENABLE_VTK_SignedTensor="DONT_WANT" - -DVTK_MODULE_ENABLE_VTK_SplineDrivenImageSlicer="DONT_WANT" - -DVTK_MODULE_ENABLE_VTK_vtkDICOM="DONT_WANT" - -DVTK_MODULE_USE_EXTERNAL_vtkkissfft=ON - ) - fi - - use java && export JAVA_HOME="${EPREFIX}/etc/java-config-2/current-system-vm" - - if use mpi; then - export CC=mpicc - export CXX=mpicxx - export FC=mpif90 - export F90=mpif90 - export F77=mpif77 - fi - - cmake_src_configure -} - -src_test() { - nonfatal virtx cmake_src_test -} - -src_install() { - use web && webapp_src_preinst - - # Stop web page images from being compressed - if use doc; then - HTML_DOCS=( "${WORKDIR}/html/." ) - fi - - cmake_src_install - - use java && java-pkg_regjar "${ED}"/usr/share/${PN}/${PN}.jar - - # install examples - if use examples; then - einfo "Installing examples" - mv -v {E,e}xamples || die - dodoc -r examples - docompress -x /usr/share/doc/${PF}/examples - - einfo "Installing datafiles" - insinto /usr/share/${PN}/data - doins -r "${S}/.ExternalData" - fi - - # with MPI runpath's are not deleted properly - if use mpi; then - chrpath -d "${ED}"/usr/$(get_libdir)/*.so.${PV} || die - fi - - use python && python_optimize - - # environment - cat >> "${T}"/40${PN} <<- EOF || die - VTK_DATA_ROOT=${EPREFIX}/usr/share/${PN}/data - VTK_DIR=${EPREFIX}/usr/$(get_libdir)/${PN} - VTKHOME=${EPREFIX}/usr - EOF - doenvd "${T}"/40${PN} - - use web && webapp_src_install - - # Temporary! - # Avoid collision with paraview. - # bug #793221 - rm -rf "${ED}"/usr/share/vtkm-1.5/VTKm{LICENSE.txt,README.md} || die -} - -# webapp.eclass exports these but we want it optional #534036 -pkg_postinst() { - use web && webapp_pkg_postinst - - if use examples; then - einfo "You can get more and updated examples at" - einfo "https://kitware.github.io/vtk-examples/site/" - fi -} - -pkg_prerm() { - use web && webapp_pkg_prerm -} diff --git a/sci-libs/vtk/vtk-9.0.3-r4.ebuild b/sci-libs/vtk/vtk-9.0.3-r4.ebuild new file mode 100644 index 000000000000..578cf8ade8fb --- /dev/null +++ b/sci-libs/vtk/vtk-9.0.3-r4.ebuild @@ -0,0 +1,550 @@ +# 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,9} ) +WEBAPP_OPTIONAL=yes +WEBAPP_MANUAL_SLOT=yes + +inherit check-reqs cmake cuda flag-o-matic java-pkg-opt-2 python-single-r1 toolchain-funcs virtualx webapp + +# Short package version +MY_PV="$(ver_cut 1-2)" + +DESCRIPTION="The Visualization Toolkit" +HOMEPAGE="https://www.vtk.org/" +SRC_URI=" + https://www.vtk.org/files/release/${MY_PV}/VTK-${PV}.tar.gz + https://www.vtk.org/files/release/${MY_PV}/VTKData-${PV}.tar.gz + doc? ( https://www.vtk.org/files/release/${MY_PV}/vtkDocHtml-${PV}.tar.gz ) + examples? ( https://www.vtk.org/files/release/${MY_PV}/VTKLargeData-${PV}.tar.gz ) + test? ( + https://www.vtk.org/files/release/${MY_PV}/VTKLargeData-${PV}.tar.gz + ) +" +S="${WORKDIR}/VTK-${PV}" + +LICENSE="BSD LGPL-2" +SLOT="0/${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 +} -- cgit v1.2.3