From 404e1ec83f1d6ed05bd75daa201df1bf64770842 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sun, 3 Jan 2021 12:05:07 +0100 Subject: [PATCH] vtk: try to fix the build patches taken from gentoo: https://gitweb.gentoo.org/repo/gentoo.git/tree/sci-libs/vtk/files --- .../008-fix-python-modules-path.patch | 17 ++++++-- mingw-w64-vtk/030-pugixml.patch | 12 ++++++ mingw-w64-vtk/031-fno-common.patch | 40 +++++++++++++++++++ ...etype-2.10.3-provide-FT_CALLBACK_DEF.patch | 18 +++++++++ mingw-w64-vtk/033-qt-5.15.patch | 37 +++++++++++++++++ mingw-w64-vtk/PKGBUILD | 20 ++++++++-- 6 files changed, 137 insertions(+), 7 deletions(-) create mode 100644 mingw-w64-vtk/030-pugixml.patch create mode 100644 mingw-w64-vtk/031-fno-common.patch create mode 100644 mingw-w64-vtk/032-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch create mode 100644 mingw-w64-vtk/033-qt-5.15.patch diff --git a/mingw-w64-vtk/008-fix-python-modules-path.patch b/mingw-w64-vtk/008-fix-python-modules-path.patch index 87519061f1..d16fa81aa5 100644 --- a/mingw-w64-vtk/008-fix-python-modules-path.patch +++ b/mingw-w64-vtk/008-fix-python-modules-path.patch @@ -37,8 +37,8 @@ ver = sys.version[0:3] purelib = prefix+'/lib/python'+ver+'/site-packages' platlib = exec_prefix+'/lib/python'+ver+'/site-packages' ---- VTK-8.2.0/CMake/FindPythonLibs.cmake.orig 2019-05-22 15:23:02.502137600 +0300 -+++ VTK-8.2.0/CMake/FindPythonLibs.cmake 2019-05-22 15:24:36.966270100 +0300 +--- VTK-8.2.0/CMake/FindPythonLibs.cmake.orig 2019-01-30 18:15:13.000000000 +0100 ++++ VTK-8.2.0/CMake/FindPythonLibs.cmake 2021-01-03 10:14:54.693475800 +0100 @@ -32,7 +32,7 @@ # Use the executable's path as a hint set(_Python_LIBRARY_PATH_HINT) @@ -53,7 +53,7 @@ set(_Python_VERSIONS ${Python_ADDITIONAL_VERSIONS} ${_PythonInterp_VERSION} - 2.7 2.6 2.5 3.6 3.5 3.4 3.3 3.2) -+ 2.7 2.6 2.5 3.7 3.6 3.5 3.4 3.3 3.2) ++ 2.7 2.6 2.5 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2) foreach(_CURRENT_VERSION ${_Python_VERSIONS}) string(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION}) @@ -62,3 +62,14 @@ find_library(PYTHON_DEBUG_LIBRARY NAMES python${_CURRENT_VERSION_NO_DOTS}_d python HINTS ${_Python_LIBRARY_PATH_HINT} +@@ -102,10 +102,6 @@ + python${_CURRENT_VERSION} + HINTS + ${_Python_LIBRARY_PATH_HINT} +- PATHS +- ${PYTHON_FRAMEWORK_LIBRARIES} +- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs +- [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs + # Avoid finding the .dll in the PATH. We want the .lib. + NO_SYSTEM_ENVIRONMENT_PATH + ) diff --git a/mingw-w64-vtk/030-pugixml.patch b/mingw-w64-vtk/030-pugixml.patch new file mode 100644 index 0000000000..d890f69638 --- /dev/null +++ b/mingw-w64-vtk/030-pugixml.patch @@ -0,0 +1,12 @@ +https://bugs.gentoo.org/758611 +--- a/IO/CityGML/CMakeLists.txt ++++ b/IO/CityGML/CMakeLists.txt +@@ -5,7 +5,4 @@ vtk_module_library(vtkIOCityGML ${Module_SRCS}) + if(VTK_USE_SYSTEM_PUGIXML AND NOT pugixml_INCLUDE_DIRS) + find_package(pugixml REQUIRED) +- get_target_property(pugixml_INCLUDE_DIRS pugixml INTERFACE_INCLUDE_DIRECTORIES) +- get_target_property(pugixml_LIBRARIES pugixml LOCATION) +- include_directories(${pugixml_INCLUDE_DIRS}) +- vtk_module_link_libraries(vtkIOCityGML LINK_PRIVATE ${pugixml_LIBRARIES}) ++ vtk_module_link_libraries(vtkIOCityGML LINK_PRIVATE pugixml::pugixml) + endif() diff --git a/mingw-w64-vtk/031-fno-common.patch b/mingw-w64-vtk/031-fno-common.patch new file mode 100644 index 0000000000..d7268ef756 --- /dev/null +++ b/mingw-w64-vtk/031-fno-common.patch @@ -0,0 +1,40 @@ +From a9079bdccbb2165583d6773a5ed848427e2a38a8 Mon Sep 17 00:00:00 2001 +From: Seacas Upstream +Date: Tue, 28 Jan 2020 09:13:38 -0500 +Subject: [PATCH] exodusII 2020-01-28 (d97eb08d) + +Code extracted from: + + https://gitlab.kitware.com/third-party/seacas.git + +at commit d97eb08d79e87c82facfae39bc75deb60c0a2d83 (for/vtk-20200128-7.24f-v2019-12-18). +--- + ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c | 2 +- + ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c b/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c +index 8d5d6734f0..ef439618da 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c +@@ -216,5 +216,5 @@ int ex_create_par_int(const char *path, int cmode, int *comp_ws, int *io_ws, MPI + * Prevent warning in some versions of ranlib(1) because the object + * file has no symbols. + */ +-const char exodus_unused_symbol_dummy_1; ++const char exodus_unused_symbol_dummy_ex_create_par; + #endif +diff --git a/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c b/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c +index b2faa22c29..9df4818767 100644 +--- a/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c ++++ b/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c +@@ -459,5 +459,5 @@ int ex_open_par_int(const char *path, int mode, int *comp_ws, int *io_ws, float + * Prevent warning in some versions of ranlib(1) because the object + * file has no symbols. + */ +-const char exodus_unused_symbol_dummy_1; ++const char exodus_unused_symbol_dummy_ex_open_par; + #endif +-- +2.26.2 + diff --git a/mingw-w64-vtk/032-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch b/mingw-w64-vtk/032-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch new file mode 100644 index 0000000000..b467487350 --- /dev/null +++ b/mingw-w64-vtk/032-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch @@ -0,0 +1,18 @@ +--- VTK-8.2.0/ThirdParty/freetype/vtk_freetype.h.in.orig 2019-01-30 18:15:13.000000000 +0100 ++++ VTK-8.2.0/ThirdParty/freetype/vtk_freetype.h.in 2020-10-17 00:03:32.730820908 +0200 +@@ -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/mingw-w64-vtk/033-qt-5.15.patch b/mingw-w64-vtk/033-qt-5.15.patch new file mode 100644 index 0000000000..d5a02ca759 --- /dev/null +++ b/mingw-w64-vtk/033-qt-5.15.patch @@ -0,0 +1,37 @@ +From 797f28697d5ba50c1fa2bc5596af626a3c277826 Mon Sep 17 00:00:00 2001 +From: "Andrew J. P. Maclean" +Date: Wed, 27 May 2020 15:27:15 +1000 +Subject: [PATCH] Qt 5.15 needs the include file QPainterPath + +--- + Rendering/Qt/vtkQtLabelRenderStrategy.cxx | 1 + + Rendering/Qt/vtkQtStringToImage.cxx | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/Rendering/Qt/vtkQtLabelRenderStrategy.cxx b/Rendering/Qt/vtkQtLabelRenderStrategy.cxx +index afda585cca..eca65c64cd 100644 +--- a/Rendering/Qt/vtkQtLabelRenderStrategy.cxx ++++ b/Rendering/Qt/vtkQtLabelRenderStrategy.cxx +@@ -41,6 +41,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/Rendering/Qt/vtkQtStringToImage.cxx b/Rendering/Qt/vtkQtStringToImage.cxx +index 659c71570e..fbb9b78f05 100644 +--- a/Rendering/Qt/vtkQtStringToImage.cxx ++++ b/Rendering/Qt/vtkQtStringToImage.cxx +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + #include + #include + #include +-- +2.26.2 + diff --git a/mingw-w64-vtk/PKGBUILD b/mingw-w64-vtk/PKGBUILD index 87c3ae434f..22b20f274b 100644 --- a/mingw-w64-vtk/PKGBUILD +++ b/mingw-w64-vtk/PKGBUILD @@ -5,7 +5,7 @@ _realname=vtk pkgbase="mingw-w64-${_realname}" pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=8.2.0 -pkgrel=5 +pkgrel=6 pkgdesc="A software system for 3D computer graphics, image processing and visualization (mingw-w64)" arch=('any') url="https://www.vtk.org/" @@ -51,15 +51,23 @@ source=(https://www.vtk.org/files/release/${pkgver%.*}/VTK-${pkgver}.tar.gz "006-win7-defines-guard.patch" "007-fix-linking-movie.patch" "008-fix-python-modules-path.patch" - "020-python38-compat.patch") + "020-python38-compat.patch" + "030-pugixml.patch" + "031-fno-common.patch" + "032-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch" + "033-qt-5.15.patch") sha256sums=('34c3dc775261be5e45a8049155f7228b6bd668106c72a3c435d95730d17d57bb' 'db3163012fc7d90f6ffd8300a7a306a609e7c69a88a1dcfb9cb5b5df4391e3ad' '7f428a9c15b2dfc23fff2a19a11c48a628c9b52f82ec0d1dca37d0a5cffc9aef' '769e28e106e612671433eb2f84ab6c0c9ef676109d690f6fe330641631c1fd2b' '087d570104d2ae7f00437897e88225a1eb904b125e3a27bb9392ddf8ef068f6c' 'ec39407b6174c9b1326389b4badf1c0c377d74a6dd2c53caf983613fafe43c81' - '030861e9c134d1badc93307256063c052efd46d5e8c4dff834a9c0af7d153345' - '1d9a3227feb50d08cb507d2a750b480f15eb1819f15c5b88474ba944c51f256a') + 'b6d6f4de0e58251843dec3dfad0ae5d5308c66ab8e55a56eeb3855cd699b02f3' + '1d9a3227feb50d08cb507d2a750b480f15eb1819f15c5b88474ba944c51f256a' + 'cbcc8a0c81450e015c2ce4035f2f128956d20a22be581199446c4a72c0396190' + 'a4597f0410bea856b06d023d9db7d2661b505eec110f4beccc155f6aa2c593f7' + 'aa43d6b702e3e1bca2cb8560c1c7e6ce5681cef8a89e9b6442f8037bc295c21c' + 'de1d2088c54bc7fdd494cb8a90464d2f53dc7cabddcd0415d9fb8cc4de448d0e') prepare() { cd "${srcdir}/${_realname}-${pkgver}" @@ -72,6 +80,10 @@ prepare() { patch -Np1 -i "${srcdir}/007-fix-linking-movie.patch" patch -Np1 -i "${srcdir}/008-fix-python-modules-path.patch" patch -Np1 -i "${srcdir}/020-python38-compat.patch" + patch -Np1 -i "${srcdir}/030-pugixml.patch" + patch -Np1 -i "${srcdir}/031-fno-common.patch" + patch -Np1 -i "${srcdir}/032-freetype-2.10.3-provide-FT_CALLBACK_DEF.patch" + patch -Np1 -i "${srcdir}/033-qt-5.15.patch" } build() {