[packages/vtk] - started update to 8.2.0 - documentation does not build, most likely TeX compatibility issues

baggins baggins at pld-linux.org
Sun Aug 2 11:01:28 CEST 2020


commit 26d6f05296e9315aa2dfb502f5fe5ba084029f84
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Aug 2 11:00:48 2020 +0200

    - started update to 8.2.0
    - documentation does not build, most likely TeX compatibility issues

 gcc10.patch        |  32 +++++++
 link.patch         |  35 +++++++
 proj6_compat.patch | 264 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 python-3.8.patch   | 176 +++++++++++++++++++++++++++++++++++
 qt-5.15.patch      |  20 ++++
 vtk.spec           |  65 +++++--------
 6 files changed, 551 insertions(+), 41 deletions(-)
---
diff --git a/vtk.spec b/vtk.spec
index 7be9bce..cf902e6 100644
--- a/vtk.spec
+++ b/vtk.spec
@@ -10,22 +10,27 @@
 # Conditional build
 %bcond_without	java		# Java wrappers
 %bcond_without	ffmpeg		# FFMPEG .avi saving support
+%bcond_with	doc		# do not build and package doxygen documentation
 %bcond_with	OSMesa		# build with OSMesa (https://bugzilla.redhat.com/show_bug.cgi?id=744434)
-%bcond_with	system_proj	# use system PROJ.4 (needs 4.3 with exposed internals, not ready for 4.4+)
 %bcond_with	system_gl2ps	# use system gl2ps (VTK currently is carrying local modifications to gl2ps)
 
 Summary:	Toolkit for 3D computer graphics, image processing, and visualization
 Summary(pl.UTF-8):	Zestaw narzędzi do trójwymiarowej grafiki, przetwarzania obrazu i wizualizacji
 Name:		vtk
-Version:	8.1.1
-Release:	7
+Version:	8.2.0
+Release:	0.1
 License:	BSD
 Group:		Libraries
-Source0:	http://www.vtk.org/files/release/8.1/VTK-%{version}.tar.gz
-# Source0-md5:	cf078a71c298c76b13707c7c27704248
-Source1:	http://www.vtk.org/files/release/8.1/VTKData-%{version}.tar.gz
-# Source1-md5:	6de8c1e3884b805c47dca02e7b049301
+Source0:	http://www.vtk.org/files/release/8.2/VTK-%{version}.tar.gz
+# Source0-md5:	8af3307da0fc2ef8cafe4a312b821111
+Source1:	http://www.vtk.org/files/release/8.2/VTKData-%{version}.tar.gz
+# Source1-md5:	a6eab7bc02cee1376ee69243dde373ce
 Patch0:		vtk-abi.patch
+Patch1:		gcc10.patch
+Patch2:		proj6_compat.patch
+Patch3:		qt-5.15.patch
+Patch4:		python-3.8.patch
+Patch5:		link.patch
 URL:		http://www.vtk.org/
 %{?with_OSMesa:BuildRequires: Mesa-libOSMesa-devel}
 BuildRequires:	OpenGL-GLX-devel
@@ -43,7 +48,7 @@ BuildRequires:	Qt5UiTools-devel
 BuildRequires:	R
 BuildRequires:	boost-devel >= 1.39
 BuildRequires:	cmake >= 2.8.8
-BuildRequires:	doxygen
+%{?with_doc:BuildRequires:	doxygen}
 BuildRequires:	expat-devel
 %{?with_ffmpeg:BuildRequires:	ffmpeg-devel}
 BuildRequires:	fontconfig-devel
@@ -58,6 +63,7 @@ BuildRequires:	jdk >= 1.5
 BuildRequires:	jpackage-utils
 %endif
 BuildRequires:	jsoncpp-devel
+BuildRequires:	libharu-devel
 BuildRequires:	libjpeg-devel
 BuildRequires:	libogg-devel
 BuildRequires:	libpng-devel
@@ -73,7 +79,7 @@ BuildRequires:	netcdf-cxx-devel >= 4
 #BuildRequires:	openqube-devel
 BuildRequires:	perl-base
 BuildRequires:	postgresql-devel
-%{?with_system_proj:BuildRequires:	proj-devel >= 4.3, proj-devel < 4.4}
+BuildRequires:	proj-devel >= 6.0
 BuildRequires:	python-devel >= 2
 BuildRequires:	python-sip-devel
 BuildRequires:	qt5-build >= 4.5.0
