void-packages/srcpkgs/vtk/template
Đoàn Trần Công Danh 9978e00086 srcpkgs: remove patch_args=-Np1 en-mass
git grep -l '^patch_args=.*p1' 'srcpkgs/*/template'  |
	xargs -r sed -i '/^patch_args=/d'
2021-06-20 13:17:29 +07:00

72 lines
2.2 KiB
Bash

# Template file for 'vtk'
pkgname=vtk
version=9.0.1
revision=5
wrksrc=VTK-${version}
build_style=cmake
# vtk can be huge, especially with -DVTK_BUILD_ALL_MODULES=ON"
# Build only the core modules plus python bindings for now
configure_args="-DBUILD_SHARED_LIBS=ON -DVTK_FORBID_DOWNLOADS=ON
-DVTK_USE_EXTERNAL=ON
-DVTK_MODULE_USE_EXTERNAL_VTK_utf8=OFF
-DVTK_MODULE_USE_EXTERNAL_VTK_pegtl=OFF
-DVTK_MODULE_USE_EXTERNAL_VTK_libharu=OFF
-DVTK_WRAP_PYTHON=ON -DVTK_PYTHON_VERSION=3"
# vtk forks libharu, bumps to v2.4.0, and requires libharu>=2.4.0
makedepends="zlib-devel freetype-devel liblz4-devel expat-devel MesaLib-devel
libXt-devel libjpeg-turbo-devel tiff-devel hdf5-devel netcdf-devel
libxml2-devel jsoncpp-devel openmpi-devel libogg-devel libtheora-devel
eigen double-conversion-devel glew-devel pugixml-devel sqlite-devel
gl2ps-devel proj-devel python3-devel"
short_desc="System for 3D computer graphics, image processing, and visualization"
maintainer="Piraty <piraty1@inbox.ru>"
license="BSD-3-Clause"
homepage="https://www.vtk.org"
distfiles="https://www.vtk.org/files/release/${version:0:3}/VTK-${version}.tar.gz"
checksum=1b39a5e191c282861e7af4101eaa8585969a2de05f5646c9199a161213a622c7
nocross="hdf5 is nocross"
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
makedepends+=" libexecinfo-devel"
LDFLAGS="-lexecinfo"
fi
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel"
fi
post_extract() {
[ "$XBPS_TARGET_NO_ATOMIC8" ] || return 0
echo "vtk_module_link(VTK::CommonDataModel PRIVATE atomic)" >> \
Common/DataModel/CMakeLists.txt
}
post_install() {
vlicense Copyright.txt
# Mangle CPython extension names in CMake like xbps-src will do
vsed -e 's,\(vtkmodules/vtk.*\)\.cpython-.*\.so,\1.so,' \
-i "${DESTDIR}/usr/lib/cmake/vtk-9.0/VTKPython-targets-none.cmake"
}
vtk-devel_package() {
short_desc+=" - development files"
depends="vtk-python3>=${version}_${revision} ${makedepends}"
pkg_install() {
vmove usr/include
vmove usr/lib/*.so
vmove usr/lib/cmake
}
}
vtk-python3_package() {
short_desc+=" - Python3 bindings"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/bin/vtkpython
vmove "${py3_sitelib}"
vmove "usr/lib/lib*Python*.so.*"
vmove "usr/lib/vtk/hierarchy/VTK/vtk*Python*.txt"
}
}