2021-10-29 00:30:55 +00:00
|
|
|
# Maintainer: Evgeniy Alekseev <arcanis at archlinux dot org>
|
2024-06-22 23:12:20 +00:00
|
|
|
# Maintainer: Caleb Maclennan <caleb@alerque.com>
|
2021-10-29 00:30:55 +00:00
|
|
|
# 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
|
2023-02-28 14:48:12 +00:00
|
|
|
# - add makedepend on nlohmann-json, previously pulled in by adios2
|
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-11-18 14:35:24 +00:00
|
|
|
# May need bootstrapping on upgrades due to circular vtk <-> opencascade dependency
|
2024-07-24 19:01:05 +00:00
|
|
|
pkgver=9.3.1
|
2024-09-20 00:58:36 +00:00
|
|
|
pkgrel=6
|
2021-10-29 00:30:55 +00:00
|
|
|
pkgdesc="Software system for 3D computer graphics, image processing, and visualization"
|
|
|
|
arch=(x86_64)
|
2024-03-09 15:16:05 +00:00
|
|
|
url="https://www.vtk.org"
|
|
|
|
license=(BSD-3-Clause)
|
2023-05-03 19:12:26 +00:00
|
|
|
depends=(
|
|
|
|
double-conversion
|
|
|
|
gcc-libs
|
|
|
|
glibc
|
|
|
|
libtiff
|
|
|
|
onetbb
|
|
|
|
pugixml
|
|
|
|
)
|
|
|
|
makedepends=(
|
|
|
|
boost
|
|
|
|
cgns
|
|
|
|
cli11
|
|
|
|
cmake
|
|
|
|
doxygen
|
|
|
|
eigen
|
|
|
|
expat
|
2023-11-18 14:26:12 +00:00
|
|
|
fast_float
|
2023-05-03 19:12:26 +00:00
|
|
|
ffmpeg
|
|
|
|
fmt
|
|
|
|
freetype2
|
|
|
|
gdal
|
|
|
|
git
|
|
|
|
gl2ps
|
|
|
|
glew
|
|
|
|
gnuplot
|
|
|
|
hdf5
|
|
|
|
java-environment=11
|
|
|
|
jsoncpp
|
|
|
|
libharu
|
2024-09-20 00:58:36 +00:00
|
|
|
libjpeg-turbo
|
2023-05-03 19:12:26 +00:00
|
|
|
liblas
|
|
|
|
libogg
|
|
|
|
libpng
|
|
|
|
libtheora
|
|
|
|
libxml2
|
|
|
|
libxt
|
|
|
|
lz4
|
|
|
|
mariadb-libs
|
|
|
|
netcdf
|
2023-11-18 14:35:24 +00:00
|
|
|
opencascade
|
2023-05-03 19:12:26 +00:00
|
|
|
nlohmann-json
|
|
|
|
openmp
|
|
|
|
openmpi
|
|
|
|
openvdb
|
|
|
|
openvr
|
|
|
|
openxr
|
|
|
|
pdal
|
|
|
|
postgresql-libs
|
|
|
|
proj
|
|
|
|
python-matplotlib
|
|
|
|
python-mpi4py
|
|
|
|
qt5-base
|
|
|
|
qt5-tools
|
|
|
|
qt5-declarative
|
|
|
|
rapidjson
|
|
|
|
sqlite
|
|
|
|
tk
|
|
|
|
unixodbc
|
|
|
|
utf8cpp
|
|
|
|
verdict
|
|
|
|
wget
|
|
|
|
xz
|
|
|
|
zfp
|
|
|
|
zlib
|
|
|
|
)
|
2022-03-19 21:24:01 +00:00
|
|
|
# pegtl: https://gitlab.kitware.com/vtk/vtk/-/issues/18151
|
|
|
|
# exprtk, ioss: not packaged
|
2023-05-03 19:12:26 +00:00
|
|
|
optdepends=(
|
|
|
|
cgns
|
|
|
|
ffmpeg
|
|
|
|
fmt
|
|
|
|
gdal
|
|
|
|
gl2ps
|
|
|
|
glew
|
|
|
|
'gnuplot: plotting tools'
|
|
|
|
'graphviz: drawing tools'
|
|
|
|
hdf5
|
|
|
|
'java-runtime=11: java bindings'
|
|
|
|
jsoncpp
|
|
|
|
libarchive
|
|
|
|
libharu
|
|
|
|
liblas
|
|
|
|
lz4
|
|
|
|
mariadb-libs
|
|
|
|
netcdf
|
|
|
|
'openmpi: OpenMPI support'
|
|
|
|
openvdb
|
2023-11-18 14:26:12 +00:00
|
|
|
opencascade
|
2023-05-03 19:12:26 +00:00
|
|
|
openvr
|
|
|
|
openxr
|
|
|
|
pdal
|
|
|
|
postgresql-libs
|
|
|
|
proj
|
|
|
|
'python: python bindings'
|
|
|
|
'python-matplotlib: for Matplotlib rendering'
|
|
|
|
'python-mpi4py: OpenMPI python support'
|
|
|
|
'qt5-declarative: QML plugin'
|
|
|
|
sqlite
|
|
|
|
'tk: tcl bindings'
|
|
|
|
unixodbc
|
|
|
|
verdict
|
|
|
|
)
|
2021-10-29 00:30:55 +00:00
|
|
|
options=(staticlibs)
|
2023-05-14 16:27:38 +00:00
|
|
|
source=(${url}/files/release/${pkgver%.*}/VTK-${pkgver}.tar.gz
|
2023-11-18 14:26:12 +00:00
|
|
|
vtk-occt.patch
|
2024-09-12 18:12:14 +00:00
|
|
|
ospray-3.patch
|
|
|
|
https://github.com/Kitware/VTK/commit/761aa1d15970fcb6aadb7d6152737fa9b2d4b0d0.patch
|
|
|
|
fmt-11.patch)
|
2024-07-24 19:01:05 +00:00
|
|
|
sha256sums=('8354ec084ea0d2dc3d23dbe4243823c4bfc270382d0ce8d658939fd50061cab8'
|
2023-11-18 14:26:12 +00:00
|
|
|
'df958eabc7dc4f5b33383ce0fb0f90a3ba202c1c2a24d3b5b9e7cfb1fb38b011'
|
2024-09-12 18:12:14 +00:00
|
|
|
'faf3fd2eea2f73a07f5dcbd67920161a07ae554e008ad1e4099153fec2882278'
|
|
|
|
'46de5cee71d696d9632472e27ed369ec49f0e276c3e4bb0a397397d928553864'
|
|
|
|
'8161d4e184a3f2d075be26605c0d38f04314a8e26146ab5b1c33f87dabc2b0d2')
|
2021-10-29 00:30:55 +00:00
|
|
|
|
|
|
|
prepare() {
|
2023-05-03 19:12:26 +00:00
|
|
|
cd ${pkgname^^}-${pkgver}
|
2024-03-09 15:16:05 +00:00
|
|
|
_fast_float_version=$(pacman -Q fast_float | sed -e 's/.* //; s/-.*//g')
|
|
|
|
sed -i "s|3.9.0|${_fast_float_version}|" ThirdParty/fast_float/CMakeLists.txt
|
2023-05-14 16:27:38 +00:00
|
|
|
|
2023-11-18 14:26:12 +00:00
|
|
|
patch -Np1 -i "$srcdir"/vtk-occt.patch
|
2023-12-03 14:45:11 +00:00
|
|
|
patch -Np1 -i ../ospray-3.patch # Fix build with ospray 3.0
|
2024-09-12 18:12:14 +00:00
|
|
|
patch -Np1 -i "$srcdir"/761aa1d15970fcb6aadb7d6152737fa9b2d4b0d0.patch # Fix OCCT 7.8.0
|
|
|
|
patch -p1 -i ../fmt-11.patch # Fix build with fmt 11
|
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)
|
2023-05-03 19:12:26 +00:00
|
|
|
cmake -B build -S ${pkgname^^}-${pkgver} \
|
2021-10-29 00:30:55 +00:00
|
|
|
-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 \
|
2024-02-06 04:15:40 +00:00
|
|
|
-DVTK_QT_VERSION=5 \
|
2021-10-29 00:30:55 +00:00
|
|
|
-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 \
|
2023-11-18 14:26:12 +00:00
|
|
|
-DVTK_MODULE_ENABLE_VTK_RenderingZSpace=NO \
|
2023-03-01 13:55:35 +00:00
|
|
|
-DOpenGL_GL_PREFERENCE=LEGACY \
|
2023-11-20 14:00:21 +00:00
|
|
|
-DVTK_IGNORE_CMAKE_CXX11_CHECKS=ON \
|
2021-10-29 00:30:55 +00:00
|
|
|
-Wno-dev
|
2021-11-07 16:38:12 +00:00
|
|
|
# -DFIDES_USE_EXTERNAL_RAPIDJSON=ON \
|
2023-11-20 14:00:21 +00:00
|
|
|
cmake --build build
|
2021-10-29 00:30:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2023-11-20 14:00:21 +00:00
|
|
|
DESTDIR="${pkgdir}" cmake --install build
|
2021-10-29 00:30:55 +00:00
|
|
|
|
|
|
|
# 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
|
|
|
}
|