@@ -317,6 +323,11 @@ potrzebne do uruchamiania różnych przykładów z pakietu vtk-examples.
 %prep
 %setup -q -n VTK-%{version} -b 1
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
 
 # Replace relative path ../../../VTKData with destination filesystem path
 grep -Erl '(\.\./)+VTKData' Examples | xargs \
@@ -364,7 +375,7 @@ cd build
 %cmake .. \
 	$ccache \
 	-Wno-dev \
-	-DBUILD_DOCUMENTATION:BOOL=ON \
+	%{cmake_on_off doc DBUILD_DOCUMENTATION} \
 	-DBUILD_EXAMPLES:BOOL=ON \
 	-DBUILD_SHARED_LIBS:BOOL=ON \
 	-DBUILD_TESTING:BOOL=ON \
@@ -377,26 +388,21 @@ cd build
 	-DTCL_LIBRARY:PATH=%{_libdir}/libtcl.so \
 	-DTK_INCLUDE_PATH:PATH=%{_includedir} \
 	-DTK_LIBRARY:PATH=%{_libdir}/libtk.so \
-	-DVTK_DATA_ROOT:PATH=%{_datadir}/vtk-8.1 \
 	-DVTK_CUSTOM_LIBRARY_SUFFIX="" \
 	-DVTK_INSTALL_ARCHIVE_DIR:PATH=%{_lib}/vtk \
 	-DVTK_INSTALL_INCLUDE_DIR:PATH=include/vtk \
 	-DVTK_INSTALL_LIBRARY_DIR:PATH=%{_lib}/vtk \
 	-DVTK_INSTALL_PACKAGE_DIR:PATH=%{_lib}/cmake/vtk \
 	-DVTK_INSTALL_TCL_DIR:PATH=share/tcl%{tcl_version}/vtk \
-	-DVTK_INSTALL_PYTHON_MODULE_DIR:PATH=%{py_sitedir} \
 	-DVTK_INSTALL_QT_DIR=/%{_lib}/qt5/plugins/designer \
 	-DVTK_FFMPEG_HAS_OLD_HEADER:BOOL=OFF \
 	%{?with_OSMesa:-DVTK_OPENGL_HAS_OSMESA:BOOL=ON} \
 	-DVTK_WRAP_PYTHON:BOOL=ON \
-	-DVTK_PYTHON_SETUP_ARGS="--prefix=/usr --root=$RPM_BUILD_ROOT" \
 	-DVTK_USE_SYSTEM_LIBRARIES:BOOL=ON \
 	-DVTK_USE_OGGTHEORA_ENCODER:BOOL=ON \
-	-DVTK_USE_RENDERING:BOOL=ON \
 	-DVTK_USE_SYSTEM_HDF5:BOOL=ON \
 	-DVTK_USE_SYSTEM_XDMF2:BOOL=OFF \
 	-DVTK_USE_SYSTEM_LIBHARU:BOOL=OFF \
-	%{!?with_system_proj:-DVTK_USE_SYSTEM_LIBPROJ4:BOOL=OFF} \
 	%{!?with_system_gl2ps:-DVTK_USE_SYSTEM_GL2PS:BOOL=OFF} \
 %if %{with java}
 	-DVTK_WRAP_JAVA:BOOL=ON \
@@ -408,7 +414,6 @@ cd build
 %endif
 	-DVTK_WRAP_PYTHON:BOOL=ON \
 	%{?with_sip:-DVTK_WRAP_PYTHON_SIP:BOOL=ON} \
-	-DVTK_WRAP_TCL:BOOL=ON \
 	-DVTK_Group_Imaging:BOOL=ON \
 	-DVTK_Group_Qt:BOOL=ON \
 	-DVTK_Group_Rendering:BOOL=ON \
@@ -416,7 +421,6 @@ cd build
 	-DVTK_Group_Tk:BOOL=ON \
 	-DVTK_Group_Views:BOOL=ON \
 	-DModule_vtkFiltersReebGraph:BOOL=ON \
-	-DModule_vtkFiltersStatisticsGnuR:BOOL=ON \
 	%{?with_ffmpeg:-DModule_vtkIOFFMPEG:BOOL=ON} \
 	-DModule_vtkIOGDAL:BOOL=ON \
 	-DModule_vtkIOGeoJSON:BOOL=ON \
@@ -440,7 +444,7 @@ cd build
 # TODO:	-DModule_vtkRenderingParallelLIC:BOOL=ON (BR: MPI)
 
 %{__make}
-%{__make} DoxygenDoc
+%{?with_doc:%{__make} DoxygenDoc}
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -512,7 +516,7 @@ install -p build/bin/VTKJavaExecutable $RPM_BUILD_ROOT%{_bindir}
 install -p build/bin/vtkpython $RPM_BUILD_ROOT%{_bindir}
 
 # unwanted doxygen files and misplaced verdict docs
