[packages/vtk] - fix building with gdal 2.x

baggins baggins at pld-linux.org
Sun Dec 6 21:36:13 CET 2015


commit 8aed150362251196b55694e924bb99d08567f475
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Dec 6 21:36:00 2015 +0100

    - fix building with gdal 2.x

 gdal2.patch | 31 +++++++++++++++++++++++++++++++
 vtk.spec    |  2 ++
 2 files changed, 33 insertions(+)
---
diff --git a/vtk.spec b/vtk.spec
index 1e00643..9c6da6a 100644
--- a/vtk.spec
+++ b/vtk.spec
@@ -24,6 +24,7 @@ Source0:	http://www.vtk.org/files/release/6.3/VTK-%{version}.tar.gz
 Source1:	http://www.vtk.org/files/release/6.3/VTKData-%{version}.tar.gz
 # Source1-md5:	b164200226805aeb741703a8168afdda
 Patch0:		%{name}-chemistry.patch
+Patch1:		gdal2.patch
 URL:		http://www.vtk.org/
 %{?with_OSMesa:BuildRequires: Mesa-libOSMesa-devel}
 BuildRequires:	OpenGL-GLX-devel
@@ -311,6 +312,7 @@ potrzebne do uruchamiania różnych przykładów z pakietu vtk-examples.
 %prep
 %setup -q -n VTK-%{version} -b 1
 %patch0 -p1
+%patch1 -p1
 
 # Replace relative path ../../../VTKData with destination filesystem path
 grep -Erl '(\.\./)+VTKData' Examples | xargs \
diff --git a/gdal2.patch b/gdal2.patch
new file mode 100644
index 0000000..36c33ee
--- /dev/null
+++ b/gdal2.patch
@@ -0,0 +1,31 @@
+diff --git a/IO/GDAL/vtkGDALVectorReader.cxx b/IO/GDAL/vtkGDALVectorReader.cxx
+index 86854a0..a0e234a 100644
+--- a/IO/GDAL/vtkGDALVectorReader.cxx
++++ b/IO/GDAL/vtkGDALVectorReader.cxx
+@@ -44,7 +44,7 @@ class vtkGDALVectorReader::Internal
+ public:
+   Internal( const char* srcName, int srcMode, int appendFeatures, int addFeatIds )
+     {
+-    this->Source = OGRSFDriverRegistrar::Open( srcName, srcMode, &this->Driver );
++    this->Source = (GDALDataset*) OGROpen( srcName, srcMode, NULL );
+     if ( ! this->Source )
+       {
+       this->LastError = CPLGetLastErrorMsg();
+@@ -61,7 +61,7 @@ public:
+     {
+     if ( this->Source )
+       {
+-      OGRDataSource::DestroyDataSource( this->Source );
++      GDALClose( (GDALDatasetH) this->Source );
+       }
+     }
+
+@@ -304,7 +304,7 @@ public:
+     return nCells;
+     }
+
+-  OGRDataSource* Source;
++  GDALDataset* Source;
+   OGRSFDriver* Driver;
+   const char* LastError;
+   int LayerIdx;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/vtk.git/commitdiff/8aed150362251196b55694e924bb99d08567f475



More information about the pld-cvs-commit mailing list