Update to 9.1.0

This commit is contained in:
Orion Poplawski 2021-11-03 06:49:00 -06:00
parent 80ba414461
commit 1c260d929f
8 changed files with 86 additions and 358 deletions

2
.gitignore vendored
View File

@ -25,3 +25,5 @@ vtk-5.6.0.tar.gz
/VTKData-9.0.2.tar.gz
/VTK-9.0.3.tar.gz
/VTKData-9.0.3.tar.gz
/VTK-9.1.0.tar.gz
/VTKData-9.1.0.tar.gz

View File

@ -1,2 +1,2 @@
SHA512 (VTK-9.0.3.tar.gz) = 00528011f9206444d09fc6cea05c46930745bb70ea02be6244ab3eb510ae82af772157c025157b1761dc4c6a9ab538b57f814c03a708f30aa3598a421fdc6ae2
SHA512 (VTKData-9.0.3.tar.gz) = 28ab2ecb32860d820f736e9ceb4345bcd03471f0a35b90f8c9ccbe05454f7a95a4de3c99bae2f4b9db87a27ef8fe50159cd283f5e921f4e6e69b06a50a0570c6
SHA512 (VTK-9.1.0.tar.gz) = b2c4be8795fa082e0776e6ffdb9a3fd88dbb235841a8369a34ebe26cf4c5fcb1610fcca987be314510629da3edc74ee76c0ce2cc88d5ef4b099ac550ac892b0a
SHA512 (VTKData-9.1.0.tar.gz) = 134a8dd2b029d3a4959b601987e68a0caa5d050532655b6786b5b67dfc77d3639628b2b957511f8998e63864c247c501a11a6aed248c762f13e860d878778e1a

View File