-%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/vtk-*/{doxygen,verdict}
+%{?with_doc:%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/vtk-*/{doxygen,verdict}}
 
 # only *.pyc are built by default, add *.pyo
 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}/vtk
@@ -538,7 +542,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc README.md vtkLogo.jpg vtkBanner.gif Wrapping/Tools/README*
+%doc README.md vtkBanner.gif vtkLogo.ico Wrapping/Tools/README*
 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/ld.so.conf.d/vtk-%{_arch}.conf
 %dir %{_libdir}/vtk
 %attr(755,root,root) %{_libdir}/vtk/libvtkChartsCore.so.1
@@ -574,14 +578,9 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/vtk/libvtkViewsGeovis.so.1
 %attr(755,root,root) %{_libdir}/vtk/libvtkViewsInfovis.so.1
 %attr(755,root,root) %{_libdir}/vtk/libvtkVPIC.so.1
-%attr(755,root,root) %{_libdir}/vtk/libvtkalglib.so.1
-%attr(755,root,root) %{_libdir}/vtk/libvtkexoIIc.so.1
 %attr(755,root,root) %{_libdir}/vtk/libvtkgl2ps.so.1
-%attr(755,root,root) %{_libdir}/vtk/libvtkglew.so.1
 %attr(755,root,root) %{_libdir}/vtk/libvtklibharu.so.1
 %attr(755,root,root) %{_libdir}/vtk/libvtkmetaio.so.1
-%attr(755,root,root) %{_libdir}/vtk/libvtkproj4.so.1
-%attr(755,root,root) %{_libdir}/vtk/libvtksqlite.so.1
 %attr(755,root,root) %{_libdir}/vtk/libvtksys.so.1
 %attr(755,root,root) %{_libdir}/vtk/libvtkverdict.so.1
 %attr(755,root,root) %{_libdir}/vtk/libvtkxdmf2.so.1
@@ -590,13 +589,10 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 %exclude %{_libdir}/vtk/libvtk*Python2?D.so.1
 %exclude %{_libdir}/vtk/libvtkWrappingPython2?Core.so.1
