Compare commits

...

13 Commits

Author SHA1 Message Date
Björn Esser 5b6573e318
Revert "Rebuild (proj)"
This reverts commit 6c207e504c.
2020-03-26 18:27:01 +01:00
Björn Esser 6c207e504c
Rebuild (proj) 2020-03-26 18:18:57 +01:00
Fedora Release Engineering 722af9e012 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-31 03:25:27 +00:00
Björn Esser 29345ab693
Rebuild (jsoncpp) 2019-11-14 20:39:25 +01:00
Orion Poplawski 1d043a43e0 Drop BR on sip-devel (python2) 2019-11-09 20:51:21 -07:00
Orion Poplawski 4888dabcbb Rebuild for double-conversion 3.1.5 2019-09-22 17:10:40 -06:00
Orion Poplawski 6911e8921c Update FindLibPROJ.cmake from master to set LibPROJ_MAJOR_VERSION 2019-09-12 08:23:55 -06:00
Richard Shaw a1d022bddf Update fix for proj6 and other spec file cleanup. 2019-09-10 21:12:09 -05:00
Orion Poplawski 8fe6b10a69 Rebuild for proj 6.2.0
Add patch and flags for proj 6 support
2019-09-08 20:53:59 -06:00
Orion Poplawski 2639d96baa Add upstream patch to support Python 3.8 2019-08-20 19:40:13 -06:00
Miro Hrončok d727be173a Rebuilt for Python 3.8 2019-08-19 11:09:24 +02:00
Orion Poplawski 9c6c2d7f86 BR motif-devel instead of /usr/include/Xm (bugz#1731728) 2019-07-31 22:05:46 -06:00
Fedora Release Engineering ef355e1f39 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-27 03:13:03 +00:00
6 changed files with 477 additions and 96 deletions

View File

@ -1,40 +0,0 @@
From 706f1b397df09a27ab8981ab9464547028d0c322 Mon Sep 17 00:00:00 2001
From: David Gobbi <david.gobbi@gmail.com>
Date: Wed, 11 Jul 2018 17:14:50 -0600
Subject: [PATCH] Fix compilation issue due to Python3.7 API change
The PyUnicode_AsUTF8() method returns a "const char *" in Py37.
---
Wrapping/PythonCore/vtkPythonArgs.cxx | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/Wrapping/PythonCore/vtkPythonArgs.cxx b/Wrapping/PythonCore/vtkPythonArgs.cxx
index 1a82af0802..b733458975 100644
--- a/Wrapping/PythonCore/vtkPythonArgs.cxx
+++ b/Wrapping/PythonCore/vtkPythonArgs.cxx
@@ -95,13 +95,21 @@ bool vtkPythonGetStringValue(PyObject *o, T *&a, const char *exctext)
{
if (PyBytes_Check(o))
{
+#if PY_VERSION_HEX >= 0x03070000
+ a = const_cast<char *>(PyBytes_AS_STRING(o));
+ return true;
+#else
a = PyBytes_AS_STRING(o);
return true;
+#endif
}
#ifdef Py_USING_UNICODE
else if (PyUnicode_Check(o))
{
-#if PY_VERSION_HEX >= 0x03030000
+#if PY_VERSION_HEX >= 0x03070000
+ a = const_cast<char *>(PyUnicode_AsUTF8(o));
+ return true;
+#elif PY_VERSION_HEX >= 0x03030000
a = PyUnicode_AsUTF8(o);
return true;
#else
--
2.18.1

176
5883.patch Normal file
View File

@ -0,0 +1,176 @@
From 257b9d7b18d5f3db3fe099dc18f230e23f7dfbab Mon Sep 17 00:00:00 2001
From: David Gobbi <david.gobbi@gmail.com>
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

View File

@ -1,12 +0,0 @@
diff -up VTK-7.1.1/Utilities/KWIML/vtkkwiml/test/CMakeLists.txt.format VTK-7.1.1/Utilities/KWIML/vtkkwiml/test/CMakeLists.txt
--- VTK-7.1.1/Utilities/KWIML/vtkkwiml/test/CMakeLists.txt.format 2017-03-20 09:26:17.000000000 -0600
+++ VTK-7.1.1/Utilities/KWIML/vtkkwiml/test/CMakeLists.txt 2017-05-07 14:10:46.231254800 -0600
@@ -10,7 +10,7 @@ endif()
# Suppress printf/scanf format warnings; we test if the sizes match.
foreach(lang C CXX)
if(KWIML_LANGUAGE_${lang} AND CMAKE_${lang}_COMPILER_ID STREQUAL "GNU")
- set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -Wno-format")
+ set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -Wno-format -Wno-format-security")
endif()
endforeach()

264
vtk-proj6_compat.patch Normal file
View File

@ -0,0 +1,264 @@
--- 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 <projects.h>
+# if VTK_LibPROJ_MAJOR_VERSION >= 5
+# include <proj.h>
+# endif
+# if VTK_LibPROJ_MAJOR_VERSION < 6
+# 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
--- 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 ()

View File

@ -1,36 +0,0 @@
diff -up VTK-6.2.0.rc1/Wrapping/Tcl/CMakeLists.txt.tcllib VTK-6.2.0.rc1/Wrapping/Tcl/CMakeLists.txt
--- VTK-6.2.0.rc1/Wrapping/Tcl/CMakeLists.txt.tcllib 2015-02-16 15:08:49.121229694 -0700
+++ VTK-6.2.0.rc1/Wrapping/Tcl/CMakeLists.txt 2015-02-16 15:09:38.793971979 -0700
@@ -264,7 +264,7 @@ endforeach()
# Configure the Tcl package index file for the install tree.
SET(VTK_TCL_SCRIPT_DIR "[file dirname [info script]]")
IF(UNIX)
- SET(VTK_TCL_LIBRARY_DIR "[file dirname [file dirname [file dirname [info script]]]]")
+ SET(VTK_TCL_LIBRARY_DIR "${CMAKE_INSTALL_PREFIX}/${VTK_INSTALL_LIBRARY_DIR}")
ELSE()
SET(VTK_TCL_LIBRARY_DIR
"[file join [file dirname [file dirname [file dirname [file dirname [info script]]]]] bin]")
diff -up VTK-6.2.0.rc1/Wrapping/Tcl/pkgIndex.tcl.in.tcllib VTK-6.2.0.rc1/Wrapping/Tcl/pkgIndex.tcl.in
--- VTK-6.2.0.rc1/Wrapping/Tcl/pkgIndex.tcl.in.tcllib 2015-02-16 12:03:08.000000000 -0700
+++ VTK-6.2.0.rc1/Wrapping/Tcl/pkgIndex.tcl.in 2015-02-16 15:08:49.121229694 -0700
@@ -7,7 +7,7 @@ package ifneeded vtkinit {@VTK_MAJOR_VER
if {[catch "load {} $libName"]} {
set libExt [info sharedlibextension]
set currentDirectory [pwd]
- set libFile [file join $libPath "$libPrefix$libName-@VTK_MAJOR_VERSION@.@VTK_MINOR_VERSION@$libExt"]
+ set libFile [file join $libPath "$libPrefix$libName$libExt"]
if {[catch "cd {$libPath}; load {$libFile}" errorMessage]} {
puts $errorMessage
}
diff -up VTK-6.2.0.rc1/Wrapping/Tcl/vtkbase/vtkbase.tcl.in.tcllib VTK-6.2.0.rc1/Wrapping/Tcl/vtkbase/vtkbase.tcl.in
--- VTK-6.2.0.rc1/Wrapping/Tcl/vtkbase/vtkbase.tcl.in.tcllib 2015-02-16 12:03:08.000000000 -0700
+++ VTK-6.2.0.rc1/Wrapping/Tcl/vtkbase/vtkbase.tcl.in 2015-02-16 15:08:49.122229706 -0700
@@ -44,7 +44,7 @@ namespace eval ::vtk {
}
foreach dir $dirs {
- set libname [file join $dir ${prefix}${name}-@VTK_MAJOR_VERSION@.@VTK_MINOR_VERSION@${ext}]
+ set libname [file join $dir ${prefix}${name}${ext}]
if {[file exists $libname]} {
if {![catch {load $libname} errormsg]} {
# WARNING: it HAS to be "" so that pkg_mkIndex work (since

View File

@ -17,7 +17,7 @@
Summary: The Visualization Toolkit - A high level 3D visualization library
Name: vtk
Version: 8.2.0
Release: 4%{?dist}
Release: 13%{?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
@ -26,8 +26,10 @@ 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
Source2: xorg.conf
Source3: FindPEGTL.cmake
# Python 3.7 compat
Patch0: https://gitlab.kitware.com/vtk/vtk/merge_requests/4490.patch
# Python 3.8 support
Patch0: https://gitlab.kitware.com/vtk/vtk/merge_requests/5883.patch
# Proj 6 support
Patch1: vtk-proj6_compat.patch
URL: http://vtk.org/
@ -85,15 +87,14 @@ BuildRequires: PEGTL-devel
BuildRequires: proj-devel
BuildRequires: pugixml-devel
BuildRequires: R-devel
BuildRequires: sip-devel
BuildRequires: sqlite-devel
BuildRequires: wget
BuildRequires: %{_includedir}/Xm
BuildRequires: blas-devel
BuildRequires: lapack-devel
# Requires patched libharu https://github.com/libharu/libharu/pull/157
#BuildRequires: libharu-devel
BuildRequires: lz4-devel
BuildRequires: motif-devel
%if %{with mpich}
BuildRequires: mpich-devel
%if 0%{?fedora} >= 30
@ -538,6 +539,8 @@ programming languages.
%prep
%setup -q -b 1 -n VTK-%{version}
%patch0 -p1 -b .py38
%patch1 -p1 -b .proj6
# Remove included thirdparty sources just to be sure
# TODO - diy2 - not yet packaged
# TODO - exodusII - not yet packaged
@ -568,6 +571,7 @@ 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"
export CPPFLAGS=-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
%if %{with java}
export JAVA_HOME=/usr/lib/jvm/java
%ifarch %{arm} s390x
@ -861,7 +865,6 @@ cat xorg.log
%files qt
%{_libdir}/lib*Qt*.so.*
%exclude %{_libdir}/*TCL.so.*
%exclude %{_libdir}/*Python??D.so.*
%{_libdir}/qt?/plugins/designer/libQVTKWidgetPlugin.so
@ -911,7 +914,6 @@ cat xorg.log
%files mpich-qt
%{_libdir}/mpich/lib/lib*Qt*.so.*
%exclude %{_libdir}/mpich/lib/*TCL.so.*
%exclude %{_libdir}/mpich/lib/*Python??D.so.*
%{_libdir}/mpich/lib/qt?/
@ -963,7 +965,6 @@ cat xorg.log
%files openmpi-qt
%{_libdir}/openmpi/lib/lib*Qt*.so.*
%exclude %{_libdir}/openmpi/lib/*TCL.so.*
%exclude %{_libdir}/openmpi/lib/*Python27D.so.*
%{_libdir}/openmpi/lib/qt?/
@ -986,6 +987,34 @@ cat xorg.log
%changelog
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 8.2.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Nov 14 2019 Björn Esser <besser82@fedoraproject.org> - 8.2.0-12
- Rebuild (jsoncpp)
* Sat Nov 9 2019 Orion Poplawski <orion@nwra.com> - 8.2.0-11
- Drop BR on sip-devel (python2)
* Sun Sep 22 2019 Orion Poplawski <orion@nwra.com> - 8.2.0-10
- Rebuild for double-conversion 3.1.5
* Mon Sep 09 2019 Orion Poplawski <orion@nwra.com> - 8.2.0-9
- Rebuild for proj 6.2.0
- Add patch and flags for proj 6 support
* Tue Aug 20 2019 Orion Poplawski <orion@nwra.com> - 8.2.0-8
- Add upstream patch to support Python 3.8
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 8.2.0-7
- Rebuilt for Python 3.8
* Wed Jul 31 2019 Orion Poplawski <orion@nwra.com> - 8.2.0-6
- BR motif-devel instead of /usr/include/Xm (bugz#1731728)
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 8.2.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Wed Jul 03 2019 Björn Esser <besser82@fedoraproject.org> - 8.2.0-4
- Rebuild (jsoncpp)