From be13127c36f110af61f57467d68c22087925cd36c8417026028cec3d348a3aec Mon Sep 17 00:00:00 2001 From: Atri Bhattacharya Date: Fri, 29 May 2020 13:55:10 +0000 Subject: [PATCH 1/2] Accepting request 801834 from home:badshah400:branches:science - Update to version 9.0.0 - Rebase patches still required for building: * bundled_exodusii_add_missing_libpthread.patch: Update to upstream patch (https://gitlab.kitware.com/vtk/vtk/-/merge_requests/6865). * bundled_libharu_add_missing_libm.patch - Pass VTK_PYTHON_OPTIONAL_LINK:BOOL=OFF to cmake to link against the system python library explicitly. - Add vtk-parallelgeometry-dependency.patch to fix a missing dependency for vtkparallelgeometry (see https://discourse.vtk.org/t/building-vtk-9-0-fails-when-using-mpi-support/3227). - Comment out 0001-Allow-compilation-on-GLES-platforms.patch that no longer applies and needs extensive rebasing. - Drop patches incorporated or otherwise fixed upstream: * 0001-Make-code-calling-proj4-compatible-with-proj4-5.0-an.patch * 0001-Add-libogg-to-IOMovie-target-link-libraries.patch * python38.patch * reproducible.patch - Adapt to changes in upstream's cmake script: * Replace old options by their newer versions where applicable. * Pass VTK_USE_EXTERNAL=ON to use system libraries by default except for gl2ps, haru, and pugixml. - New BuildRequires: pegtl-devel and utfcpp-devel. - No longer needed to pass Java_JAVAH_EXECUTABLE:PATH=%{_bindir}/true to cmake; script does not look for javah any more. - Use autosetup to set up and patch sources: simplifies applying changing list of patches; use an if guard to avoid patch needing rebase while not running into conflict with factory bot. OBS-URL: https://build.opensuse.org/request/show/801834 OBS-URL: https://build.opensuse.org/package/show/science/vtk?expand=0&rev=156 --- ...ogg-to-IOMovie-target-link-libraries.patch | 24 --- ...g-proj4-compatible-with-proj4-5.0-an.patch | 127 ------------- VTK-8.2.0.tar.gz | 3 - VTK-9.0.0.tar.gz | 3 + bundled_exodusii_add_missing_libpthread.patch | 71 +++++-- bundled_libharu_add_missing_libm.patch | 27 ++- python38.patch | 176 ------------------ reproducible.patch | 167 ----------------- vtk-parallelgeometry-dependency.patch | 12 ++ vtk.changes | 35 ++++ vtk.spec | 142 ++++++-------- 11 files changed, 183 insertions(+), 604 deletions(-) delete mode 100644 0001-Add-libogg-to-IOMovie-target-link-libraries.patch delete mode 100644 0001-Make-code-calling-proj4-compatible-with-proj4-5.0-an.patch delete mode 100644 VTK-8.2.0.tar.gz create mode 100644 VTK-9.0.0.tar.gz delete mode 100644 python38.patch delete mode 100644 reproducible.patch create mode 100644 vtk-parallelgeometry-dependency.patch diff --git a/0001-Add-libogg-to-IOMovie-target-link-libraries.patch b/0001-Add-libogg-to-IOMovie-target-link-libraries.patch deleted file mode 100644 index cf7331f..0000000 --- a/0001-Add-libogg-to-IOMovie-target-link-libraries.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 9418a8a8c84c8185d61e5135b95a67c3d98ba23e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Stefan=20Br=C3=BCns?= -Date: Mon, 25 Feb 2019 00:27:07 +0100 -Subject: [PATCH] Add libogg to IOMovie target link libraries - ---- - IO/Movie/CMakeLists.txt | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/IO/Movie/CMakeLists.txt b/IO/Movie/CMakeLists.txt -index 457f1a99..98ca4708 100644 ---- a/IO/Movie/CMakeLists.txt -+++ b/IO/Movie/CMakeLists.txt -@@ -33,3 +33,7 @@ vtk_module_library(vtkIOMovie ${Module_SRCS}) - if(WIN32 AND VTK_USE_VIDEO_FOR_WINDOWS) - vtk_module_link_libraries(vtkIOMovie LINK_PRIVATE vfw32) - endif() -+ -+if(vtkIOMovie_vtkoggtheora) -+ target_link_libraries(vtkIOMovie PUBLIC ogg) -+endif() --- -2.20.1 - diff --git a/0001-Make-code-calling-proj4-compatible-with-proj4-5.0-an.patch b/0001-Make-code-calling-proj4-compatible-with-proj4-5.0-an.patch deleted file mode 100644 index f6343b6..0000000 --- a/0001-Make-code-calling-proj4-compatible-with-proj4-5.0-an.patch +++ /dev/null @@ -1,127 +0,0 @@ -From afdfe02b0b6a0117e047d0461c1daa29143cb30a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Stefan=20Br=C3=BCns?= -Date: Thu, 14 Mar 2019 23:25:52 +0100 -Subject: [PATCH] Make code calling proj4 compatible with proj4 5.0 and later - -- projects.h is no longer available in 6.0 -- use of proj_api.h has to be opted in since 6.0, to be removed in 7.0 -- pj_get_list_ref has been renamed proj_list_operations in 5.0 -- PJProps is opaque now, its contents can be accessed with proj_pj_info. - As the contents are no longer global, the const char* from - GetProjectionName has to be copied into the vtkGeoProjection object. ---- - Geovis/Core/vtkGeoProjection.cxx | 12 +++++++----- - Geovis/Core/vtkGeoTransform.cxx | 8 ++++---- - ThirdParty/libproj/vtk_libproj.h.in | 3 ++- - 3 files changed, 13 insertions(+), 10 deletions(-) - -diff --git a/Geovis/Core/vtkGeoProjection.cxx b/Geovis/Core/vtkGeoProjection.cxx -index f3a8852d..0bd7678f 100644 ---- a/Geovis/Core/vtkGeoProjection.cxx -+++ b/Geovis/Core/vtkGeoProjection.cxx -@@ -72,6 +72,7 @@ public: - } - - std::map< std::string, std::string > OptionalParameters; -+ PJ_PROJ_INFO ProjInfo; - }; - - //----------------------------------------------------------------------------- -@@ -80,7 +81,7 @@ int vtkGeoProjection::GetNumberOfProjections() - if ( vtkGeoProjectionNumProj < 0 ) - { - vtkGeoProjectionNumProj = 0; -- for ( const PJ_LIST* pj = pj_get_list_ref(); pj && pj->id; ++ pj ) -+ for ( const PJ_LIST* pj = proj_list_operations(); pj && pj->id; ++ pj ) - ++ vtkGeoProjectionNumProj; - } - return vtkGeoProjectionNumProj; -@@ -91,7 +92,7 @@ const char* vtkGeoProjection::GetProjectionName( int projection ) - if ( projection < 0 || projection >= vtkGeoProjection::GetNumberOfProjections() ) - return nullptr; - -- return pj_get_list_ref()[projection].id; -+ return proj_list_operations()[projection].id; - } - //----------------------------------------------------------------------------- - const char* vtkGeoProjection::GetProjectionDescription( int projection ) -@@ -99,7 +100,7 @@ const char* vtkGeoProjection::GetProjectionDescription( int projection ) - if ( projection < 0 || projection >= vtkGeoProjection::GetNumberOfProjections() ) - return nullptr; - -- return pj_get_list_ref()[projection].descr[0]; -+ return proj_list_operations()[projection].descr[0]; - } - //----------------------------------------------------------------------------- - vtkGeoProjection::vtkGeoProjection() -@@ -144,7 +145,7 @@ void vtkGeoProjection::PrintSelf( ostream& os, vtkIndent indent ) - int vtkGeoProjection::GetIndex() - { - int i = 0; -- for ( const PJ_LIST* proj = pj_get_list_ref(); proj && proj->id; ++ proj, ++ i ) -+ for ( const PJ_LIST* proj = proj_list_operations(); proj && proj->id; ++ proj, ++ i ) - { - if ( ! strcmp( proj->id, this->Name ) ) - { -@@ -161,7 +162,7 @@ const char* vtkGeoProjection::GetDescription() - { - return nullptr; - } -- return this->Projection->descr; -+ return this->Internals->ProjInfo.description; - } - //----------------------------------------------------------------------------- - projPJ vtkGeoProjection::GetProjection() -@@ -232,6 +233,7 @@ int vtkGeoProjection::UpdateProjection() - this->ProjectionMTime = this->GetMTime(); - if ( this->Projection ) - { -+ this->Internals->ProjInfo = proj_pj_info(this->Projection); - return 0; - } - return 1; -diff --git a/Geovis/Core/vtkGeoTransform.cxx b/Geovis/Core/vtkGeoTransform.cxx -index aeeabc10..1ca20f9d 100644 ---- a/Geovis/Core/vtkGeoTransform.cxx -+++ b/Geovis/Core/vtkGeoTransform.cxx -@@ -167,9 +167,9 @@ void vtkGeoTransform::InternalTransformPoints( double* x, vtkIdType numPts, int - double* coord = x; - for ( vtkIdType i = 0; i < numPts; ++ i ) - { -- xy.u = coord[0]; xy.v = coord[1]; -+ xy.x = coord[0]; xy.y = coord[1]; - lp = pj_inv( xy, src ); -- coord[0] = lp.u; coord[1] = lp.v; -+ coord[0] = lp.lam; coord[1] = lp.phi; - coord += stride; - } - } -@@ -191,9 +191,9 @@ void vtkGeoTransform::InternalTransformPoints( double* x, vtkIdType numPts, int - double* coord = x; - for ( vtkIdType i = 0; i < numPts; ++ i ) - { -- lp.u = coord[0]; lp.v = coord[1]; -+ lp.lam = coord[0]; lp.phi = coord[1]; - xy = pj_fwd( lp, dst ); -- coord[0] = xy.u; coord[1] = xy.v; -+ coord[0] = xy.x; coord[1] = xy.y; - coord += stride; - } - } -diff --git a/ThirdParty/libproj/vtk_libproj.h.in b/ThirdParty/libproj/vtk_libproj.h.in -index cd9edc3a..9725eb37 100644 ---- a/ThirdParty/libproj/vtk_libproj.h.in -+++ b/ThirdParty/libproj/vtk_libproj.h.in -@@ -18,7 +18,8 @@ - /* Use the libproj library configured for VTK. */ - #cmakedefine VTK_USE_SYSTEM_LIBPROJ - #ifdef VTK_USE_SYSTEM_LIBPROJ --# include -+# include -+# define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H 1 - # include - # include - #else --- -2.21.0 - diff --git a/VTK-8.2.0.tar.gz b/VTK-8.2.0.tar.gz deleted file mode 100644 index bd4fe9e..0000000 --- a/VTK-8.2.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:34c3dc775261be5e45a8049155f7228b6bd668106c72a3c435d95730d17d57bb -size 35511819 diff --git a/VTK-9.0.0.tar.gz b/VTK-9.0.0.tar.gz new file mode 100644 index 0000000..964a908 --- /dev/null +++ b/VTK-9.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:15def4e6f84d72f82386617fe595ec124dda3cbd13ea19a0dcd91583197d8715 +size 33535036 diff --git a/bundled_exodusii_add_missing_libpthread.patch b/bundled_exodusii_add_missing_libpthread.patch index 1a3b0c2..0dab21a 100644 --- a/bundled_exodusii_add_missing_libpthread.patch +++ b/bundled_exodusii_add_missing_libpthread.patch @@ -1,14 +1,63 @@ ---- VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt_orig 2019-02-14 23:22:45.209934041 +0100 -+++ VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt 2019-02-14 23:23:32.793799582 +0100 -@@ -297,8 +297,10 @@ +From ca02bcc844e4d268ac5060f56f10467e2579fb43 Mon Sep 17 00:00:00 2001 +From: Ben Boeckel +Date: Thu, 7 May 2020 11:36:50 -0400 +Subject: [PATCH 1/3] exodusII: also link to hdf5 directly + +--- + ThirdParty/exodusII/vtk.module | 1 + + 1 file changed, 1 insertion(+) + +Index: VTK-9.0.0/ThirdParty/exodusII/vtk.module +=================================================================== +--- VTK-9.0.0.orig/ThirdParty/exodusII/vtk.module ++++ VTK-9.0.0/ThirdParty/exodusII/vtk.module +@@ -3,5 +3,6 @@ NAME + LIBRARY_NAME + vtkexodusII + DEPENDS ++ VTK::hdf5 + VTK::netcdf + THIRD_PARTY + +From a98772f6d5f6b62c0f3ac360702b585c09bc5557 Mon Sep 17 00:00:00 2001 +From: Seacas Upstream +Date: Thu, 7 May 2020 12:22:01 -0400 +Subject: [PATCH 3/3] exodusII 2020-05-07 (2c24a120) + +Code extracted from: + + https://gitlab.kitware.com/third-party/seacas.git + +at commit 2c24a120deb77a8a2ea05462d0a60e7f9d90e58e (for/vtk-20200507-7.24f-v2019-12-18). +--- + ThirdParty/exodusII/vtkexodusII/CMakeLists.txt | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt b/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt +index 025abc43e0..d931004997 100644 +--- a/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt ++++ b/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt +@@ -297,14 +297,19 @@ set(headers "${CMAKE_CURRENT_BINARY_DIR}/include/exodusII_cfg.h" "${CMAKE_CURRENT_BINARY_DIR}/include/exodus_config.h") --vtk_add_library(vtkexodusII ${sources} ${headers}) -+vtk_add_library(vtkexodusII ${sources} ${headers}) -+set_property(TARGET vtkexodusII PROPERTY POSITION_INDEPENDENT_CODE ON) - target_link_libraries(vtkexodusII PUBLIC ${vtknetcdf_LIBRARIES}) -+target_link_libraries(vtkexodusII PUBLIC pthread) - if (NOT VTK_INSTALL_NO_DEVELOPMENT) - install(FILES - ${headers} ++vtk_module_find_package(PACKAGE Threads) ++ + vtk_module_add_module(VTK::exodusII + SOURCES ${sources} + HEADERS ${headers} + HEADERS_SUBDIR "vtkexodusII/include") +-target_compile_definitions(exodusII ++vtk_module_definitions(VTK::exodusII + PRIVATE + exoIIc_EXPORTS) +-target_include_directories(exodusII ++vtk_module_include(VTK::exodusII + PUBLIC + "$" + "$") ++vtk_module_link(VTK::exodusII ++ PRIVATE ++ Threads::Threads) +-- +2.26.2 diff --git a/bundled_libharu_add_missing_libm.patch b/bundled_libharu_add_missing_libm.patch index 3c711e8..cd81d66 100644 --- a/bundled_libharu_add_missing_libm.patch +++ b/bundled_libharu_add_missing_libm.patch @@ -1,14 +1,13 @@ ---- VTK-8.2.0/ThirdParty/libharu/vtklibharu/src/CMakeLists.txt_orig 2019-02-14 22:43:46.723537248 +0100 -+++ VTK-8.2.0/ThirdParty/libharu/vtklibharu/src/CMakeLists.txt 2019-02-14 22:45:37.203271692 +0100 -@@ -101,8 +101,10 @@ - ) - endif(LIBHPDF_SHARED) - else () -- vtk_add_library(vtklibharu ${LIBHPDF_SRCS}) -+ vtk_add_library(vtklibharu ${LIBHPDF_SRCS}) -+ set_property(TARGET vtklibharu PROPERTY POSITION_INDEPENDENT_CODE ON) - target_link_libraries(vtklibharu PRIVATE ${vtkzlib_LIBRARIES} ${vtkpng_LIBRARIES}) -+ target_link_libraries(vtklibharu PUBLIC m) - if (WIN32) - set_target_properties(vtklibharu - PROPERTIES +Index: VTK-9.0.0/ThirdParty/libharu/vtklibharu/CMakeLists.txt +=================================================================== +--- VTK-9.0.0.orig/ThirdParty/libharu/vtklibharu/CMakeLists.txt ++++ VTK-9.0.0/ThirdParty/libharu/vtklibharu/CMakeLists.txt +@@ -125,6 +125,8 @@ if(PNG_FOUND) + endif(PNG_FOUND) + endif () + ++link_libraries(m) ++ + # ======================================================================= + # configure header files, add compiler flags + # ======================================================================= diff --git a/python38.patch b/python38.patch deleted file mode 100644 index 81c2a63..0000000 --- a/python38.patch +++ /dev/null @@ -1,176 +0,0 @@ -From 257b9d7b18d5f3db3fe099dc18f230e23f7dfbab Mon Sep 17 00:00:00 2001 -From: David Gobbi -Date: Tue, 20 Aug 2019 17:02:24 -0600 -Subject: [PATCH] Compatibility for Python 3.8 - -The PyTypeObject struct was modified in Python 3.8, this change is -required to avoid compile errors. ---- - .../PythonInterpreter/vtkPythonStdStreamCaptureHelper.h | 6 ++++++ - Wrapping/PythonCore/PyVTKMethodDescriptor.cxx | 2 +- - Wrapping/PythonCore/PyVTKNamespace.cxx | 2 +- - Wrapping/PythonCore/PyVTKReference.cxx | 8 ++++---- - Wrapping/PythonCore/PyVTKTemplate.cxx | 2 +- - Wrapping/PythonCore/vtkPythonCompatibility.h | 8 +++++++- - Wrapping/Tools/vtkWrapPythonClass.c | 2 +- - Wrapping/Tools/vtkWrapPythonEnum.c | 2 +- - Wrapping/Tools/vtkWrapPythonType.c | 2 +- - 9 files changed, 23 insertions(+), 11 deletions(-) - -diff --git a/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h b/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h -index b1c12c83de..14ccfbe928 100644 ---- a/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h -+++ b/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h -@@ -140,6 +140,12 @@ static PyTypeObject vtkPythonStdStreamCaptureHelperType = { - #if PY_VERSION_HEX >= 0x03040000 - 0, // tp_finalize - #endif -+#if PY_VERSION_HEX >= 0x03080000 -+ 0, // tp_vectorcall -+#if PY_VERSION_HEX < 0x03090000 -+ 0, // tp_print -+#endif -+#endif - }; - - static PyObject* vtkWrite(PyObject* self, PyObject* args) -diff --git a/Wrapping/PythonCore/PyVTKMethodDescriptor.cxx b/Wrapping/PythonCore/PyVTKMethodDescriptor.cxx -index 2b0d443537..3840038498 100644 ---- a/Wrapping/PythonCore/PyVTKMethodDescriptor.cxx -+++ b/Wrapping/PythonCore/PyVTKMethodDescriptor.cxx -@@ -186,7 +186,7 @@ PyTypeObject PyVTKMethodDescriptor_Type = { - sizeof(PyMethodDescrObject), // tp_basicsize - 0, // tp_itemsize - PyVTKMethodDescriptor_Delete, // tp_dealloc -- nullptr, // tp_print -+ 0, // tp_vectorcall_offset - nullptr, // tp_getattr - nullptr, // tp_setattr - nullptr, // tp_compare -diff --git a/Wrapping/PythonCore/PyVTKNamespace.cxx b/Wrapping/PythonCore/PyVTKNamespace.cxx -index 71ee2a3516..5cf5bfbe6b 100644 ---- a/Wrapping/PythonCore/PyVTKNamespace.cxx -+++ b/Wrapping/PythonCore/PyVTKNamespace.cxx -@@ -49,7 +49,7 @@ PyTypeObject PyVTKNamespace_Type = { - 0, // tp_basicsize - 0, // tp_itemsize - PyVTKNamespace_Delete, // tp_dealloc -- nullptr, // tp_print -+ 0, // tp_vectorcall_offset - nullptr, // tp_getattr - nullptr, // tp_setattr - nullptr, // tp_compare -diff --git a/Wrapping/PythonCore/PyVTKReference.cxx b/Wrapping/PythonCore/PyVTKReference.cxx -index 943ac71080..b7104091c0 100644 ---- a/Wrapping/PythonCore/PyVTKReference.cxx -+++ b/Wrapping/PythonCore/PyVTKReference.cxx -@@ -1010,7 +1010,7 @@ PyTypeObject PyVTKReference_Type = { - sizeof(PyVTKReference), // tp_basicsize - 0, // tp_itemsize - PyVTKReference_Delete, // tp_dealloc -- nullptr, // tp_print -+ 0, // tp_vectorcall_offset - nullptr, // tp_getattr - nullptr, // tp_setattr - nullptr, // tp_compare -@@ -1067,7 +1067,7 @@ PyTypeObject PyVTKNumberReference_Type = { - sizeof(PyVTKReference), // tp_basicsize - 0, // tp_itemsize - PyVTKReference_Delete, // tp_dealloc -- nullptr, // tp_print -+ 0, // tp_vectorcall_offset - nullptr, // tp_getattr - nullptr, // tp_setattr - nullptr, // tp_compare -@@ -1124,7 +1124,7 @@ PyTypeObject PyVTKStringReference_Type = { - sizeof(PyVTKReference), // tp_basicsize - 0, // tp_itemsize - PyVTKReference_Delete, // tp_dealloc -- nullptr, // tp_print -+ 0, // tp_vectorcall_offset - nullptr, // tp_getattr - nullptr, // tp_setattr - nullptr, // tp_compare -@@ -1181,7 +1181,7 @@ PyTypeObject PyVTKTupleReference_Type = { - sizeof(PyVTKReference), // tp_basicsize - 0, // tp_itemsize - PyVTKReference_Delete, // tp_dealloc -- nullptr, // tp_print -+ 0, // tp_vectorcall_offset - nullptr, // tp_getattr - nullptr, // tp_setattr - nullptr, // tp_compare -diff --git a/Wrapping/PythonCore/PyVTKTemplate.cxx b/Wrapping/PythonCore/PyVTKTemplate.cxx -index be200985b3..340fe7953b 100644 ---- a/Wrapping/PythonCore/PyVTKTemplate.cxx -+++ b/Wrapping/PythonCore/PyVTKTemplate.cxx -@@ -268,7 +268,7 @@ PyTypeObject PyVTKTemplate_Type = { - 0, // tp_basicsize - 0, // tp_itemsize - nullptr, // tp_dealloc -- nullptr, // tp_print -+ 0, // tp_vectorcall_offset - nullptr, // tp_getattr - nullptr, // tp_setattr - nullptr, // tp_compare -diff --git a/Wrapping/PythonCore/vtkPythonCompatibility.h b/Wrapping/PythonCore/vtkPythonCompatibility.h -index 4a767844a6..be208faeef 100644 ---- a/Wrapping/PythonCore/vtkPythonCompatibility.h -+++ b/Wrapping/PythonCore/vtkPythonCompatibility.h -@@ -64,7 +64,13 @@ - #endif - - // PyTypeObject compatibility --#if PY_VERSION_HEX >= 0x03040000 -+#if PY_VERSION_HEX >= 0x03090000 -+#define VTK_WRAP_PYTHON_SUPPRESS_UNINITIALIZED \ -+ 0, 0, 0, 0, -+#elif PY_VERSION_HEX >= 0x03080000 -+#define VTK_WRAP_PYTHON_SUPPRESS_UNINITIALIZED \ -+ 0, 0, 0, 0, 0, -+#elif PY_VERSION_HEX >= 0x03040000 - #define VTK_WRAP_PYTHON_SUPPRESS_UNINITIALIZED \ - 0, 0, 0, - #else -diff --git a/Wrapping/Tools/vtkWrapPythonClass.c b/Wrapping/Tools/vtkWrapPythonClass.c -index b1e45f8e80..4d558ea081 100644 ---- a/Wrapping/Tools/vtkWrapPythonClass.c -+++ b/Wrapping/Tools/vtkWrapPythonClass.c -@@ -521,7 +521,7 @@ void vtkWrapPython_GenerateObjectType( - " sizeof(PyVTKObject), // tp_basicsize\n" - " 0, // tp_itemsize\n" - " PyVTKObject_Delete, // tp_dealloc\n" -- " nullptr, // tp_print\n" -+ " 0, // tp_vectorcall_offset\n" - " nullptr, // tp_getattr\n" - " nullptr, // tp_setattr\n" - " nullptr, // tp_compare\n" -diff --git a/Wrapping/Tools/vtkWrapPythonEnum.c b/Wrapping/Tools/vtkWrapPythonEnum.c -index b933702242..1249362854 100644 ---- a/Wrapping/Tools/vtkWrapPythonEnum.c -+++ b/Wrapping/Tools/vtkWrapPythonEnum.c -@@ -145,7 +145,7 @@ void vtkWrapPython_GenerateEnumType( - " sizeof(PyIntObject), // tp_basicsize\n" - " 0, // tp_itemsize\n" - " nullptr, // tp_dealloc\n" -- " nullptr, // tp_print\n" -+ " 0, // tp_vectorcall_offset\n" - " nullptr, // tp_getattr\n" - " nullptr, // tp_setattr\n" - " nullptr, // tp_compare\n" -diff --git a/Wrapping/Tools/vtkWrapPythonType.c b/Wrapping/Tools/vtkWrapPythonType.c -index 744cb1b9d3..0a1375e541 100644 ---- a/Wrapping/Tools/vtkWrapPythonType.c -+++ b/Wrapping/Tools/vtkWrapPythonType.c -@@ -709,7 +709,7 @@ void vtkWrapPython_GenerateSpecialType( - " sizeof(PyVTKSpecialObject), // tp_basicsize\n" - " 0, // tp_itemsize\n" - " Py%s_Delete, // tp_dealloc\n" -- " nullptr, // tp_print\n" -+ " 0, // tp_vectorcall_offset\n" - " nullptr, // tp_getattr\n" - " nullptr, // tp_setattr\n" - " nullptr, // tp_compare\n" --- -2.21.0 - diff --git a/reproducible.patch b/reproducible.patch deleted file mode 100644 index 410610d..0000000 --- a/reproducible.patch +++ /dev/null @@ -1,167 +0,0 @@ -https://gitlab.kitware.com/vtk/vtk/merge_requests/5633 -https://gitlab.kitware.com/vtk/vtk/merge_requests/5634 - -Index: VTK-8.2.0/Utilities/Doxygen/doc_codematch.pl -=================================================================== ---- VTK-8.2.0.orig/Utilities/Doxygen/doc_codematch.pl -+++ VTK-8.2.0/Utilities/Doxygen/doc_codematch.pl -@@ -249,7 +249,7 @@ foreach my $source (@files) { - - my $preamble = " \@par " . $args{"label"} . ":\n"; - my $doc = $preamble . -- " " . join(" ", keys %{$class2matches{$class}}) . "\n"; -+ " " . join(" ", sort keys %{$class2matches{$class}}) . "\n"; - - if ($block !~ s/($preamble.+?)(\s*\@par|\z)/$doc$2/gms) { - $block .= "\n$doc"; -@@ -282,7 +282,7 @@ my $header; - my (@summary, @credits); - - push @summary, -- " - $nb_files implementation file(s) returning " . scalar (keys %allmatches) . " word(s) for " . scalar (keys %allclasses) . " classe(es) on " . localtime(), -+ " - $nb_files implementation file(s) returning " . scalar (keys %allmatches) . " word(s) for " . scalar (keys %allclasses) . " classe(es) on " . gmtime($ENV{SOURCE_DATE_EPOCH}||time), - " - $nb_replaced_files file(s) updated"; - - push @credits, -Index: VTK-8.2.0/Utilities/Doxygen/doc_index.pl -=================================================================== ---- VTK-8.2.0.orig/Utilities/Doxygen/doc_index.pl -+++ VTK-8.2.0/Utilities/Doxygen/doc_index.pl -@@ -213,7 +213,7 @@ foreach my $source (@files) { - } - } - --my @words = keys %index; -+my @words = sort keys %index; - print " => ", scalar @words, " word(s) grabbed in $nb_files file(s) in ", time() - $intermediate_time, " s.\n"; - - # ------------------------------------------------------------------------- -@@ -243,7 +243,7 @@ print "Grouping...\n"; - - sub transfer_keys { - my ($rfrom, $rto) = @_; -- foreach my $key (keys %$rfrom) { -+ foreach my $key (sort keys %$rfrom) { - $rto->{$key} += $rfrom->{$key}; - } - } -@@ -350,7 +350,7 @@ foreach my $word (@words) { - # with these extensions that were not found and build a list of similar - # "words" by concatenating both. - -- my @verbs = keys %verbs; -+ my @verbs = sort keys %verbs; - if (@verbs) { - my %try = ("" => 1, - "e" => 1, -@@ -397,7 +397,7 @@ print " => $nb_grouped word(s) grouped.\ - - print "Normalizing...\n"; - --@words = keys %index; -+@words = sort keys %index; - foreach my $word (@words) { - my $lcw = lc $word; - -@@ -413,7 +413,7 @@ foreach my $word (@words) { - # Normalize group to lowercase - - if (exists $group{$word}) { -- foreach my $gword (keys %{$group{$word}}) { -+ foreach my $gword (sort keys %{$group{$word}}) { - my $lcgw = lc $gword; - if ($gword ne uc($gword) && $gword ne $lcgw) { - $group{$word}{$lcgw} = $group{$word}{$gword}; -@@ -441,7 +441,7 @@ my (@summary, @credits); - - push @summary, - " - $nb_files file(s) indexed by " . scalar @words . " word(s) on " . -- localtime(), -+ gmtime($ENV{SOURCE_DATE_EPOCH}||time), - " - max limit is " . $args{"limit"} . " xref(s) per word"; - - push @credits, -Index: VTK-8.2.0/Utilities/Doxygen/doc_class2example.pl -=================================================================== ---- VTK-8.2.0.orig/Utilities/Doxygen/doc_class2example.pl -+++ VTK-8.2.0/Utilities/Doxygen/doc_class2example.pl -@@ -171,7 +171,7 @@ sub unique { - foreach my $item (@$ref) { - $uniques{$item}++; - } -- return keys %uniques; -+ return sort keys %uniques; - } - - sub parse { -@@ -506,7 +506,7 @@ my (@summary, @credits, @legend); - - push @summary, - " - " . scalar @words . " class(es) in " . -- scalar @parsable . " file(s) from directories matching \@c " . $args{"dirmatch"} . " on " . localtime(); -+ scalar @parsable . " file(s) from directories matching \@c " . $args{"dirmatch"} . " on " . gmtime($ENV{SOURCE_DATE_EPOCH}||time); - - push @summary, - " - " . scalar @parsers . " parser(s) : [" . join(", ", @parsers) . "]"; -Index: VTK-8.2.0/Utilities/Doxygen/doc_contributors.pl -=================================================================== ---- VTK-8.2.0.orig/Utilities/Doxygen/doc_contributors.pl -+++ VTK-8.2.0/Utilities/Doxygen/doc_contributors.pl -@@ -462,7 +462,7 @@ my $nb_removed = 0; - - foreach my $signature (sort { (scalar keys %{$log_revision_by_signature_file{$b}}) <=> (scalar keys %{$log_revision_by_signature_file{$a}}) } - keys %log_revision_by_signature_file) { -- my @files = keys %{$log_revision_by_signature_file{$signature}}; -+ my @files = sort keys %{$log_revision_by_signature_file{$signature}}; - - if (scalar @files > $args{"massive"}) { - print " >> Removed: (" . scalar @files . ")\n " . -@@ -521,7 +521,7 @@ $intermediate_time = time(); - - # Browse each file, each revision and use contribution - --foreach my $file_name (keys %files_visited) { -+foreach my $file_name (sort keys %files_visited) { - - # Check if file is part of a class group - -@@ -533,7 +533,7 @@ foreach my $file_name (keys %files_visit - $classes{$class_name}{'creators'}{$log_by_file_revision{$file_name}{'1.1'}{'author'}} = 1; - } - -- foreach my $revision (keys %{$log_by_file_revision{$file_name}}) { -+ foreach my $revision (sort keys %{$log_by_file_revision{$file_name}}) { - - my $author = $log_by_file_revision{$file_name}{$revision}{'author'}; - -@@ -603,7 +603,7 @@ while (@classes_names) { - # Find the class header name - - my $source_header_name = undef; -- foreach my $file_name (keys %{$classes{$class_name}{'files'}}) { -+ foreach my $file_name (sort keys %{$classes{$class_name}{'files'}}) { - if ($file_name =~ m/\.h$/) { - $source_header_name = $file_name; - last; -@@ -682,7 +682,7 @@ while (@classes_names) { - - if (exists $args{"cvsweb"}) { - $doc .= "\n \@par CVS logs (CVSweb):\n"; -- foreach my $file (keys %{$classes{$class_name}{'files'}}) { -+ foreach my $file (sort keys %{$classes{$class_name}{'files'}}) { - my $shortname = get_short_relative_name($file, $args{"relativeto"}); - my ($base, $dir, $ext) = fileparse($shortname, '\..*'); - $doc .= ' - @htmlonly + +- Update to version 9.0.0 + * See https://discourse.vtk.org/t/vtk-9-0-0/3205. +- Rebase patches still required for building: + * bundled_exodusii_add_missing_libpthread.patch: Update to + upstream patch + (https://gitlab.kitware.com/vtk/vtk/-/merge_requests/6865). + * bundled_libharu_add_missing_libm.patch +- Pass VTK_PYTHON_OPTIONAL_LINK:BOOL=OFF to cmake to link against + the system python library explicitly. +- Add vtk-parallelgeometry-dependency.patch to fix a missing + dependency for vtkparallelgeometry (see + https://discourse.vtk.org/t/building-vtk-9-0-fails-when-using-mpi-support/3227). +- Comment out 0001-Allow-compilation-on-GLES-platforms.patch that + no longer applies and needs extensive rebasing. +- Drop patches incorporated or otherwise fixed upstream: + * 0001-Make-code-calling-proj4-compatible-with-proj4-5.0-an.patch + * 0001-Add-libogg-to-IOMovie-target-link-libraries.patch + * python38.patch + * reproducible.patch +- Adapt to changes in upstream's cmake script: + * Replace old options by their newer versions where applicable. + * Pass VTK_USE_EXTERNAL=ON to use system libraries by default + except for gl2ps, haru, and pugixml. +- New BuildRequires: pegtl-devel and utfcpp-devel. +- No longer needed to pass + Java_JAVAH_EXECUTABLE:PATH=%{_bindir}/true to cmake; script does + not look for javah any more. +- Use autosetup to set up and patch sources: simplifies applying + changing list of patches; use an if guard to avoid patch needing + rebase while not running into conflict with factory bot. +- Use system gl2ps for openSUSE > 1500. + ------------------------------------------------------------------- Mon Apr 27 11:00:45 UTC 2020 - Atri Bhattacharya diff --git a/vtk.spec b/vtk.spec index 891eac9..36debec 100644 --- a/vtk.spec +++ b/vtk.spec @@ -18,8 +18,6 @@ %global flavor @BUILD_FLAVOR@%{nil} -# FIXME: ENABLE EXAMPLES BY DEFAULT WHEN VERSION 9.0 IS PACKAGED -# [https://gitlab.kitware.com/vtk/vtk/issues/17619] %bcond_with examples %if 0%{?sle_version} >= 150200 @@ -33,15 +31,17 @@ %if 0%{?suse_version} <= 1500 %bcond_with pugixml +%bcond_with gl2ps %else %bcond_without pugixml +%bcond_without gl2ps %endif # Need patched version with HPDF_SHADING %bcond_with haru # Need unrelased version > 1.4.0 with e.g. gl2psTextOptColorBL -%bcond_with gl2ps %if "%{flavor}" == "" +%define my_suffix %{nil} %define my_prefix %_prefix %define my_bindir %_bindir %define my_libdir %_libdir @@ -88,9 +88,9 @@ %define shlib %{vtklib} Name: vtk%{?my_suffix} -Version: 8.2.0 +Version: 9.0.0 Release: 0 -%define series 8.2 +%define series 9.0 # This is a variant BSD license, a cross between BSD and ZLIB. # For all intents, it has the same rights and restrictions as BSD. # http://fedoraproject.org/wiki/Licensing/BSD#VTKBSDVariant @@ -102,20 +102,17 @@ Source: https://www.vtk.org/files/release/%{series}/VTK-%{version}.tar.g # FIXME See if packaging can be tweaked to accommodate python-vtk's devel files in a devel package later # We need to use the compat conditionals here to avoid Factory's source validator from tripping up Source99: vtk-rpmlintrc +# PATCH-NEEDS-REBASE +%if 0 # PATCH-FIX-OPENSUSE 0001-Allow-compilation-on-GLES-platforms.patch VTK issue #17113 stefan.bruens@rwth-aachen.de -- Fix building with Qt GLES builds Patch2: 0001-Allow-compilation-on-GLES-platforms.patch -# PATCH-FIX-OPENSUSE bundled_libharu_add_missing_libm.patch stefan.bruens@rwth-aachen.de -- Add missing libm for linking +%endif +# PATCH-FIX-OPENSUSE bundled_libharu_add_missing_libm.patch stefan.bruens@rwth-aachen.de -- Add missing libm for linking (gh#libharu/libharu#213) Patch3: bundled_libharu_add_missing_libm.patch -# PATCH-FIX-OPENSUSE bundled_exodusii_add_missing_libpthread.patch stefan.bruens@rwth-aachen.de -- Add missing libm for linking +# PATCH-FIX-UPSTREAM bundled_exodusii_add_missing_libpthread.patch stefan.bruens@rwth-aachen.de -- Add missing libm for linking (updated to upstream patch by badshah400, see https://gitlab.kitware.com/vtk/vtk/-/merge_requests/6865) Patch4: bundled_exodusii_add_missing_libpthread.patch -# PATCH-FIX-OPENSUSE -- Missing libogg symbols -Patch5: 0001-Add-libogg-to-IOMovie-target-link-libraries.patch -# PATCH-FIX-UPSTREAM -- Compatibility for proj4 5.x and 6.0, https://gitlab.kitware.com/vtk/vtk/issues/17554 -Patch6: 0001-Make-code-calling-proj4-compatible-with-proj4-5.0-an.patch -# PATCH-FIX-UPSTREAM -- Support for python3.8 -Patch7: python38.patch -# PATCH-FIX-UPSTREAM https://gitlab.kitware.com/vtk/vtk/merge_requests/5633 + 5634 -Patch8: reproducible.patch +# PATCH-FIX-UPSTREAM vtk-parallelgeometry-dependency.patch badshah400@gmail.com -- Fix a mistake in the dependencies for ParallelGeometry causing build failures for MPI builds +Patch5: vtk-parallelgeometry-dependency.patch BuildRequires: R-base-devel BuildRequires: chrpath BuildRequires: cmake >= 3.4 @@ -145,6 +142,7 @@ BuildRequires: libharu-devel > 2.3.0 BuildRequires: libjpeg-devel BuildRequires: libmysqlclient-devel BuildRequires: libtiff-devel +BuildRequires: pegtl-devel >= 2.0.0 %if %{with mpi} BuildRequires: %{mpi_flavor}-devel %endif @@ -154,6 +152,7 @@ BuildRequires: python3-mpi4py-devel %endif BuildRequires: python3-numpy-devel BuildRequires: python3-qt5-devel +BuildRequires: utfcpp-devel BuildRequires: wget BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5OpenGL) @@ -230,8 +229,10 @@ Requires: libjpeg-devel Requires: libmysqlclient-devel Requires: libnetcdf_c++-devel Requires: libtiff-devel +Requires: pegtl-devel Requires: python3-%{name} = %{version} Requires: python3-%{name} = %{version} +Requires: utfcpp-devel %{?with_mpi:Requires: %{mpi_flavor}} %{?with_mpi:Requires: %{mpi_flavor}-devel} Requires: pkgconfig(Qt5Core) @@ -351,14 +352,7 @@ languages. %endif %prep -%setup -q -n VTK-%{version} -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 +%autosetup -p1 -n VTK-%{version} # Replace relative path ../../../../VTKData with %%{_datadir}/vtkdata # otherwise it will break on symlinks. @@ -378,58 +372,43 @@ export CXX=g++ export CFLAGS="%{optflags}" export CXXFLAGS="%{optflags}" -# FindJava.cmake looks for javah executable. However, -# the build never invokes the tool. Define a bogus -# Java_JAVAH_EXECUTABLE in order to be able to build -# with JDK10 that does not have this tool, deprecated -# since JDK8. %cmake \ - -DBUILD_DOCUMENTATION:BOOL=ON \ - -DBUILD_EXAMPLES:BOOL=%{?with_examples:ON}%{!?with_examples:OFF} \ - -DBUILD_TESTING:BOOL=OFF \ - -DCMAKE_NO_BUILTIN_CHRPATH:BOOL=ON \ - -DJava_JAVAH_EXECUTABLE:PATH=%{_bindir}/true \ - -DModule_vtkTestingCore:BOOL=ON \ - -DModule_vtkTestingRendering:BOOL=ON \ - -DOpenGL_GL_PREFERENCE:STRING='GLVND' \ - -DVTK_CUSTOM_LIBRARY_SUFFIX="" \ - -DVTK_Group_Imaging:BOOL=ON \ -%if %{with mpi} - -DVTK_Group_MPI:BOOL=ON \ -%else - -DVTK_Group_MPI:BOOL=OFF \ -%endif - -DVTK_Group_Qt:BOOL=ON \ - -DVTK_Group_Rendering:BOOL=ON \ - -DVTK_Group_StandAlone:BOOL=ON \ - -DVTK_Group_Tk:BOOL=ON \ - -DVTK_Group_Views:BOOL=ON \ -DCMAKE_INSTALL_PREFIX:PATH=%{my_prefix} \ - -DVTK_INSTALL_ARCHIVE_DIR:PATH=%{_lib} \ + -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \ + -DCMAKE_INSTALL_DOCDIR:PATH=%{_docdir}/%{name}-%{series} \ -DVTK_INSTALL_LIBRARY_DIR:PATH=%{_lib} \ -DVTK_INSTALL_PACKAGE_DIR:PATH=%{_lib}/cmake/%{pkgname} \ - -DVTK_INSTALL_QT_DIR:STRING=%{_lib}/qt5/plugins/designer \ + -DVTK_PYTHON_OPTIONAL_LINK:BOOL=OFF \ + -DVTK_BUILD_TESTING:BOOL=ON \ + -DCMAKE_NO_BUILTIN_CHRPATH:BOOL=ON \ + -DVTK_MODULE_ENABLE_VTK_TestingCore=WANT \ + -DVTK_MODULE_ENABLE_VTK_TestingRendering=WANT \ + -DOpenGL_GL_PREFERENCE:STRING='GLVND' \ + -DVTK_CUSTOM_LIBRARY_SUFFIX="" \ + -DVTK_GROUP_ENABLE_Imaging=WANT \ +%if %{with mpi} + -DVTK_USE_MPI:BOOL=ON \ + -DVTK_GROUP_ENABLE_MPI=WANT \ +%else + -DVTK_USE_MPI:BOOL=OFF \ +%endif + -DVTK_GROUP_ENABLE_Qt=WANT \ + -DVTK_GROUP_ENABLE_Rendering=WANT \ + -DVTK_GROUP_ENABLE_StandAlone=WANT \ + -DVTK_GROUP_ENABLE_Views=WANT \ -DVTK_PYTHON_VERSION=3 \ - -DVTK_QT_VERSION=5 \ -DVTK_USE_OGGTHEORA_ENCODER:BOOL=ON \ - -DVTK_USE_SYSTEM_LIBRARIES:BOOL=ON \ - -DVTK_USE_SYSTEM_DIY2=OFF \ - -DVTK_USE_SYSTEM_GL2PS:BOOL=%{?with_gl2ps:ON}%{!?with_gl2ps:OFF} \ - -DVTK_USE_SYSTEM_LIBHARU:BOOL=%{?with_haru:ON}%{!?with_haru:OFF} \ - -DVTK_USE_SYSTEM_LIBPROJ:BOOL=ON \ - -DVTK_USE_SYSTEM_HDF5:BOOL=ON \ - -DVTK_USE_SYSTEM_MPI4PY=ON \ - -DVTK_USE_SYSTEM_NETCDF:BOOL=ON \ - -DVTK_USE_SYSTEM_PUGIXML:BOOL=%{?with_pugixml:ON}%{!?with_pugixml:OFF} \ -DVTK_WRAP_JAVA:BOOL=ON \ -DVTK_WRAP_PYTHON:BOOL=ON \ - -DVTK_WRAP_PYTHON_SIP:BOOL=ON \ + -DVTK_USE_EXTERNAL:BOOL=ON \ + -DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps=%{?with_gl2ps:ON}%{!?with_gl2ps:OFF} \ + -DVTK_MODULE_USE_EXTERNAL_VTK_libharu=%{?with_haru:ON}%{!?with_haru:OFF} \ + -DVTK_MODULE_USE_EXTERNAL_VTK_pugixml=%{?with_pugixml:ON}%{!?with_pugixml:OFF} \ -DVTK_INSTALL_DOC_DIR:PATH=%{_docdir}/%{name}-%{series} #-DVTK_EXTERNAL_LIBHARU_IS_SHARED:BOOL=OFF \ -%make_jobs -make %{?_smp_mflags} DoxygenDoc +%cmake_build # Remove executable bits from sources (some of which are generated) find . -name \*.c -o -name \*.cxx -o -name \*.h -o -name \*.hxx -o -name \*.gif -exec chmod -x "{}" "+" @@ -491,6 +470,10 @@ perl -pi -e's,^,%{my_bindir}/,' examples.list %endif +# MOVE LICENSES TO PROPER DOCDIR INSTEAD OF %%{my_datadir}/licenses +mkdir -p %{buildroot}%{_datadir}/licenses/%{name} +mv %{buildroot}%{my_datadir}/licenses/VTK/* %{buildroot}%{_datadir}/licenses/%{name}/ + %fdupes -s %{buildroot} %check @@ -515,29 +498,28 @@ find %{buildroot} . -name vtk.cpython-3*.pyc -delete # drop unreproducible time- %files -n %{shlib} %license Copyright.txt %{my_libdir}/lib*.so.* +%exclude %{my_libdir}/libvtk*Qt*.so.* %exclude %{my_libdir}/libvtk*Java.so.1 -%exclude %{my_libdir}/libvtk*Python3*.so.1 -%exclude %{my_libdir}/libvtkFiltersPython.so.1 -%exclude %{my_libdir}/libvtkPythonContext2D.so.1 +%exclude %{my_libdir}/libvtk*Python*.so.1 %files devel %license Copyright.txt -#%%{my_bindir}/%%{pkgname}EncodeString -#%%{my_bindir}/%%{pkgname}HashSource +%license %{_datadir}/licenses/%{name}/ +%{my_bindir}/vtkProbeOpenGLVersion %{my_bindir}/%{pkgname}ParseJava %{my_bindir}/%{pkgname}WrapHierarchy %{my_bindir}/%{pkgname}WrapJava %{my_bindir}/%{pkgname}WrapPython %{my_bindir}/%{pkgname}WrapPythonInit %{my_libdir}/*.so +%{my_libdir}/vtk/ %{?with_mpi: %dir %{my_libdir}/cmake/} -%{my_libdir}/cmake/%{pkgname}/ -%{my_libdir}/libvtkWrappingTools.a +%{my_libdir}/cmake/%{pkgname}-%{series}/ %{my_incdir}/%{pkgname}-%{series}/ -# VTK JNI, PythonTkinter +# VTK JNI, PythonTkinter, QtGUI %exclude %{my_libdir}/libvtk*Java.so -%exclude %{my_libdir}/libvtk*Python3*.so -%exclude %{my_libdir}/libvtkRenderingPythonTkWidgets*.so +%exclude %{my_libdir}/libvtk*Python*.so +%exclude %{my_libdir}/libvtk*Qt*.so %files devel-doc %license Copyright.txt @@ -545,9 +527,9 @@ find %{buildroot} . -name vtk.cpython-3*.pyc -delete # drop unreproducible time- %files java %license Copyright.txt -%{my_libdir}/%{pkgname}.jar %{my_libdir}/libvtk*Java.so %{my_libdir}/libvtk*Java.so.1 +%{my_libdir}/java/ %files -n python3-%{name} %license Copyright.txt @@ -558,17 +540,13 @@ find %{buildroot} . -name vtk.cpython-3*.pyc -delete # drop unreproducible time- %else %{python3_sitearch}/ %endif -%{my_libdir}/libvtk*Python3*.so.1 -%{my_libdir}/libvtkFiltersPython.so.1 -%{my_libdir}/libvtkPythonContext2D.so.1 -%{my_libdir}/libvtkRenderingPythonTkWidgets*.so +%{my_libdir}/libvtk*Python*.so.1 +%{my_libdir}/libvtk*Python*.so %files qt %license Copyright.txt -%{?with_mpi: %dir %{my_libdir}/qt5/} -%{?with_mpi: %dir %{my_libdir}/qt5/plugins/} -%dir %{my_libdir}/qt5/plugins/designer/ -%{my_libdir}/qt5/plugins/designer/libQVTKWidgetPlugin.so +%{my_libdir}/libvtk*Qt*.so.* +%{my_libdir}/libvtk*Qt*.so %if %{with examples} %if "%{flavor}" == "" From 713745e6cbd2ba2cdf793755388445554dcf5dd072ba683672666505e4d29f81 Mon Sep 17 00:00:00 2001 From: Dirk Stoecker Date: Wed, 3 Jun 2020 15:39:23 +0000 Subject: [PATCH 2/2] Accepting request 810514 from home:badshah400:branches:science * Fix build failures against Qt 5.15 (see current staging:adi:100) with upstream patch * Get around %cmake's RPATH weirdness for Leap to make builds successful again. * Disbale pegtl module when pegtl >= 2.0 is unavailable (Leap 15.1). * Disable java bindings for Leap 15.1 due to inavailability of javah. OBS-URL: https://build.opensuse.org/request/show/810514 OBS-URL: https://build.opensuse.org/package/show/science/vtk?expand=0&rev=157 --- vtk-qt-5.15-include-QPainterPath.patch | 36 +++++++++++ vtk.changes | 18 ++++++ vtk.spec | 82 +++++++++++++++++--------- 3 files changed, 107 insertions(+), 29 deletions(-) create mode 100644 vtk-qt-5.15-include-QPainterPath.patch diff --git a/vtk-qt-5.15-include-QPainterPath.patch b/vtk-qt-5.15-include-QPainterPath.patch new file mode 100644 index 0000000..a50085b --- /dev/null +++ b/vtk-qt-5.15-include-QPainterPath.patch @@ -0,0 +1,36 @@ +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/vtk.changes b/vtk.changes index 96c7508..9c8343b 100644 --- a/vtk.changes +++ b/vtk.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Sun May 31 20:28:03 UTC 2020 - Atri Bhattacharya + +- Add vtk-qt-5.15-include-QPainterPath.patch: Include QPainterPath + to fix build failures against Qt 5.15; patch taken from + upstream, see + . +- The %%cmake macro sets CMAKE_SKIP_RPATH=ON for Leap 15.x which + causes build failures; set it to OFF and set + CMAKE_SKIP_INSTALL_RPATH=ON for openSUSE <= 1500. See + . +- Build without pegtl for distributions where pegtl > 2.0 is + unavailable (Leap 15.1). +- Disable java bindings for Leap 15.1 only where cmake still + searches for the javah binary (and setting it to %{_bindir}/true + seems to no longer work). +- Run ld post scripts for vtk-qt. + ------------------------------------------------------------------- Fri May 8 13:33:26 UTC 2020 - Atri Bhattacharya diff --git a/vtk.spec b/vtk.spec index 36debec..13c795f 100644 --- a/vtk.spec +++ b/vtk.spec @@ -29,6 +29,7 @@ %define pkgname vtk +# PUGIXML, GL2PS IN LEAPS ARE TOO OLD %if 0%{?suse_version} <= 1500 %bcond_with pugixml %bcond_with gl2ps @@ -36,9 +37,19 @@ %bcond_without pugixml %bcond_without gl2ps %endif + +# PEGTL IN LEAP 15.1 IS TOO OLD (< 2.0.0) +# cmake STILL CHECKS FOR JAVAH (AND CHEATING WITH %{_bindir}/true NO LONGER WORKS) +%if 0%{?suse_version} == 1500 && 0%{?sle_version} == 150100 +%bcond_with java +%bcond_with pegtl +%else +%bcond_without java +%bcond_without pegtl +%endif + # Need patched version with HPDF_SHADING %bcond_with haru -# Need unrelased version > 1.4.0 with e.g. gl2psTextOptColorBL %if "%{flavor}" == "" %define my_suffix %{nil} @@ -113,6 +124,8 @@ Patch3: bundled_libharu_add_missing_libm.patch Patch4: bundled_exodusii_add_missing_libpthread.patch # PATCH-FIX-UPSTREAM vtk-parallelgeometry-dependency.patch badshah400@gmail.com -- Fix a mistake in the dependencies for ParallelGeometry causing build failures for MPI builds Patch5: vtk-parallelgeometry-dependency.patch +# PATCH-FIX-UPSTREAM vtk-qt-5.15-include-QPainterPath.patch badshah400@gmail.com -- Include QPainterPath to fix build failures against Qt 5.15; patch taken from upstream, see https://gitlab.kitware.com/vtk/vtk/-/merge_requests/6943 +Patch6: vtk-qt-5.15-include-QPainterPath.patch BuildRequires: R-base-devel BuildRequires: chrpath BuildRequires: cmake >= 3.4 @@ -120,36 +133,16 @@ BuildRequires: double-conversion-devel BuildRequires: doxygen BuildRequires: fdupes BuildRequires: gcc-c++ -%if %{with gl2ps} -BuildRequires: gl2ps-devel > 1.4.0 -%endif BuildRequires: gnuplot BuildRequires: graphviz -%if %{with mpi} -BuildRequires: hdf5-%{mpi_flavor}-devel -%endif BuildRequires: hdf5-devel -BuildRequires: java-devel BuildRequires: libboost_graph-devel BuildRequires: libboost_graph_parallel-devel BuildRequires: libboost_serialization-devel -%if %{with mpi} -BuildRequires: libboost_mpi-devel -%endif -%if %{with haru} -BuildRequires: libharu-devel > 2.3.0 -%endif BuildRequires: libjpeg-devel BuildRequires: libmysqlclient-devel BuildRequires: libtiff-devel -BuildRequires: pegtl-devel >= 2.0.0 -%if %{with mpi} -BuildRequires: %{mpi_flavor}-devel -%endif BuildRequires: python3-devel -%if %{with mpi} -BuildRequires: python3-mpi4py-devel -%endif BuildRequires: python3-numpy-devel BuildRequires: python3-qt5-devel BuildRequires: utfcpp-devel @@ -176,19 +169,35 @@ BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libswscale) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(netcdf) -%if %{with mpi} -BuildRequires: netcdf-%{mpi_flavor}-devel -%endif BuildRequires: pkgconfig(proj) >= 5.0.0 -%if %{with pugixml} -BuildRequires: pkgconfig(pugixml) -%endif BuildRequires: pkgconfig(sqlite3) BuildRequires: pkgconfig(theora) # Still required with 8.2.x for PythonTkInter BuildRequires: pkgconfig(tk) BuildRequires: pkgconfig(xt) BuildRequires: pkgconfig(zlib) +%if %{with gl2ps} +BuildRequires: gl2ps-devel > 1.4.0 +%endif +%if %{with haru} +BuildRequires: libharu-devel > 2.3.0 +%endif +%if %{with java} +BuildRequires: java-devel +%endif +%if %{with mpi} +BuildRequires: %{mpi_flavor}-devel +BuildRequires: hdf5-%{mpi_flavor}-devel +BuildRequires: libboost_mpi-devel +BuildRequires: netcdf-%{mpi_flavor}-devel +BuildRequires: python3-mpi4py-devel +%endif +%if %{with pugixml} +BuildRequires: pkgconfig(pugixml) +%endif +%if %{with pegtl} +BuildRequires: pegtl-devel >= 2.0.0 +%endif %description VTK is a software system for image processing, 3D graphics, volume @@ -229,7 +238,6 @@ Requires: libjpeg-devel Requires: libmysqlclient-devel Requires: libnetcdf_c++-devel Requires: libtiff-devel -Requires: pegtl-devel Requires: python3-%{name} = %{version} Requires: python3-%{name} = %{version} Requires: utfcpp-devel @@ -257,6 +265,9 @@ Requires: pkgconfig(libswscale) Requires: pkgconfig(netcdf) Requires: pkgconfig(theora) Requires: pkgconfig(zlib) +%if %{with pegtl} +Requires: pegtl-devel +%endif Conflicts: vtk-compat_gl-devel %description devel @@ -372,6 +383,8 @@ export CXX=g++ export CFLAGS="%{optflags}" export CXXFLAGS="%{optflags}" +# THE %%cmake MACRO SETS CMAKE_SKIP_RPATH=ON FOR LEAP 15.x WHICH CAUSES BUILD FAILURES +# https://discourse.vtk.org/t/building-fails-generating-wrap-hierarchy-for-vtk-commoncore-unable-to-open-libvtkwrappingtools-so-1 %cmake \ -DCMAKE_INSTALL_PREFIX:PATH=%{my_prefix} \ -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \ @@ -381,6 +394,10 @@ export CXXFLAGS="%{optflags}" -DVTK_PYTHON_OPTIONAL_LINK:BOOL=OFF \ -DVTK_BUILD_TESTING:BOOL=ON \ -DCMAKE_NO_BUILTIN_CHRPATH:BOOL=ON \ +%if 0%{?suse_version} <= 1500 + -DCMAKE_SKIP_RPATH:BOOL=OFF \ + -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON \ +%endif -DVTK_MODULE_ENABLE_VTK_TestingCore=WANT \ -DVTK_MODULE_ENABLE_VTK_TestingRendering=WANT \ -DOpenGL_GL_PREFERENCE:STRING='GLVND' \ @@ -398,12 +415,13 @@ export CXXFLAGS="%{optflags}" -DVTK_GROUP_ENABLE_Views=WANT \ -DVTK_PYTHON_VERSION=3 \ -DVTK_USE_OGGTHEORA_ENCODER:BOOL=ON \ - -DVTK_WRAP_JAVA:BOOL=ON \ + -DVTK_WRAP_JAVA:BOOL=%{?with_java:ON}%{!?with_java:OFF} \ -DVTK_WRAP_PYTHON:BOOL=ON \ -DVTK_USE_EXTERNAL:BOOL=ON \ -DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps=%{?with_gl2ps:ON}%{!?with_gl2ps:OFF} \ -DVTK_MODULE_USE_EXTERNAL_VTK_libharu=%{?with_haru:ON}%{!?with_haru:OFF} \ -DVTK_MODULE_USE_EXTERNAL_VTK_pugixml=%{?with_pugixml:ON}%{!?with_pugixml:OFF} \ + -DVTK_MODULE_ENABLE_VTK_pegtl=%{?with_pegtl:YES}%{!?with_pegtl:NO} \ -DVTK_INSTALL_DOC_DIR:PATH=%{_docdir}/%{name}-%{series} #-DVTK_EXTERNAL_LIBHARU_IS_SHARED:BOOL=OFF \ @@ -490,8 +508,12 @@ find %{buildroot} . -name vtk.cpython-3*.pyc -delete # drop unreproducible time- %post -n %{shlib} -p /sbin/ldconfig %postun -n %{shlib} -p /sbin/ldconfig +%if %{with java} %post java -p /sbin/ldconfig %postun java -p /sbin/ldconfig +%endif +%post qt -p /sbin/ldconfig +%postun qt -p /sbin/ldconfig %post -n python3-%{name} -p /sbin/ldconfig %postun -n python3-%{name} -p /sbin/ldconfig @@ -525,11 +547,13 @@ find %{buildroot} . -name vtk.cpython-3*.pyc -delete # drop unreproducible time- %license Copyright.txt %{_docdir}/%{name}-%{series} +%if %{with java} %files java %license Copyright.txt %{my_libdir}/libvtk*Java.so %{my_libdir}/libvtk*Java.so.1 %{my_libdir}/java/ +%endif %files -n python3-%{name} %license Copyright.txt