]> git.pld-linux.org Git - packages/vtk.git/commitdiff
- fix building with gdal 2.x
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 6 Dec 2015 20:36:00 +0000 (21:36 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 6 Dec 2015 20:36:00 +0000 (21:36 +0100)
gdal2.patch [new file with mode: 0644]
vtk.spec

diff --git a/gdal2.patch b/gdal2.patch
new file mode 100644 (file)
index 0000000..36c33ee
--- /dev/null
@@ -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;
index 1e00643181a183b31af2088be99057d5e7e8b4aa..9c6da6ab8e59d343a3384ad3a5eb6941a5f1195f 100644 (file)
--- 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 \
This page took 0.099343 seconds and 4 git commands to generate.