From a6fa95ab4cf8c0149b86c8a35d9ed7760e35e156 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Sun, 10 May 2020 07:37:43 -0600 Subject: [PATCH] Update to 9.0.1 Disable OSMesa - conflicts with X support Build against Fedora gl2ps, libharu, utf8cpp Drop python3-vtk-qt packages No longer ship compiled examples Install jar file into /usr/share/java Fix JNI install location Drop Qt4 build option Drop gcc10 patch --- .gitignore | 2 + 5883.patch | 176 ---------- vtk-AllValues.patch | 137 ++++++++ vtk-gcc10.patch | 32 -- vtk-includes.patch | 71 ++++ vtk-libharu.patch | 12 + vtk-limits.patch | 60 ++++ vtk-proj6_compat.patch | 264 --------------- vtk.spec | 669 ++++++++++++++++---------------------- vtk_freetype-2.10.4.patch | 44 +-- 10 files changed, 582 insertions(+), 885 deletions(-) delete mode 100644 5883.patch create mode 100644 vtk-AllValues.patch delete mode 100644 vtk-gcc10.patch create mode 100644 vtk-includes.patch create mode 100644 vtk-libharu.patch create mode 100644 vtk-limits.patch delete mode 100644 vtk-proj6_compat.patch diff --git a/.gitignore b/.gitignore index 56e40bd..79d4c4e 100644 --- a/.gitignore +++ b/.gitignore @@ -17,5 +17,7 @@ vtk-5.6.0.tar.gz /VTKData-8.1.1.tar.gz /VTK-8.2.0.tar.gz /VTKData-8.2.0.tar.gz +/VTK-9.0.0.tar.gz +/VTKData-9.0.0.tar.gz /VTK-9.0.1.tar.gz /VTKData-9.0.1.tar.gz diff --git a/5883.patch b/5883.patch deleted file mode 100644 index f749d3c..0000000 --- a/5883.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/vtk-AllValues.patch b/vtk-AllValues.patch new file mode 100644 index 0000000..d032d92 --- /dev/null +++ b/vtk-AllValues.patch @@ -0,0 +1,137 @@ +Index: VTK-9.0.1/Common/Core/vtkDataArray.cxx +=================================================================== +--- VTK-9.0.1.orig/Common/Core/vtkDataArray.cxx ++++ VTK-9.0.1/Common/Core/vtkDataArray.cxx +@@ -1627,7 +1627,7 @@ struct ScalarRangeDispatchWrapper + void operator()(ArrayT* array) + { + this->Success = vtkDataArrayPrivate::DoComputeScalarRange( +- array, this->Range, vtkDataArrayPrivate::AllValues()); ++ array, this->Range, vtkDataArrayPrivate::vtkAllValues()); + } + }; + +@@ -1646,7 +1646,7 @@ struct VectorRangeDispatchWrapper + void operator()(ArrayT* array) + { + this->Success = vtkDataArrayPrivate::DoComputeVectorRange( +- array, this->Range, vtkDataArrayPrivate::AllValues()); ++ array, this->Range, vtkDataArrayPrivate::vtkAllValues()); + } + }; + +Index: VTK-9.0.1/Common/Core/vtkDataArray.h +=================================================================== +--- VTK-9.0.1.orig/Common/Core/vtkDataArray.h ++++ VTK-9.0.1/Common/Core/vtkDataArray.h +@@ -599,7 +599,7 @@ vtkArrayDownCast_FastCastMacro(vtkDataAr + // vtkGenericDataArray.h as well. + namespace vtkDataArrayPrivate + { +-struct AllValues ++struct vtkAllValues + { + }; + struct FiniteValues +Index: VTK-9.0.1/Common/Core/vtkGenericDataArray.txx +=================================================================== +--- VTK-9.0.1.orig/Common/Core/vtkGenericDataArray.txx ++++ VTK-9.0.1/Common/Core/vtkGenericDataArray.txx +@@ -1192,7 +1192,7 @@ bool vtkGenericDataArray; + return ComputeScalarValueRangeImpl( +- static_cast(this), ranges, vtkDataArrayPrivate::AllValues{}, Supported{}); ++ static_cast(this), ranges, vtkDataArrayPrivate::vtkAllValues{}, Supported{}); + } + + //----------------------------------------------------------------------------- +@@ -1202,7 +1202,7 @@ bool vtkGenericDataArray; + return ComputeVectorValueRangeImpl( +- static_cast(this), range, vtkDataArrayPrivate::AllValues{}, Supported{}); ++ static_cast(this), range, vtkDataArrayPrivate::vtkAllValues{}, Supported{}); + } + + //----------------------------------------------------------------------------- +Index: VTK-9.0.1/Common/Core/vtkDataArrayPrivate.txx +=================================================================== +--- VTK-9.0.1.orig/Common/Core/vtkDataArrayPrivate.txx ++++ VTK-9.0.1/Common/Core/vtkDataArrayPrivate.txx +@@ -301,7 +301,7 @@ template + struct ComputeScalarRange + { + template +- bool operator()(ArrayT* array, RangeValueType* ranges, AllValues) ++ bool operator()(ArrayT* array, RangeValueType* ranges, vtkAllValues) + { + AllValuesMinAndMax minmax(array); + vtkSMPTools::For(0, array->GetNumberOfTuples(), minmax); +@@ -435,7 +435,7 @@ public: + }; + + template +-bool GenericComputeScalarRange(ArrayT* array, RangeValueType* ranges, AllValues) ++bool GenericComputeScalarRange(ArrayT* array, RangeValueType* ranges, vtkAllValues) + { + AllValuesGenericMinAndMax minmax(array); + vtkSMPTools::For(0, array->GetNumberOfTuples(), minmax); +@@ -518,7 +518,7 @@ bool DoComputeScalarRange(ArrayT* array, + //---------------------------------------------------------------------------- + // generic implementation that operates on ValueType. + template +-bool DoComputeVectorRange(ArrayT* array, RangeValueType range[2], AllValues) ++bool DoComputeVectorRange(ArrayT* array, RangeValueType range[2], vtkAllValues) + { + range[0] = vtkTypeTraits::Max(); + range[1] = vtkTypeTraits::Min(); +Index: VTK-9.0.1/Common/Core/vtkGenericDataArray.h +=================================================================== +--- VTK-9.0.1.orig/Common/Core/vtkGenericDataArray.h ++++ VTK-9.0.1/Common/Core/vtkGenericDataArray.h +@@ -414,7 +414,7 @@ namespace vtkDataArrayPrivate + template + bool DoComputeScalarRange(A*, R*, T); + template +-bool DoComputeVectorRange(A*, R[2], AllValues); ++bool DoComputeVectorRange(A*, R[2], vtkAllValues); + template + bool DoComputeVectorRange(A*, R[2], FiniteValues); + } // namespace vtkDataArrayPrivate +@@ -466,11 +466,11 @@ class vtkScaledSOADataArrayTemplate; + + #define VTK_INSTANTIATE_VALUERANGE_ARRAYTYPE(ArrayType, ValueType) \ + template VTKCOMMONCORE_EXPORT bool DoComputeScalarRange( \ +- ArrayType*, ValueType*, vtkDataArrayPrivate::AllValues); \ ++ ArrayType*, ValueType*, vtkDataArrayPrivate::vtkAllValues); \ + template VTKCOMMONCORE_EXPORT bool DoComputeScalarRange( \ + ArrayType*, ValueType*, vtkDataArrayPrivate::FiniteValues); \ + template VTKCOMMONCORE_EXPORT bool DoComputeVectorRange( \ +- ArrayType*, ValueType[2], vtkDataArrayPrivate::AllValues); \ ++ ArrayType*, ValueType[2], vtkDataArrayPrivate::vtkAllValues); \ + template VTKCOMMONCORE_EXPORT bool DoComputeVectorRange( \ + ArrayType*, ValueType[2], vtkDataArrayPrivate::FiniteValues); + +@@ -516,18 +516,18 @@ namespace vtkDataArrayPrivate + template + bool DoComputeScalarRange(A*, R*, T); + template +-bool DoComputeVectorRange(A*, R[2], AllValues); ++bool DoComputeVectorRange(A*, R[2], vtkAllValues); + template + bool DoComputeVectorRange(A*, R[2], FiniteValues); + } // namespace vtkDataArrayPrivate + + #define VTK_DECLARE_VALUERANGE_ARRAYTYPE(ArrayType, ValueType) \ + extern template VTKCOMMONCORE_EXPORT bool DoComputeScalarRange( \ +- ArrayType*, ValueType*, vtkDataArrayPrivate::AllValues); \ ++ ArrayType*, ValueType*, vtkDataArrayPrivate::vtkAllValues); \ + extern template VTKCOMMONCORE_EXPORT bool DoComputeScalarRange( \ + ArrayType*, ValueType*, vtkDataArrayPrivate::FiniteValues); \ + extern template VTKCOMMONCORE_EXPORT bool DoComputeVectorRange( \ +- ArrayType*, ValueType[2], vtkDataArrayPrivate::AllValues); \ ++ ArrayType*, ValueType[2], vtkDataArrayPrivate::vtkAllValues); \ + extern template VTKCOMMONCORE_EXPORT bool DoComputeVectorRange( \ + ArrayType*, ValueType[2], vtkDataArrayPrivate::FiniteValues); + diff --git a/vtk-gcc10.patch b/vtk-gcc10.patch deleted file mode 100644 index 27b15cd..0000000 --- a/vtk-gcc10.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -up VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c.gcc10 VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c ---- VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c.gcc10 2019-01-30 10:15:13.000000000 -0700 -+++ VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c 2020-05-08 21:38:46.401363001 -0600 -@@ -614,5 +614,5 @@ int ex_create_par_int(const char *path, - * 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 -up VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c.gcc10 VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c ---- VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c.gcc10 2019-01-30 10:15:13.000000000 -0700 -+++ VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c 2020-05-08 21:38:46.402363007 -0600 -@@ -474,5 +474,5 @@ int ex_open_par_int(const char *path, in - * 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 -diff -up VTK-8.2.0/CMake/VTKGenerateExportHeader.cmake.gcc10 VTK-8.2.0/CMake/VTKGenerateExportHeader.cmake ---- VTK-8.2.0/CMake/VTKGenerateExportHeader.cmake.gcc10 2019-01-30 10:15:13.000000000 -0700 -+++ VTK-8.2.0/CMake/VTKGenerateExportHeader.cmake 2020-05-26 21:07:24.625840251 -0600 -@@ -174,7 +174,7 @@ macro(_vtk_test_compiler_hidden_visibili - execute_process(COMMAND ${CMAKE_C_COMPILER} --version - OUTPUT_VARIABLE _gcc_version_info - ERROR_VARIABLE _gcc_version_info) -- string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*" -+ string(REGEX MATCH "[1-9][0-9]*\\.[0-9]+\\.[0-9]+" - _gcc_version "${_gcc_version_info}") - # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the - # patch level, handle this here: diff --git a/vtk-includes.patch b/vtk-includes.patch new file mode 100644 index 0000000..f906200 --- /dev/null +++ b/vtk-includes.patch @@ -0,0 +1,71 @@ +diff -up VTK-9.0.1/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx.includes VTK-9.0.1/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx +--- VTK-9.0.1/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx.includes 2020-06-26 07:24:40.000000000 -0600 ++++ VTK-9.0.1/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx 2021-01-27 06:51:11.776958150 -0700 +@@ -61,10 +61,23 @@ typedef ptrdiff_t GLsizeiptr; + + #include + ++#include ++#include ++#if VTK_HAVE_XCURSOR ++#include ++#endif + #include + #include +-#include + ++/* ++ * Work-around to get forward declarations of C typedef of anonymous ++ * structs working. We do not want to include XUtil.h in the header as ++ * it populates the global namespace. ++ */ ++struct vtkXVisualInfo : public XVisualInfo ++{ ++}; ++ + #define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091 + #define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092 + typedef GLXContext (*glXCreateContextAttribsARBProc)( +@@ -224,7 +237,7 @@ int XEventTypeEquals(Display*, XEvent* e + return event->type == EventType; + } + +-XVisualInfo* vtkXOpenGLRenderWindow::GetDesiredVisualInfo() ++vtkXVisualInfo* vtkXOpenGLRenderWindow::GetDesiredVisualInfo() + { + XVisualInfo* v = nullptr; + +@@ -258,7 +271,7 @@ XVisualInfo* vtkXOpenGLRenderWindow::Get + vtkErrorMacro(<< "Could not find a decent visual\n"); + } + } +- return (v); ++ return reinterpret_cast(v); + } + + vtkXOpenGLRenderWindow::vtkXOpenGLRenderWindow() +diff -up VTK-9.0.1/Rendering/OpenGL2/vtkXOpenGLRenderWindow.h.includes VTK-9.0.1/Rendering/OpenGL2/vtkXOpenGLRenderWindow.h +--- VTK-9.0.1/Rendering/OpenGL2/vtkXOpenGLRenderWindow.h.includes 2020-06-26 07:24:40.000000000 -0600 ++++ VTK-9.0.1/Rendering/OpenGL2/vtkXOpenGLRenderWindow.h 2021-01-27 06:49:09.420323338 -0700 +@@ -28,11 +28,11 @@ + #include "vtkOpenGLRenderWindow.h" + #include "vtkRenderingOpenGL2Module.h" // For export macro + #include // Needed for X types used in the public interface +-#include // Needed for X types used in the public interface + #include // for ivar + + class vtkIdList; + class vtkXOpenGLRenderWindowInternal; ++struct vtkXVisualInfo; + + class VTKRENDERINGOPENGL2_EXPORT vtkXOpenGLRenderWindow : public vtkOpenGLRenderWindow + { +@@ -112,7 +112,7 @@ public: + */ + virtual Colormap GetDesiredColormap(); + virtual Visual* GetDesiredVisual(); +- virtual XVisualInfo* GetDesiredVisualInfo(); ++ virtual vtkXVisualInfo* GetDesiredVisualInfo(); + virtual int GetDesiredDepth(); + //@} + diff --git a/vtk-libharu.patch b/vtk-libharu.patch new file mode 100644 index 0000000..2d03ab6 --- /dev/null +++ b/vtk-libharu.patch @@ -0,0 +1,12 @@ +diff -up VTK-9.0.0/ThirdParty/libharu/CMakeLists.txt.libharu VTK-9.0.0/ThirdParty/libharu/CMakeLists.txt +--- VTK-9.0.0/ThirdParty/libharu/CMakeLists.txt.libharu 2020-05-01 13:29:00.000000000 -0600 ++++ VTK-9.0.0/ThirdParty/libharu/CMakeLists.txt 2020-05-12 16:47:18.298133406 -0600 +@@ -8,7 +8,7 @@ vtk_module_third_party( + # Unreleased. Requires these PRs: + # https://github.com/libharu/libharu/pull/157 + # https://github.com/libharu/libharu/pull/187 +- VERSION 2.4.0 ++ VERSION 2.3.0 + TARGETS LibHaru::LibHaru + STANDARD_INCLUDE_DIRS) + diff --git a/vtk-limits.patch b/vtk-limits.patch new file mode 100644 index 0000000..e581628 --- /dev/null +++ b/vtk-limits.patch @@ -0,0 +1,60 @@ +diff --git a/Common/Core/vtkGenericDataArrayLookupHelper.h b/Common/Core/vtkGenericDataArrayLookupHelper.h +index ab9d57248f..202aaa27f4 100644 +--- a/Common/Core/vtkGenericDataArrayLookupHelper.h ++++ b/Common/Core/vtkGenericDataArrayLookupHelper.h +@@ -25,6 +25,7 @@ + #include "vtkIdList.h" + #include + #include ++#include + #include + #include + +diff --git a/Common/DataModel/Testing/Cxx/UnitTestLine.cxx b/Common/DataModel/Testing/Cxx/UnitTestLine.cxx +index 7b45f41202..223f4db7ef 100644 +--- a/Common/DataModel/Testing/Cxx/UnitTestLine.cxx ++++ b/Common/DataModel/Testing/Cxx/UnitTestLine.cxx +@@ -14,6 +14,7 @@ + =========================================================================*/ + + #include ++#include + + #include "vtkLine.h" + #include "vtkMath.h" +diff --git a/Common/DataModel/vtkPiecewiseFunction.cxx b/Common/DataModel/vtkPiecewiseFunction.cxx +index 22eca0bc22..11086f1dc4 100644 +--- a/Common/DataModel/vtkPiecewiseFunction.cxx ++++ b/Common/DataModel/vtkPiecewiseFunction.cxx +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + #include + #include + +diff --git a/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx b/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx +index a16bb27fc6..1052192c61 100644 +--- a/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx ++++ b/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx +@@ -27,6 +27,7 @@ + #include "vtkHyperTreeGridNonOrientedCursor.h" + + #include ++#include + + vtkStandardNewMacro(vtkHyperTreeGridThreshold); + +diff --git a/Rendering/Core/vtkColorTransferFunction.cxx b/Rendering/Core/vtkColorTransferFunction.cxx +index 55c046b4df..1be02919ab 100644 +--- a/Rendering/Core/vtkColorTransferFunction.cxx ++++ b/Rendering/Core/vtkColorTransferFunction.cxx +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + #include + #include + diff --git a/vtk-proj6_compat.patch b/vtk-proj6_compat.patch deleted file mode 100644 index 95e4a6d..0000000 --- a/vtk-proj6_compat.patch +++ /dev/null @@ -1,264 +0,0 @@ ---- a/CMake/FindLibPROJ.cmake -+++ b/CMake/FindLibPROJ.cmake -@@ -30,7 +30,7 @@ if ( NOT LibPROJ_INCLUDE_DIR OR NOT LibP - ) - - find_path( LibPROJ_INCLUDE_DIR -- NAMES proj_api.h -+ NAMES proj_api.h proj.h - HINTS - ${_LibPROJ_DIR} - ${_LibPROJ_DIR}/include ---- a/Geovis/Core/vtkGeoProjection.cxx -+++ b/Geovis/Core/vtkGeoProjection.cxx -@@ -72,6 +72,9 @@ public: - } - - std::map< std::string, std::string > OptionalParameters; -+#if PROJ_VERSION_MAJOR >= 5 -+ PJ_PROJ_INFO ProjInfo; -+#endif - }; - - //----------------------------------------------------------------------------- -@@ -80,7 +83,7 @@ int vtkGeoProjection::GetNumberOfProject - 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 +94,7 @@ const char* vtkGeoProjection::GetProject - 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 +102,7 @@ const char* vtkGeoProjection::GetProject - 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 +147,7 @@ void vtkGeoProjection::PrintSelf( ostrea - 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 +164,11 @@ const char* vtkGeoProjection::GetDescrip - { - return nullptr; - } -+#if PROJ_VERSION_MAJOR >= 5 -+ return this->Internals->ProjInfo.description; -+#else - return this->Projection->descr; -+#endif - } - //----------------------------------------------------------------------------- - projPJ vtkGeoProjection::GetProjection() -@@ -232,6 +239,9 @@ int vtkGeoProjection::UpdateProjection() - this->ProjectionMTime = this->GetMTime(); - if ( this->Projection ) - { -+#if PROJ_VERSION_MAJOR >= 5 -+ this->Internals->ProjInfo = proj_pj_info(this->Projection); -+#endif - return 0; - } - return 1; ---- a/Geovis/Core/vtkGeoTransform.cxx -+++ b/Geovis/Core/vtkGeoTransform.cxx -@@ -167,9 +167,17 @@ void vtkGeoTransform::InternalTransformP - double* coord = x; - for ( vtkIdType i = 0; i < numPts; ++ i ) - { -+#if PROJ_VERSION_MAJOR >= 5 -+ xy.x = coord[0]; xy.y = coord[1]; -+#else - xy.u = coord[0]; xy.v = coord[1]; -+#endif - lp = pj_inv( xy, src ); -+#if PROJ_VERSION_MAJOR >= 5 -+ coord[0] = lp.lam; coord[1] = lp.phi; -+#else - coord[0] = lp.u; coord[1] = lp.v; -+#endif - coord += stride; - } - } -@@ -191,9 +199,17 @@ void vtkGeoTransform::InternalTransformP - double* coord = x; - for ( vtkIdType i = 0; i < numPts; ++ i ) - { -+#if PROJ_VERSION_MAJOR >= 5 -+ lp.lam = coord[0]; lp.phi = coord[1]; -+#else - lp.u = coord[0]; lp.v = coord[1]; -+#endif - xy = pj_fwd( lp, dst ); -+#if PROJ_VERSION_MAJOR >= 5 -+ coord[0] = xy.x; coord[1] = xy.y; -+#else - coord[0] = xy.u; coord[1] = xy.v; -+#endif - coord += stride; - } - } ---- a/ThirdParty/libproj/vtk_libproj.h.in -+++ b/ThirdParty/libproj/vtk_libproj.h.in -@@ -15,10 +15,20 @@ - #ifndef vtk_libproj_h - #define vtk_libproj_h - -+#define VTK_LibPROJ_MAJOR_VERSION @LibPROJ_MAJOR_VERSION@ -+ - /* Use the libproj library configured for VTK. */ - #cmakedefine VTK_USE_SYSTEM_LIBPROJ - #ifdef VTK_USE_SYSTEM_LIBPROJ --# include -+# if VTK_LibPROJ_MAJOR_VERSION >= 5 -+# include -+# endif -+# if VTK_LibPROJ_MAJOR_VERSION < 6 -+# include -+# endif -+# if VTK_LibPROJ_MAJOR_VERSION >= 6 -+# define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H 1 -+# endif - # include - # include - #else ---- VTK-8.2.0/CMake/FindLibPROJ.cmake 2019-09-11 22:13:29.493741215 -0600 -+++ vtk/CMake/FindLibPROJ.cmake 2019-09-11 19:56:57.465802610 -0600 -@@ -1,55 +1,67 @@ --# Find LibPROJ library and header file --# Sets --# LibPROJ_FOUND to 0 or 1 depending on the result --# LibPROJ_INCLUDE_DIR to directories required for using libproj4 --# LibPROJ_LIBRARIES to libproj4 and any dependent libraries --# If LibPROJ_REQUIRED is defined, then a fatal error message will be generated if libproj4 is not found -- --if ( NOT LibPROJ_INCLUDE_DIR OR NOT LibPROJ_LIBRARIES OR NOT LibPROJ_FOUND ) -+find_path(LibPROJ_INCLUDE_DIR -+ NAMES proj_api.h proj.h -+ DOC "libproj include directories") -+mark_as_advanced(LibPROJ_INCLUDE_DIR) - -- if ( $ENV{LibPROJ_DIR} ) -- file( TO_CMAKE_PATH "$ENV{LibPROJ_DIR}" _LibPROJ_DIR ) -+find_library(LibPROJ_LIBRARY_RELEASE -+ NAMES proj -+ DOC "libproj release library") -+mark_as_advanced(LibPROJ_LIBRARY_RELEASE) -+ -+find_library(LibPROJ_LIBRARY_DEBUG -+ NAMES projd -+ DOC "libproj debug library") -+mark_as_advanced(LibPROJ_LIBRARY_DEBUG) -+ -+include(SelectLibraryConfigurations) -+select_library_configurations(LibPROJ) -+ -+if (LibPROJ_INCLUDE_DIR) -+ if (EXISTS "${LibPROJ_INCLUDE_DIR}/proj.h") -+ file(STRINGS "${LibPROJ_INCLUDE_DIR}/proj.h" _libproj_version_lines REGEX "#define[ \t]+PROJ_VERSION_(MAJOR|MINOR|PATCH)") -+ string(REGEX REPLACE ".*PROJ_VERSION_MAJOR *\([0-9]*\).*" "\\1" _libproj_version_major "${_libproj_version_lines}") -+ string(REGEX REPLACE ".*PROJ_VERSION_MINOR *\([0-9]*\).*" "\\1" _libproj_version_minor "${_libproj_version_lines}") -+ string(REGEX REPLACE ".*PROJ_VERSION_PATCH *\([0-9]*\).*" "\\1" _libproj_version_patch "${_libproj_version_lines}") -+ else () -+ file(STRINGS "${LibPROJ_INCLUDE_DIR}/proj_api.h" _libproj_version_lines REGEX "#define[ \t]+PJ_VERSION") -+ string(REGEX REPLACE ".*PJ_VERSION *\([0-9]*\).*" "\\1" _libproj_version "${_libproj_version_lines}") -+ math(EXPR _libproj_version_major "${_libproj_version} / 100") -+ math(EXPR _libproj_version_minor "(${_libproj_version} % 100) / 10") -+ math(EXPR _libproj_version_patch "${_libproj_version} % 10") - endif () -- -- set(LibPROJ_LIBRARY_SEARCH_PATHS -- ${_LibPROJ_DIR} -- ${_LibPROJ_DIR}/lib64 -- ${_LibPROJ_DIR}/lib -- ) -- -- find_library( LibPROJ_LIBRARY_RELEASE -- NAMES proj -- HINTS -- ${LibPROJ_LIBRARY_SEARCH_PATHS} -- ) -- -- find_library( LibPROJ_LIBRARY_DEBUG -- NAMES projd -- PATHS -- ${LibPROJ_LIBRARY_SEARCH_PATHS} -- ) -- -- find_path( LibPROJ_INCLUDE_DIR -- NAMES proj_api.h proj.h -- HINTS -- ${_LibPROJ_DIR} -- ${_LibPROJ_DIR}/include -- ) -- -- include(SelectLibraryConfigurations) -- select_library_configurations(LibPROJ) -- -- include(FindPackageHandleStandardArgs) -- find_package_handle_standard_args(LibPROJ -- REQUIRED_VARS LibPROJ_LIBRARY LibPROJ_INCLUDE_DIR) -- -- if(LibPROJ_FOUND) -- set(LibPROJ_INCLUDE_DIRS ${LibPROJ_INCLUDE_DIR}) -- -- if(NOT LibPROJ_LIBRARIES) -- set(LibPROJ_LIBRARIES ${LibPROJ_LIBRARY}) -- endif() -- endif() -+ set(LibPROJ_VERSION "${_libproj_version_major}.${_libproj_version_minor}.${_libproj_version_patch}") -+ set(LibPROJ_MAJOR_VERSION "${_libproj_version_major}") -+ unset(_libproj_version_major) -+ unset(_libproj_version_minor) -+ unset(_libproj_version_patch) -+ unset(_libproj_version) -+ unset(_libproj_version_lines) - endif () - --mark_as_advanced(LibPROJ_INCLUDE_DIR) -+include(FindPackageHandleStandardArgs) -+find_package_handle_standard_args(LibPROJ -+ REQUIRED_VARS LibPROJ_LIBRARY LibPROJ_INCLUDE_DIR -+ VERSION_VAR LibPROJ_VERSION) -+ -+if (LibPROJ_FOUND) -+ set(LibPROJ_INCLUDE_DIRS "${LibPROJ_INCLUDE_DIR}") -+ set(LibPROJ_LIBRARIES "${LibPROJ_LIBRARY}") -+ -+ if (NOT TARGET LibPROJ::LibPROJ) -+ add_library(LibPROJ::LibPROJ UNKNOWN IMPORTED) -+ set_target_properties(LibPROJ::LibPROJ PROPERTIES -+ INTERFACE_INCLUDE_DIRECTORIES "${LibPROJ_INCLUDE_DIR}") -+ if (LibPROJ_LIBRARY_RELEASE) -+ set_property(TARGET LibPROJ::LibPROJ APPEND PROPERTY -+ IMPORTED_CONFIGURATIONS RELEASE) -+ set_target_properties(LibPROJ::LibPROJ PROPERTIES -+ IMPORTED_LOCATION_RELEASE "${LibPROJ_LIBRARY_RELEASE}") -+ endif () -+ if (LibPROJ_LIBRARY_DEBUG) -+ set_property(TARGET LibPROJ::LibPROJ APPEND PROPERTY -+ IMPORTED_CONFIGURATIONS DEBUG) -+ set_target_properties(LibPROJ::LibPROJ PROPERTIES -+ IMPORTED_LOCATION_DEBUG "${LibPROJ_LIBRARY_DEBUG}") -+ endif () -+ endif () -+endif () diff --git a/vtk.spec b/vtk.spec index e137a55..f59cf2d 100644 --- a/vtk.spec +++ b/vtk.spec @@ -5,11 +5,11 @@ # '_ZZNSt8__detail18__to_chars_10_implIjEEvPcjT_E8__digits@@LLVM_11' %global _lto_cflags %{nil} -# Disable OSMesa builds for now - see Bug 744434 -%bcond_without OSMesa +# OSMesa and X support are mutually exclusive. +# TODO - buid separate OSMesa version if desired +%bcond_with OSMesa %bcond_without java %bcond_without mpich -%bcond_without qt5 %bcond_without openmpi # s390x on EL8 does not have xorg-x11-drv-dummy %if 0%{?rhel} @@ -34,86 +34,90 @@ Summary: The Visualization Toolkit - A high level 3D visualization library Name: vtk -Version: 8.2.0 -Release: 26%{?dist} +Version: 9.0.1 +Release: 1%{?dist} # 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 License: BSD -Source0: http://www.vtk.org/files/release/8.2/VTK-%{version}.tar.gz -Source1: http://www.vtk.org/files/release/8.2/VTKData-%{version}.tar.gz +Source0: https://www.vtk.org/files/release/9.0/VTK-%{version}.tar.gz +Source1: https://www.vtk.org/files/release/9.0/VTKData-%{version}.tar.gz Source2: xorg.conf -Source3: FindPEGTL.cmake -# Python 3.8 support -Patch0: https://gitlab.kitware.com/vtk/vtk/merge_requests/5883.patch -# Proj 6 support -Patch1: vtk-proj6_compat.patch -# GCC 10 support based on: -# https://gitlab.kitware.com/vtk/vtk/-/merge_requests/6420 -Patch2: vtk-gcc10.patch -# Qt 5.15 support -# https://gitlab.kitware.com/vtk/vtk/-/issues/18005 -Patch3: vtk-qt5.15.patch +# Patch required libharu version (Fedora 33+ contains the needed VTK patches) +Patch0: vtk-libharu.patch +Patch1: vtk-limits.patch +#Patch2: https://gitlab.kitware.com/vtk/vtk/-/merge_requests/7430.patch +Patch2: vtk-includes.patch +# Duplicate define conflict with Xutil, see: +# https://gitlab.kitware.com/vtk/vtk/-/issues/18048 +Patch3: vtk-AllValues.patch # Temporary patch for building against freetype-2.10.4, which removed FT_CALLBACK_DEF, # but was later re-added in https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=b0667d2d36fb134d48030b2a560eaaa37810d6ba Patch4: vtk_freetype-2.10.4.patch -URL: http://vtk.org/ +URL: https://vtk.org/ -BuildRequires: cmake -BuildRequires: gcc-c++ +BuildRequires: cmake +BuildRequires: gcc-c++ %{?with_java:BuildRequires: java-devel} -BuildRequires: libX11-devel, libXt-devel, libXext-devel -BuildRequires: libICE-devel, libGL-devel -%{?with_OSMesa:BuildRequires: mesa-libOSMesa-devel} -BuildRequires: tk-devel, tcl-devel -BuildRequires: python%{python3_pkgversion}-devel -BuildRequires: expat-devel, freetype-devel, libjpeg-devel, libpng-devel -%if 0%{with gl2ps} -BuildRequires: gl2ps-devel -%endif -BuildRequires: libtiff-devel, zlib-devel -BuildRequires: libxml2-devel -%if %{with qt5} -BuildRequires: cmake(Qt5) -BuildRequires: cmake(Qt5UiPlugin) -BuildRequires: cmake(Qt5X11Extras) -BuildRequires: qt5-qtwebkit-devel -BuildRequires: python%{python3_pkgversion}-qt5 -%else -BuildRequires: PyQt4-devel -BuildRequires: qt4-devel -BuildRequires: qtwebkit-devel -%endif -BuildRequires: chrpath -BuildRequires: doxygen, graphviz -BuildRequires: gnuplot -BuildRequires: boost-devel -BuildRequires: double-conversion-devel -BuildRequires: eigen3-devel -BuildRequires: glew-devel -BuildRequires: hdf5-devel -BuildRequires: jsoncpp-devel -BuildRequires: libtheora-devel -BuildRequires: mariadb-connector-c-devel -BuildRequires: netcdf-cxx-devel -BuildRequires: libpq-devel -BuildRequires: PEGTL-devel -BuildRequires: proj-devel -BuildRequires: pugixml-devel -BuildRequires: R-devel -BuildRequires: sqlite-devel -BuildRequires: wget %if %{with flexiblas} -BuildRequires: flexiblas-devel +BuildRequires: flexiblas-devel %else -BuildRequires: blas-devel -BuildRequires: lapack-devel +BuildRequires: blas-devel +BuildRequires: lapack-devel %endif -# Requires patched libharu https://github.com/libharu/libharu/pull/157 -#BuildRequires: libharu-devel -BuildRequires: lz4-devel -BuildRequires: motif-devel +BuildRequires: boost-devel +BuildRequires: double-conversion-devel +BuildRequires: eigen3-devel +BuildRequires: expat-devel +BuildRequires: freetype-devel +BuildRequires: gdal-devel +%if %{with gl2ps} +BuildRequires: gl2ps-devel +%endif +BuildRequires: glew-devel +BuildRequires: hdf5-devel +BuildRequires: jsoncpp-devel +BuildRequires: libarchive-devel +BuildRequires: libGL-devel +# Requires special patched version of libharu +BuildRequires: libharu-devel >= 2.3.0-9 +BuildRequires: libICE-devel +BuildRequires: libjpeg-devel +BuildRequires: libpng-devel +BuildRequires: libpq-devel +BuildRequires: libtheora-devel +BuildRequires: libtiff-devel +BuildRequires: libxml2-devel +BuildRequires: libX11-devel +BuildRequires: libXext-devel +BuildRequires: libXt-devel +BuildRequires: lz4-devel +BuildRequires: mariadb-connector-c-devel +%{?with_OSMesa:BuildRequires: mesa-libOSMesa-devel} +BuildRequires: motif-devel +BuildRequires: netcdf-cxx-devel +BuildRequires: openslide-devel +BuildRequires: PEGTL-devel +BuildRequires: proj-devel +BuildRequires: pugixml-devel +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-qt5 +BuildRequires: cmake(Qt5) +BuildRequires: cmake(Qt5UiPlugin) +BuildRequires: cmake(Qt5X11Extras) +BuildRequires: qt5-qtwebkit-devel +BuildRequires: R-devel +BuildRequires: sqlite-devel +BuildRequires: tcl-devel +BuildRequires: tk-devel +BuildRequires: utf8cpp-devel +BuildRequires: zlib-devel +BuildRequires: chrpath +BuildRequires: doxygen +BuildRequires: graphviz +BuildRequires: gnuplot +BuildRequires: wget %if %{with mpich} BuildRequires: mpich-devel BuildRequires: python%{?python3_pkgversion}-mpi4py-mpich @@ -126,11 +130,71 @@ BuildRequires: netcdf-openmpi-devel %endif # For %check %if %{with xdummy} -BuildRequires: xorg-x11-drv-dummy +BuildRequires: xorg-x11-drv-dummy +BuildRequires: mesa-dri-drivers %endif %{!?with_java:Conflicts: vtk-java} Requires: hdf5 = %{_hdf5_version} +# Almost every BR needs to be required by the -devel packages +%global vtk_devel_requires \ +Requires: cmake \ +%if %{with flexiblas} \ +Requires: flexiblas-devel%{?_isa} \ +%else \ +Requires: blas-devel%{?_isa} \ +Requires: lapack-devel%{?_isa} \ +%endif \ +Requires: blas-devel%{?_isa} \ +Requires: boost-devel%{?_isa} \ +Requires: double-conversion-devel%{?_isa} \ +# eigen3 is noarch \ +Requires: eigen3-devel \ +Requires: expat-devel%{?_isa} \ +Requires: freetype-devel%{?_isa} \ +Requires: gdal-devel%{?_isa} \ +%if %{with gl2ps} \ +Requires: gl2ps-devel%{?_isa} \ +%endif \ +Requires: glew-devel%{?_isa} \ +%if %{with java} \ +Requires: java-devel \ +%endif \ +Requires: jsoncpp-devel%{?_isa} \ +Requires: lapack-devel%{?_isa} \ +Requires: libarchive-devel%{?_isa} \ +Requires: libGL-devel%{?_isa} \ +Requires: libharu-devel%{?_isa} >= 2.3.0-9 \ +Requires: libjpeg-devel%{?_isa} \ +Requires: libogg-devel%{?_isa} \ +Requires: libpng-devel%{?_isa} \ +Requires: libpq-devel%{?_isa} \ +Requires: libtheora-devel%{?_isa} \ +Requires: libtiff-devel%{?_isa} \ +Requires: libxml2-devel%{?_isa} \ +Requires: libX11-devel%{?_isa} \ +Requires: libXext-devel%{?_isa} \ +Requires: libXt-devel%{?_isa} \ +Requires: lz4-devel%{?_isa} \ +Requires: mariadb-connector-c-devel%{?_isa} \ +%if %{with OSMesa} \ +Requires: mesa-libOSMesa-devel%{?_isa} \ +%endif \ +Requires: netcdf-cxx-devel%{?_isa} \ +Requires: openslide-devel%{?_isa} \ +Requires: PEGTL-devel%{?_isa} \ +Requires: proj-devel%{?_isa} \ +Requires: pugixml-devel%{?_isa} \ +# bz #1183210 + #1183530 \ +Requires: python%{python3_pkgversion}-devel \ +Requires: sqlite-devel%{?_isa} \ +Requires: cmake(Qt5) \ +Requires: cmake(Qt5UiPlugin) \ +Requires: cmake(Qt5X11Extras) \ +Requires: qt5-qtwebkit-devel%{?_isa} \ +Requires: utf8cpp-devel \ +Requires: zlib-devel%{?_isa} \ + # Bundled KWSys # https://fedorahosted.org/fpc/ticket/555 # Components used are specified in Utilities/KWSys/CMakeLists.txt @@ -155,10 +219,7 @@ Provides: bundled(ftgl) = 1.32 %if !%{with gl2ps} Provides: bundled(gl2ps) = 1.4.0 %endif -Provides: bundled(libharu) Provides: bundled(metaio) -Provides: bundled(pugixml) = 1.8 -Provides: bundled(utf8cpp) Provides: bundled(verdict) = 1.2.0 Provides: bundled(vpic) Provides: bundled(xdmf2) = 2.1 @@ -184,76 +245,32 @@ Install the %{name}-openmpi package to get a version compiled with openmpi. %package devel Summary: VTK header files for building C++ code -Requires: vtk%{?_isa} = %{version}-%{release} -Requires: python%{python3_pkgversion}-vtk%{?_isa} = %{version}-%{release} -Requires: python%{python3_pkgversion}-vtk-qt%{?_isa} = %{version}-%{release} -%{?with_OSMesa:Requires: mesa-libOSMesa-devel%{?_isa}} -Requires: cmake -%if %{with flexiblas} -Requires: flexiblas-devel%{?_isa} -%else -Requires: blas-devel%{?_isa} -Requires: lapack-devel%{?_isa} -%endif -Requires: double-conversion-devel%{?_isa} -# eigen3 is noarch -Requires: eigen3-devel -Requires: expat-devel%{?_isa} -Requires: freetype-devel%{?_isa} -%if %{with gl2ps} -Requires: gl2ps-devel%{?_isa} -%endif -Requires: glew-devel%{?_isa} +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: python%{python3_pkgversion}-%{name}%{?_isa} = %{version}-%{release} Requires: hdf5-devel%{?_isa} -Requires: libjpeg-devel%{?_isa} -Requires: lz4-devel%{?_isa} -Requires: libpng-devel%{?_isa} -Requires: libogg-devel%{?_isa} -Requires: libSM-devel%{?_isa} -Requires: libtheora-devel%{?_isa} -Requires: libtiff-devel%{?_isa} -Requires: libxml2-devel%{?_isa} -Requires: libpq-devel%{?_isa} -Requires: PEGTL-devel%{?_isa} -Requires: proj-devel%{?_isa} -Requires: pugixml-devel%{?_isa} -Requires: sqlite-devel%{?_isa} -Requires: libX11-devel%{?_isa} -Requires: libXext-devel%{?_isa} -Requires: libXt-devel%{?_isa} -Requires: mariadb-devel%{?_isa} -Requires: netcdf-cxx-devel%{?_isa} -%if %{with qt5} -Requires: cmake(Qt5) -Requires: cmake(Qt5UiPlugin) -Requires: cmake(Qt5X11Extras) -Requires: qt5-qtwebkit-devel%{?_isa} -%else -Requires: qt4-devel%{?_isa} -Requires: qtwebkit-devel%{?_isa} -%endif -Requires: jsoncpp-devel%{?_isa} -# bz #1183210 + #1183530 -Requires: python%{python3_pkgversion}-devel +Requires: netcdf-mpich-devel%{?_isa} +%{vtk_devel_requires} -%description devel +%description devel This provides the VTK header files required to compile C++ programs that use VTK to do 3D visualization. -%package -n python%{python3_pkgversion}-vtk +%package -n python%{python3_pkgversion}-%{name} Summary: Python 3 bindings for VTK Requires: vtk%{?_isa} = %{version}-%{release} %{?python_provide:%python_provide python%{python3_pkgversion}-vtk} Provides: %{py3_dist vtk} = %{version} Provides: python%{python3_version}dist(vtk) = %{version} +Obsoletes: python3-vtk-qt < 8.2.0-15 +Provides: python%{python3_pkgversion}-vtk-qt = %{version}-%{release} -%description -n python%{python3_pkgversion}-vtk +%description -n python%{python3_pkgversion}-%{name} Python 3 bindings for VTK. %if %{with java} %package java Summary: Java bindings for VTK -Requires: vtk%{?_isa} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} %description java Java bindings for VTK. @@ -261,19 +278,11 @@ Java bindings for VTK. %package qt Summary: Qt bindings for VTK -Requires: vtk%{?_isa} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} %description qt Qt bindings for VTK. -%package -n python%{python3_pkgversion}-vtk-qt -Summary: Qt Python 3 bindings for VTK -Requires: vtk%{?_isa} = %{version}-%{release} -%{?python_provide:%python_provide python%{python3_pkgversion}-vtk-qt} - -%description -n python%{python3_pkgversion}-vtk-qt -Qt Python 3 bindings for VTK. - %if %{with mpich} %package mpich Summary: The Visualization Toolkit - mpich version @@ -292,64 +301,31 @@ NOTE: The version in this package has been compiled with mpich support. %package mpich-devel Summary: VTK header files for building C++ code with mpich -Requires: vtk-mpich%{?_isa} = %{version}-%{release} -#Requires: python2-vtk%{?_isa} = %{version}-%{release} -#Requires: python2-vtk-qt%{?_isa} = %{version}-%{release} -%{?with_OSMesa:Requires: mesa-libOSMesa-devel%{?_isa}} -Requires: cmake +Requires: %{name}-mpich%{?_isa} = %{version}-%{release} +Requires: python%{python3_pkgversion}-%{name}-mpich%{?_isa} = %{version}-%{release} Requires: mpich-devel -%if %{with flexiblas} -Requires: flexiblas-devel%{?_isa} -%else -Requires: blas-devel%{?_isa} -Requires: lapack-devel%{?_isa} -%endif -%if 0%{with gl2ps} -Requires: gl2ps-devel%{?_isa} -%endif -Requires: expat-devel%{?_isa} -Requires: freetype-devel%{?_isa} Requires: hdf5-mpich-devel%{?_isa} -Requires: libjpeg-devel%{?_isa} -Requires: libpng-devel%{?_isa} -Requires: libogg-devel%{?_isa} -Requires: libtheora-devel%{?_isa} -Requires: libtiff-devel%{?_isa} -Requires: libxml2-devel%{?_isa} -Requires: libpq-devel%{?_isa} -Requires: mariadb-devel%{?_isa} -Requires: netcdf-cxx-devel%{?_isa} -Requires: netcdf-mpich-devel%{?_isa} -%if %{with qt5} -Requires: cmake(Qt5) -Requires: cmake(Qt5UiPlugin) -Requires: cmake(Qt5X11Extras) -Requires: qt5-qtwebkit-devel%{?_isa} -%else -Requires: qt4-devel%{?_isa} -Requires: qtwebkit-devel%{?_isa} -%endif -Requires: jsoncpp-devel%{?_isa} -# bz #1183210 + #1183530 -Requires: python%{python3_pkgversion}-devel +%{vtk_devel_requires} -%description mpich-devel +%description mpich-devel This provides the VTK header files required to compile C++ programs that use VTK to do 3D visualization. NOTE: The version in this package has been compiled with mpich support. -%package -n python%{python3_pkgversion}-vtk-mpich +%package -n python%{python3_pkgversion}-%{name}-mpich Summary: Python 3 bindings for VTK with mpich -Requires: vtk-mpich%{?_isa} = %{version}-%{release} +Requires: %{name}-mpich%{?_isa} = %{version}-%{release} +Obsoletes: python3-vtk-mpich-qt < 8.2.0-15 +Provides: python%{python3_pkgversion}-vtk-mpich-qt = %{version}-%{release} -%description -n python%{python3_pkgversion}-vtk-mpich +%description -n python%{python3_pkgversion}-%{name}-mpich python 3 bindings for VTK with mpich. %if %{with java} %package mpich-java Summary: Java bindings for VTK with mpich -Requires: vtk-mpich%{?_isa} = %{version}-%{release} +Requires: %{name}-mpich%{?_isa} = %{version}-%{release} %description mpich-java Java bindings for VTK with mpich. @@ -357,17 +333,10 @@ Java bindings for VTK with mpich. %package mpich-qt Summary: Qt bindings for VTK with mpich -Requires: vtk-mpich%{?_isa} = %{version}-%{release} +Requires: %{name}-mpich%{?_isa} = %{version}-%{release} %description mpich-qt Qt bindings for VTK with mpich. - -%package -n python%{python3_pkgversion}-vtk-mpich-qt -Summary: Qt Python 3 bindings for VTK with mpich -Requires: vtk-mpich%{?_isa} = %{version}-%{release} - -%description -n python%{python3_pkgversion}-vtk-mpich-qt -Qt Python 3 bindings for VTK with mpich. %endif %if %{with openmpi} @@ -388,64 +357,32 @@ NOTE: The version in this package has been compiled with openmpi support. %package openmpi-devel Summary: VTK header files for building C++ code with openmpi -Requires: vtk-openmpi%{?_isa} = %{version}-%{release} -#Requires: python2-vtk%{?_isa} = %{version}-%{release} -#Requires: python2-vtk-qt%{?_isa} = %{version}-%{release} -%{?with_OSMesa:Requires: mesa-libOSMesa-devel%{?_isa}} -Requires: cmake +Requires: %{name}-openmpi%{?_isa} = %{version}-%{release} +Requires: python%{python3_pkgversion}-%{name}-openmpi%{?_isa} = %{version}-%{release} Requires: openmpi-devel -%if %{with flexiblas} -Requires: flexiblas-devel%{?_isa} -%else -Requires: blas-devel%{?_isa} -Requires: lapack-devel%{?_isa} -%endif -%if 0%{with gl2ps} -Requires: gl2ps-devel%{?_isa} -%endif -Requires: expat-devel%{?_isa} -Requires: freetype-devel%{?_isa} Requires: hdf5-openmpi-devel%{?_isa} -Requires: libjpeg-devel%{?_isa} -Requires: libpng-devel%{?_isa} -Requires: libogg-devel%{?_isa} -Requires: libtheora-devel%{?_isa} -Requires: libtiff-devel%{?_isa} -Requires: libxml2-devel%{?_isa} -Requires: libpq-devel%{?_isa} -Requires: mariadb-devel%{?_isa} -Requires: netcdf-cxx-devel%{?_isa} Requires: netcdf-openmpi-devel%{?_isa} -%if %{with qt5} -Requires: cmake(Qt5) -Requires: cmake(Qt5UiPlugin) -Requires: cmake(Qt5X11Extras) -Requires: qt5-qtwebkit-devel%{?_isa} -%else -Requires: qt4-devel%{?_isa} -Requires: qtwebkit-devel%{?_isa} -%endif -Requires: jsoncpp-devel%{?_isa} -# bz #1183210 + #1183530 -Requires: python%{python3_pkgversion}-devel +%{vtk_devel_requires} -%description openmpi-devel +%description openmpi-devel This provides the VTK header files required to compile C++ programs that use VTK to do 3D visualization. NOTE: The version in this package has been compiled with openmpi support. -%package -n python%{python3_pkgversion}-vtk-openmpi +%package -n python%{python3_pkgversion}-%{name}-openmpi Summary: Python 3 bindings for VTK with openmpi -Requires: vtk-openmpi%{?_isa} = %{version}-%{release} +Requires: %{name}-openmpi%{?_isa} = %{version}-%{release} +Obsoletes: python3-vtk-openmpi-qt < 8.2.0-15 +Provides: python%{python3_pkgversion}-vtk-openmpi-qt = %{version}-%{release} -%description -n python%{python3_pkgversion}-vtk-openmpi +%description -n python%{python3_pkgversion}-%{name}-openmpi Python 3 bindings for VTK with openmpi. %if %{with java} %package openmpi-java Summary: Java bindings for VTK with openmpi -Requires: vtk-openmpi%{?_isa} = %{version}-%{release} +Requires: %{name}-openmpi%{?_isa} = %{version}-%{release} %endif %description openmpi-java @@ -453,17 +390,10 @@ Java bindings for VTK with openmpi. %package openmpi-qt Summary: Qt bindings for VTK with openmpi -Requires: vtk-openmpi%{?_isa} = %{version}-%{release} +Requires: %{name}-openmpi%{?_isa} = %{version}-%{release} %description openmpi-qt Qt bindings for VTK with openmpi. - -%package -n python%{python3_pkgversion}-vtk-openmpi-qt -Summary: Qt Python 3 bindings for VTK with openmpi -Requires: vtk-openmpi%{?_isa} = %{version}-%{release} - -%description -n python%{python3_pkgversion}-vtk-openmpi-qt -Qt Python 3 bindings for VTK with openmpi. %endif %package data @@ -476,14 +406,14 @@ VTK data files for tests and examples. %package testing Summary: Testing programs for VTK -Requires: vtk%{?_isa} = %{version}-%{release}, vtk-data = %{version} +Requires: %{name}%{?_isa} = %{version}-%{release}, %{name}-data = %{version} %description testing Testing programs for VTK %package examples Summary: Examples for VTK -Requires: vtk%{?_isa} = %{version}-%{release}, vtk-data = %{version} +Requires: %{name}%{?_isa} = %{version}-%{release}, %{name}-data = %{version} %description examples This package contains many well-commented examples showing how to use @@ -493,28 +423,23 @@ programming languages. %prep %setup -q -b 1 -n VTK-%{version} -%patch0 -p1 -b .py38 -%patch1 -p1 -b .proj6 -%patch2 -p1 -b .gcc10 -%patch3 -p1 -b .qt5.15 +%patch0 -p1 -b .libharu +%patch1 -p1 -b .limits +%patch2 -p1 -b .includes +%patch3 -p1 -b .AllValues %patch4 -p1 -b .freetype # Remove included thirdparty sources just to be sure # TODO - diy2 - not yet packaged # TODO - exodusII - not yet packaged -# TODO - pugixml - https://gitlab.kitware.com/vtk/vtk/issues/17538 -# TODO - utf8cpp(source) - http://www.vtk.org/Bug/view.php?id=15730 # TODO - verdict - not yet packaged # TODO - VPIC - not yet packaged # TODO - xdmf2 - not yet packaged # TODO - xdmf3 - not yet packaged -for x in vtk{doubleconversion,eigen,expat,freetype,%{?_with_gl2ps:gl2ps,}glew,hdf5,jpeg,jsoncpp,kissfft,libproj,libxml2,lz4,lzma,mpi4py,netcdf,ogg,pegtl,png,sqlite,theora,tiff,zfp,zlib} +for x in vtk{doubleconversion,eigen,expat,freetype,%{?with_gl2ps:gl2ps,}glew,hdf5,jpeg,jsoncpp,kissfft,libharu,libproj,libxml2,lz4,lzma,mpi4py,netcdf,ogg,pegtl,png,pugixml,sqlite,theora,tiff,utf8,zfp,zlib} do rm -r ThirdParty/*/${x} done -# Needed to find PEGTL -cp %SOURCE3 CMake/FindPEGTL.cmake - # Remove unused KWSys items find Utilities/KWSys/vtksys/ -name \*.[ch]\* | grep -vE '^Utilities/KWSys/vtksys/([a-z].*|Configure|SharedForward|String\.hxx|Base64|CommandLineArguments|Directory|DynamicLoader|Encoding|FStream|FundamentalType|Glob|MD5|Process|RegularExpression|System|SystemInformation|SystemTools)(C|CXX|UNIX)?\.' | xargs rm @@ -525,6 +450,7 @@ cp -a Examples vtk-examples rm -r vtk-examples/Examples/GUI/Win32 find vtk-examples -type f | xargs chmod -R a-x + %build export CFLAGS="%{optflags} -D_UNICODE -DHAVE_UINTPTR_T" export CXXFLAGS="%{optflags} -D_UNICODE -DHAVE_UINTPTR_T" @@ -538,19 +464,30 @@ export JAVA_TOOL_OPTIONS=-Xmx2048m %endif %global vtk_cmake_options \\\ + -DCMAKE_INSTALL_DOCDIR=share/doc/%{name} \\\ + -DCMAKE_INSTALL_JARDIR=share/java \\\ + -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \\\ + -DCMAKE_INSTALL_JNILIBDIR:PATH=%{_lib}/%{name} \\\ + -DCMAKE_INSTALL_LICENSEDIR:PATH=share/licenses/%{name} \\\ -DVTK_CUSTOM_LIBRARY_SUFFIX="" \\\ - -DVTK_INSTALL_ARCHIVE_DIR:PATH=%{_lib} \\\ - -DVTK_INSTALL_DATA_DIR=share/vtk \\\ - -DVTK_INSTALL_INCLUDE_DIR:PATH=include/vtk \\\ - -DVTK_INSTALL_LIBRARY_DIR:PATH=%{_lib} \\\ - -DVTK_INSTALL_PACKAGE_DIR:PATH=%{_lib}/cmake/vtk \\\ + -DVTK_INSTALL_DATA_DIR=share/%{name} \\\ + -DVTK_INSTALL_INCLUDE_DIR:PATH=include/%{name} \\\ + -DVTK_INSTALL_PACKAGE_DIR:PATH=%{_lib}/cmake/%{name} \\\ + -DVTK_VERSIONED_INSTALL:BOOL=OFF \\\ + -DVTK_GROUP_ENABLE_Imaging:STRING=YES \\\ + -DVTK_GROUP_ENABLE_Qt:STRING=YES \\\ + -DVTK_GROUP_ENABLE_Rendering:STRING=YES \\\ + -DVTK_GROUP_ENABLE_StandAlone:STRING=YES \\\ + -DVTK_GROUP_ENABLE_Views:STRING=YES \\\ + -DVTK_GROUP_ENABLE_Web:STRING=YES \\\ + -DVTK_MODULE_ENABLE_VTK_CommonArchive:STRING=YES \\\ + -DVTK_MODULE_ENABLE_VTK_DomainsMicroscopy:STRING=YES \\\ + -DVTK_MODULE_ENABLE_VTK_GeovisGDAL:STRING=YES \\\ + -DVTK_MODULE_ENABLE_VTK_ImagingOpenGL2:STRING=YES \\\ + -DVTK_MODULE_ENABLE_VTK_InfovisBoost:STRING=YES \\\ + -DVTK_MODULE_ENABLE_VTK_InfovisBoostGraphAlgorithms:STRING=YES \\\ + -DVTK_MODULE_ENABLE_VTK_IOMySQL:STRING=YES \\\ -DVTK_PYTHON_VERSION=3 \\\ -%if %{with qt5} \ - -DVTK_INSTALL_QT_DIR:PATH=%{_lib}/qt5/plugins/designer \\\ -%else \ - -DVTK_INSTALL_QT_DIR:PATH=%{_lib}/qt4/plugins/designer \\\ -%endif \ - -DTK_INTERNAL_PATH:PATH=/usr/include/tk-private/generic \\\ %if %{with OSMesa} \ -DVTK_OPENGL_HAS_OSMESA:BOOL=ON \\\ %endif \ @@ -563,62 +500,38 @@ export JAVA_TOOL_OPTIONS=-Xmx2048m -DVTK_WRAP_JAVA:BOOL=OFF \\\ %endif \ -DVTK_WRAP_PYTHON:BOOL=ON \\\ - -DVTK_Group_Imaging:BOOL=ON \\\ - -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 \\\ - -DModule_vtkIOExportOpenGL2:BOOL=ON \\\ - -DModule_vtkIOMySQL:BOOL=ON \\\ - -DModule_vtkIOPostgreSQL:BOOL=ON \\\ - -DModule_vtkRenderingParallel:BOOL=ON \\\ - -DModule_vtkTestingCore:BOOL=ON \\\ - -DModule_vtkTestingRendering:BOOL=ON \\\ -%if %{with qt5} \ - -DVTK_QT_VERSION:STRING="5" \\\ -%endif \ -DVTK_USE_OGGTHEORA_ENCODER=ON \\\ - -DVTK_USE_SYSTEM_LIBRARIES=ON \\\ - %{?vtk_use_system_gl2ps} \\\ - -DVTK_USE_SYSTEM_HDF5:BOOL=ON \\\ - -DVTK_USE_SYSTEM_LIBHARU=OFF \\\ - -DVTK_USE_SYSTEM_NETCDF:BOOL=ON -# Commented old flags in case we'd like to reactive some of them -# -DVTK_USE_DISPLAY:BOOL=OFF \ # This prevents building of graphics tests + -DVTK_USE_EXTERNAL=ON \\\ +%if !%{with gl2ps} \ + -DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps:BOOL=OFF \\\ +%endif \ + -DVTK_USE_TK=ON +# https://gitlab.kitware.com/cmake/cmake/issues/17223 +#-DVTK_MODULE_ENABLE_VTK_IOPostgreSQL:STRING=YES \\\ %global _vpath_builddir build %cmake \ %{vtk_cmake_options} \ %{?with_flexiblas:-DBLAS_LIBRARIES=-lflexiblas} \ - -DBUILD_DOCUMENTATION:BOOL=ON \ - -DBUILD_EXAMPLES:BOOL=ON \ - -DBUILD_TESTING:BOOL=ON + -DVTK_BUILD_DOCUMENTATION:BOOL=ON \ + -DVTK_BUILD_EXAMPLES:BOOL=ON \ + -DVTK_BUILD_TESTING:BOOL=ON %cmake_build -%cmake_build --target DoxygenDoc vtkMyDoxygenDoc +%cmake_build --target DoxygenDoc %if %{with mpich} %global _vpath_builddir build-mpich %_mpich_load -export CC=mpicc -export CXX=mpic++ +%define __cc mpicc +%define __cxx mpic++ %cmake \ %{vtk_cmake_options} \ -DCMAKE_PREFIX_PATH:PATH=$MPI_HOME \ -DCMAKE_INSTALL_PREFIX:PATH=$MPI_HOME \ - -DVTK_INSTALL_ARCHIVE_DIR:PATH=lib \ - -DVTK_INSTALL_LIBRARY_DIR:PATH=lib \ + -DCMAKE_INSTALL_LIBDIR:PATH=lib \ + -DCMAKE_INSTALL_JNILIBDIR:PATH=lib/%{name} \ -DVTK_INSTALL_PACKAGE_DIR:PATH=lib/cmake \ -%if %{with qt5} - -DVTK_INSTALL_QT_DIR:PATH=lib/qt5/plugins/designer \ -%else - -DVTK_INSTALL_QT_DIR:PATH=lib/qt4/plugins/designer \ -%endif - -DVTK_Group_MPI:BOOL=ON \ - -DModule_vtkRenderingParallel:BOOL=ON \ - -DVTK_USE_PARALLEL:BOOL=ON \ - -DVTK_USE_SYSTEM_DIY2:BOOL=OFF \ - -DVTK_USE_SYSTEM_MPI4PY:BOOL=ON + -DVTK_USE_MPI:BOOL=ON %cmake_build %_mpich_unload %endif @@ -626,25 +539,16 @@ export CXX=mpic++ %if %{with openmpi} %global _vpath_builddir build-openmpi %_openmpi_load -export CC=mpicc -export CXX=mpic++ +%define __cc mpicc +%define __cxx mpic++ %cmake \ %{vtk_cmake_options} \ -DCMAKE_PREFIX_PATH:PATH=$MPI_HOME \ -DCMAKE_INSTALL_PREFIX:PATH=$MPI_HOME \ - -DVTK_INSTALL_ARCHIVE_DIR:PATH=lib \ - -DVTK_INSTALL_LIBRARY_DIR:PATH=lib \ + -DCMAKE_INSTALL_LIBDIR:PATH=lib \ + -DCMAKE_INSTALL_JNILIBDIR:PATH=lib/%{name} \ -DVTK_INSTALL_PACKAGE_DIR:PATH=lib/cmake \ -%if %{with qt5} - -DVTK_INSTALL_QT_DIR:PATH=lib/qt5/plugins/designer \ -%else - -DVTK_INSTALL_QT_DIR:PATH=lib/qt4/plugins/designer \ -%endif - -DVTK_Group_MPI:BOOL=ON \ - -DModule_vtkRenderingParallel:BOOL=ON \ - -DVTK_USE_PARALLEL:BOOL=ON \ - -DVTK_USE_SYSTEM_DIY2:BOOL=OFF \ - -DVTK_USE_SYSTEM_MPI4PY:BOOL=ON + -DVTK_USE_MPI:BOOL=ON %cmake_build %_openmpi_unload %endif @@ -659,59 +563,31 @@ find . -name \*.c -or -name \*.cxx -or -name \*.h -or -name \*.hxx -or \ %cmake_install pushd build -# Gather list of non-python/tcl libraries +# Gather list of non-java/python/qt libraries ls %{buildroot}%{_libdir}/*.so.* \ - | grep -Ev '(Java|Qt|Python..D|TCL)' | sed -e's,^%{buildroot},,' > libs.list - -# List of executable examples -cat > examples.list << EOF -HierarchicalBoxPipeline -MultiBlock -Arrays -Cube -RGrid -SGrid -Medical1 -Medical2 -Medical3 -finance -AmbientSpheres -Cylinder -DiffuseSpheres -SpecularSpheres -Cone -Cone2 -Cone3 -Cone4 -Cone5 -Cone6 -EOF + | grep -Ev '(Java|Qt|Python)' | sed -e's,^%{buildroot},,' > libs.list # List of executable test binaries find bin \( -name \*Tests -o -name Test\* -o -name VTKBenchMark \) \ -printf '%f\n' > testing.list # Install examples too -for filelist in examples.list testing.list; do +for filelist in testing.list; do for file in `cat $filelist`; do install -p bin/$file %{buildroot}%{_bindir} done done # Fix up filelist paths -for filelist in examples.list testing.list; do +for filelist in testing.list; do perl -pi -e's,^,%{_bindir}/,' $filelist done # Remove any remnants of rpaths on files we install # Seems to be some kind of java path -for file in `cat examples.list testing.list`; do +for file in `cat testing.list`; do chrpath -d %{buildroot}$file done -chrpath -d %{buildroot}%{_libdir}/qt?/plugins/designer/libQVTKWidgetPlugin.so - -# Main package contains utils and core libs -cat libs.list popd %if %{with mpich} @@ -719,9 +595,12 @@ popd %global _vpath_builddir build-mpich %cmake_install -# Gather list of non-python/tcl libraries +# Gather list of non-java/pythonl/qt libraries ls %{buildroot}%{_libdir}/mpich/lib/*.so.* \ - | grep -Ev '(Java|Qt|Python..D|TCL)' | sed -e's,^%{buildroot},,' > build-mpich/libs.list + | grep -Ev '(Java|Python|Qt)' | sed -e's,^%{buildroot},,' > build-mpich/libs.list + +# Move licenses since we cannot install them outside of CMAKE_INSTALL_PREFIX (MPI_HOME) +mv %{buildroot}%{_libdir}/mpich/share/licenses/vtk %{buildroot}%{_defaultlicensedir}/%{name}-mpich %_mpich_unload %endif @@ -730,9 +609,12 @@ ls %{buildroot}%{_libdir}/mpich/lib/*.so.* \ %global _vpath_builddir build-openmpi %cmake_install -# Gather list of non-python/tcl libraries +# Gather list of non-java/python//qt libraries ls %{buildroot}%{_libdir}/openmpi/lib/*.so.* \ - | grep -Ev '(Java|Qt|Python..D|TCL)' | sed -e's,^%{buildroot},,' > build-openmpi/libs.list + | grep -Ev '(Java|Python|Qt)' | sed -e's,^%{buildroot},,' > build-openmpi/libs.list + +# Move licenses since we cannot install them outside of CMAKE_INSTALL_PREFIX (MPI_HOME) +mv %{buildroot}%{_libdir}/openmpi/share/licenses/vtk %{buildroot}%{_defaultlicensedir}/%{name}-openmpi %_openmpi_unload %endif @@ -746,12 +628,13 @@ find Utilities/Upgrading -type f -print0 | xargs -0 chmod -x # Setup Wrapping docs tree mkdir -p _docs -cp -pr --parents Wrapping/*/README* _docs/ +cp -pr --parents Wrapping/*/README* _docs/ #Install data mkdir -p %{buildroot}%{_datadir}/vtkdata cp -alL build/ExternalData/* %{buildroot}%{_datadir}/vtkdata/ + %check cp %SOURCE2 . %if %{with xdummy} @@ -773,22 +656,23 @@ cat xorg.log %files -f build/libs.list -%license Copyright.txt +%license %{_defaultlicensedir}/%{name}/ %doc README.md _docs/Wrapping %files devel %doc Utilities/Upgrading +%{_bindir}/vtkProbeOpenGLVersion %{_bindir}/vtkWrapHierarchy -%{_includedir}/vtk +%{_includedir}/%{name} %{_libdir}/*.so -%{_libdir}/libvtkWrappingTools.a -%{_libdir}/cmake/vtk/ -%{_docdir}/vtk-8.2/ +%{_libdir}/cmake/%{name}/ +%dir %{_libdir}/%{name} +%{_libdir}/%{name}/hierarchy/ +%{_docdir}/%{name}-9.0/ %files -n python%{python3_pkgversion}-vtk %{python3_sitearch}/* -%{_libdir}/*Python%{python3_version_nodots}D.so.* -%exclude %{_libdir}/*QtPython%{python3_version_nodots}D.so.* +%{_libdir}/*Python*.so.* %{_bindir}/vtkpython %{_bindir}/vtkWrapPython %{_bindir}/vtkWrapPythonInit @@ -796,36 +680,34 @@ cat xorg.log %if %{with java} %files java %{_libdir}/*Java.so.* -%{_libdir}/vtk.jar +%dir %{_libdir}/%{name} +%{_libdir}/%{name}/*Java.so +%{_javadir}/vtk.jar %{_bindir}/vtkParseJava %{_bindir}/vtkWrapJava %endif %files qt %{_libdir}/lib*Qt*.so.* -%exclude %{_libdir}/*Python%{python3_version_nodots}D.so.* -%{_libdir}/qt?/plugins/designer/libQVTKWidgetPlugin.so - -%files -n python%{python3_pkgversion}-vtk-qt -%{_libdir}/*QtPython%{python3_version_nodots}D.so.* +%exclude %{_libdir}/*Python*.so.* %if %{with mpich} %files mpich -f build-mpich/libs.list -%license Copyright.txt +%license %{_defaultlicensedir}/%{name}-mpich/ %doc README.md _docs/Wrapping %files mpich-devel +%{_libdir}/mpich/bin/vtkProbeOpenGLVersion %{_libdir}/mpich/bin/vtkWrapHierarchy %{_libdir}/mpich/include/ %{_libdir}/mpich/lib/*.so -%{_libdir}/mpich/lib/libvtkWrappingTools.a %{_libdir}/mpich/lib/cmake/ -%{_libdir}/mpich/share/doc/vtk-8.2/ +%dir %{_libdir}/mpich/lib/%{name} +%{_libdir}/mpich/lib/%{name}/hierarchy/ %files -n python%{python3_pkgversion}-vtk-mpich %{_libdir}/mpich/lib/python%{python3_version}/ -%{_libdir}/mpich/lib/*Python%{python3_version_nodots}D.so.* -%exclude %{_libdir}/mpich/lib/*QtPython%{python3_version_nodots}D.so.* +%{_libdir}/mpich/lib/*Python*.so.* %{_libdir}/mpich/bin/pvtkpython %{_libdir}/mpich/bin/vtkpython %{_libdir}/mpich/bin/vtkWrapPython @@ -834,38 +716,35 @@ cat xorg.log %if %{with java} %files mpich-java %{_libdir}/mpich/lib/*Java.so.* -%{_libdir}/mpich/lib/vtk.jar +%dir %{_libdir}/mpich/lib/%{name} +%{_libdir}/mpich/lib/%{name}/*Java.so +%{_libdir}/mpich/share/java/vtk.jar %{_libdir}/mpich/bin/vtkParseJava %{_libdir}/mpich/bin/vtkWrapJava %endif %files mpich-qt %{_libdir}/mpich/lib/lib*Qt*.so.* -%exclude %{_libdir}/mpich/lib/*Python%{python3_version_nodots}D.so.* -%{_libdir}/mpich/lib/qt?/ - -%files -n python%{python3_pkgversion}-vtk-mpich-qt -%{_libdir}/mpich/lib/*QtPython%{python3_version_nodots}D.so.* +%exclude %{_libdir}/mpich/lib/*Python*.so.* %endif %if %{with openmpi} %files openmpi -f build-openmpi/libs.list -%license Copyright.txt +%license %{_defaultlicensedir}/%{name}-openmpi/ %doc README.md _docs/Wrapping %files openmpi-devel +%{_libdir}/openmpi/bin/vtkProbeOpenGLVersion %{_libdir}/openmpi/bin/vtkWrapHierarchy %{_libdir}/openmpi/include/ %{_libdir}/openmpi/lib/*.so -%{_libdir}/openmpi/lib/libvtkWrappingTools.a %{_libdir}/openmpi/lib/cmake/ -%{_libdir}/openmpi/share/doc/vtk-8.2/ - +%dir %{_libdir}/openmpi/lib/%{name} +%{_libdir}/openmpi/lib/%{name}/hierarchy/ %files -n python%{python3_pkgversion}-vtk-openmpi %{_libdir}/openmpi/lib/python%{python3_version}/ -%{_libdir}/openmpi/lib/*Python%{python3_version_nodots}D.so.* -%exclude %{_libdir}/openmpi/lib/*QtPython%{python3_version_nodots}D.so.* +%{_libdir}/openmpi/lib/*Python*.so.* %{_libdir}/openmpi/bin/pvtkpython %{_libdir}/openmpi/bin/vtkpython %{_libdir}/openmpi/bin/vtkWrapPython @@ -874,18 +753,16 @@ cat xorg.log %if %{with java} %files openmpi-java %{_libdir}/openmpi/lib/*Java.so.* -%{_libdir}/openmpi/lib/vtk.jar +%dir %{_libdir}/openmpi/lib/%{name} +%{_libdir}/openmpi/lib/%{name}/*Java.so +%{_libdir}/openmpi/share/java/vtk.jar %{_libdir}/openmpi/bin/vtkParseJava %{_libdir}/openmpi/bin/vtkWrapJava %endif %files openmpi-qt %{_libdir}/openmpi/lib/lib*Qt*.so.* -%exclude %{_libdir}/openmpi/lib/*Python27D.so.* -%{_libdir}/openmpi/lib/qt?/ - -%files -n python%{python3_pkgversion}-vtk-openmpi-qt -%{_libdir}/openmpi/lib/*QtPython%{python3_version_nodots}D.so.* +%exclude %{_libdir}/openmpi/lib/*Python*.so.* %endif %files data @@ -893,11 +770,21 @@ cat xorg.log %files testing -f build/testing.list -%files examples -f build/examples.list +%files examples %doc vtk-examples/Examples %changelog +* Sat Jan 30 2021 Orion Poplawski - 9.0.1-1 +- Update to 9.0.1 +- Disable OSMesa - conflicts with X support +- Build against Fedora gl2ps, libharu, utf8cpp +- Drop python3-vtk-qt packages +- No longer ship compiled examples +- Install jar file into /usr/share/java +- Fix JNI install location +- Drop Qt4 build option + * Wed Jan 27 2021 Fedora Release Engineering - 8.2.0-26 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild @@ -1430,11 +1317,11 @@ cat xorg.log * Sun Jan 11 2004 Intrinsic Spin - Built against a reasonably good (according to dashboard) CVS version so-as to get GL2PS support. -- Rearranged. Cleaned up. Added some comments. +- Rearranged. Cleaned up. Added some comments. * Sat Jan 10 2004 Intrinsic Spin - Blatently stole this spec file for my own nefarious purposes. -- Removed Java (for now). Merged the Python and Tcl stuff into +- Removed Java (for now). Merged the Python and Tcl stuff into the main rpm. * Fri Dec 05 2003 Fabrice Bellet diff --git a/vtk_freetype-2.10.4.patch b/vtk_freetype-2.10.4.patch index d8469a5..4ae8269 100644 --- a/vtk_freetype-2.10.4.patch +++ b/vtk_freetype-2.10.4.patch @@ -1,23 +1,6 @@ -diff -rupN VTK-8.2.0/Rendering/FreeType/vtkFreeTypeTools.cxx VTK-8.2.0-new/Rendering/FreeType/vtkFreeTypeTools.cxx ---- VTK-8.2.0/Rendering/FreeType/vtkFreeTypeTools.cxx 2019-01-30 18:15:13.000000000 +0100 -+++ VTK-8.2.0-new/Rendering/FreeType/vtkFreeTypeTools.cxx 2020-11-06 00:21:07.259999338 +0100 -@@ -387,6 +387,13 @@ FTC_CMapCache* vtkFreeTypeTools::GetCMap - } - - //---------------------------------------------------------------------------- -+#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 */ - FT_CALLBACK_DEF(FT_Error) - vtkFreeTypeToolsFaceRequester(FTC_FaceID face_id, - FT_Library lib, -diff -rupN VTK-8.2.0/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx VTK-8.2.0-new/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx ---- VTK-8.2.0/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx 2019-01-30 18:15:13.000000000 +0100 -+++ VTK-8.2.0-new/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx 2020-11-06 00:21:25.588991839 +0100 +diff -up VTK-9.0.1/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx.freetype VTK-9.0.1/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx +--- VTK-9.0.1/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx.freetype 2021-01-23 17:24:14.600721579 -0700 ++++ VTK-9.0.1/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx 2021-01-23 17:25:05.457127603 -0700 @@ -29,6 +29,13 @@ vtkStandardNewMacro(vtkFontConfigFreeTyp namespace { @@ -30,5 +13,22 @@ diff -rupN VTK-8.2.0/Rendering/FreeTypeFontConfig/vtkFontConfigFreeTypeTools.cxx +#endif +#endif /* FT_CALLBACK_DEF */ FT_CALLBACK_DEF(FT_Error) - vtkFontConfigFreeTypeToolsFaceRequester(FTC_FaceID face_id, - FT_Library lib, + vtkFontConfigFreeTypeToolsFaceRequester( + FTC_FaceID face_id, FT_Library lib, FT_Pointer request_data, FT_Face* face) +diff -up VTK-9.0.1/Rendering/FreeType/vtkFreeTypeTools.cxx.freetype VTK-9.0.1/Rendering/FreeType/vtkFreeTypeTools.cxx +--- VTK-9.0.1/Rendering/FreeType/vtkFreeTypeTools.cxx.freetype 2021-01-23 17:24:14.600721579 -0700 ++++ VTK-9.0.1/Rendering/FreeType/vtkFreeTypeTools.cxx 2021-01-23 17:25:49.546479602 -0700 +@@ -378,6 +378,13 @@ FTC_CMapCache* vtkFreeTypeTools::GetCMap + } + + //---------------------------------------------------------------------------- ++#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 */ + FT_CALLBACK_DEF(FT_Error) + vtkFreeTypeToolsFaceRequester( + FTC_FaceID face_id, FT_Library lib, FT_Pointer request_data, FT_Face* face)