2021-10-29 00:30:55 +00:00
|
|
|
# Maintainer: Evgeniy Alekseev <arcanis at archlinux dot org>
|
|
|
|
# Maintainer: Bruno Pagani <archange at archlinux dot org>
|
|
|
|
# Contributor: Michael Migliore <mcmigliore+aur@gmail.com>
|
|
|
|
# Contributor: Ray Rashif <schiv at archlinux dot org>
|
|
|
|
# Contributor: Andrzej Giniewicz <gginiu at gmail dot com>
|
|
|
|
# Contributor: Thomas Dziedzic <gostrc at gmail>
|
|
|
|
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
|
|
# - remove make/optdepends on adios2, openimagedenoise, ospray
|
|
|
|
# - add makedepend on tbb, previously pulled in by ospray
|
2021-11-07 21:28:53 +00:00
|
|
|
# - explicitly disable the fides, adios2 modules due to -DVTK_BUILD_ALL_MODULES=ON
|
2021-10-29 00:30:55 +00:00
|
|
|
# - generalize moving .so files in install
|
2022-04-23 20:02:02 +00:00
|
|
|
# - removed -ffat-lto-objects from CFLAGS
|
2021-10-29 00:30:55 +00:00
|
|
|
|
|
|
|
pkgname=vtk
|
2023-02-28 13:30:57 +00:00
|
|
|
pkgver=9.2.5
|
|
|
|
pkgrel=2
|
2021-10-29 00:30:55 +00:00
|
|
|
pkgdesc="Software system for 3D computer graphics, image processing, and visualization"
|
|
|
|
arch=(x86_64)
|
|
|
|
url="https://www.vtk.org/"
|
|
|
|
license=(BSD)
|
2023-02-28 13:30:57 +00:00
|
|
|
depends=(gcc-libs double-conversion pugixml tbb libtiff)
|
2021-10-29 00:30:55 +00:00
|
|
|
makedepends=(cmake boost doxygen ffmpeg gdal git gnuplot java-environment=11
|
2022-07-23 00:24:17 +00:00
|
|
|
liblas libxt mariadb-libs openmp openmpi openvdb
|
|
|
|
openvr pdal postgresql-libs python-matplotlib qt5-base
|
2022-11-10 13:54:43 +00:00
|
|
|
qt5-tools qt5-declarative tk unixodbc wget
|
2022-04-05 23:35:11 +00:00
|
|
|
cgns cli11 eigen expat fmt freetype2 gl2ps glew hdf5 libjpeg
|
|
|
|
jsoncpp libjsoncpp.so libharu proj libxml2 lz4 xz python-mpi4py
|
2023-02-28 13:30:57 +00:00
|
|
|
netcdf libogg libpng rapidjson sqlite libtheora utf8cpp zfp zlib openxr verdict)
|
2022-03-19 21:24:01 +00:00
|
|
|
# pegtl: https://gitlab.kitware.com/vtk/vtk/-/issues/18151
|
|
|
|
# exprtk, ioss: not packaged
|
2021-10-29 00:30:55 +00:00
|
|
|
optdepends=('gnuplot: plotting tools'
|
|
|
|
'graphviz: drawing tools'
|
|
|
|
'java-runtime=11: java bindings'
|
|
|
|
'python: python bindings'
|
|
|
|
'python-mpi4py: OpenMPI python support'
|
|
|
|
'python-matplotlib: for Matplotlib rendering'
|
|
|
|
'openmpi: OpenMPI support'
|
2022-11-10 13:54:43 +00:00
|
|
|
'qt5-declarative: QML plugin'
|
2021-10-29 00:30:55 +00:00
|
|
|
'tk: tcl bindings'
|
2021-11-07 16:38:12 +00:00
|
|
|
cgns
|
2021-10-29 00:30:55 +00:00
|
|
|
ffmpeg
|
2022-04-05 23:35:11 +00:00
|
|
|
fmt
|
2021-10-29 00:30:55 +00:00
|
|
|
gdal
|
|
|
|
gl2ps
|
|
|
|
glew
|
|
|
|
hdf5
|
|
|
|
jsoncpp
|
|
|
|
libarchive
|
|
|
|
libharu
|
|
|
|
liblas
|
|
|
|
lz4
|
2022-09-01 13:32:30 +00:00
|
|
|
mariadb-libs
|
2021-10-29 00:30:55 +00:00
|
|
|
netcdf
|
2021-11-07 16:38:12 +00:00
|
|
|
openvdb
|
2021-10-29 00:30:55 +00:00
|
|
|
openvr
|
2023-02-28 13:30:57 +00:00
|
|
|
openxr
|
2021-10-29 00:30:55 +00:00
|
|
|
pdal
|
2022-09-01 13:32:30 +00:00
|
|
|
postgresql-libs
|
2021-10-29 00:30:55 +00:00
|
|
|
proj
|
|
|
|
sqlite
|
2023-02-28 13:30:57 +00:00
|
|
|
unixodbc
|
|
|
|
verdict)
|
2021-11-09 19:22:30 +00:00
|
|
|
source=(${url}/files/release/${pkgver%.*}/VTK-${pkgver}.tar.gz
|
2023-02-28 13:30:57 +00:00
|
|
|
)
|
2021-10-29 00:30:55 +00:00
|
|
|
options=(staticlibs)
|
2023-02-28 13:30:57 +00:00
|
|
|
sha256sums=('128d601baa980e98ee034207974b33fb38d2c98ab9cf4a5756efdb09ed6c0949')
|
2021-10-29 00:30:55 +00:00
|
|
|
|
|
|
|
prepare() {
|
|
|
|
cd VTK-${pkgver}
|
2021-11-07 16:38:12 +00:00
|
|
|
# We have a patched fmt
|
2022-09-01 13:32:30 +00:00
|
|
|
sed -i "s|8.1.0|9.0.0|" ThirdParty/fmt/CMakeLists.txt
|
2021-10-29 00:30:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
# To help cmake find java
|
|
|
|
export JAVA_HOME=/usr/lib/jvm/default
|
|
|
|
# To set tcl lib path
|
|
|
|
local _tkver=$(echo 'puts $tcl_version' | tclsh)
|
|
|
|
cmake -B build -S VTK-${pkgver} \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
-DCMAKE_INSTALL_LICENSEDIR=share/licenses/vtk \
|
|
|
|
-DCMAKE_SKIP_RPATH=OFF \
|
|
|
|
-DCMAKE_SKIP_INSTALL_RPATH=ON \
|
2023-02-28 13:30:57 +00:00
|
|
|
-DCMAKE_JAVA_COMPILE_FLAGS="-Xlint:-options" \
|
2021-10-29 00:30:55 +00:00
|
|
|
-DBUILD_SHARED_LIBS=ON \
|
|
|
|
-DVTK_BUILD_ALL_MODULES=ON \
|
|
|
|
-DVTK_MODULE_ENABLE_VTK_IOADIOS2:STRING=NO \
|
2021-11-07 21:28:53 +00:00
|
|
|
-DVTK_MODULE_ENABLE_VTK_fides:STRING=NO \
|
2021-10-29 00:30:55 +00:00
|
|
|
-DVTK_INSTALL_TCL_DIR=/usr/lib/tcl${_tkver}/vtk/ \
|
|
|
|
-DVTK_LEGACY_REMOVE=ON \
|
2021-11-07 16:38:12 +00:00
|
|
|
-DVTK_SMP_ENABLE_OPENMP=ON \
|
2021-10-29 00:30:55 +00:00
|
|
|
-DVTK_SMP_IMPLEMENTATION_TYPE=TBB \
|
|
|
|
-DVTK_PYTHON_VERSION=3 \
|
|
|
|
-DVTK_USE_MPI=ON \
|
|
|
|
-DVTK_USE_TK=ON \
|
|
|
|
-DVTK_VERSIONED_INSTALL=OFF \
|
|
|
|
-DVTK_WRAP_JAVA=ON \
|
|
|
|
-DVTK_WRAP_PYTHON=ON \
|
2021-11-07 16:38:12 +00:00
|
|
|
-DVTKOSPRAY_ENABLE_DENOISER=OFF \
|
|
|
|
-DVTKm_ENABLE_HDF5_IO=ON \
|
|
|
|
-DVTKm_ENABLE_MPI=ON \
|
|
|
|
-DVTKm_ENABLE_OPENMP=ON \
|
2021-11-07 21:28:53 +00:00
|
|
|
-DVTK_ENABLE_OSPRAY=OFF \
|
2021-10-29 00:30:55 +00:00
|
|
|
-DVTK_USE_EXTERNAL=ON \
|
2021-11-07 16:38:12 +00:00
|
|
|
-DVTK_MODULE_USE_EXTERNAL_VTK_exprtk=OFF \
|
|
|
|
-DVTK_MODULE_USE_EXTERNAL_VTK_ioss=OFF \
|
2021-10-29 00:30:55 +00:00
|
|
|
-DVTK_MODULE_USE_EXTERNAL_VTK_pegtl=OFF \
|
|
|
|
-DVTK_MODULE_ENABLE_VTK_DomainsMicroscopy=NO \
|
|
|
|
-DVTK_MODULE_ENABLE_VTK_FiltersOpenTURNS=NO \
|
|
|
|
-Wno-dev
|
2021-11-07 16:38:12 +00:00
|
|
|
# -DFIDES_USE_EXTERNAL_RAPIDJSON=ON \
|
2021-10-29 00:30:55 +00:00
|
|
|
make -C build
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
make -C build DESTDIR="${pkgdir}" install
|
|
|
|
|
|
|
|
# Move the vtk.jar to the arch-specific location…
|
|
|
|
install -dv "${pkgdir}"/usr/share/java/vtk
|
|
|
|
mv -v "${pkgdir}"/usr/lib/java/vtk.jar "${pkgdir}"/usr/share/java/vtk
|
|
|
|
# …and the libs to the proper place
|
|
|
|
mv "${pkgdir}"/usr/lib/java/vtk-Linux-*/*.so "${pkgdir}"/usr/lib/
|
|
|
|
rmdir "${pkgdir}"/usr/lib/java/{vtk-Linux-*/,}
|
|
|
|
|
2022-07-23 00:24:17 +00:00
|
|
|
# byte-compile python modules since the CMake build does not do it
|
|
|
|
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
|
|
|
|
python -m compileall -o 0 -o 1 -o 2 --hardlink-dupes -s "${pkgdir}" "${pkgdir}"${site_packages}
|
|
|
|
|
2021-10-29 00:30:55 +00:00
|
|
|
# Remove third party CMake patching for older versions than ours
|
2023-02-28 13:30:57 +00:00
|
|
|
rm -rv "${pkgdir}"/usr/lib/cmake/vtk/patches/3.{1{3,6,9},20}
|
2021-10-29 00:30:55 +00:00
|
|
|
# … as well as duplicate copies
|
2021-12-10 03:06:26 +00:00
|
|
|
rm -rv "${pkgdir}"/usr/lib/cmake/vtk/vtkm/{Find*.cmake,cmake/{Find*.cmake,3.15}}
|
2021-10-29 00:30:55 +00:00
|
|
|
}
|