-%exclude %{_libdir}/vtk/libvtk*TCL.so.1
 
 %files devel
 %defattr(644,root,root,755)
 %doc Utilities/Upgrading/*
-%attr(755,root,root) %{_bindir}/vtkEncodeString
-%attr(755,root,root) %{_bindir}/vtkHashSource
 %attr(755,root,root) %{_bindir}/vtkWrapHierarchy
 %attr(755,root,root) %{_libdir}/vtk/libvtkChartsCore.so
 %attr(755,root,root) %{_libdir}/vtk/libvtkCommon*.so
@@ -631,14 +627,9 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/vtk/libvtkViewsGeovis.so
 %attr(755,root,root) %{_libdir}/vtk/libvtkViewsInfovis.so
 %attr(755,root,root) %{_libdir}/vtk/libvtkVPIC.so
-%attr(755,root,root) %{_libdir}/vtk/libvtkalglib.so
-%attr(755,root,root) %{_libdir}/vtk/libvtkexoIIc.so
 %attr(755,root,root) %{_libdir}/vtk/libvtkgl2ps.so
-%attr(755,root,root) %{_libdir}/vtk/libvtkglew.so
 %attr(755,root,root) %{_libdir}/vtk/libvtklibharu.so
 %attr(755,root,root) %{_libdir}/vtk/libvtkmetaio.so
-%attr(755,root,root) %{_libdir}/vtk/libvtkproj4.so
-%attr(755,root,root) %{_libdir}/vtk/libvtksqlite.so
 %attr(755,root,root) %{_libdir}/vtk/libvtksys.so
 %attr(755,root,root) %{_libdir}/vtk/libvtkverdict.so
 %attr(755,root,root) %{_libdir}/vtk/libvtkxdmf2.so
@@ -647,19 +638,15 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 %exclude %{_libdir}/vtk/libvtk*Python2?D.so
 %exclude %{_libdir}/vtk/libvtkWrappingPython2?Core.so
-%exclude %{_libdir}/vtk/libvtk*TCL.so
 %{_libdir}/vtk/libvtkWrappingTools.a
 %dir %{_includedir}/vtk
 %{_includedir}/vtk/VPIC
 %{_includedir}/vtk/DICOM*.h
 %{_includedir}/vtk/DatabaseSchemaWith2Tables.h
-%{_includedir}/vtk/alglib
 %{_includedir}/vtk/vtkgl2ps
-%{_includedir}/vtk/vtkglew
 %{_includedir}/vtk/vtkkwiml
 %{_includedir}/vtk/vtklibharu
 %{_includedir}/vtk/vtkmetaio
-%{_includedir}/vtk/vtksqlite
 %{_includedir}/vtk/vtksys
 %{_includedir}/vtk/vtkverdict
 %{_includedir}/vtk/vtkxdmf2
@@ -675,7 +662,6 @@ rm -rf $RPM_BUILD_ROOT
 %exclude %{_includedir}/vtk/vtkQImageToImageSource.h
 %exclude %{_includedir}/vtk/vtkQt*.h
 %exclude %{_includedir}/vtk/vtkRenderingQtModule.h
-%exclude %{_includedir}/vtk/vtkTcl*.h
 %exclude %{_includedir}/vtk/vtkTk*.h
 %exclude %{_includedir}/vtk/vtkViewsQtModule.h
 %{_libdir}/cmake/vtk
@@ -724,7 +710,6 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/vtk/libvtkInteraction*Java.so
 %attr(755,root,root) %{_libdir}/vtk/libvtkLocalExampleJava.so
 %attr(755,root,root) %{_libdir}/vtk/libvtkParallelCoreJava.so
-%attr(755,root,root) %{_libdir}/vtk/libvtkPythonInterpreterJava.so
 %attr(755,root,root) %{_libdir}/vtk/libvtkRendering*Java.so
 %attr(755,root,root) %{_libdir}/vtk/libvtkTestingRenderingJava.so
 %attr(755,root,root) %{_libdir}/vtk/libvtkViews*Java.so
@@ -785,11 +770,9 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/vtkWrapTclInit
 %attr(755,root,root) %{_bindir}/vtk
 %{_datadir}/tcl%{tcl_version}/vtk
-%attr(755,root,root) %{_libdir}/vtk/libvtk*TCL.so.1
 
 %files tcl-devel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/vtk/libvtk*TCL.so
 %{_includedir}/vtk/vtkTcl*.h
 %{_includedir}/vtk/vtkTk*.h
 
diff --git a/gcc10.patch b/gcc10.patch
new file mode 100644
index 0000000..27b15cd
--- /dev/null
+++ b/gcc10.patch
@@ -0,0 +1,32 @@
+diff -up VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c.gcc10 VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c
+--- VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c.gcc10	2019-01-30 10:15:13.000000000 -0700
++++ VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c	2020-05-08 21:38:46.401363001 -0600
+@@ -614,5 +614,5 @@ int ex_create_par_int(const char *path,
+  * Prevent warning in some versions of ranlib(1) because the object
+  * file has no symbols.
+  */
+-const char exodus_unused_symbol_dummy_1;
++const char exodus_unused_symbol_dummy_ex_create_par;
+ #endif
+diff -up VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c.gcc10 VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c
+--- VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c.gcc10	2019-01-30 10:15:13.000000000 -0700
++++ VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c	2020-05-08 21:38:46.402363007 -0600
+@@ -474,5 +474,5 @@ int ex_open_par_int(const char *path, in
+  * Prevent warning in some versions of ranlib(1) because the object
+  * file has no symbols.
+  */
+-const char exodus_unused_symbol_dummy_1;
++const char exodus_unused_symbol_dummy_ex_open_par;
+ #endif
+diff -up VTK-8.2.0/CMake/VTKGenerateExportHeader.cmake.gcc10 VTK-8.2.0/CMake/VTKGenerateExportHeader.cmake
+--- VTK-8.2.0/CMake/VTKGenerateExportHeader.cmake.gcc10	2019-01-30 10:15:13.000000000 -0700
++++ VTK-8.2.0/CMake/VTKGenerateExportHeader.cmake	2020-05-26 21:07:24.625840251 -0600
+@@ -174,7 +174,7 @@ macro(_vtk_test_compiler_hidden_visibili
+     execute_process(COMMAND ${CMAKE_C_COMPILER} --version
+       OUTPUT_VARIABLE _gcc_version_info
+       ERROR_VARIABLE _gcc_version_info)
+-    string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*"
++    string(REGEX MATCH "[1-9][0-9]*\\.[0-9]+\\.[0-9]+"
+       _gcc_version "${_gcc_version_info}")
+     # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
+     # patch level, handle this here:
diff --git a/link.patch b/link.patch
new file mode 100644
index 0000000..685d0cc
--- /dev/null
+++ b/link.patch
@@ -0,0 +1,35 @@
+--- VTK-8.2.0/IO/Movie/CMakeLists.txt.orig	2019-01-30 18:15:13.000000000 +0100
++++ VTK-8.2.0/IO/Movie/CMakeLists.txt	2020-08-02 01:01:33.766555218 +0200
+@@ -29,6 +29,7 @@
+   ${CMAKE_CURRENT_BINARY_DIR}/vtkIOMovieConfigure.h)
+ 
+ vtk_module_library(vtkIOMovie ${Module_SRCS})
++vtk_module_link_libraries(vtkIOMovie LINK_PUBLIC ${THEORA_dec_LIBRARY} ${THEORA_enc_LIBRARY} ${OGG_LIBRARY})
+ 
+ if(WIN32 AND VTK_USE_VIDEO_FOR_WINDOWS)
+   vtk_module_link_libraries(vtkIOMovie LINK_PRIVATE vfw32)
+--- VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt~	2019-01-30 18:15:13.000000000 +0100
++++ VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/CMakeLists.txt	2020-08-02 01:13:25.706301562 +0200
+@@ -299,6 +299,7 @@
+ 
+ vtk_add_library(vtkexodusII ${sources} ${headers})
+ target_link_libraries(vtkexodusII PUBLIC ${vtknetcdf_LIBRARIES})
++target_link_libraries(vtkexodusII PUBLIC ${CMAKE_THREAD_LIBS})
+ if (NOT VTK_INSTALL_NO_DEVELOPMENT)
+   install(FILES
+     ${headers}
+--- VTK-8.2.0/ThirdParty/libharu/vtklibharu/CMakeLists.txt.orig	2020-08-02 10:14:54.000000000 +0200
++++ VTK-8.2.0/ThirdParty/libharu/vtklibharu/CMakeLists.txt	2020-08-02 10:25:09.955242344 +0200
+@@ -298,3 +297,5 @@
+ 
+ INCLUDE( CPack )
+ endif ()
++
++find_library(M_LIBRARY m)
+--- VTK-8.2.0/ThirdParty/libharu/vtklibharu/src/CMakeLists.txt~	2019-01-30 18:15:13.000000000 +0100
++++ VTK-8.2.0/ThirdParty/libharu/vtklibharu/src/CMakeLists.txt	2020-08-02 10:25:38.091690113 +0200
+@@ -113,3 +113,4 @@
+       "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>"
+       "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../include>")
+ endif ()
++target_link_libraries(vtklibharu PUBLIC ${M_LIBRARY})
diff --git a/proj6_compat.patch b/proj6_compat.patch
new file mode 100644
index 0000000..95e4a6d
--- /dev/null
+++ b/proj6_compat.patch
@@ -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 ()
diff --git a/python-3.8.patch b/python-3.8.patch
new file mode 100644
index 0000000..f749d3c
--- /dev/null
+++ b/python-3.8.patch
@@ -0,0 +1,176 @@
+From 257b9d7b18d5f3db3fe099dc18f230e23f7dfbab Mon Sep 17 00:00:00 2001
+From: David Gobbi <david.gobbi at 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
+
diff --git a/qt-5.15.patch b/qt-5.15.patch
new file mode 100644
index 0000000..ec5fcc4
--- /dev/null
+++ b/qt-5.15.patch
@@ -0,0 +1,20 @@
+--- VTK-8.2.0/Rendering/Qt/vtkQtLabelRenderStrategy.cxx~	2019-01-30 18:15:13.000000000 +0100
++++ VTK-8.2.0/Rendering/Qt/vtkQtLabelRenderStrategy.cxx	2020-08-01 18:48:26.642080520 +0200
+@@ -41,6 +41,7 @@
+ #include <QImage>
+ #include <QMap>
+ #include <QPainter>
++#include <QPainterPath>
+ #include <QPair>
+ #include <QPixmap>
+ #include <QTextDocument>
+--- VTK-8.2.0/Rendering/Qt/vtkQtStringToImage.cxx~	2019-01-30 18:15:13.000000000 +0100
++++ VTK-8.2.0/Rendering/Qt/vtkQtStringToImage.cxx	2020-08-01 18:57:14.025679183 +0200
+@@ -31,6 +31,7 @@
+ #include <QFontMetrics>
+ #include <QImage>
+ #include <QPainter>
++#include <QPainterPath>
+ #include <QPixmap>
+ #include <QTextDocument>
+ #include <QTextStream>
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/vtk.git/commitdiff/26d6f05296e9315aa2dfb502f5fe5ba084029f84



More information about the pld-cvs-commit mailing list