Update fix for proj6 and other spec file cleanup.
This commit is contained in:
parent
8fe6b10a69
commit
a1d022bddf
@ -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()
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -up VTK-8.2.0/ThirdParty/libproj/vtk_libproj.h.in.proj6 VTK-8.2.0/ThirdParty/libproj/vtk_libproj.h.in
|
||||
--- VTK-8.2.0/ThirdParty/libproj/vtk_libproj.h.in.proj6 2019-01-30 10:15:13.000000000 -0700
|
||||
+++ VTK-8.2.0/ThirdParty/libproj/vtk_libproj.h.in 2019-09-08 20:17:31.848988325 -0600
|
||||
@@ -18,7 +18,7 @@
|
||||
/* Use the libproj library configured for VTK. */
|
||||
#cmakedefine VTK_USE_SYSTEM_LIBPROJ
|
||||
#ifdef VTK_USE_SYSTEM_LIBPROJ
|
||||
-# include <projects.h>
|
||||
+# define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H
|
||||
# include <proj_api.h>
|
||||
# include <geodesic.h>
|
||||
#else
|
143
vtk-proj6_compat.patch
Normal file
143
vtk-proj6_compat.patch
Normal file
@ -0,0 +1,143 @@
|
||||
--- 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
|
@ -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
|
11
vtk.spec
11
vtk.spec
@ -29,7 +29,7 @@ Source3: FindPEGTL.cmake
|
||||
# Python 3.8 support
|
||||
Patch0: https://gitlab.kitware.com/vtk/vtk/merge_requests/5883.patch
|
||||
# Proj 6 support
|
||||
Patch1: vtk-proj6.patch
|
||||
Patch1: vtk-proj6_compat.patch
|
||||
|
||||
URL: http://vtk.org/
|
||||
|
||||
@ -631,7 +631,8 @@ export JAVA_TOOL_OPTIONS=-Xmx2048m
|
||||
%{?vtk_use_system_gl2ps} \\\
|
||||
-DVTK_USE_SYSTEM_HDF5:BOOL=ON \\\
|
||||
-DVTK_USE_SYSTEM_LIBHARU=OFF \\\
|
||||
-DVTK_USE_SYSTEM_NETCDF:BOOL=ON
|
||||
-DVTK_USE_SYSTEM_NETCDF:BOOL=ON \\\
|
||||
-DLibPROJ_MAJOR_VERSION=6
|
||||
# Commented old flags in case we'd like to reactive some of them
|
||||
# -DVTK_USE_DISPLAY:BOOL=OFF \ # This prevents building of graphics tests
|
||||
|
||||
@ -866,7 +867,7 @@ cat xorg.log
|
||||
|
||||
%files qt
|
||||
%{_libdir}/lib*Qt*.so.*
|
||||
%exclude %{_libdir}/*TCL.so.*
|
||||
#exclude %{_libdir}/*TCL.so.*
|
||||
%exclude %{_libdir}/*Python??D.so.*
|
||||
%{_libdir}/qt?/plugins/designer/libQVTKWidgetPlugin.so
|
||||
|
||||
@ -916,7 +917,7 @@ cat xorg.log
|
||||
|
||||
%files mpich-qt
|
||||
%{_libdir}/mpich/lib/lib*Qt*.so.*
|
||||
%exclude %{_libdir}/mpich/lib/*TCL.so.*
|
||||
#exclude %{_libdir}/mpich/lib/*TCL.so.*
|
||||
%exclude %{_libdir}/mpich/lib/*Python??D.so.*
|
||||
%{_libdir}/mpich/lib/qt?/
|
||||
|
||||
@ -968,7 +969,7 @@ cat xorg.log
|
||||
|
||||
%files openmpi-qt
|
||||
%{_libdir}/openmpi/lib/lib*Qt*.so.*
|
||||
%exclude %{_libdir}/openmpi/lib/*TCL.so.*
|
||||
#exclude %{_libdir}/openmpi/lib/*TCL.so.*
|
||||
%exclude %{_libdir}/openmpi/lib/*Python27D.so.*
|
||||
%{_libdir}/openmpi/lib/qt?/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user