Compare commits
8 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
960e9c990b | ||
|
|
be948bbc62 | ||
|
|
30d30fd785 | ||
|
|
f3f43d7d3f | ||
|
|
90fb492b5a | ||
|
|
d71abbaa42 | ||
|
|
5b5b5ec525 | ||
|
|
d0b3d7e84a |
11 changed files with 267 additions and 698 deletions
14
.gitignore
vendored
14
.gitignore
vendored
|
|
@ -31,17 +31,3 @@ vtk-5.6.0.tar.gz
|
|||
/VTKData-9.2.5.tar.gz
|
||||
/VTK-9.2.6.tar.gz
|
||||
/VTKData-9.2.6.tar.gz
|
||||
/VTK-9.3.0.tar.gz
|
||||
/VTKData-9.3.0.tar.gz
|
||||
/VTK-9.3.1.tar.gz
|
||||
/VTKData-9.3.1.tar.gz
|
||||
/VTK-9.4.1.tar.gz
|
||||
/VTKData-9.4.1.tar.gz
|
||||
/VTK-9.4.2.tar.gz
|
||||
/VTKData-9.4.2.tar.gz
|
||||
/VTK-9.5.0.tar.gz
|
||||
/VTKData-9.5.0.tar.gz
|
||||
/VTK-9.5.1.tar.gz
|
||||
/VTKData-9.5.1.tar.gz
|
||||
/VTK-9.5.2.tar.gz
|
||||
/VTKData-9.5.2.tar.gz
|
||||
|
|
|
|||
79
9616.patch
Normal file
79
9616.patch
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
From a2ca9a079ecc8926f6ddf7a72803340a4944e7cf Mon Sep 17 00:00:00 2001
|
||||
From: Eric Larson <larson.eric.d@gmail.com>
|
||||
Date: Tue, 11 Oct 2022 12:12:38 -0400
|
||||
Subject: [PATCH] BUG: Fix bug with vtkPlotBar.GetLookupTable()
|
||||
|
||||
Also remove old nullptr assignments as they are unnecessary
|
||||
when using vtkSmartPointer.
|
||||
---
|
||||
.../Core/Testing/Cxx/TestPlotBarRangeHandlesItem.cxx | 2 ++
|
||||
Charts/Core/vtkPlotBar.cxx | 10 +++++++---
|
||||
.../release/dev/fix-vtkPlotBar-GetLookupTable.md | 4 ++++
|
||||
3 files changed, 13 insertions(+), 3 deletions(-)
|
||||
create mode 100644 Documentation/release/dev/fix-vtkPlotBar-GetLookupTable.md
|
||||
|
||||
diff --git a/Charts/Core/Testing/Cxx/TestPlotBarRangeHandlesItem.cxx b/Charts/Core/Testing/Cxx/TestPlotBarRangeHandlesItem.cxx
|
||||
index 2d0ed46b128..919319a6b4d 100644
|
||||
--- a/Charts/Core/Testing/Cxx/TestPlotBarRangeHandlesItem.cxx
|
||||
+++ b/Charts/Core/Testing/Cxx/TestPlotBarRangeHandlesItem.cxx
|
||||
@@ -88,6 +88,8 @@ int TestPlotBarRangeHandlesItem(int, char*[])
|
||||
|
||||
// Add bar plot and handles
|
||||
vtkPlotBar* barPlot = vtkPlotBar::SafeDownCast(chart->AddPlot(vtkChart::BAR));
|
||||
+ // smoke test for https://gitlab.kitware.com/vtk/vtk/-/issues/18682#note_1258974
|
||||
+ barPlot->GetLookupTable();
|
||||
barPlot->SetInputData(table, "Months", "Books");
|
||||
chart->SetBarWidthFraction(1.0);
|
||||
|
||||
diff --git a/Charts/Core/vtkPlotBar.cxx b/Charts/Core/vtkPlotBar.cxx
|
||||
index a68a26c0ecd..220e8199d02 100644
|
||||
--- a/Charts/Core/vtkPlotBar.cxx
|
||||
+++ b/Charts/Core/vtkPlotBar.cxx
|
||||
@@ -535,12 +535,11 @@ vtkStandardNewMacro(vtkPlotBar);
|
||||
vtkPlotBar::vtkPlotBar()
|
||||
{
|
||||
this->Private = new vtkPlotBarPrivate(this);
|
||||
+ // Points is not a vtkSmartPointer, so set it explicitly to nullptr
|
||||
this->Points = nullptr;
|
||||
- this->AutoLabels = nullptr;
|
||||
this->Width = 1.0;
|
||||
this->Pen->SetWidth(1.0);
|
||||
this->Offset = 1.0;
|
||||
- this->ColorSeries = nullptr;
|
||||
this->Orientation = vtkPlotBar::VERTICAL;
|
||||
this->ScalarVisibility = false;
|
||||
this->EnableOpacityMapping = true;
|
||||
@@ -612,6 +611,10 @@ void vtkPlotBar::GetBounds(double bounds[4], bool unscaled)
|
||||
|
||||
// Get the x and y arrays (index 0 and 1 respectively)
|
||||
vtkTable* table = this->Data->GetInput();
|
||||
+ if (!table)
|
||||
+ {
|
||||
+ return;
|
||||
+ }
|
||||
vtkDataArray* x =
|
||||
this->UseIndexForXSeries ? nullptr : this->Data->GetInputArrayToProcess(0, table);
|
||||
vtkDataArray* y = this->Data->GetInputArrayToProcess(1, table);
|
||||
@@ -945,7 +948,8 @@ void vtkPlotBar::CreateDefaultLookupTable()
|
||||
// rainbow - blue to red
|
||||
lut->SetHueRange(0.6667, 0.0);
|
||||
lut->Build();
|
||||
- double bounds[4];
|
||||
+ // set reasonable defaults in case no data has been set
|
||||
+ double bounds[4] = { 0.0, 1.0, 0.0, 1.0 };
|
||||
this->GetBounds(bounds);
|
||||
lut->SetRange(bounds[0], bounds[1]);
|
||||
this->LookupTable = lut;
|
||||
diff --git a/Documentation/release/dev/fix-vtkPlotBar-GetLookupTable.md b/Documentation/release/dev/fix-vtkPlotBar-GetLookupTable.md
|
||||
new file mode 100644
|
||||
index 00000000000..ba6a96753ac
|
||||
--- /dev/null
|
||||
+++ b/Documentation/release/dev/fix-vtkPlotBar-GetLookupTable.md
|
||||
@@ -0,0 +1,4 @@
|
||||
+## Fixes for vtkPlotBar.GetLookupTable
|
||||
+
|
||||
+Fixes a bug where calling vtkPlotBar.GetLookupTable caused a segmentation
|
||||
+fault in the case where no data had been plotted yet.
|
||||
--
|
||||
GitLab
|
||||
|
||||
24
changelog
24
changelog
|
|
@ -1,3 +1,27 @@
|
|||
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 9.2.6-42
|
||||
- Rebuilt for Python 3.14.0rc2 bytecode
|
||||
|
||||
* Sat Aug 09 2025 Orion Poplawski <orion@nwra.com> - 9.2.6-41
|
||||
- Rebuild for libharu 2.4.5
|
||||
|
||||
* Tue Jul 29 2025 Sandro Mani <manisandro@gmail.com> - 9.2.6-40
|
||||
- Rebuild (gdal)
|
||||
|
||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 9.2.6-39
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Tue Jun 03 2025 Python Maint <python-maint@redhat.com> - 9.2.6-38
|
||||
- Rebuilt for Python 3.14
|
||||
|
||||
* Sun Mar 02 2025 Christoph Junghans <junghans@votca.org> - 9.2.6-37
|
||||
- Remove obsolete FindHDF5.cmake
|
||||
|
||||
* Thu Feb 27 2025 Björn Esser <besser82@fedoraproject.org> - 9.2.6-36
|
||||
- Explicitly set CMAKE_POLICY_VERSION_MINIMUM=3.5
|
||||
|
||||
* Thu Feb 27 2025 Björn Esser <besser82@fedoraproject.org> - 9.2.6-35
|
||||
- Rebuild (jsoncpp)
|
||||
|
||||
* Thu Feb 13 2025 Orion Poplawski <orion@nwra.com> - 9.2.6-26
|
||||
- Rebuild with hdf5 1.14.6
|
||||
|
||||
|
|
|
|||
4
sources
4
sources
|
|
@ -1,2 +1,2 @@
|
|||
SHA512 (VTK-9.5.2.tar.gz) = fc8157a89fa603a7f7fce356e2f638ae69e0ea629a507458bdbb173daf511c61e39a1f0d7201b196a5b3a7ffa7e3e821398b62521faadf85edb1119a1e8b8e8e
|
||||
SHA512 (VTKData-9.5.2.tar.gz) = 1be895bed613ed0f0ace0ba5e138afacc3d61b57e437299b3aecf6beff702ad1a2d02036fd147853bbbcb6a1f9d20a51831c0263fdc5b8e62ece9a6f8f7d410e
|
||||
SHA512 (VTK-9.2.6.tar.gz) = f2328caae959d583299b7fd57205f3dd76f87c8c1ee78653e85d44cab085295bf7bf88b3f6a2b960a57df96ccb32049337ebccb067ecde6d84d25eda636196bc
|
||||
SHA512 (VTKData-9.2.6.tar.gz) = 5c5f2b365777733180a63daff224da7055e1c2911eb5e4efda26e38b9ac01cb8e886cf7e71c45ac83347642caf1786e72bb469c22954ffbbb6e2c317fc6b4080
|
||||
|
|
|
|||
12
vtk-build.patch
Normal file
12
vtk-build.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -rupN VTK-9.2.6/Utilities/octree/octree/octree_node.txx VTK-9.2.6-new/Utilities/octree/octree/octree_node.txx
|
||||
--- VTK-9.2.6/Utilities/octree/octree/octree_node.txx 2023-02-15 05:03:53.000000000 +0100
|
||||
+++ VTK-9.2.6-new/Utilities/octree/octree/octree_node.txx 2025-01-24 14:12:16.855255487 +0100
|
||||
@@ -207,7 +207,7 @@ const octree_node<T_, d_, A_>& octree_no
|
||||
{
|
||||
throw std::domain_error("Attempt to access children of an octree leaf node.");
|
||||
}
|
||||
- return this->_M_chilren[child];
|
||||
+ return this->m_children[child];
|
||||
}
|
||||
|
||||
/**\brief Return a reference to a child node.
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
diff -up VTK-9.3.1/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/chobo/small_vector.hpp.cstdint VTK-9.3.1/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/chobo/small_vector.hpp
|
||||
--- VTK-9.3.1/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/chobo/small_vector.hpp.cstdint 2024-06-28 10:00:10.000000000 -0600
|
||||
+++ VTK-9.3.1/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/chobo/small_vector.hpp 2025-02-17 17:08:44.231541639 -0700
|
||||
@@ -138,6 +138,7 @@
|
||||
|
||||
#include <type_traits>
|
||||
#include <cstddef>
|
||||
+#include <cstdint>
|
||||
#include <memory>
|
||||
|
||||
#define CHOBO_SMALL_VECTOR_ERROR_HANDLING_NONE 0
|
||||
diff -up VTK-9.3.1/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/thirdparty/diy/vtkmdiy/include/vtkmdiy/thirdparty/chobo/small_vector.hpp.cstdint VTK-9.3.1/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/thirdparty/diy/vtkmdiy/include/vtkmdiy/thirdparty/chobo/small_vector.hpp
|
||||
--- VTK-9.3.1/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/thirdparty/diy/vtkmdiy/include/vtkmdiy/thirdparty/chobo/small_vector.hpp.cstdint 2024-06-28 10:00:10.000000000 -0600
|
||||
+++ VTK-9.3.1/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/thirdparty/diy/vtkmdiy/include/vtkmdiy/thirdparty/chobo/small_vector.hpp 2025-02-17 17:08:27.992495226 -0700
|
||||
@@ -138,6 +138,7 @@
|
||||
|
||||
#include <type_traits>
|
||||
#include <cstddef>
|
||||
+#include <cstdint>
|
||||
#include <memory>
|
||||
|
||||
#define CHOBO_SMALL_VECTOR_ERROR_HANDLING_NONE 0
|
||||
11
vtk-include.patch
Normal file
11
vtk-include.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
diff -up VTK-9.2.5/IO/Image/vtkSEPReader.h.include VTK-9.2.5/IO/Image/vtkSEPReader.h
|
||||
--- VTK-9.2.5/IO/Image/vtkSEPReader.h.include 2023-01-05 08:51:35.000000000 -0700
|
||||
+++ VTK-9.2.5/IO/Image/vtkSEPReader.h 2023-01-17 07:43:41.988095734 -0700
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "vtkNew.h" // for ivars
|
||||
|
||||
#include <array> // for std::array
|
||||
+#include <cstdint> // for std::uint8_t
|
||||
#include <string> // for std::string
|
||||
|
||||
namespace details
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/Common/Core/vtkDataArrayMeta.h b/Common/Core/vtkDataArrayMeta.h
|
||||
index 602305d3ed..8c37a96891 100644
|
||||
--- a/Common/Core/vtkDataArrayMeta.h
|
||||
+++ b/Common/Core/vtkDataArrayMeta.h
|
||||
@@ -32,7 +32,7 @@
|
||||
#endif
|
||||
|
||||
#if (defined(VTK_ALWAYS_OPTIMIZE_ARRAY_ITERATORS) || !defined(VTK_DEBUG_RANGE_ITERATORS)) && \
|
||||
- !defined(VTK_COMPILER_MSVC)
|
||||
+ !defined(VTK_COMPILER_MSVC) && !defined(__PPC64__)
|
||||
#define VTK_ITER_INLINE VTK_ALWAYS_INLINE
|
||||
#define VTK_ITER_ASSUME VTK_ASSUME_NO_ASSERT
|
||||
#define VTK_ITER_OPTIMIZE_START VTK_ALWAYS_OPTIMIZE_START
|
||||
90
vtk-python3.13.patch
Normal file
90
vtk-python3.13.patch
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
diff --git a/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx b/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx
|
||||
index 0471594..bc92c85 100644
|
||||
--- a/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx
|
||||
+++ b/Utilities/PythonInterpreter/vtkPythonInterpreter.cxx
|
||||
@@ -114,7 +114,9 @@ wchar_t* vtk_Py_UTF8ToWide(const char* arg)
|
||||
|
||||
return result;
|
||||
}
|
||||
+#endif
|
||||
|
||||
+#if PY_VERSION_HEX < 0x03080000
|
||||
std::string vtk_Py_WideToUTF8(const wchar_t* arg)
|
||||
{
|
||||
std::string result;
|
||||
@@ -859,15 +861,20 @@ void vtkPythonInterpreter::SetupVTKPythonPaths()
|
||||
if (vtklib.empty())
|
||||
{
|
||||
VTKPY_DEBUG_MESSAGE(
|
||||
- "`GetVTKVersion` library couldn't be found. Will use `Py_GetProgramName` next.");
|
||||
+ "`GetVTKVersion` library couldn't be found. Will use `sys.executable` next.");
|
||||
}
|
||||
|
||||
if (vtklib.empty())
|
||||
{
|
||||
-#if PY_VERSION_HEX >= 0x03000000
|
||||
- vtklib = vtk_Py_WideToUTF8(Py_GetProgramName());
|
||||
+#if PY_VERSION_HEX >= 0x03080000
|
||||
+ vtkPythonScopeGilEnsurer gilEnsurer;
|
||||
+ PyObject* executable_path = PySys_GetObject("executable");
|
||||
+ if (executable_path != Py_None)
|
||||
+ {
|
||||
+ vtklib = PyUnicode_AsUTF8AndSize(executable_path, nullptr);
|
||||
+ }
|
||||
#else
|
||||
- vtklib = Py_GetProgramName();
|
||||
+ vtklib = vtk_Py_WideToUTF8(Py_GetProgramName());
|
||||
#endif
|
||||
}
|
||||
|
||||
diff --git a/Wrapping/Python/vtkmodules/test/Testing.py b/Wrapping/Python/vtkmodules/test/Testing.py
|
||||
index 59186bb..d0643c1 100644
|
||||
--- a/Wrapping/Python/vtkmodules/test/Testing.py
|
||||
+++ b/Wrapping/Python/vtkmodules/test/Testing.py
|
||||
@@ -513,8 +513,10 @@ def test(cases):
|
||||
"""
|
||||
# Make the test suites from the arguments.
|
||||
suites = []
|
||||
- for case in cases:
|
||||
- suites.append(unittest.makeSuite(case[0], case[1]))
|
||||
+ loader = unittest.TestLoader()
|
||||
+ # the "name" is ignored (it was always just 'test')
|
||||
+ for test,name in cases:
|
||||
+ suites.append(loader.loadTestsFromTestCase(test))
|
||||
test_suite = unittest.TestSuite(suites)
|
||||
|
||||
# Now run the tests.
|
||||
diff --git a/Wrapping/PythonCore/PyVTKNamespace.cxx b/Wrapping/PythonCore/PyVTKNamespace.cxx
|
||||
index 927eef1..7460eb7 100644
|
||||
--- a/Wrapping/PythonCore/PyVTKNamespace.cxx
|
||||
+++ b/Wrapping/PythonCore/PyVTKNamespace.cxx
|
||||
@@ -113,8 +113,10 @@ PyObject* PyVTKNamespace_New(const char* name)
|
||||
{
|
||||
// make sure python has readied the type object
|
||||
PyType_Ready(&PyVTKNamespace_Type);
|
||||
- // call the allocator provided by python for this type
|
||||
- self = PyVTKNamespace_Type.tp_alloc(&PyVTKNamespace_Type, 0);
|
||||
+ // call the superclass new function
|
||||
+ PyObject* empty = PyTuple_New(0);
|
||||
+ self = PyVTKNamespace_Type.tp_base->tp_new(&PyVTKNamespace_Type, empty, nullptr);
|
||||
+ Py_DECREF(empty);
|
||||
// call the superclass init function
|
||||
PyObject* args = PyTuple_New(1);
|
||||
PyTuple_SET_ITEM(args, 0, PyString_FromString(name));
|
||||
diff --git a/Wrapping/PythonCore/PyVTKTemplate.cxx b/Wrapping/PythonCore/PyVTKTemplate.cxx
|
||||
index e0ff31e..c89900f 100644
|
||||
--- a/Wrapping/PythonCore/PyVTKTemplate.cxx
|
||||
+++ b/Wrapping/PythonCore/PyVTKTemplate.cxx
|
||||
@@ -788,8 +788,10 @@ PyObject* PyVTKTemplate_New(const char* name, const char* docstring)
|
||||
{
|
||||
// make sure python has readied the type object
|
||||
PyType_Ready(&PyVTKTemplate_Type);
|
||||
- // call the allocator provided by python for this type
|
||||
- PyObject* self = PyVTKTemplate_Type.tp_alloc(&PyVTKTemplate_Type, 0);
|
||||
+ // call the superclass new function
|
||||
+ PyObject* empty = PyTuple_New(0);
|
||||
+ PyObject* self = PyVTKTemplate_Type.tp_base->tp_new(&PyVTKTemplate_Type, empty, nullptr);
|
||||
+ Py_DECREF(empty);
|
||||
// call the superclass init function
|
||||
PyObject* args = PyTuple_New(2);
|
||||
PyTuple_SET_ITEM(args, 0, PyString_FromString(name));
|
||||
489
vtk-tk9.patch
489
vtk-tk9.patch
|
|
@ -1,489 +0,0 @@
|
|||
commit b7c22497712be6751fbefe155533ae34d5e381f5
|
||||
Author: Spiros Tsalikis <spiros.tsalikis@kitware.com>
|
||||
Date: Thu May 22 12:30:19 2025 -0400
|
||||
|
||||
Tcl/Tk: Support version 9.0.0
|
||||
|
||||
diff --git a/Rendering/Tk/vtkTkImageViewerWidget.cxx b/Rendering/Tk/vtkTkImageViewerWidget.cxx
|
||||
index 43c7a48a13..9d2c4210de 100644
|
||||
--- a/Rendering/Tk/vtkTkImageViewerWidget.cxx
|
||||
+++ b/Rendering/Tk/vtkTkImageViewerWidget.cxx
|
||||
@@ -23,6 +23,17 @@
|
||||
#include <algorithm>
|
||||
#include <cstdlib>
|
||||
|
||||
+#if (TCL_MAJOR_VERSION >= 9)
|
||||
+#define VTK_TCL_CONST const
|
||||
+#elif ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4))
|
||||
+#define VTK_TCL_CONST CONST84
|
||||
+#else
|
||||
+#define VTK_TCL_CONST
|
||||
+#endif
|
||||
+#ifndef offsetof
|
||||
+#define offsetof(type, field) ((size_t)((char*)&((type*)0)->field))
|
||||
+#endif
|
||||
+
|
||||
#define VTK_ALL_EVENTS_MASK \
|
||||
KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | EnterWindowMask | \
|
||||
LeaveWindowMask | PointerMotionMask | ExposureMask | VisibilityChangeMask | FocusChangeMask | \
|
||||
@@ -32,14 +43,14 @@
|
||||
// or with the command configure. The only new one is "-rw" which allows
|
||||
// the uses to set their own ImageViewer window.
|
||||
static Tk_ConfigSpec vtkTkImageViewerWidgetConfigSpecs[] = {
|
||||
- { TK_CONFIG_PIXELS, (char*)"-height", (char*)"height", (char*)"Height", (char*)"400",
|
||||
- Tk_Offset(struct vtkTkImageViewerWidget, Height), 0, nullptr },
|
||||
+ { TK_CONFIG_PIXELS, "-height", "height", "Height", "400",
|
||||
+ offsetof(struct vtkTkImageViewerWidget, Height), 0, nullptr },
|
||||
|
||||
- { TK_CONFIG_PIXELS, (char*)"-width", (char*)"width", (char*)"Width", (char*)"400",
|
||||
- Tk_Offset(struct vtkTkImageViewerWidget, Width), 0, nullptr },
|
||||
+ { TK_CONFIG_PIXELS, "-width", "width", "Width", "400",
|
||||
+ offsetof(struct vtkTkImageViewerWidget, Width), 0, nullptr },
|
||||
|
||||
- { TK_CONFIG_STRING, (char*)"-iv", (char*)"iv", (char*)"IV", (char*)"",
|
||||
- Tk_Offset(struct vtkTkImageViewerWidget, IV), 0, nullptr },
|
||||
+ { TK_CONFIG_STRING, "-iv", "iv", "IV", "", offsetof(struct vtkTkImageViewerWidget, IV), 0,
|
||||
+ nullptr },
|
||||
|
||||
{ TK_CONFIG_END, nullptr, nullptr, nullptr, nullptr, 0, 0, nullptr }
|
||||
};
|
||||
@@ -56,17 +67,22 @@ extern int vtkImageViewerCommand(ClientData cd, Tcl_Interp* interp, int argc, ch
|
||||
//------------------------------------------------------------------------------
|
||||
// It's possible to change with this function or in a script some
|
||||
// options like width, height or the ImageViewer widget.
|
||||
-int vtkTkImageViewerWidget_Configure(
|
||||
- Tcl_Interp* interp, struct vtkTkImageViewerWidget* self, int argc, char* argv[], int flags)
|
||||
+#if (TCL_MAJOR_VERSION >= 9)
|
||||
+int vtkTkImageViewerWidget_Configure(Tcl_Interp* interp, struct vtkTkImageViewerWidget* self,
|
||||
+ Tcl_Size objc, Tcl_Obj* const* objv, int flags)
|
||||
+#else
|
||||
+int vtkTkImageViewerWidget_Configure(Tcl_Interp* interp, struct vtkTkImageViewerWidget* self,
|
||||
+ int argc, VTK_TCL_CONST char* argv[], int flags)
|
||||
+#endif
|
||||
{
|
||||
// Let Tk handle generic configure options.
|
||||
- if (Tk_ConfigureWidget(interp, self->TkWin, vtkTkImageViewerWidgetConfigSpecs, argc,
|
||||
-#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
|
||||
- const_cast<CONST84 char**>(argv),
|
||||
+#if (TCL_MAJOR_VERSION >= 9)
|
||||
+ if (Tk_ConfigureWidget(interp, self->TkWin, vtkTkImageViewerWidgetConfigSpecs, objc, objv,
|
||||
+ (void*)self, flags) == TCL_ERROR)
|
||||
#else
|
||||
- argv,
|
||||
-#endif
|
||||
+ if (Tk_ConfigureWidget(interp, self->TkWin, vtkTkImageViewerWidgetConfigSpecs, argc, argv,
|
||||
(char*)self, flags) == TCL_ERROR)
|
||||
+#endif
|
||||
{
|
||||
return (TCL_ERROR);
|
||||
}
|
||||
@@ -89,11 +105,8 @@ int vtkTkImageViewerWidget_Configure(
|
||||
// to choose the appropriate method to invoke.
|
||||
extern "C"
|
||||
{
|
||||
- int vtkTkImageViewerWidget_Widget(ClientData clientData, Tcl_Interp* interp, int argc,
|
||||
-#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
|
||||
- CONST84
|
||||
-#endif
|
||||
- char* argv[])
|
||||
+ int vtkTkImageViewerWidget_Widget(
|
||||
+ ClientData clientData, Tcl_Interp* interp, int argc, VTK_TCL_CONST char* argv[])
|
||||
{
|
||||
struct vtkTkImageViewerWidget* self = (struct vtkTkImageViewerWidget*)clientData;
|
||||
int result = TCL_OK;
|
||||
@@ -106,7 +119,11 @@ extern "C"
|
||||
}
|
||||
|
||||
// Make sure the widget is not deleted during this function
|
||||
+#if (TCL_MAJOR_VERSION >= 9)
|
||||
+ Tcl_Preserve((ClientData)self);
|
||||
+#else
|
||||
Tk_Preserve((ClientData)self);
|
||||
+#endif
|
||||
|
||||
// Handle render call to the widget
|
||||
if (strncmp(argv[1], "render", std::max<size_t>(1, strlen(argv[1]))) == 0 ||
|
||||
@@ -137,13 +154,27 @@ extern "C"
|
||||
else
|
||||
{
|
||||
/* Execute a configuration change */
|
||||
- result = vtkTkImageViewerWidget_Configure(interp, self, argc - 2,
|
||||
-#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
|
||||
- const_cast<char**>(argv + 2),
|
||||
+#if (TCL_MAJOR_VERSION >= 9)
|
||||
+ // Convert string arguments to Tcl_Obj for TCL 9.0
|
||||
+ Tcl_Obj** objv_config = (Tcl_Obj**)ckalloc((argc - 2) * sizeof(Tcl_Obj*));
|
||||
+ for (int i = 0; i < argc - 2; i++)
|
||||
+ {
|
||||
+ objv_config[i] = Tcl_NewStringObj(argv[i + 2], -1);
|
||||
+ Tcl_IncrRefCount(objv_config[i]);
|
||||
+ }
|
||||
+ result = vtkTkImageViewerWidget_Configure(
|
||||
+ interp, self, argc - 2, objv_config, TK_CONFIG_ARGV_ONLY);
|
||||
+
|
||||
+ // Clean up the Tcl_Obj array
|
||||
+ for (int i = 0; i < argc - 2; i++)
|
||||
+ {
|
||||
+ Tcl_DecrRefCount(objv_config[i]);
|
||||
+ }
|
||||
+ ckfree((char*)objv_config);
|
||||
#else
|
||||
- argv + 2,
|
||||
+ result =
|
||||
+ vtkTkImageViewerWidget_Configure(interp, self, argc - 2, argv + 2, TK_CONFIG_ARGV_ONLY);
|
||||
#endif
|
||||
- TK_CONFIG_ARGV_ONLY);
|
||||
}
|
||||
}
|
||||
else if (!strcmp(argv[1], "GetImageViewer"))
|
||||
@@ -165,7 +196,11 @@ extern "C"
|
||||
}
|
||||
|
||||
// Unlock the object so it can be deleted.
|
||||
+#if (TCL_MAJOR_VERSION >= 9)
|
||||
+ Tcl_Release((ClientData)self);
|
||||
+#else
|
||||
Tk_Release((ClientData)self);
|
||||
+#endif
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -181,16 +216,10 @@ extern "C"
|
||||
// * Configures this vtkTkImageViewerWidget for the given arguments
|
||||
extern "C"
|
||||
{
|
||||
- int vtkTkImageViewerWidget_Cmd(ClientData clientData, Tcl_Interp* interp, int argc,
|
||||
-#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
|
||||
- CONST84
|
||||
-#endif
|
||||
- char** argv)
|
||||
+ int vtkTkImageViewerWidget_Cmd(
|
||||
+ ClientData clientData, Tcl_Interp* interp, int argc, VTK_TCL_CONST char** argv)
|
||||
{
|
||||
-#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
|
||||
- CONST84
|
||||
-#endif
|
||||
- char* name;
|
||||
+ VTK_TCL_CONST char* name;
|
||||
Tk_Window main = (Tk_Window)clientData;
|
||||
Tk_Window tkwin;
|
||||
struct vtkTkImageViewerWidget* self;
|
||||
@@ -233,13 +262,37 @@ extern "C"
|
||||
vtkTkImageViewerWidget_EventProc, (ClientData)self);
|
||||
|
||||
// Configure vtkTkImageViewerWidget widget
|
||||
- if (vtkTkImageViewerWidget_Configure(interp, self, argc - 2,
|
||||
-#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
|
||||
- const_cast<char**>(argv + 2),
|
||||
+#if (TCL_MAJOR_VERSION >= 9)
|
||||
+ // Convert string arguments to Tcl_Obj for TCL 9.0
|
||||
+ Tcl_Obj** objv_init = (Tcl_Obj**)ckalloc((argc - 2) * sizeof(Tcl_Obj*));
|
||||
+ for (int i = 0; i < argc - 2; i++)
|
||||
+ {
|
||||
+ objv_init[i] = Tcl_NewStringObj(argv[i + 2], -1);
|
||||
+ Tcl_IncrRefCount(objv_init[i]);
|
||||
+ }
|
||||
+
|
||||
+ if (vtkTkImageViewerWidget_Configure(interp, self, argc - 2, objv_init, 0) == TCL_ERROR)
|
||||
+ {
|
||||
+ // Clean up before error return
|
||||
+ for (int i = 0; i < argc - 2; i++)
|
||||
+ {
|
||||
+ Tcl_DecrRefCount(objv_init[i]);
|
||||
+ }
|
||||
+ ckfree((char*)objv_init);
|
||||
+
|
||||
+ Tk_DestroyWindow(tkwin);
|
||||
+ Tcl_DeleteCommand(interp, (char*)"vtkTkImageViewerWidget");
|
||||
+ return TCL_ERROR;
|
||||
+ }
|
||||
+
|
||||
+ // Clean up the Tcl_Obj array
|
||||
+ for (int i = 0; i < argc - 2; i++)
|
||||
+ {
|
||||
+ Tcl_DecrRefCount(objv_init[i]);
|
||||
+ }
|
||||
+ ckfree((char*)objv_init);
|
||||
#else
|
||||
- argv + 2,
|
||||
-#endif
|
||||
- 0) == TCL_ERROR)
|
||||
+ if (vtkTkImageViewerWidget_Configure(interp, self, argc - 2, argv + 2, 0) == TCL_ERROR)
|
||||
{
|
||||
Tk_DestroyWindow(tkwin);
|
||||
Tcl_DeleteCommand(interp, (char*)"vtkTkImageViewerWidget");
|
||||
@@ -247,6 +300,7 @@ extern "C"
|
||||
// free(self);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
+#endif
|
||||
|
||||
Tcl_AppendResult(interp, Tk_PathName(tkwin), nullptr);
|
||||
return TCL_OK;
|
||||
@@ -255,7 +309,11 @@ extern "C"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
+#if (TCL_MAJOR_VERSION >= 9)
|
||||
+ void vtkTkImageViewerWidget_Destroy(void* memPtr)
|
||||
+#else
|
||||
void vtkTkImageViewerWidget_Destroy(char* memPtr)
|
||||
+#endif
|
||||
{
|
||||
struct vtkTkImageViewerWidget* self = (struct vtkTkImageViewerWidget*)memPtr;
|
||||
|
||||
diff --git a/Rendering/Tk/vtkTkRenderWidget.cxx b/Rendering/Tk/vtkTkRenderWidget.cxx
|
||||
index 6ddaa5816a..84c940b484 100644
|
||||
--- a/Rendering/Tk/vtkTkRenderWidget.cxx
|
||||
+++ b/Rendering/Tk/vtkTkRenderWidget.cxx
|
||||
@@ -29,6 +29,17 @@
|
||||
#include <cstdlib>
|
||||
#include <vector>
|
||||
|
||||
+#if (TCL_MAJOR_VERSION >= 9) || ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 6))
|
||||
+#define VTK_TCL_CONST const
|
||||
+#elif ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4))
|
||||
+#define VTK_TCL_CONST CONST84
|
||||
+#else
|
||||
+#define VTK_TCL_CONST
|
||||
+#endif
|
||||
+#ifndef offsetof
|
||||
+#define offsetof(type, field) ((size_t)((char*)&((type*)0)->field))
|
||||
+#endif
|
||||
+
|
||||
// Silence warning like
|
||||
// "dereferencing type-punned pointer will break strict-aliasing rules"
|
||||
// it happens because this kind of expression: (long *)&ptr
|
||||
@@ -45,14 +56,13 @@
|
||||
// or with the command configure. The only new one is "-rw" which allows
|
||||
// the uses to set their own render window.
|
||||
static Tk_ConfigSpec vtkTkRenderWidgetConfigSpecs[] = {
|
||||
- { TK_CONFIG_PIXELS, (char*)"-height", (char*)"height", (char*)"Height", (char*)"400",
|
||||
- Tk_Offset(struct vtkTkRenderWidget, Height), 0, nullptr },
|
||||
+ { TK_CONFIG_PIXELS, "-height", "height", "Height", "400",
|
||||
+ offsetof(struct vtkTkRenderWidget, Height), 0, nullptr },
|
||||
|
||||
- { TK_CONFIG_PIXELS, (char*)"-width", (char*)"width", (char*)"Width", (char*)"400",
|
||||
- Tk_Offset(struct vtkTkRenderWidget, Width), 0, nullptr },
|
||||
+ { TK_CONFIG_PIXELS, "-width", "width", "Width", "400", offsetof(struct vtkTkRenderWidget, Width),
|
||||
+ 0, nullptr },
|
||||
|
||||
- { TK_CONFIG_STRING, (char*)"-rw", (char*)"rw", (char*)"RW", (char*)"",
|
||||
- Tk_Offset(struct vtkTkRenderWidget, RW), 0, nullptr },
|
||||
+ { TK_CONFIG_STRING, "-rw", "rw", "RW", "", offsetof(struct vtkTkRenderWidget, RW), 0, nullptr },
|
||||
|
||||
{ TK_CONFIG_END, nullptr, nullptr, nullptr, nullptr, 0, 0, nullptr }
|
||||
};
|
||||
@@ -113,11 +123,8 @@ extern "C"
|
||||
#define VTKIMAGEDATATOTKPHOTO_CORONAL 0
|
||||
#define VTKIMAGEDATATOTKPHOTO_SAGITTAL 1
|
||||
#define VTKIMAGEDATATOTKPHOTO_TRANSVERSE 2
|
||||
- int vtkImageDataToTkPhoto_Cmd(ClientData vtkNotUsed(clientData), Tcl_Interp* interp, int argc,
|
||||
-#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
|
||||
- CONST84
|
||||
-#endif
|
||||
- char** argv)
|
||||
+ int vtkImageDataToTkPhoto_Cmd(
|
||||
+ ClientData vtkNotUsed(clientData), Tcl_Interp* interp, int argc, VTK_TCL_CONST char** argv)
|
||||
{
|
||||
int status = 0;
|
||||
vtkImageData* image;
|
||||
@@ -330,8 +337,14 @@ extern "C"
|
||||
block.offset[3] = 3;
|
||||
break;
|
||||
}
|
||||
+#if (TCL_MAJOR_VERSION >= 9)
|
||||
+ Tk_PhotoSetSize(interp, photo, block.width, block.height);
|
||||
+ Tk_PhotoPutBlock(
|
||||
+ interp, photo, &block, 0, 0, block.width, block.height, TK_PHOTO_COMPOSITE_SET);
|
||||
+#else
|
||||
Tk_PhotoSetSize(photo, block.width, block.height);
|
||||
Tk_PhotoPutBlock(photo, &block, 0, 0, block.width, block.height);
|
||||
+#endif
|
||||
return TCL_OK;
|
||||
}
|
||||
}
|
||||
@@ -339,17 +352,22 @@ extern "C"
|
||||
//------------------------------------------------------------------------------
|
||||
// It's possible to change with this function or in a script some
|
||||
// options like width, height or the render widget.
|
||||
-int vtkTkRenderWidget_Configure(
|
||||
- Tcl_Interp* interp, struct vtkTkRenderWidget* self, int argc, char* argv[], int flags)
|
||||
+#if (TCL_MAJOR_VERSION >= 9)
|
||||
+int vtkTkRenderWidget_Configure(Tcl_Interp* interp, struct vtkTkRenderWidget* self, Tcl_Size objc,
|
||||
+ Tcl_Obj* const* objv, int flags)
|
||||
+#else
|
||||
+int vtkTkRenderWidget_Configure(Tcl_Interp* interp, struct vtkTkRenderWidget* self, int argc,
|
||||
+ VTK_TCL_CONST char* argv[], int flags)
|
||||
+#endif
|
||||
{
|
||||
// Let Tk handle generic configure options.
|
||||
- if (Tk_ConfigureWidget(interp, self->TkWin, vtkTkRenderWidgetConfigSpecs, argc,
|
||||
-#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
|
||||
- const_cast<CONST84 char**>(argv),
|
||||
+#if (TCL_MAJOR_VERSION >= 9)
|
||||
+ if (Tk_ConfigureWidget(interp, self->TkWin, vtkTkRenderWidgetConfigSpecs, objc, objv, (void*)self,
|
||||
+ flags) == TCL_ERROR)
|
||||
#else
|
||||
- argv,
|
||||
+ if (Tk_ConfigureWidget(interp, self->TkWin, vtkTkRenderWidgetConfigSpecs, argc, argv, (char*)self,
|
||||
+ flags) == TCL_ERROR)
|
||||
#endif
|
||||
- (char*)self, flags) == TCL_ERROR)
|
||||
{
|
||||
return (TCL_ERROR);
|
||||
}
|
||||
@@ -372,11 +390,8 @@ int vtkTkRenderWidget_Configure(
|
||||
// to choose the appropriate method to invoke.
|
||||
extern "C"
|
||||
{
|
||||
- int vtkTkRenderWidget_Widget(ClientData clientData, Tcl_Interp* interp, int argc,
|
||||
-#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
|
||||
- CONST84
|
||||
-#endif
|
||||
- char* argv[])
|
||||
+ int vtkTkRenderWidget_Widget(
|
||||
+ ClientData clientData, Tcl_Interp* interp, int argc, VTK_TCL_CONST char* argv[])
|
||||
{
|
||||
struct vtkTkRenderWidget* self = (struct vtkTkRenderWidget*)clientData;
|
||||
int result = TCL_OK;
|
||||
@@ -389,7 +404,11 @@ extern "C"
|
||||
}
|
||||
|
||||
// Make sure the widget is not deleted during this function
|
||||
+#if (TCL_MAJOR_VERSION >= 9)
|
||||
+ Tcl_Preserve((ClientData)self);
|
||||
+#else
|
||||
Tk_Preserve((ClientData)self);
|
||||
+#endif
|
||||
|
||||
// Handle render call to the widget
|
||||
if (strncmp(argv[1], "render", std::max<size_t>(1, strlen(argv[1]))) == 0 ||
|
||||
@@ -420,13 +439,26 @@ extern "C"
|
||||
else
|
||||
{
|
||||
/* Execute a configuration change */
|
||||
- result = vtkTkRenderWidget_Configure(interp, self, argc - 2,
|
||||
-#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
|
||||
- const_cast<char**>(argv + 2),
|
||||
+#if (TCL_MAJOR_VERSION >= 9)
|
||||
+ // Convert string arguments to Tcl_Obj for TCL 9.0
|
||||
+ Tcl_Obj** objv_config = (Tcl_Obj**)ckalloc((argc - 2) * sizeof(Tcl_Obj*));
|
||||
+ for (int i = 0; i < argc - 2; i++)
|
||||
+ {
|
||||
+ objv_config[i] = Tcl_NewStringObj(argv[i + 2], -1);
|
||||
+ Tcl_IncrRefCount(objv_config[i]);
|
||||
+ }
|
||||
+ result =
|
||||
+ vtkTkRenderWidget_Configure(interp, self, argc - 2, objv_config, TK_CONFIG_ARGV_ONLY);
|
||||
+
|
||||
+ // Clean up the Tcl_Obj array
|
||||
+ for (int i = 0; i < argc - 2; i++)
|
||||
+ {
|
||||
+ Tcl_DecrRefCount(objv_config[i]);
|
||||
+ }
|
||||
+ ckfree((char*)objv_config);
|
||||
#else
|
||||
- argv + 2,
|
||||
+ result = vtkTkRenderWidget_Configure(interp, self, argc - 2, argv + 2, TK_CONFIG_ARGV_ONLY);
|
||||
#endif
|
||||
- TK_CONFIG_ARGV_ONLY);
|
||||
}
|
||||
}
|
||||
else if (!strcmp(argv[1], "GetRenderWindow"))
|
||||
@@ -448,7 +480,11 @@ extern "C"
|
||||
}
|
||||
|
||||
// Unlock the object so it can be deleted.
|
||||
+#if (TCL_MAJOR_VERSION >= 9)
|
||||
+ Tcl_Release((ClientData)self);
|
||||
+#else
|
||||
Tk_Release((ClientData)self);
|
||||
+#endif
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -464,16 +500,10 @@ extern "C"
|
||||
// * Configures this vtkTkRenderWidget for the given arguments
|
||||
extern "C"
|
||||
{
|
||||
- int vtkTkRenderWidget_Cmd(ClientData clientData, Tcl_Interp* interp, int argc,
|
||||
-#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
|
||||
- CONST84
|
||||
-#endif
|
||||
- char** argv)
|
||||
+ int vtkTkRenderWidget_Cmd(
|
||||
+ ClientData clientData, Tcl_Interp* interp, int argc, VTK_TCL_CONST char** argv)
|
||||
{
|
||||
-#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
|
||||
- CONST84
|
||||
-#endif
|
||||
- char* name;
|
||||
+ VTK_TCL_CONST char* name;
|
||||
Tk_Window main = (Tk_Window)clientData;
|
||||
Tk_Window tkwin;
|
||||
struct vtkTkRenderWidget* self;
|
||||
@@ -515,13 +545,37 @@ extern "C"
|
||||
tkwin, ExposureMask | StructureNotifyMask, vtkTkRenderWidget_EventProc, (ClientData)self);
|
||||
|
||||
// Configure vtkTkRenderWidget widget
|
||||
- if (vtkTkRenderWidget_Configure(interp, self, argc - 2,
|
||||
-#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
|
||||
- const_cast<char**>(argv + 2),
|
||||
+#if (TCL_MAJOR_VERSION >= 9)
|
||||
+ // Convert string arguments to Tcl_Obj for TCL 9.0
|
||||
+ Tcl_Obj** objv_init = (Tcl_Obj**)ckalloc((argc - 2) * sizeof(Tcl_Obj*));
|
||||
+ for (int i = 0; i < argc - 2; i++)
|
||||
+ {
|
||||
+ objv_init[i] = Tcl_NewStringObj(argv[i + 2], -1);
|
||||
+ Tcl_IncrRefCount(objv_init[i]);
|
||||
+ }
|
||||
+
|
||||
+ if (vtkTkRenderWidget_Configure(interp, self, argc - 2, objv_init, 0) == TCL_ERROR)
|
||||
+ {
|
||||
+ // Clean up before error return
|
||||
+ for (int i = 0; i < argc - 2; i++)
|
||||
+ {
|
||||
+ Tcl_DecrRefCount(objv_init[i]);
|
||||
+ }
|
||||
+ ckfree((char*)objv_init);
|
||||
+
|
||||
+ Tk_DestroyWindow(tkwin);
|
||||
+ Tcl_DeleteCommand(interp, (char*)"vtkTkImageViewerWidget");
|
||||
+ return TCL_ERROR;
|
||||
+ }
|
||||
+
|
||||
+ // Clean up the Tcl_Obj array
|
||||
+ for (int i = 0; i < argc - 2; i++)
|
||||
+ {
|
||||
+ Tcl_DecrRefCount(objv_init[i]);
|
||||
+ }
|
||||
+ ckfree((char*)objv_init);
|
||||
#else
|
||||
- argv + 2,
|
||||
-#endif
|
||||
- 0) == TCL_ERROR)
|
||||
+ if (vtkTkRenderWidget_Configure(interp, self, argc - 2, argv + 2, 0) == TCL_ERROR)
|
||||
{
|
||||
Tk_DestroyWindow(tkwin);
|
||||
Tcl_DeleteCommand(interp, "vtkTkRenderWidget");
|
||||
@@ -529,6 +583,7 @@ extern "C"
|
||||
// free(self);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
+#endif
|
||||
|
||||
Tcl_AppendResult(interp, Tk_PathName(tkwin), nullptr);
|
||||
return TCL_OK;
|
||||
@@ -555,7 +610,11 @@ extern "C"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
+#if (TCL_MAJOR_VERSION >= 9)
|
||||
+ void vtkTkRenderWidget_Destroy(void* memPtr)
|
||||
+#else
|
||||
void vtkTkRenderWidget_Destroy(char* memPtr)
|
||||
+#endif
|
||||
{
|
||||
struct vtkTkRenderWidget* self = (struct vtkTkRenderWidget*)memPtr;
|
||||
|
||||
207
vtk.spec
207
vtk.spec
|
|
@ -5,9 +5,6 @@
|
|||
# '_ZZNSt8__detail18__to_chars_10_implIjEEvPcjT_E8__digits@@LLVM_11'
|
||||
%global _lto_cflags %{nil}
|
||||
|
||||
# There is a circular dep with opencascade
|
||||
%bcond bootstrap 0
|
||||
|
||||
# OSMesa and X support are mutually exclusive.
|
||||
# TODO - buid separate OSMesa version if desired
|
||||
%bcond_with OSMesa
|
||||
|
|
@ -21,18 +18,15 @@
|
|||
%bcond_with mpich
|
||||
%bcond_with openmpi
|
||||
%else
|
||||
%bcond_without mpich
|
||||
# No openmpi on i668 with openmpi 5 in Fedora 40+
|
||||
# No mpi4py on i686
|
||||
%if 0%{?fedora}
|
||||
%if 0%{?fedora} >= 40
|
||||
%ifarch %{ix86}
|
||||
%bcond_with mpich
|
||||
%bcond_with openmpi
|
||||
%else
|
||||
%bcond_without mpich
|
||||
%bcond_without openmpi
|
||||
%endif
|
||||
%else
|
||||
%bcond_without mpich
|
||||
%bcond_without openmpi
|
||||
%endif
|
||||
%endif
|
||||
|
|
@ -47,39 +41,37 @@
|
|||
%bcond_without xdummy
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 9
|
||||
%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9
|
||||
%bcond_without flexiblas
|
||||
%endif
|
||||
|
||||
# Try disabling LTO on ppc64le
|
||||
%ifarch ppc64le
|
||||
%global _lto_cflags %{nil}
|
||||
%endif
|
||||
|
||||
# VTK currently is carrying local modifications to gl2ps
|
||||
%bcond_with gl2ps
|
||||
|
||||
%bcond_without fmt
|
||||
|
||||
#global rc rc2
|
||||
# VTK currently requires unreleased fmt 8.1.0
|
||||
%bcond_with fmt
|
||||
|
||||
Summary: The Visualization Toolkit - A high level 3D visualization library
|
||||
Name: vtk
|
||||
Version: 9.5.2%{?rc:~%{rc}}
|
||||
Release: %autorelease
|
||||
Version: 9.2.6
|
||||
Release: %autorelease -b 41
|
||||
License: BSD-3-Clause
|
||||
%global srcver %{lua:local ver = rpm.expand('%version');ver = ver:gsub('~','.');print(ver)}
|
||||
Source0: https://www.vtk.org/files/release/9.5/VTK-%{srcver}.tar.gz
|
||||
Source1: https://www.vtk.org/files/release/9.5/VTKData-%{srcver}.tar.gz
|
||||
Source0: https://www.vtk.org/files/release/9.2/VTK-%{version}.tar.gz
|
||||
Source1: https://www.vtk.org/files/release/9.2/VTKData-%{version}.tar.gz
|
||||
Source2: xorg.conf
|
||||
# Patch required libharu version (Fedora 33+ contains the needed VTK patches)
|
||||
Patch: vtk-libharu.patch
|
||||
# Tk 9.0 - based on b7c22497712be6751fbefe155533ae34d5e381f5
|
||||
Patch: vtk-tk9.patch
|
||||
# always_inline fails on ppc64le
|
||||
# https://gitlab.kitware.com/vtk/vtk/-/issues/19622
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2386242
|
||||
Patch: vtk-ppc64-no-always-inline.patch
|
||||
Patch0: vtk-libharu.patch
|
||||
# Fix issue with Mayavi
|
||||
Patch1: https://gitlab.kitware.com/vtk/vtk/-/merge_requests/9616.patch
|
||||
# Add missing includes for gcc 13
|
||||
# https://gitlab.kitware.com/vtk/vtk/-/issues/18782
|
||||
Patch2: vtk-include.patch
|
||||
# Fix segfault with Python 3.13
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2310520
|
||||
# Backport of https://gitlab.kitware.com/vtk/vtk/-/merge_requests/11486
|
||||
Patch3: vtk-python3.13.patch
|
||||
# Fix build
|
||||
Patch4: vtk-build.patch
|
||||
|
||||
URL: https://vtk.org/
|
||||
|
||||
|
|
@ -94,7 +86,6 @@ BuildRequires: java-devel
|
|||
Obsoletes: %{name}-java < %{version}-%{release}
|
||||
Obsoletes: %{name}-java-devel < %{version}-%{release}
|
||||
%endif
|
||||
BuildRequires: alembic-devel
|
||||
%if %{with flexiblas}
|
||||
BuildRequires: flexiblas-devel
|
||||
%else
|
||||
|
|
@ -107,17 +98,15 @@ BuildRequires: cli11-devel
|
|||
BuildRequires: double-conversion-devel
|
||||
BuildRequires: eigen3-devel
|
||||
BuildRequires: expat-devel
|
||||
BuildRequires: fast_float-devel
|
||||
BuildRequires: ffmpeg-free-devel
|
||||
%if %{with fmt}
|
||||
BuildRequires: fmt-devel >= 8.1.0
|
||||
%endif
|
||||
BuildRequires: freeglut-devel
|
||||
BuildRequires: freetype-devel
|
||||
BuildRequires: gdal-devel
|
||||
%if %{with gl2ps}
|
||||
BuildRequires: gl2ps-devel
|
||||
%endif
|
||||
BuildRequires: glew-devel
|
||||
BuildRequires: hdf5-devel
|
||||
BuildRequires: json-devel
|
||||
BuildRequires: jsoncpp-devel
|
||||
|
|
@ -126,12 +115,10 @@ BuildRequires: libGL-devel
|
|||
BuildRequires: libharu-devel >= 2.4.0
|
||||
BuildRequires: libICE-devel
|
||||
BuildRequires: libjpeg-devel
|
||||
BuildRequires: liblas-devel
|
||||
BuildRequires: libpng-devel
|
||||
BuildRequires: libpq-devel
|
||||
BuildRequires: libtheora-devel
|
||||
BuildRequires: libtiff-devel
|
||||
BuildRequires: libxkbcommon-devel
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: libX11-devel
|
||||
BuildRequires: libXcursor-devel
|
||||
|
|
@ -140,27 +127,22 @@ BuildRequires: libXt-devel
|
|||
BuildRequires: lz4-devel
|
||||
BuildRequires: mariadb-connector-c-devel
|
||||
%{?with_OSMesa:BuildRequires: mesa-libOSMesa-devel}
|
||||
BuildRequires: motif-devel
|
||||
BuildRequires: netcdf-cxx-devel
|
||||
%if %{without bootstrap}
|
||||
BuildRequires: opencascade-devel
|
||||
%endif
|
||||
BuildRequires: openslide-devel
|
||||
# Currently does not provide OpenVDBConfig.cmake
|
||||
#BuildRequires: openvdb-devel
|
||||
BuildRequires: openvr-devel
|
||||
BuildRequires: openxr-devel
|
||||
BuildRequires: PDAL-devel
|
||||
BuildRequires: PEGTL-devel
|
||||
BuildRequires: proj-devel
|
||||
BuildRequires: pugixml-devel
|
||||
BuildRequires: python%{python3_pkgversion}-devel
|
||||
BuildRequires: cmake(Qt6UiPlugin)
|
||||
BuildRequires: cmake(Qt6Quick)
|
||||
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: unixODBC-devel
|
||||
BuildRequires: utf8cpp-devel
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: chrpath
|
||||
|
|
@ -205,18 +187,15 @@ Requires: double-conversion-devel%{?_isa} \
|
|||
# eigen3 is noarch and header-only \
|
||||
Requires: eigen3-static \
|
||||
Requires: expat-devel%{?_isa} \
|
||||
# fast_float is noarch and header-only \
|
||||
Requires: fast_float-devel \
|
||||
Requires: ffmpeg-free-devel%{?_isa} \
|
||||
%if %{with fmt} \
|
||||
Requires: fmt-devel%{?_isa} \
|
||||
%endif \
|
||||
Requires: freeglut-devel%{?_isa} \
|
||||
Requires: freetype-devel%{?_isa} \
|
||||
Requires: gdal-devel%{?_isa} \
|
||||
%if %{with gl2ps} \
|
||||
Requires: gl2ps-devel%{?_isa} \
|
||||
%endif \
|
||||
Requires: glew-devel%{?_isa} \
|
||||
Requires: json-devel%{?_isa} \
|
||||
Requires: jsoncpp-devel%{?_isa} \
|
||||
Requires: lapack-devel%{?_isa} \
|
||||
|
|
@ -224,13 +203,11 @@ Requires: libarchive-devel%{?_isa} \
|
|||
Requires: libGL-devel%{?_isa} \
|
||||
Requires: libharu-devel%{?_isa} >= 2.3.0-9 \
|
||||
Requires: libjpeg-devel%{?_isa} \
|
||||
Requires: liblas-devel%{?_isa} \
|
||||
Requires: libogg-devel%{?_isa} \
|
||||
Requires: libpng-devel%{?_isa} \
|
||||
Requires: libpq-devel%{?_isa} \
|
||||
Requires: libtheora-devel%{?_isa} \
|
||||
Requires: libtiff-devel%{?_isa} \
|
||||
Requires: libxkbcommon-devel%{?_isa} \
|
||||
Requires: libxml2-devel%{?_isa} \
|
||||
Requires: libX11-devel%{?_isa} \
|
||||
Requires: libXcursor-devel%{?_isa} \
|
||||
|
|
@ -242,25 +219,17 @@ Requires: mariadb-connector-c-devel%{?_isa} \
|
|||
Requires: mesa-libOSMesa-devel%{?_isa} \
|
||||
%endif \
|
||||
Requires: netcdf-cxx-devel%{?_isa} \
|
||||
%if %{without bootstrap} \
|
||||
Requires: opencascade-devel%{?_isa} \
|
||||
%endif \
|
||||
Requires: openslide-devel%{?_isa} \
|
||||
#Requires: openvdb-devel%{?_isa} \
|
||||
Requires: openvr-devel%{?_isa} \
|
||||
Requires: openxr-devel%{?_isa} \
|
||||
Requires: PDAL-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(Qt6) \
|
||||
Requires: cmake(Qt6Core5Compat) \
|
||||
Requires: cmake(Qt6Quick) \
|
||||
Requires: cmake(Qt6UiPlugin) \
|
||||
Requires: unixODBC-devel%{?_isa} \
|
||||
Requires: cmake(Qt5) \
|
||||
Requires: cmake(Qt5UiPlugin) \
|
||||
Requires: cmake(Qt5X11Extras) \
|
||||
Requires: qt5-qtwebkit-devel%{?_isa} \
|
||||
Requires: utf8cpp-devel \
|
||||
Requires: zlib-devel%{?_isa} \
|
||||
|
||||
|
|
@ -286,7 +255,6 @@ Provides: bundled(kwsys-systemtools)
|
|||
Provides: bundled(diy2)
|
||||
Provides: bundled(exodusII) = 2.0.0
|
||||
Provides: bundled(exprtk) = 2.71
|
||||
Provides: bundled(fides)
|
||||
%if !%{with fmt}
|
||||
Provides: bundled(fmt) = 8.1.0
|
||||
%endif
|
||||
|
|
@ -294,17 +262,10 @@ Provides: bundled(ftgl) = 1.32
|
|||
%if !%{with gl2ps}
|
||||
Provides: bundled(gl2ps) = 1.4.0
|
||||
%endif
|
||||
Provides: bundled(h5part) = 1.6.6
|
||||
Provides: bundled(ioss) = 20221014
|
||||
Provides: bundled(itlib-small-vector) = 1.0.4
|
||||
Provides: bundled(ioss) = 20210512
|
||||
Provides: bundled(kissfft)
|
||||
Provides: bundled(loguru) = 2.1
|
||||
Provides: bundled(metaio)
|
||||
Provides: bundled(scn) = 4.0.0
|
||||
# kitware library https://gitlab.kitware.com/utils/token
|
||||
Provides: bundled(token) = 23.09
|
||||
Provides: bundled(verdict) = 1.4.0
|
||||
Provides: bundled(viskores) = 1.0.0
|
||||
Provides: bundled(vpic)
|
||||
Provides: bundled(xdmf2) = 2.1
|
||||
Provides: bundled(xdmf3)
|
||||
|
|
@ -559,36 +520,18 @@ programming languages.
|
|||
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -b 1 -n VTK-%{srcver}
|
||||
%autosetup -p1 -b 1 -n VTK-%{version}
|
||||
# Remove included thirdparty sources just to be sure
|
||||
# ls VTK-*/ThirdParty/*/vtk* -dl | grep ^d
|
||||
# TODO - diy2 - not yet packaged
|
||||
# TODO - exodusII - not yet packaged
|
||||
# TODO - exprtk - not yet packaged
|
||||
# TODO - fides - not yet packaged
|
||||
# TODO - h5part - not yet packaged
|
||||
# TODO - ioss - not yet packaged
|
||||
# TODO - kissfft - not yet packaged
|
||||
# TODO - loguru - not yet packaged
|
||||
# TODO - scn - not yet packaged
|
||||
# TODO - verdict - not yet packaged
|
||||
# TODO - viskores - not yet packaged
|
||||
# TODO - VPIC - not yet packaged
|
||||
# TODO - xdmf2 - not yet packaged
|
||||
# TODO - xdmf3 - not yet packaged
|
||||
for x in vtk{cgns,cli11,doubleconversion,eigen,expat,fast_float,%{?with_fmt:fmt,}freetype,%{?with_gl2ps:gl2ps,}hdf5,jpeg,jsoncpp,libharu,libproj,libxml2,lz4,lzma,mpi4py,netcdf,nlohmannjson,ogg,pegtl,png,pugixml,sqlite,theora,tiff,utf8,zlib}
|
||||
for x in vtk{cli11,doubleconversion,eigen,expat,%{?with_fmt:fmt,}freetype,%{?with_gl2ps:gl2ps,}glew,hdf5,jpeg,jsoncpp,libharu,libproj,libxml2,lz4,lzma,mpi4py,netcdf,ogg,pegtl,png,pugixml,sqlite,theora,tiff,utf8,zfp,zlib}
|
||||
do
|
||||
rm -r ThirdParty/*/${x}
|
||||
done
|
||||
%ifarch %{ix86}
|
||||
rm -r ThirdParty/xdmf3
|
||||
%endif
|
||||
|
||||
# Remove version requirements
|
||||
sed -i -e '/VERSION *"/d' ThirdParty/fast_float/CMakeLists.txt
|
||||
|
||||
# Remove version requirements
|
||||
sed -i -e '/VERSION *"/d' ThirdParty/fast_float/CMakeLists.txt
|
||||
|
||||
# Remove unused KWSys items
|
||||
find Utilities/KWSys/vtksys/ -name \*.[ch]\* | grep -vE '^Utilities/KWSys/vtksys/([a-z].*|Configure|SharedForward|Status|String\.hxx|Base64|CommandLineArguments|Directory|DynamicLoader|Encoding|FStream|FundamentalType|Glob|MD5|Process|RegularExpression|System|SystemInformation|SystemTools)(C|CXX|UNIX)?\.' | xargs rm
|
||||
|
|
@ -598,11 +541,7 @@ mkdir vtk-examples
|
|||
cp -a Examples vtk-examples
|
||||
find vtk-examples -type f | xargs chmod -R a-x
|
||||
|
||||
# Requires OpenTURNS which is not packaged
|
||||
# -DVTK_MODULE_ENABLE_VTK_FiltersOpenTURNS:STRING=YES
|
||||
# fides and ADIOS2 require ADIOS2 which is not packaged
|
||||
# ZSpace is Windows only, but is getting enabled anyway
|
||||
# Xdmf3 fails on i686 - https://gitlab.kitware.com/vtk/vtk/-/issues/19402
|
||||
|
||||
%global vtk_cmake_options \\\
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \\\
|
||||
-DCMAKE_INSTALL_DOCDIR=share/doc/%{name} \\\
|
||||
|
|
@ -610,6 +549,7 @@ find vtk-examples -type f | xargs chmod -R a-x
|
|||
-DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \\\
|
||||
-DCMAKE_INSTALL_JNILIBDIR:PATH=%{_lib}/%{name} \\\
|
||||
-DCMAKE_INSTALL_LICENSEDIR:PATH=share/licenses/%{name} \\\
|
||||
-DCMAKE_INSTALL_QMLDIR:PATH=%{_lib}/qt5/qml \\\
|
||||
-DVTK_CUSTOM_LIBRARY_SUFFIX="" \\\
|
||||
-DVTK_VERSIONED_INSTALL:BOOL=OFF \\\
|
||||
-DVTK_GROUP_ENABLE_Imaging:STRING=YES \\\
|
||||
|
|
@ -618,34 +558,15 @@ find vtk-examples -type f | xargs chmod -R a-x
|
|||
-DVTK_GROUP_ENABLE_StandAlone:STRING=YES \\\
|
||||
-DVTK_GROUP_ENABLE_Views:STRING=YES \\\
|
||||
-DVTK_GROUP_ENABLE_Web:STRING=YES \\\
|
||||
-DVTK_MODULE_ENABLE_VTK_AcceleratorsVTKmFilters: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_FiltersParallelStatistics:STRING=YES \\\
|
||||
-DVTK_MODULE_ENABLE_VTK_FiltersParallelVerdict:STRING=YES \\\
|
||||
-DVTK_MODULE_ENABLE_VTK_ImagingOpenGL2:STRING=YES \\\
|
||||
-DVTK_MODULE_ENABLE_VTK_InfovisBoost:STRING=YES \\\
|
||||
-DVTK_MODULE_ENABLE_VTK_InfovisBoostGraphAlgorithms:STRING=YES \\\
|
||||
%if %{with bootstrap} \
|
||||
-DVTK_MODULE_ENABLE_VTK_IOOCCT:STRING=NO \\\
|
||||
%endif \
|
||||
-DVTK_MODULE_ENABLE_VTK_IOFDS:STRING=YES \\\
|
||||
-DVTK_MODULE_ENABLE_VTK_IOH5part:STRING=YES \\\
|
||||
-DVTK_MODULE_ENABLE_VTK_IOH5Rage:STRING=YES \\\
|
||||
-DVTK_MODULE_ENABLE_VTK_IOMySQL:STRING=YES \\\
|
||||
-DVTK_MODULE_ENABLE_VTK_IOOMF:STRING=YES \\\
|
||||
-DVTK_MODULE_ENABLE_VTK_IOParallelLSDyna:STRING=YES \\\
|
||||
-DVTK_MODULE_ENABLE_VTK_IOTRUCHAS:STRING=YES \\\
|
||||
-DVTK_MODULE_ENABLE_VTK_IOVPIC:STRING=YES \\\
|
||||
-DVTK_MODULE_ENABLE_VTK_IOXdmf2:STRING=YES \\\
|
||||
%ifarch %{ix86} \
|
||||
-DVTK_MODULE_ENABLE_VTK_IOXdmf3:STRING=NO \\\
|
||||
%endif \
|
||||
-DVTK_MODULE_ENABLE_VTK_RenderingAnari:STRING=NO \\\
|
||||
-DVTK_MODULE_ENABLE_VTK_RenderingMatplotlib:STRING=YES \\\
|
||||
-DVTK_MODULE_ENABLE_VTK_RenderingVolumeAMR:STRING=YES \\\
|
||||
-DVTK_PYTHON_OPTIONAL_LINK:BOOL=OFF \\\
|
||||
-DVTK_PYTHON_VERSION=3 \\\
|
||||
%if %{with OSMesa} \
|
||||
-DVTK_OPENGL_HAS_OSMESA:BOOL=ON \\\
|
||||
%endif \
|
||||
|
|
@ -664,12 +585,6 @@ find vtk-examples -type f | xargs chmod -R a-x
|
|||
%endif \
|
||||
-DVTK_WRAP_PYTHON:BOOL=ON \\\
|
||||
-DVTK_USE_EXTERNAL=ON \\\
|
||||
-DVTK_BUILD_ALL_MODULES=ON \\\
|
||||
-DVTK_ENABLE_OSPRAY:BOOL=OFF \\\
|
||||
-DVTK_MODULE_ENABLE_VTK_fides:STRING=NO \\\
|
||||
-DVTK_MODULE_ENABLE_VTK_FiltersOpenTURNS:STRING=NO \\\
|
||||
-DVTK_MODULE_ENABLE_VTK_IOADIOS2:STRING=NO \\\
|
||||
-DVTK_MODULE_ENABLE_VTK_IOOpenVDB:STRING=NO \\\
|
||||
%if !%{with fmt} \
|
||||
-DVTK_MODULE_USE_EXTERNAL_VTK_fmt:BOOL=OFF \\\
|
||||
%endif \
|
||||
|
|
@ -678,18 +593,16 @@ find vtk-examples -type f | xargs chmod -R a-x
|
|||
%endif \
|
||||
-DVTK_MODULE_USE_EXTERNAL_VTK_exprtk:BOOL=OFF \\\
|
||||
-DVTK_MODULE_USE_EXTERNAL_VTK_ioss:BOOL=OFF \\\
|
||||
-DVTK_MODULE_USE_EXTERNAL_VTK_scn:BOOL=OFF \\\
|
||||
-DVTK_MODULE_USE_EXTERNAL_VTK_token:BOOL=OFF \\\
|
||||
-DVTK_MODULE_USE_EXTERNAL_VTK_verdict:BOOL=OFF \\\
|
||||
-DVTK_MODULE_USE_EXTERNAL_VTK_vtkviskores:BOOL=OFF \\\
|
||||
-DVTK_USE_TK=ON \\\
|
||||
%{?with_flexiblas:-DBLA_VENDOR=FlexiBLAS}
|
||||
# https://gitlab.kitware.com/cmake/cmake/issues/17223
|
||||
#-DVTK_MODULE_ENABLE_VTK_IOPostgreSQL:STRING=YES \\\
|
||||
|
||||
# $mpi will be evaluated in the loops below
|
||||
%global _vpath_builddir %{_vendor}-%{_target_os}-build-${mpi:-serial}
|
||||
|
||||
|
||||
%conf
|
||||
%build
|
||||
export CFLAGS="%{optflags} -D_UNICODE -DHAVE_UINTPTR_T"
|
||||
export CXXFLAGS="%{optflags} -D_UNICODE -DHAVE_UINTPTR_T"
|
||||
export CPPFLAGS=-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
|
||||
|
|
@ -705,41 +618,29 @@ export JAVA_TOOL_OPTIONS=-Xmx2048m
|
|||
%endif
|
||||
%endif
|
||||
|
||||
|
||||
%cmake %{cmake_gen} \
|
||||
%{vtk_cmake_options} \
|
||||
-DVTK_BUILD_DOCUMENTATION:BOOL=ON \
|
||||
-DVTK_BUILD_EXAMPLES:BOOL=ON \
|
||||
-DVTK_BUILD_TESTING:BOOL=ON
|
||||
%cmake_build -- --output-sync
|
||||
%cmake_build --target DoxygenDoc
|
||||
|
||||
|
||||
#-DVTK_MODULE_ENABLE_VTK_FiltersParallelStatistics:STRING=YES \
|
||||
|
||||
export CC=mpicc
|
||||
export CXX=mpic++
|
||||
for mpi in %{mpi_list}
|
||||
do
|
||||
module load mpi/$mpi-%{_arch}
|
||||
# CMAKE_INSTALL_LIBDIR -> ARCHIVE_DESTINATION must not be an absolute path
|
||||
# VTK_MODULE_ENABLE_VTK_FiltersParallelStatistics need MPI modules at the moment
|
||||
#CMAKE_INSTALL_LIBDIR -> ARCHIVE_DESTINATION must not be an absolute path
|
||||
%cmake %{cmake_gen} \
|
||||
%{vtk_cmake_options} \
|
||||
-DCMAKE_PREFIX_PATH:PATH=$MPI_HOME \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=$MPI_HOME \
|
||||
-DCMAKE_INSTALL_LIBDIR:PATH=lib \
|
||||
-DCMAKE_INSTALL_JNILIBDIR:PATH=lib/%{name} \
|
||||
-DVTK_MODULE_ENABLE_VTK_IOPIO:STRING=YES \
|
||||
-DCMAKE_INSTALL_QMLDIR:PATH=lib/qt5/qml \
|
||||
-DVTK_USE_MPI:BOOL=ON
|
||||
module purge
|
||||
done
|
||||
|
||||
|
||||
%build
|
||||
%cmake_build -- --output-sync
|
||||
%cmake_build --target DoxygenDoc
|
||||
for mpi in %{mpi_list}
|
||||
do
|
||||
module load mpi/$mpi-%{_arch}
|
||||
%cmake_build -- --output-sync
|
||||
module purge
|
||||
done
|
||||
|
|
@ -826,8 +727,6 @@ rm -v %{buildroot}/%{_libdir}/openmpi/lib/cmake/%{name}/patches/99/FindHDF5.cmak
|
|||
export QA_RPATHS=18
|
||||
|
||||
|
||||
# Test take a very long time on s390x because many tests hit the default 25 minute timeout
|
||||
%ifnarch s390x
|
||||
%check
|
||||
cp %SOURCE2 .
|
||||
%if %{with xdummy}
|
||||
|
|
@ -845,14 +744,11 @@ export FLEXIBLAS=netlib
|
|||
kill %1 || :
|
||||
cat xorg.log
|
||||
%endif
|
||||
%endif
|
||||
|
||||
|
||||
%files -f %{_vendor}-%{_target_os}-build-serial/libs.list
|
||||
%license %{_defaultlicensedir}/%{name}/
|
||||
%doc README.md _docs/Wrapping
|
||||
%{_datadir}/vr_actions/
|
||||
%{_datadir}/xr_actions/
|
||||
|
||||
%files devel
|
||||
%doc Utilities/Upgrading
|
||||
|
|
@ -860,8 +756,6 @@ cat xorg.log
|
|||
%{_bindir}/vtkProbeOpenGLVersion
|
||||
%{_bindir}/vtkWrapHierarchy
|
||||
%{_bindir}/vtkWrapJava
|
||||
%{_bindir}/vtkWrapSerDes
|
||||
|
||||
%{_includedir}/%{name}
|
||||
%{_libdir}/*.so
|
||||
%{_libdir}/cmake/%{name}/
|
||||
|
|
@ -886,20 +780,18 @@ cat xorg.log
|
|||
%files qt
|
||||
%{_libdir}/lib*Qt*.so.*
|
||||
%exclude %{_libdir}/*Python*.so.*
|
||||
%{_libdir}/qt5/qml/*
|
||||
|
||||
%if %{with mpich}
|
||||
%files mpich -f %{_vendor}-%{_target_os}-build-mpich/libs.list
|
||||
%license %{_defaultlicensedir}/%{name}-mpich/
|
||||
%doc README.md _docs/Wrapping
|
||||
%{_libdir}/mpich/share/vr_actions/
|
||||
%{_libdir}/mpich/share/xr_actions/
|
||||
|
||||
%files mpich-devel
|
||||
%{_libdir}/mpich/bin/vtkParseJava
|
||||
%{_libdir}/mpich/bin/vtkProbeOpenGLVersion
|
||||
%{_libdir}/mpich/bin/vtkWrapHierarchy
|
||||
%{_libdir}/mpich/bin/vtkWrapJava
|
||||
%{_libdir}/mpich/bin/vtkWrapSerDes
|
||||
%{_libdir}/mpich/include/
|
||||
%{_libdir}/mpich/lib/*.so
|
||||
%{_libdir}/mpich/lib/cmake/
|
||||
|
|
@ -925,21 +817,19 @@ cat xorg.log
|
|||
%files mpich-qt
|
||||
%{_libdir}/mpich/lib/lib*Qt*.so.*
|
||||
%exclude %{_libdir}/mpich/lib/*Python*.so.*
|
||||
%{_libdir}/mpich/lib/qt5/
|
||||
%endif
|
||||
|
||||
%if %{with openmpi}
|
||||
%files openmpi -f %{_vendor}-%{_target_os}-build-openmpi/libs.list
|
||||
%license %{_defaultlicensedir}/%{name}-openmpi/
|
||||
%doc README.md _docs/Wrapping
|
||||
%{_libdir}/openmpi/share/vr_actions/
|
||||
%{_libdir}/openmpi/share/xr_actions/
|
||||
|
||||
%files openmpi-devel
|
||||
%{_libdir}/openmpi/bin/vtkParseJava
|
||||
%{_libdir}/openmpi/bin/vtkProbeOpenGLVersion
|
||||
%{_libdir}/openmpi/bin/vtkWrapHierarchy
|
||||
%{_libdir}/openmpi/bin/vtkWrapJava
|
||||
%{_libdir}/openmpi/bin/vtkWrapSerDes
|
||||
%{_libdir}/openmpi/include/
|
||||
%{_libdir}/openmpi/lib/*.so
|
||||
%{_libdir}/openmpi/lib/cmake/
|
||||
|
|
@ -965,6 +855,7 @@ cat xorg.log
|
|||
%files openmpi-qt
|
||||
%{_libdir}/openmpi/lib/lib*Qt*.so.*
|
||||
%exclude %{_libdir}/openmpi/lib/*Python*.so.*
|
||||
%{_libdir}/openmpi/lib/qt5/
|
||||
%endif
|
||||
|
||||
%files data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue