From 49dc0f1033877d4849dab14680c895c82fc4756e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sat, 20 Mar 2021 10:39:23 +0700 Subject: [PATCH] vtk: devendor most of dependencies --- common/shlibs | 7 ------- ...etype-2.10.3-provide-FT_CALLBACK_DEF.patch | 19 +++++++++++++++++++ srcpkgs/vtk/template | 17 ++++++++++++----- 3 files changed, 31 insertions(+), 12 deletions(-) create mode 100644 srcpkgs/vtk/patches/vtk-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch diff --git a/common/shlibs b/common/shlibs index 7319cc8d20cb..9a9d74bc96a0 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3221,7 +3221,6 @@ libvtkCommonSystem-9.0.so.1 vtk-9.0.1_1 libvtkCommonTransforms-9.0.so.1 vtk-9.0.1_1 libvtkDICOMParser-9.0.so.1 vtk-9.0.1_1 libvtkDomainsChemistry-9.0.so.1 vtk-9.0.1_1 -libvtkDomainsChemistryOpenGL2-9.0.so.1 vtk-9.0.1_1 libvtkFiltersAMR-9.0.so.1 vtk-9.0.1_1 libvtkFiltersCore-9.0.so.1 vtk-9.0.1_1 libvtkFiltersExtraction-9.0.so.1 vtk-9.0.1_1 @@ -3253,7 +3252,6 @@ libvtkIOEnSight-9.0.so.1 vtk-9.0.1_1 libvtkIOExodus-9.0.so.1 vtk-9.0.1_1 libvtkIOExport-9.0.so.1 vtk-9.0.1_1 libvtkIOExportGL2PS-9.0.so.1 vtk-9.0.1_1 -libvtkIOExportOpenGL2-9.0.so.1 vtk-9.0.1_1 libvtkIOExportPDF-9.0.so.1 vtk-9.0.1_1 libvtkIOGeometry-9.0.so.1 vtk-9.0.1_1 libvtkIOImage-9.0.so.1 vtk-9.0.1_1 @@ -3263,7 +3261,6 @@ libvtkIOLSDyna-9.0.so.1 vtk-9.0.1_1 libvtkIOLegacy-9.0.so.1 vtk-9.0.1_1 libvtkIOMotionFX-9.0.so.1 vtk-9.0.1_1 libvtkIOMINC-9.0.so.1 vtk-9.0.1_1 -libvtkIOMPIParallel-9.0.so.1 vtk-9.0.1_1 libvtkIOMovie-9.0.so.1 vtk-9.0.1_1 libvtkIONetCDF-9.0.so.1 vtk-9.0.1_1 libvtkIOOggTheora-9.0.so.1 vtk-9.0.1_1 @@ -3293,10 +3290,8 @@ libvtkInteractionImage-9.0.so.1 vtk-9.0.1_1 libvtkInteractionStyle-9.0.so.1 vtk-9.0.1_1 libvtkInteractionWidgets-9.0.so.1 vtk-9.0.1_1 libvtkParallelCore-9.0.so.1 vtk-9.0.1_1 -libvtkParallelMPI-9.0.so.1 vtk-9.0.1_1 libvtkRenderingAnnotation-9.0.so.1 vtk-9.0.1_1 libvtkRenderingContext2D-9.0.so.1 vtk-9.0.1_1 -libvtkRenderingContextOpenGL2-9.0.so.1 vtk-9.0.1_1 libvtkRenderingCore-9.0.so.1 vtk-9.0.1_1 libvtkRenderingFreeType-9.0.so.1 vtk-9.0.1_1 libvtkRenderingGL2PSOpenGL2-9.0.so.1 vtk-9.0.1_1 @@ -3314,10 +3309,8 @@ libvtkViewsContext2D-9.0.so.1 vtk-9.0.1_1 libvtkViewsCore-9.0.so.1 vtk-9.0.1_1 libvtkViewsInfovis-9.0.so.1 vtk-9.0.1_1 libvtkexodusII-9.0.so.1 vtk-9.0.1_1 -libvtkgl2ps-9.0.so.1 vtk-9.0.1_1 libvtklibharu-9.0.so.1 vtk-9.0.1_1 libvtkmetaio-9.0.so.1 vtk-9.0.1_1 -libvtkpugixml-9.0.so.1 vtk-9.0.1_1 libvtksys-9.0.so.1 vtk-9.0.1_1 libvtkverdict-9.0.so.1 vtk-9.0.1_1 libvolume_key.so.1 volume_key-0.3.9_1 diff --git a/srcpkgs/vtk/patches/vtk-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch b/srcpkgs/vtk/patches/vtk-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch new file mode 100644 index 000000000000..b95015c859cf --- /dev/null +++ b/srcpkgs/vtk/patches/vtk-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch @@ -0,0 +1,19 @@ + https://gitlab.kitware.com/vtk/vtk/-/issues/18033 +--- VTK/ThirdParty/freetype/vtk_freetype.h.in.orig ++++ VTK/ThirdParty/freetype/vtk_freetype.h.in +@@ -20,6 +20,15 @@ + + #ifdef VTK_USE_SYSTEM_FREETYPE + # include ++/* FT_CALLBACK_DEF no longer exported since freetype-2.10.3 */ ++/* has been moved to */ ++# ifndef FT_CALLBACK_DEF ++# ifdef __cplusplus ++# define FT_CALLBACK_DEF( x ) extern "C" x ++# else ++# define FT_CALLBACK_DEF( x ) static x ++# endif ++# endif /* FT_CALLBACK_DEF */ + #else + # include + #endif diff --git a/srcpkgs/vtk/template b/srcpkgs/vtk/template index 1b2051aba307..bc6ead62f887 100644 --- a/srcpkgs/vtk/template +++ b/srcpkgs/vtk/template @@ -1,24 +1,31 @@ # Template file for 'vtk' pkgname=vtk version=9.0.1 -revision=3 +revision=4 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 + -DCMAKE_BUILD_TYPE=None + -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 python3-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 " 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 - +patch_args=-Np1 nocross="hdf5 is nocross" if [ "$XBPS_TARGET_LIBC" = "musl" ]; then @@ -42,12 +49,12 @@ post_install() { # 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-release.cmake" + -i "${DESTDIR}/usr/lib/cmake/vtk-9.0/VTKPython-targets-none.cmake" } vtk-devel_package() { short_desc+=" - development files" - depends="vtk-python3>=${version}_${revision}" + depends="vtk-python3>=${version}_${revision} ${makedepends}" pkg_install() { vmove usr/include vmove usr/lib/*.so