From 95bc71b32ee6e1a917b4ed9b12bb1d05948ad54392415ca22d28fe4437e8b90c Mon Sep 17 00:00:00 2001 From: Atri Bhattacharya Date: Tue, 19 Mar 2019 13:50:29 +0000 Subject: [PATCH] Accepting request 685449 from home:StefanBruens:branches:science - Update to version 8.2.0 * Removed support for TCL and Qt4 * Removed all VTK_OVERRIDE, VTK_FINAL, VTK_DELETE_FUNCTION macros as C++11 is now required. * vtkAbstractArray gained support for runtime user defined free functions, allowing for custom allocator memory to be used with VTK. * The vtkGeovis classes are now deprecated. See https://blog.kitware.com/vtk-8-2-0/ for a more exhaustive list. - Packaging changes: * Python bindings for MPI flavors are now installed below the MPI prefix and thus no longer conflict with each other. To use these, the PYTHONPATH currently has to be amended manually. * Removed several devel Requires: from the devel package. This reduces the dependency chain (e.g. java-devel) for all packages building against VTK, but may require to specify some dependencies explicitly, depending on the used VTK modules and bindings. - Patch updates/additions: * Rebase vtk-fix-file-contains-date-time.patch * Rebase 0001-Allow-compilation-on-GLES-platforms.patch * Drop obsolete fix_qt5_example_cmake.patch * Add bundled_libharu_add_missing_libm.patch * Add bundled_exodusii_add_missing_libpthread.patch * Add 0001-Add-libogg-to-IOMovie-target-link-libraries.patch * Add 0001-Make-code-calling-proj4-compatible-with-proj4-5.0-an.patch Moved two omitted python modules to python3-vtk OBS-URL: https://build.opensuse.org/request/show/685449 OBS-URL: https://build.opensuse.org/package/show/science/vtk?expand=0&rev=136 --- ...ogg-to-IOMovie-target-link-libraries.patch | 24 +++ ...-Allow-compilation-on-GLES-platforms.patch | 18 +-- ...g-proj4-compatible-with-proj4-5.0-an.patch | 127 ++++++++++++++++ VTK-8.1.2.tar.gz | 3 - VTK-8.2.0.tar.gz | 3 + bundled_exodusii_add_missing_libpthread.patch | 14 ++ bundled_libharu_add_missing_libm.patch | 14 ++ fix_qt5_example_cmake.patch | 110 -------------- vtk-fix-file-contains-date-time.patch | 14 +- vtk.changes | 30 +++- vtk.spec | 140 +++++++++--------- 11 files changed, 299 insertions(+), 198 deletions(-) create mode 100644 0001-Add-libogg-to-IOMovie-target-link-libraries.patch create mode 100644 0001-Make-code-calling-proj4-compatible-with-proj4-5.0-an.patch delete mode 100644 VTK-8.1.2.tar.gz create mode 100644 VTK-8.2.0.tar.gz create mode 100644 bundled_exodusii_add_missing_libpthread.patch create mode 100644 bundled_libharu_add_missing_libm.patch delete mode 100644 fix_qt5_example_cmake.patch diff --git a/0001-Add-libogg-to-IOMovie-target-link-libraries.patch b/0001-Add-libogg-to-IOMovie-target-link-libraries.patch new file mode 100644 index 0000000..cf7331f --- /dev/null +++ b/0001-Add-libogg-to-IOMovie-target-link-libraries.patch @@ -0,0 +1,24 @@ +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-Allow-compilation-on-GLES-platforms.patch b/0001-Allow-compilation-on-GLES-platforms.patch index 2b8b470..112a158 100644 --- a/0001-Allow-compilation-on-GLES-platforms.patch +++ b/0001-Allow-compilation-on-GLES-platforms.patch @@ -13,17 +13,17 @@ blitting, which in worst case is a noop. Signed-off-by: Stefan Brüns --- - GUISupport/Qt/QVTKOpenGLWidget.cxx | 12 ++++++++++++ + GUISupport/Qt/QVTKOpenGLNativeWidget.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) -diff --git a/GUISupport/Qt/QVTKOpenGLWidget.cxx b/GUISupport/Qt/QVTKOpenGLWidget.cxx +diff --git a/GUISupport/Qt/QVTKOpenGLNativeWidget.cxx b/GUISupport/Qt/QVTKOpenGLNativeWidget.cxx index a1676e8..16e255f 100644 ---- a/GUISupport/Qt/QVTKOpenGLWidget.cxx -+++ b/GUISupport/Qt/QVTKOpenGLWidget.cxx -@@ -421,10 +421,15 @@ void QVTKOpenGLWidget::paintGL() +--- a/GUISupport/Qt/QVTKOpenGLNativeWidget.cxx ++++ b/GUISupport/Qt/QVTKOpenGLNativeWidget.cxx +@@ -534,10 +534,15 @@ void QVTKOpenGLNativeWidget::paintGL() // blit from this->FBO to QOpenGLWidget's FBO. - vtkQVTKOpenGLWidgetDebugMacro("paintGL::blit-to-defaultFBO"); + vtkQVTKOpenGLNativeWidgetDebugMacro("paintGL::blit-to-defaultFBO"); +#if QT_VERSION < 0x050700 QOpenGLFunctions_3_2_Core* f = QOpenGLContext::currentContext()->versionFunctions(); @@ -33,10 +33,10 @@ index a1676e8..16e255f 100644 if (f) { +#if QT_VERSION < 0x050700 - f->glBindFramebuffer(GL_DRAW_FRAMEBUFFER, this->defaultFramebufferObject()); - f->glDrawBuffer(GL_COLOR_ATTACHMENT0); + vtkOpenGLState *ostate = this->RenderWindow->GetState(); -@@ -434,6 +439,13 @@ void QVTKOpenGLWidget::paintGL() + f->glBindFramebuffer(GL_DRAW_FRAMEBUFFER, this->defaultFramebufferObject()); +@@ -556,6 +561,13 @@ void QVTKOpenGLNativeWidget::paintGL() f->glBlitFramebuffer(0, 0, this->RenderWindow->GetSize()[0], this->RenderWindow->GetSize()[1], 0, 0, this->RenderWindow->GetSize()[0], this->RenderWindow->GetSize()[1], GL_COLOR_BUFFER_BIT, GL_NEAREST); 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 new file mode 100644 index 0000000..f6343b6 --- /dev/null +++ b/0001-Make-code-calling-proj4-compatible-with-proj4-5.0-an.patch @@ -0,0 +1,127 @@ +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.1.2.tar.gz b/VTK-8.1.2.tar.gz deleted file mode 100644 index 70991c2..0000000 --- a/VTK-8.1.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0995fb36857dd76ccfb8bb07350c214d9f9099e80b1e66b4a8909311f24ff0db -size 33479307 diff --git a/VTK-8.2.0.tar.gz b/VTK-8.2.0.tar.gz new file mode 100644 index 0000000..bd4fe9e --- /dev/null +++ b/VTK-8.2.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34c3dc775261be5e45a8049155f7228b6bd668106c72a3c435d95730d17d57bb +size 35511819 diff --git a/bundled_exodusii_add_missing_libpthread.patch b/bundled_exodusii_add_missing_libpthread.patch new file mode 100644 index 0000000..1a3b0c2 --- /dev/null +++ b/bundled_exodusii_add_missing_libpthread.patch @@ -0,0 +1,14 @@ +--- 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 @@ + "${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} diff --git a/bundled_libharu_add_missing_libm.patch b/bundled_libharu_add_missing_libm.patch new file mode 100644 index 0000000..3c711e8 --- /dev/null +++ b/bundled_libharu_add_missing_libm.patch @@ -0,0 +1,14 @@ +--- 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 diff --git a/fix_qt5_example_cmake.patch b/fix_qt5_example_cmake.patch deleted file mode 100644 index aca701f..0000000 --- a/fix_qt5_example_cmake.patch +++ /dev/null @@ -1,110 +0,0 @@ -From 54e43bf38f7b8af1fa1bfc934a27f2443fe304d2 Mon Sep 17 00:00:00 2001 -From: Todd -Date: Mon, 11 Jun 2018 15:40:00 -0400 -Subject: [PATCH 1/8] Use `target_link_libraries` instead of `qt5_use_modules`. - -diff --git a/Examples/GUI/Qt/Events/CMakeLists.txt b/Examples/GUI/Qt/Events/CMakeLists.txt ---- a/Examples/GUI/Qt/Events/CMakeLists.txt -+++ b/Examples/GUI/Qt/Events/CMakeLists.txt -@@ -43,7 +43,7 @@ - - add_executable(qtevents - MACOSX_BUNDLE ${Srcs} ${Hdrs} ${UI_Srcs} ${MOC_Hdrs}) -- qt5_use_modules(qtevents Core Gui Widgets) -+ target_link_libraries(qtevents Qt5::Core Qt5::Gui Qt5::Widgets) - target_link_libraries(qtevents ${VTK_LIBRARIES}) - else() - find_package(Qt4 REQUIRED) - -diff --git a/Examples/GUI/Qt/FourPaneViewer/CMakeLists.txt b/Examples/GUI/Qt/FourPaneViewer/CMakeLists.txt ---- a/Examples/GUI/Qt/FourPaneViewer/CMakeLists.txt -+++ b/Examples/GUI/Qt/FourPaneViewer/CMakeLists.txt -@@ -46,7 +46,7 @@ - - # CMAKE_AUTOMOC in ON so the MocHdrs will be automatically wrapped. - add_executable(QtVTKRenderWindows ${Srcs} ${Hdrs} ${UI_Srcs} ${MOC_Hdrs}) -- qt5_use_modules(QtVTKRenderWindows Core Gui Widgets) -+ target_link_libraries(QtVTKRenderWindows Qt5::Core Qt5::Gui Qt5::Widgets) - target_link_libraries(QtVTKRenderWindows ${VTK_LIBRARIES}) - else() - find_package(Qt4 REQUIRED) - -diff --git a/Examples/GUI/Qt/GraphicsView/CMakeLists.txt b/Examples/GUI/Qt/GraphicsView/CMakeLists.txt ---- a/Examples/GUI/Qt/GraphicsView/CMakeLists.txt -+++ b/Examples/GUI/Qt/GraphicsView/CMakeLists.txt -@@ -61,8 +61,9 @@ - - add_executable(qtgraphicsview MACOSX_BUNDLE - ${Srcs} ${Hdrs} ${MOC_Hdrs} ${QRC_Srcs}) -- qt5_use_modules(qtgraphicsview Core Gui Widgets -- WebKit WebKitWidgets OpenGL OpenGLExtensions) -+ target_link_libraries(qtgraphicsview Qt5::Core Qt5::Gui Qt5::Widgets -+ Qt5::WebKit Qt5::WebKitWidgets -+ Qt5::OpenGL Qt5::OpenGLExtensions) - target_link_libraries(qtgraphicsview ${VTK_LIBRARIES}) - else() - find_package(Qt4 REQUIRED) - -diff --git a/Examples/GUI/Qt/ImageViewer/CMakeLists.txt b/Examples/GUI/Qt/ImageViewer/CMakeLists.txt ---- a/Examples/GUI/Qt/ImageViewer/CMakeLists.txt -+++ b/Examples/GUI/Qt/ImageViewer/CMakeLists.txt -@@ -21,6 +21,6 @@ - find_package(Qt5 COMPONENTS Core REQUIRED QUIET) - - add_executable(qtimageviewer ${Srcs}) -- qt5_use_modules(qtimageviewer Core Gui Widgets) -+ target_link_libraries(qtimageviewer Qt5::Core Qt5::Gui Qt5::Widgets) - target_link_libraries(qtimageviewer ${VTK_LIBRARIES}) - endif() - -diff --git a/Examples/GUI/Qt/SimpleView/CMakeLists.txt b/Examples/GUI/Qt/SimpleView/CMakeLists.txt ---- a/Examples/GUI/Qt/SimpleView/CMakeLists.txt -+++ b/Examples/GUI/Qt/SimpleView/CMakeLists.txt -@@ -64,7 +64,7 @@ - - add_executable(SimpleView MACOSX_BUNDLE - ${Srcs} ${Hdrs} ${UI_Srcs} ${MOC_Hdrs} ${QRC_Srcs}) -- qt5_use_modules(SimpleView Core Gui Widgets) -+ target_link_libraries(SimpleView Qt5::Core Qt5::Gui Qt5::Widgets) - target_link_libraries(SimpleView ${VTK_LIBRARIES}) - else() - find_package(Qt4 REQUIRED) - -diff --git a/Examples/Infovis/Cxx/CustomLinkView/CMakeLists.txt b/Examples/Infovis/Cxx/CustomLinkView/CMakeLists.txt ---- a/Examples/Infovis/Cxx/CustomLinkView/CMakeLists.txt -+++ b/Examples/Infovis/Cxx/CustomLinkView/CMakeLists.txt -@@ -65,7 +65,7 @@ - add_executable(CustomLinkView - MACOSX_BUNDLE ${Srcs} ${Hdrs} ${UI_Srcs} ${MOC_Hdrs} ${Rcs_Srcs}) - -- qt5_use_modules(CustomLinkView Core Gui Widgets) -+ target_link_libraries(CustomLinkView Qt5::Core Qt5::Gui Qt5::Widgets) - - target_link_libraries(CustomLinkView ${VTK_LIBRARIES}) - else() - -diff --git a/Examples/Infovis/Cxx/EasyView/CMakeLists.txt b/Examples/Infovis/Cxx/EasyView/CMakeLists.txt ---- a/Examples/Infovis/Cxx/EasyView/CMakeLists.txt -+++ b/Examples/Infovis/Cxx/EasyView/CMakeLists.txt -@@ -74,7 +74,7 @@ - add_executable(EasyView - MACOSX_BUNDLE ${Srcs} ${Hdrs} ${UI_Srcs} ${MOC_Hdrs} ${Rcs_Srcs}) - -- qt5_use_modules(EasyView Core Gui Widgets) -+ target_link_libraries(EasyView Qt5::Core Qt5::Gui Qt5::Widgets) - - target_link_libraries(EasyView ${VTK_LIBRARIES}) - else() - -diff --git a/Examples/Infovis/Cxx/StatsView/CMakeLists.txt b/Examples/Infovis/Cxx/StatsView/CMakeLists.txt ---- a/Examples/Infovis/Cxx/StatsView/CMakeLists.txt -+++ b/Examples/Infovis/Cxx/StatsView/CMakeLists.txt -@@ -62,7 +62,7 @@ - add_executable(StatsView - MACOSX_BUNDLE ${Srcs} ${Hdrs} ${UI_Srcs} ${MOC_Hdrs} ${Rcs_Srcs}) - -- qt5_use_modules(StatsView Core Gui Widgets) -+ target_link_libraries(StatsView Qt5::Core Qt5::Gui Qt5::Widgets) - - target_link_libraries(StatsView ${VTK_LIBRARIES}) - else() diff --git a/vtk-fix-file-contains-date-time.patch b/vtk-fix-file-contains-date-time.patch index 67d5b23..773462e 100644 --- a/vtk-fix-file-contains-date-time.patch +++ b/vtk-fix-file-contains-date-time.patch @@ -1,13 +1,13 @@ -Index: VTK6.0.0/ThirdParty/netcdf/vtknetcdf/libdispatch/error.c +Index: VTK8.2.0/ThirdParty/netcdf/vtknetcdf/libdispatch/error.c =================================================================== ---- VTK6.0.0.orig/ThirdParty/netcdf/vtknetcdf/libdispatch/error.c -+++ VTK6.0.0/ThirdParty/netcdf/vtknetcdf/libdispatch/error.c -@@ -9,7 +9,7 @@ - #include "ncdispatch.h" +--- VTK8.2.0.orig/ThirdParty/netcdf/vtknetcdf/libdispatch/derror.c ++++ VTK8.2.0/ThirdParty/netcdf/vtknetcdf/libdispatch/derror.c +@@ -13,7 +13,7 @@ + #endif /* Tell the user the version of netCDF. */ -static const char nc_libvers[] = PACKAGE_VERSION " of "__DATE__" "__TIME__" $"; +static const char nc_libvers[] = PACKAGE_VERSION; - const char * - nc_inq_libvers(void) + /** + \defgroup lib_version Library Version diff --git a/vtk.changes b/vtk.changes index 3e90504..e7b0278 100644 --- a/vtk.changes +++ b/vtk.changes @@ -1,3 +1,31 @@ +------------------------------------------------------------------- +Fri Mar 15 18:42:02 UTC 2019 - Stefan Brüns + +- Update to version 8.2.0 + * Removed support for TCL and Qt4 + * Removed all VTK_OVERRIDE, VTK_FINAL, VTK_DELETE_FUNCTION macros as + C++11 is now required. + * vtkAbstractArray gained support for runtime user defined free functions, + allowing for custom allocator memory to be used with VTK. + * The vtkGeovis classes are now deprecated. + See https://blog.kitware.com/vtk-8-2-0/ for a more exhaustive list. +- Packaging changes: + * Python bindings for MPI flavors are now installed below the MPI prefix + and thus no longer conflict with each other. To use these, the + PYTHONPATH currently has to be amended manually. + * Removed several devel Requires: from the devel package. This reduces the + dependency chain (e.g. java-devel) for all packages building against VTK, + but may require to specify some dependencies explicitly, depending on + the used VTK modules and bindings. +- Patch updates/additions: + * Rebase vtk-fix-file-contains-date-time.patch + * Rebase 0001-Allow-compilation-on-GLES-platforms.patch + * Drop obsolete fix_qt5_example_cmake.patch + * Add bundled_libharu_add_missing_libm.patch + * Add bundled_exodusii_add_missing_libpthread.patch + * Add 0001-Add-libogg-to-IOMovie-target-link-libraries.patch + * Add 0001-Make-code-calling-proj4-compatible-with-proj4-5.0-an.patch + ------------------------------------------------------------------- Sun Jan 6 18:32:58 UTC 2019 - Stefan Brüns @@ -682,5 +710,3 @@ python 2.7 Thu Mar 25 11:50:35 CET 2010 - boris@steki.net - Extended buffer size in VTK/Utilities/kwsys/SystemInformation.cxx -to fix buffer overflow report from rpmlint - diff --git a/vtk.spec b/vtk.spec index 27163fe..b3e618f 100644 --- a/vtk.spec +++ b/vtk.spec @@ -20,6 +20,16 @@ %define pkgname vtk +%if 0%{?suse_version} <= 1500 +%bcond_with pugixml +%else +%bcond_without pugixml +%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_prefix %_prefix %define my_bindir %_bindir @@ -54,16 +64,16 @@ %define shlib %{vtklib} Name: vtk%{?my_suffix} -Version: 8.1.2 +Version: 8.2.0 Release: 0 -%define series 8.1 +%define series 8.2 # 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 Summary: The Visualization Toolkit - A high level 3D visualization library License: BSD-3-Clause Group: Productivity/Scientific/Other -URL: http://vtk.org/ +URL: https://vtk.org/ Source: https://www.vtk.org/files/release/%{series}/VTK-%{version}.tar.gz # 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 @@ -71,16 +81,25 @@ Source99: vtk-rpmlintrc # PATCH-FIX-UPSTREAM vtk-fix-file-contains-date-time.patch badshah400@gmail.com -- Fix file containing DATE and TIME Patch1: vtk-fix-file-contains-date-time.patch # PATCH-FIX-OPENSUSE 0001-Allow-compilation-on-GLES-platforms.patch VTK issue #17113 stefan.bruens@rwth-aachen.de -- Fix building with Qt GLES builds -Patch3: 0001-Allow-compilation-on-GLES-platforms.patch -# PATCH-FIX-UPSTREAM fix_qt5_example_cmake.patch -- Fix for recent Qt5 version https://gitlab.kitware.com/vtk/vtk/issues/17336 -Patch4: fix_qt5_example_cmake.patch +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 +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 +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 BuildRequires: R-base-devel BuildRequires: chrpath BuildRequires: cmake >= 3.4 +BuildRequires: double-conversion-devel BuildRequires: doxygen BuildRequires: fdupes BuildRequires: gcc-c++ -BuildRequires: gl2ps-devel +%if %{with gl2ps} +BuildRequires: gl2ps-devel > 1.4.0 +%endif BuildRequires: gnuplot BuildRequires: graphviz %if %{with mpi} @@ -88,6 +107,9 @@ BuildRequires: hdf5-%{mpi_flavor}-devel %endif BuildRequires: hdf5-devel BuildRequires: java-devel +%if %{with haru} +BuildRequires: libharu-devel > 2.3.0 +%endif BuildRequires: libjpeg-devel BuildRequires: libmysqlclient-devel BuildRequires: libnetcdf_c++-devel @@ -108,9 +130,11 @@ BuildRequires: pkgconfig(Qt5OpenGLExtensions) BuildRequires: pkgconfig(Qt5Sql) BuildRequires: pkgconfig(Qt5WebKitWidgets) BuildRequires: pkgconfig(Qt5Widgets) +BuildRequires: pkgconfig(eigen3) >= 2.91.0 BuildRequires: pkgconfig(expat) BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(gl) +BuildRequires: pkgconfig(glew) BuildRequires: pkgconfig(jsoncpp) %if 0%{?suse_version} < 1500 # libav pulls in a conflicting libnetcdf version @@ -126,14 +150,19 @@ BuildRequires: pkgconfig(libiodbc) BuildRequires: pkgconfig(liblz4) >= 1.7.3 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(tcl) +BuildRequires: pkgconfig(proj) +%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(x11) BuildRequires: pkgconfig(xt) BuildRequires: pkgconfig(zlib) %if 0%{?suse_version} >= 1500 @@ -146,11 +175,6 @@ BuildRequires: libboost_serialization-devel %else BuildRequires: boost-devel %endif -%if %{?sles_version} -BuildRequires: libxml2-devel -%else -BuildRequires: pkgconfig(libxml-2.0) -%endif %description VTK is a software system for image processing, 3D graphics, volume @@ -179,17 +203,13 @@ Summary: VTK header files for building C++ code # not strictly necessary, but required by VTKs cmake files Group: Development/Libraries/C and C++ Requires: %{name}-java = %{version} -Requires: %{name}-tcl = %{version} Requires: %{shlib} = %{version} -Requires: R-base-devel +Requires: R-core-devel Requires: cmake >= 3.4 Requires: gcc-c++ -Requires: gl2ps-devel -Requires: gnuplot -Requires: graphviz +%{?with_gl2ps:Requires: gl2ps-devel} Requires: hdf5-devel %{?with_mpi:Requires: hdf5-%{mpi_flavor}-devel} -Requires: java-devel Requires: libjpeg-devel Requires: libmysqlclient-devel Requires: libnetcdf_c++-devel @@ -217,12 +237,7 @@ Requires: pkgconfig(liblz4) >= 1.7.3 Requires: pkgconfig(libpng) Requires: pkgconfig(libswscale) Requires: pkgconfig(netcdf) -Requires: pkgconfig(tcl) Requires: pkgconfig(theora) -Requires: pkgconfig(tk) -Requires: pkgconfig(x11) -Requires: pkgconfig(xt) -Requires: pkgconfig(zlib) Conflicts: vtk-compat_gl-devel %description devel @@ -272,10 +287,6 @@ Requires: %{shlib} = %{version} Requires: python3-numpy Requires: python3-qt5 Conflicts: python3-vtk-compat_gl -%if %{with mpi} -Conflicts: python3-vtk -Provides: python3-vtk = %{version} -%endif %description -n python3-%{name} VTK is a software system for image processing, 3D graphics, volume @@ -301,21 +312,6 @@ LOD control). This package provides a Qt Designer plugin for the QVTKWidget. -%package tcl -Summary: Tcl bindings for VTK -Group: Development/Languages/Tcl -Requires: %{shlib} = %{version} -Conflicts: vtk-compat_gl-tcl - -%description tcl -VTK is a software system for image processing, 3D graphics, volume -rendering and visualization. VTK includes many advanced algorithms -(e.g. surface reconstruction, implicit modelling, decimation) and -rendering techniques (e.g. hardware-accelerated volume rendering, -LOD control). - -This package provides tcl bindings for VTK. - # The examples work with any VTK flavor, just package these once %if "%{flavor}" == "" %package examples @@ -339,8 +335,13 @@ languages. %prep %setup -q -n VTK-%{version} %patch1 -p1 +%patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 +%if 0%{?suse_version} > 1500 +%patch6 -p1 +%endif # Replace relative path ../../../../VTKData with %%{_datadir}/vtkdata # otherwise it will break on symlinks. @@ -374,7 +375,6 @@ export CXXFLAGS="%{optflags}" -DModule_vtkTestingRendering:BOOL=ON \ -DOpenGL_GL_PREFERENCE:STRING='GLVND' \ -DVTK_CUSTOM_LIBRARY_SUFFIX="" \ - -DVTK_EXTERNAL_LIBHARU_IS_SHARED:BOOL=OFF \ -DVTK_Group_Imaging:BOOL=ON \ %if %{with mpi} -DVTK_Group_MPI:BOOL=ON \ @@ -392,24 +392,25 @@ export CXXFLAGS="%{optflags}" -DVTK_INSTALL_PACKAGE_DIR:PATH=%{_lib}/cmake/%{pkgname} \ -DVTK_INSTALL_QT_DIR:STRING=%{_lib}/qt5/plugins/designer \ -DVTK_INSTALL_PYTHON_MODULE_DIR:PATH=%{python3_sitearch} \ - -DVTK_INSTALL_TCL_DIR:PATH=share/tcl/%{pkgname} \ -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=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_LIBHARU:BOOL=OFF \ - -DVTK_USE_SYSTEM_LIBPROJ4:BOOL=OFF \ -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_WRAP_TCL:BOOL=ON \ -DVTK_INSTALL_DOC_DIR:PATH=%{_docdir}/%{name}-%{series} + #-DVTK_EXTERNAL_LIBHARU_IS_SHARED:BOOL=OFF \ + %make_jobs make %{?_smp_mflags} DoxygenDoc @@ -476,38 +477,46 @@ perl -pi -e's,^,%{my_bindir}/,' examples.list # Make sure the python library is at least importable %if %{with mpi} source %{mpiprefix}/bin/mpivars.sh +export _PYTHON_MPI_PREFIX=`echo %{buildroot}%{my_libdir}/py*/site-packages/` +export PYTHONPATH=$_PYTHON_MPI_PREFIX:$PYTHONPATH %endif export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{my_libdir} -export PYTHONPATH=%{buildroot}%{python3_sitearch} +export PYTHONPATH=$PYTHONPATH:%{buildroot}%{python3_sitearch} python3 -c "import vtk" %post -n %{shlib} -p /sbin/ldconfig %postun -n %{shlib} -p /sbin/ldconfig +%post java -p /sbin/ldconfig +%postun java -p /sbin/ldconfig +%post -n python3-%{name} -p /sbin/ldconfig +%postun -n python3-%{name} -p /sbin/ldconfig %files -n %{shlib} %license Copyright.txt %{my_libdir}/lib*.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 %files devel %license Copyright.txt -%{my_bindir}/%{pkgname}EncodeString -%{my_bindir}/%{pkgname}HashSource +#%%{my_bindir}/%%{pkgname}EncodeString +#%%{my_bindir}/%%{pkgname}HashSource %{my_bindir}/%{pkgname}ParseJava %{my_bindir}/%{pkgname}WrapHierarchy %{my_bindir}/%{pkgname}WrapJava %{my_bindir}/%{pkgname}WrapPython %{my_bindir}/%{pkgname}WrapPythonInit -%{my_bindir}/%{pkgname}WrapTcl -%{my_bindir}/%{pkgname}WrapTclInit %{my_libdir}/*.so %{?with_mpi: %dir %{my_libdir}/cmake/} %{my_libdir}/cmake/%{pkgname}/ %{my_libdir}/libvtkWrappingTools.a %{my_incdir}/%{pkgname}-%{series}/ -# VTK JNI, PythonTkinter, TCL bindings +# VTK JNI, PythonTkinter %exclude %{my_libdir}/libvtk*Java.so +%exclude %{my_libdir}/libvtk*Python3*.so %exclude %{my_libdir}/libvtkRenderingPythonTkWidgets*.so -%exclude %{my_datadir}/tcl/vtk/vtktcl.c %files devel-doc %license Copyright.txt @@ -517,24 +526,21 @@ python3 -c "import vtk" %license Copyright.txt %{my_libdir}/%{pkgname}.jar %{my_libdir}/libvtk*Java.so +%{my_libdir}/libvtk*Java.so.1 %files -n python3-%{name} %license Copyright.txt %{my_bindir}/%{pkgname}python %if %{with mpi} %{my_bindir}/p%{pkgname}python +%{my_libdir}/py* +%else +%{python3_sitearch}/ %endif +%{my_libdir}/libvtk*Python3*.so.1 +%{my_libdir}/libvtkFiltersPython.so.1 +%{my_libdir}/libvtkPythonContext2D.so.1 %{my_libdir}/libvtkRenderingPythonTkWidgets*.so -%{python3_sitearch}/%{pkgname}/ - -%files tcl -%license Copyright.txt -%{my_bindir}/%{pkgname} -%if %{with mpi} -%{my_bindir}/p%{pkgname} -%dir %{my_datadir}/tcl/ -%endif -%{my_datadir}/tcl/%{pkgname}/ %files qt %license Copyright.txt