Source: vtk6
Version: 6.2.0+dfsg1-4
Severity: important
Tags: patch upstream
User: debian-...@lists.debian.org
Usertags: gdal-2.0

Dear Maintainer,

vtk6 (6.2.0+dfsg1-4) FTBFS due to missing compatibility with
GDAL/OGR 2.0:

 error: 'Open' is not a member of 'OGRSFDriverRegistrar'

GDAL 2.0 support in discussed upstream in #15692:

 http://www.vtk.org/Bug/view.php?id=15692

That issue links to a patch from ArchLinux for GDAL 2.0 support:

 
https://projects.archlinux.org/svntogit/community.git/tree/trunk/gdal2.patch?h=packages/vtk

The attached debdiff includes the changes from ArchLinux patch further
improved to support both GDAL 1.x and 2.x, please consider including
these changes in the next vtk6 upload.

Can you also forward the improved patch to the vtk bugtracker for which
I don't have an account?

The severity of this issue will be increased to serious when the GDAL
2.0 transition starts.

There are no GDAL 2.0.1 packages available in experimental yet, because
the transition to GDAL 1.11.3 (#802222) needs to start first. This issue
was triaged using locally built GDAL 2.0.1 packages from the
experimental-2.0 branch in git:

 http://anonscm.debian.org/cgit/pkg-grass/gdal.git/log/?h=experimental-2.0

Kind Regards,

Bas
diff -Nru vtk6-6.2.0+dfsg1/debian/changelog vtk6-6.2.0+dfsg1/debian/changelog
--- vtk6-6.2.0+dfsg1/debian/changelog	2015-08-25 20:13:44.000000000 +0200
+++ vtk6-6.2.0+dfsg1/debian/changelog	2015-10-21 19:24:51.000000000 +0200
@@ -1,3 +1,10 @@
+vtk6 (6.2.0+dfsg1-4.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Add patch for GDAL 2.0 support.
+
+ -- Bas Couwenberg <sebas...@debian.org>  Wed, 21 Oct 2015 19:24:42 +0200
+
 vtk6 (6.2.0+dfsg1-4) unstable; urgency=medium
 
   * [83a91c2] Move some more header-files into libvtk6-qt-dev. (Closes: #796891)
diff -Nru vtk6-6.2.0+dfsg1/debian/patches/90_gdal-2.0.patch vtk6-6.2.0+dfsg1/debian/patches/90_gdal-2.0.patch
--- vtk6-6.2.0+dfsg1/debian/patches/90_gdal-2.0.patch	1970-01-01 01:00:00.000000000 +0100
+++ vtk6-6.2.0+dfsg1/debian/patches/90_gdal-2.0.patch	2015-10-21 15:31:16.000000000 +0200
@@ -0,0 +1,43 @@
+Description: Fix GDAL 2.0 compatibility.
+ Based on gdal2.patch from ArchLinux, improved to support both GDAL 1.x & 2.x.
+Origin: https://projects.archlinux.org/svntogit/community.git/tree/trunk/gdal2.patch?h=packages/vtk
+Bug: http://www.vtk.org/Bug/view.php?id=15692
+
+--- a/IO/GDAL/vtkGDALVectorReader.cxx
++++ b/IO/GDAL/vtkGDALVectorReader.cxx
+@@ -44,7 +44,11 @@ class vtkGDALVectorReader::Internal
+ public:
+   Internal( const char* srcName, int srcMode, int appendFeatures, int addFeatIds )
+     {
++#if GDAL_VERSION_MAJOR < 2
+     this->Source = OGRSFDriverRegistrar::Open( srcName, srcMode, &this->Driver );
++#else
++    this->Source = (GDALDataset*) OGROpen( srcName, srcMode, NULL );
++#endif
+     if ( ! this->Source )
+       {
+       this->LastError = CPLGetLastErrorMsg();
+@@ -61,7 +65,11 @@ public:
+     {
+     if ( this->Source )
+       {
++#if GDAL_VERSION_MAJOR < 2
+       OGRDataSource::DestroyDataSource( this->Source );
++#else
++      GDALClose( (GDALDatasetH) this->Source );
++#endif
+       }
+     }
+ 
+@@ -307,7 +315,11 @@ public:
+     return nCells;
+     }
+ 
++#if GDAL_VERSION_MAJOR < 2
+   OGRDataSource* Source;
++#else
++  GDALDataset* Source;
++#endif
+   OGRSFDriver* Driver;
+   const char* LastError;
+   int LayerIdx;
diff -Nru vtk6-6.2.0+dfsg1/debian/patches/series vtk6-6.2.0+dfsg1/debian/patches/series
--- vtk6-6.2.0+dfsg1/debian/patches/series	2015-08-02 20:23:50.000000000 +0200
+++ vtk6-6.2.0+dfsg1/debian/patches/series	2015-10-21 12:39:39.000000000 +0200
@@ -6,3 +6,4 @@
 60_use_system_mpi4py.patch
 70_fix_ftbfs_gcc49.patch
 80_fix_arm_compilation.patch
+90_gdal-2.0.patch
_______________________________________________
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

Reply via email to