@ -1,8 +1,7 @@
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
diff -up VTK-9.1.0.rc1/Common/Core/vtkDataArray.cxx.AllValues VTK-9.1.0.rc1/Common/Core/vtkDataArray.cxx
--- VTK-9.1.0.rc1/Common/Core/vtkDataArray.cxx.AllValues 2021-10-01 12:23:49.000000000 -0600
+++ VTK-9.1.0.rc1/Common/Core/vtkDataArray.cxx 2021-10-04 19:27:42.557502417 -0600
@@ -1674,7 +1674,7 @@ struct ScalarRangeDispatchWrapper
void operator()(ArrayT* array)
{
this->Success = vtkDataArrayPrivate::DoComputeScalarRange(
@ -11,7 +10,7 @@ Index: VTK-9.0.1/Common/Core/vtkDataArray.cxx
}
};
@@ -1646,7 +1646,7 @@ struct VectorRangeDispatchWrapper
@@ -1693,7 +1693,7 @@ struct VectorRangeDispatchWrapper
void operator()(ArrayT* array)
{
this->Success = vtkDataArrayPrivate::DoComputeVectorRange(
@ -20,10 +19,9 @@ Index: VTK-9.0.1/Common/Core/vtkDataArray.cxx
}
};
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
diff -up VTK-9.1.0.rc1/Common/Core/vtkDataArray.h.AllValues VTK-9.1.0.rc1/Common/Core/vtkDataArray.h
--- VTK-9.1.0.rc1/Common/Core/vtkDataArray.h.AllValues 2021-10-01 12:23:49.000000000 -0600
+++ VTK-9.1.0.rc1/Common/Core/vtkDataArray.h 2021-10-04 19:27:42.557502417 -0600
@@ -599,7 +599,7 @@ vtkArrayDownCast_FastCastMacro(vtkDataAr
// vtkGenericDataArray.h as well.
namespace vtkDataArrayPrivate
@ -33,33 +31,10 @@ Index: VTK-9.0.1/Common/Core/vtkDataArray.h
{
};
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<DerivedT, Value
using namespace vtk_GDA_detail;
using Supported = IsSupported<DerivedT, ValueTypeT>;
return ComputeScalarValueRangeImpl(
- static_cast<DerivedT*>(this), ranges, vtkDataArrayPrivate::AllValues{}, Supported{});
+ static_cast<DerivedT*>(this), ranges, vtkDataArrayPrivate::vtkAllValues{}, Supported{});
}
//-----------------------------------------------------------------------------
@@ -1202,7 +1202,7 @@ bool vtkGenericDataArray<DerivedT, Value
using namespace vtk_GDA_detail;
using Supported = IsSupported<DerivedT, ValueTypeT>;
return ComputeVectorValueRangeImpl(
- static_cast<DerivedT*>(this), range, vtkDataArrayPrivate::AllValues{}, Supported{});
+ static_cast<DerivedT*>(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 <int NumComps>
diff -up VTK-9.1.0.rc1/Common/Core/vtkDataArrayPrivate.txx.AllValues VTK-9.1.0.rc1/Common/Core/vtkDataArrayPrivate.txx
--- VTK-9.1.0.rc1/Common/Core/vtkDataArrayPrivate.txx.AllValues 2021-10-01 12:23:49.000000000 -0600
+++ VTK-9.1.0.rc1/Common/Core/vtkDataArrayPrivate.txx 2021-10-04 19:27:42.559502435 -0600
@@ -310,7 +310,7 @@ template <int NumComps>
struct ComputeScalarRange
{
template <class ArrayT, typename RangeValueType>
@ -68,7 +43,7 @@ Index: VTK-9.0.1/Common/Core/vtkDataArrayPrivate.txx
{
AllValuesMinAndMax<NumComps, ArrayT> minmax(array);
vtkSMPTools::For(0, array->GetNumberOfTuples(), minmax);
@@ -435,7 +435,7 @@ public:
@@ -447,7 +447,7 @@ public:
};
template <class ArrayT, typename RangeValueType>
@ -77,7 +52,7 @@ Index: VTK-9.0.1/Common/Core/vtkDataArrayPrivate.txx
{
AllValuesGenericMinAndMax<ArrayT> minmax(array);
vtkSMPTools::For(0, array->GetNumberOfTuples(), minmax);
@@ -518,7 +518,7 @@ bool DoComputeScalarRange(ArrayT* array,
@@ -530,7 +530,7 @@ bool DoComputeScalarRange(ArrayT* array,
//----------------------------------------------------------------------------
// generic implementation that operates on ValueType.
template <typename ArrayT, typename RangeValueType>
@ -86,10 +61,9 @@ Index: VTK-9.0.1/Common/Core/vtkDataArrayPrivate.txx
{
range[0] = vtkTypeTraits<RangeValueType>::Max();
range[1] = vtkTypeTraits<RangeValueType>::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
diff -up VTK-9.1.0.rc1/Common/Core/vtkGenericDataArray.h.AllValues VTK-9.1.0.rc1/Common/Core/vtkGenericDataArray.h
--- VTK-9.1.0.rc1/Common/Core/vtkGenericDataArray.h.AllValues 2021-10-01 12:23:49.000000000 -0600
+++ VTK-9.1.0.rc1/Common/Core/vtkGenericDataArray.h 2021-10-04 19:27:42.559502435 -0600
@@ -414,7 +414,7 @@ namespace vtkDataArrayPrivate
template <typename A, typename R, typename T>
bool DoComputeScalarRange(A*, R*, T);
@ -135,3 +109,24 @@ Index: VTK-9.0.1/Common/Core/vtkGenericDataArray.h
extern template VTKCOMMONCORE_EXPORT bool DoComputeVectorRange( \
ArrayType*, ValueType[2], vtkDataArrayPrivate::FiniteValues);
diff -up VTK-9.1.0.rc1/Common/Core/vtkGenericDataArray.txx.AllValues VTK-9.1.0.rc1/Common/Core/vtkGenericDataArray.txx
--- VTK-9.1.0.rc1/Common/Core/vtkGenericDataArray.txx.AllValues 2021-10-01 12:23:49.000000000 -0600
+++ VTK-9.1.0.rc1/Common/Core/vtkGenericDataArray.txx 2021-10-04 19:27:42.558502426 -0600
@@ -1190,7 +1190,7 @@ bool vtkGenericDataArray<DerivedT, Value
using namespace vtk_GDA_detail;
using Supported = IsSupported<DerivedT, ValueTypeT>;
return ComputeScalarValueRangeImpl(
- static_cast<DerivedT*>(this), ranges, vtkDataArrayPrivate::AllValues{}, Supported{});
+ static_cast<DerivedT*>(this), ranges, vtkDataArrayPrivate::vtkAllValues{}, Supported{});
}
//-----------------------------------------------------------------------------
@@ -1200,7 +1200,7 @@ bool vtkGenericDataArray<DerivedT, Value
using namespace vtk_GDA_detail;
using Supported = IsSupported<DerivedT, ValueTypeT>;
return ComputeVectorValueRangeImpl(
- static_cast<DerivedT*>(this), range, vtkDataArrayPrivate::AllValues{}, Supported{});
+ static_cast<DerivedT*>(this), range, vtkDataArrayPrivate::vtkAllValues{}, Supported{});
}
//-----------------------------------------------------------------------------

View File

@ -1,71 +0,0 @@
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 <sstream>
+#include <X11/Xatom.h>
+#include <X11/cursorfont.h>
+#if VTK_HAVE_XCURSOR
+#include <X11/Xcursor/Xcursor.h>
+#endif
#include <X11/Xlib.h>
#include <X11/Xutil.h>
-#include <X11/cursorfont.h>
+/*
+ * 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<vtkXVisualInfo*>(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 <X11/Xlib.h> // Needed for X types used in the public interface
-#include <X11/Xutil.h> // Needed for X types used in the public interface
#include <stack> // 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();
//@}

View File

@ -1,60 +0,0 @@
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 <algorithm>
#include <cmath>
+#include <limits>
#include <unordered_map>
#include <vector>
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 <cmath>
+#include <limits>
#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 <cassert>
#include <cmath>
#include <iterator>
+#include <limits>
#include <set>
#include <vector>
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 <cmath>
+#include <limits>
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 <algorithm>
#include <cmath>
#include <iterator>
+#include <limits>
#include <set>
#include <vector>

View File

@ -1,19 +0,0 @@
commit 27e159a06042fd144dd9d30183cb38b1eba943d7
Author: Aleksei Nikiforov <darktemplar@basealt.ru>
Date: Fri Jun 25 11:36:29 2021 +0300
Fix crash in vtkOpenSlideReader destructor due to uninitialized pointer use
diff --git a/Domains/Microscopy/vtkOpenSlideReader.h b/Domains/Microscopy/vtkOpenSlideReader.h
index 0e6daf8667..18a767886f 100644
--- a/Domains/Microscopy/vtkOpenSlideReader.h
+++ b/Domains/Microscopy/vtkOpenSlideReader.h
@@ -73,7 +73,7 @@ protected:
void ExecuteDataWithInformation(vtkDataObject* out, vtkInformation* outInfo) override;
private:
- openslide_t* openslide_handle;
+ openslide_t* openslide_handle = nullptr;
vtkOpenSlideReader(const vtkOpenSlideReader&) = delete;
void operator=(const vtkOpenSlideReader&) = delete;

View File

@ -1,131 +0,0 @@
diff -up VTK-9.0.1/Geovis/Core/vtkGeoProjection.cxx.proj5 VTK-9.0.1/Geovis/Core/vtkGeoProjection.cxx
--- VTK-9.0.1/Geovis/Core/vtkGeoProjection.cxx.proj5 2020-06-26 07:24:40.000000000 -0600
+++ VTK-9.0.1/Geovis/Core/vtkGeoProjection.cxx 2021-03-13 11:36:29.049321435 -0700
@@ -121,7 +121,11 @@ vtkGeoProjection::~vtkGeoProjection()
this->SetPROJ4String(nullptr);
if (this->Projection)
{
+#if PROJ_VERSION_MAJOR >= 5
+ proj_destroy(this->Projection);
+#else
pj_free(this->Projection);
+#endif
}
delete this->Internals;
this->Internals = nullptr;
@@ -185,13 +189,21 @@ int vtkGeoProjection::UpdateProjection()
if (this->Projection)
{
+#if PROJ_VERSION_MAJOR >= 5
+ proj_destroy(this->Projection);
+#else
pj_free(this->Projection);
+#endif
this->Projection = nullptr;
}
if (this->PROJ4String && strlen(this->PROJ4String))
{
+#if PROJ_VERSION_MAJOR >= 5
+ this->Projection = proj_create(PJ_DEFAULT_CTX, this->PROJ4String);
+#else
this->Projection = pj_init_plus(this->PROJ4String);
+#endif
}
else
{
@@ -230,8 +242,11 @@ int vtkGeoProjection::UpdateProjection()
stringHolder[i] = param.str();
pjArgs[3 + i] = stringHolder[i].c_str();
}
-
+#if PROJ_VERSION_MAJOR >= 5
+ this->Projection = proj_create_argv(PJ_DEFAULT_CTX, argSize, const_cast<char**>(pjArgs));
+#else
this->Projection = pj_init(argSize, const_cast<char**>(pjArgs));
+#endif
delete[] pjArgs;
}
this->ProjectionMTime = this->GetMTime();
diff -up VTK-9.0.1/Geovis/Core/vtkGeoTransform.cxx.proj5 VTK-9.0.1/Geovis/Core/vtkGeoTransform.cxx
--- VTK-9.0.1/Geovis/Core/vtkGeoTransform.cxx.proj5 2020-06-26 07:24:40.000000000 -0600
+++ VTK-9.0.1/Geovis/Core/vtkGeoTransform.cxx 2021-03-13 11:35:13.646115813 -0700
@@ -163,8 +163,12 @@ void vtkGeoTransform::InternalTransformP
projPJ src = this->SourceProjection ? this->SourceProjection->GetProjection() : nullptr;
projPJ dst = this->DestinationProjection ? this->DestinationProjection->GetProjection() : nullptr;
int delta = stride - 2;
+#if PROJ_VERSION_MAJOR >= 5
+ PJ_COORD c, c_out;
+#else
projLP lp;
projXY xy;
+#endif
if (src)
{
// Convert from src system to lat/long using inverse of src transform
@@ -172,17 +176,15 @@ void vtkGeoTransform::InternalTransformP
for (vtkIdType i = 0; i < numPts; ++i)
{
#if PROJ_VERSION_MAJOR >= 5
- xy.x = coord[0];
- xy.y = coord[1];
+ c.xy.x = coord[0];
+ c.xy.y = coord[1];
+ c_out = proj_trans(src, PJ_INV, c);
+ coord[0] = c_out.lp.lam;
+ coord[1] = c_out.lp.phi;
#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
@@ -208,17 +210,15 @@ void vtkGeoTransform::InternalTransformP
for (vtkIdType i = 0; i < numPts; ++i)
{
#if PROJ_VERSION_MAJOR >= 5
- lp.lam = coord[0];
- lp.phi = coord[1];
+ c.lp.lam = coord[0];
+ c.lp.phi = coord[1];
+ c_out = proj_trans(src, PJ_FWD, c);
+ coord[0] = c_out.xy.x;
+ coord[1] = c_out.xy.y;
#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
diff -up VTK-9.0.1/ThirdParty/libproj/vtk_libproj.h.in.proj5 VTK-9.0.1/ThirdParty/libproj/vtk_libproj.h.in
--- VTK-9.0.1/ThirdParty/libproj/vtk_libproj.h.in.proj5 2020-06-26 07:24:40.000000000 -0600
+++ VTK-9.0.1/ThirdParty/libproj/vtk_libproj.h.in 2021-03-13 11:35:13.646115813 -0700
@@ -28,14 +28,9 @@
#if VTK_MODULE_USE_EXTERNAL_vtklibproj
# if VTK_LibPROJ_MAJOR_VERSION >= 5
# include <proj.h>
-# endif
-# if VTK_LibPROJ_MAJOR_VERSION < 6
+# else
# include <projects.h>
# endif
-# if VTK_LibPROJ_MAJOR_VERSION >= 6
-# define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H 1
-# endif
-# include <proj_api.h>
# include <geodesic.h>
#else
# include <vtklibproj/src/projects.h>

View File

@ -28,34 +28,26 @@
# VTK currently is carrying local modifications to gl2ps
%bcond_with gl2ps
%if !%{with gl2ps}
%global vtk_use_system_gl2ps -DVTK_USE_SYSTEM_GL2PS:BOOL=OFF
%endif
# 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.0.3
Release: 4%{?dist}
Version: 9.1.0
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: 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
Source0: https://www.vtk.org/files/release/9.1/VTK-%{version}.tar.gz
Source1: https://www.vtk.org/files/release/9.1/VTKData-%{version}.tar.gz
Source2: xorg.conf
# 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
# Upstream fix for openslidereader initialization that causes Mayavi to crash
# https://bugzilla.redhat.com/show_bug.cgi?id=1966135
Patch4: vtk-openslidereader.patch
# Proj 5 support - backport https://gitlab.kitware.com/vtk/vtk/-/merge_requests/7731
Patch5: vtk-proj5.patch
URL: https://vtk.org/
@ -69,9 +61,14 @@ BuildRequires: blas-devel
BuildRequires: lapack-devel
%endif
BuildRequires: boost-devel
BuildRequires: cgnslib-devel
BuildRequires: cli11-devel
BuildRequires: double-conversion-devel
BuildRequires: eigen3-devel
BuildRequires: expat-devel
%if %{with fmt}
BuildRequires: fmt-devel >= 8.1.0
%endif
BuildRequires: freetype-devel
BuildRequires: gdal-devel
%if %{with gl2ps}
@ -149,10 +146,16 @@ Requires: lapack-devel%{?_isa} \
%endif \
Requires: blas-devel%{?_isa} \
Requires: boost-devel%{?_isa} \
Requires: cgnslib-devel%{?_isa} \
# cli11 is noarch and header-only \
Requires: cli11-static \
Requires: double-conversion-devel%{?_isa} \
# eigen3 is noarch \
Requires: eigen3-devel \
# eigen3 is noarch and header-only \
Requires: eigen3-static \
Requires: expat-devel%{?_isa} \
%if %{with fmt} \
Requires: fmt-devel%{?_isa} \
%endif \
Requires: freetype-devel%{?_isa} \
Requires: gdal-devel%{?_isa} \
%if %{with gl2ps} \
@ -211,16 +214,23 @@ Provides: bundled(kwsys-glob)
Provides: bundled(kwsys-md5)
Provides: bundled(kwsys-process)
Provides: bundled(kwsys-regularexpression)
Provides: bundled(kwsys-status)
Provides: bundled(kwsys-system)
Provides: bundled(kwsys-systeminformation)
Provides: bundled(kwsys-systemtools)
# Other bundled libraries
Provides: bundled(diy2)
Provides: bundled(exodusII) = 2.0.0
Provides: bundled(exprtk) = 2.71
%if !%{with fmt}
Provides: bundled(fmt) = 8.1.0
%endif
Provides: bundled(ftgl) = 1.32
%if !%{with gl2ps}
Provides: bundled(gl2ps) = 1.4.0
%endif
Provides: bundled(ioss) = 20210512
Provides: bundled(kissfft)
Provides: bundled(metaio)
Provides: bundled(verdict) = 1.2.0
Provides: bundled(vpic)
@ -429,11 +439,7 @@ programming languages.
%prep
%setup -q -b 1 -n VTK-%{version}
%patch0 -p1 -b .libharu
%patch1 -p1 -b .limits
%patch2 -p1 -b .includes
%patch3 -p1 -b .AllValues
%patch4 -p1 -b .openslidereader
%patch5 -p1 -b .proj5
# Remove included thirdparty sources just to be sure
# TODO - diy2 - not yet packaged
# TODO - exodusII - not yet packaged
@ -441,19 +447,17 @@ programming languages.
# 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,libharu,libproj,libxml2,lz4,lzma,mpi4py,netcdf,ogg,pegtl,png,pugixml,sqlite,theora,tiff,utf8,zfp,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
# 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
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
# Save an unbuilt copy of the Example's sources for %doc
mkdir vtk-examples
cp -a Examples vtk-examples
# Don't ship Win32 examples
rm -r vtk-examples/Examples/GUI/Win32
find vtk-examples -type f | xargs chmod -R a-x
@ -479,10 +483,8 @@ export JAVA_TOOL_OPTIONS=-Xmx2048m
-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_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 \\\
@ -510,11 +512,15 @@ export JAVA_TOOL_OPTIONS=-Xmx2048m
-DVTK_WRAP_JAVA:BOOL=OFF \\\
%endif \
-DVTK_WRAP_PYTHON:BOOL=ON \\\
-DVTK_USE_OGGTHEORA_ENCODER=ON \\\
-DVTK_USE_EXTERNAL=ON \\\
%if !%{with fmt} \
-DVTK_MODULE_USE_EXTERNAL_VTK_fmt:BOOL=OFF \\\
%endif \
%if !%{with gl2ps} \
-DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps:BOOL=OFF \\\
%endif \
-DVTK_MODULE_USE_EXTERNAL_VTK_exprtk:BOOL=OFF \\\
-DVTK_MODULE_USE_EXTERNAL_VTK_ioss:BOOL=OFF \\\
-DVTK_USE_TK=ON \\\
%{?with_flexiblas:-DBLA_VENDOR=FlexiBLAS}
# https://gitlab.kitware.com/cmake/cmake/issues/17223
@ -540,7 +546,7 @@ export JAVA_TOOL_OPTIONS=-Xmx2048m
-DCMAKE_INSTALL_PREFIX:PATH=$MPI_HOME \
-DCMAKE_INSTALL_LIBDIR:PATH=lib \
-DCMAKE_INSTALL_JNILIBDIR:PATH=lib/%{name} \
-DVTK_INSTALL_PACKAGE_DIR:PATH=lib/cmake \
-DCMAKE_INSTALL_QMLDIR:PATH=lib/qt5/qml \
-DVTK_USE_MPI:BOOL=ON
%cmake_build
%_mpich_unload
@ -557,7 +563,7 @@ export JAVA_TOOL_OPTIONS=-Xmx2048m
-DCMAKE_INSTALL_PREFIX:PATH=$MPI_HOME \
-DCMAKE_INSTALL_LIBDIR:PATH=lib \
-DCMAKE_INSTALL_JNILIBDIR:PATH=lib/%{name} \
-DVTK_INSTALL_PACKAGE_DIR:PATH=lib/cmake \
-DCMAKE_INSTALL_QMLDIR:PATH=lib/qt5/qml \
-DVTK_USE_MPI:BOOL=ON
%cmake_build
%_openmpi_unload
@ -677,7 +683,7 @@ cat xorg.log
%{_libdir}/cmake/%{name}/
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/hierarchy/
%{_docdir}/%{name}-9.0/
%{_docdir}/%{name}/
%files -n python%{python3_pkgversion}-vtk
%{python3_sitearch}/*
@ -699,6 +705,7 @@ cat xorg.log
%files qt
%{_libdir}/lib*Qt*.so.*
%exclude %{_libdir}/*Python*.so.*
%{_libdir}/qt5/qml/*
%if %{with mpich}
%files mpich -f build-mpich/libs.list
@ -735,6 +742,7 @@ 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}
@ -772,6 +780,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
@ -784,6 +793,9 @@ cat xorg.log
%changelog
* Sun Nov 21 2021 Orion Poplawski <orion@nwra.com> - 9.1.0-1
- Update to 9.1.0
* Thu Nov 11 2021 Sandro Mani <manisandro@gmail.com> - 9.0.3-4
- Rebuild (gdal)