Source: sumo
Version: 0.23.0+dfsg1-2
Severity: important
Tags: patch upstream
User: debian-...@lists.debian.org
Usertags: gdal-2.0

Dear Maintainer,

sumo (0.23.0+dfsg1-2) FTBFS due to missing compatibility with
GDAL/OGR 2.0:

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

This issue has been fixed upstream via #1868 with r18752:

 http://sumo.dlr.de/trac.wsgi/ticket/1868
 http://sumo.dlr.de/trac.wsgi/changeset/18752

The attached debdiff includes the changes from SVN r18752 in
50_gdal-2.0.patch, please consider including these changes in the next
sumo upload.

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 [1].

[0] https://lists.debian.org/debian-gis/2015/10/msg00022.html
[1]
http://anonscm.debian.org/cgit/pkg-grass/gdal.git/log/?h=experimental-2.0

Kind Regards,

Bas
diff -Nru sumo-0.23.0+dfsg1/debian/changelog sumo-0.23.0+dfsg1/debian/changelog
--- sumo-0.23.0+dfsg1/debian/changelog	2015-05-04 21:26:49.000000000 +0200
+++ sumo-0.23.0+dfsg1/debian/changelog	2015-10-20 12:53:22.000000000 +0200
@@ -1,3 +1,10 @@
+sumo (0.23.0+dfsg1-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Add patch for GDAL 2.0 support.
+
+ -- Bas Couwenberg <sebas...@debian.org>  Tue, 20 Oct 2015 12:51:15 +0200
+
 sumo (0.23.0+dfsg1-2) unstable; urgency=medium
 
   * Move package from experimental to unstable
diff -Nru sumo-0.23.0+dfsg1/debian/patches/50_gdal-2.0.patch sumo-0.23.0+dfsg1/debian/patches/50_gdal-2.0.patch
--- sumo-0.23.0+dfsg1/debian/patches/50_gdal-2.0.patch	1970-01-01 01:00:00.000000000 +0100
+++ sumo-0.23.0+dfsg1/debian/patches/50_gdal-2.0.patch	2015-10-20 12:51:09.000000000 +0200
@@ -0,0 +1,65 @@
+Description: now supporting GDAL 2.0 (as well as 1.x).
+Author: Thomas Lockhart
+Bug: http://sumo.dlr.de/trac.wsgi/ticket/1868
+Origin: http://sumo.dlr.de/trac.wsgi/changeset/18752
+
+--- a/src/netbuild/NBHeightMapper.cpp
++++ b/src/netbuild/NBHeightMapper.cpp
+@@ -166,8 +166,13 @@ NBHeightMapper::loadIfSet(OptionsCont& o
+ int
+ NBHeightMapper::loadShapeFile(const std::string& file) {
+ #ifdef HAVE_GDAL
++#if GDAL_VERSION_MAJOR < 2
+     OGRRegisterAll();
+     OGRDataSource* ds = OGRSFDriverRegistrar::Open(file.c_str(), FALSE);
++#else
++    GDALAllRegister();
++    GDALDataset* ds = (GDALDataset*) GDALOpen(file.c_str(), GA_ReadOnly);
++#endif
+     if (ds == NULL) {
+         throw ProcessError("Could not open shape file '" + file + "'.");
+     }
+@@ -242,7 +247,11 @@ NBHeightMapper::loadShapeFile(const std:
+         */
+         OGRFeature::DestroyFeature(feature);
+     }
++#if GDAL_VERSION_MAJOR < 2
+     OGRDataSource::DestroyDataSource(ds);
++#else
++    GDALClose(ds);
++#endif
+     OCTDestroyCoordinateTransformation(toWGS84);
+     OGRCleanupAll();
+     return numFeatures;
+--- a/src/netimport/NIImporter_ArcView.cpp
++++ b/src/netimport/NIImporter_ArcView.cpp
+@@ -125,8 +125,13 @@ void
+ NIImporter_ArcView::load() {
+ #ifdef HAVE_GDAL
+     PROGRESS_BEGIN_MESSAGE("Loading data from '" + mySHPName + "'");
++#if GDAL_VERSION_MAJOR < 2
+     OGRRegisterAll();
+     OGRDataSource* poDS = OGRSFDriverRegistrar::Open(mySHPName.c_str(), FALSE);
++#else
++    GDALAllRegister();
++    GDALDataset* poDS = (GDALDataset*) GDALOpen(mySHPName.c_str(), GA_ReadOnly);
++#endif
+     if (poDS == NULL) {
+         WRITE_ERROR("Could not open shape description '" + mySHPName + "'.");
+         return;
+--- a/src/polyconvert/PCLoaderArcView.cpp
++++ b/src/polyconvert/PCLoaderArcView.cpp
+@@ -84,8 +84,13 @@ PCLoaderArcView::load(const std::string&
+     bool useRunningID = oc.getBool("shapefile.use-running-id");
+     // start parsing
+     std::string shpName = file + ".shp";
++#if GDAL_VERSION_MAJOR < 2
+     OGRRegisterAll();
+     OGRDataSource* poDS = OGRSFDriverRegistrar::Open(shpName.c_str(), FALSE);
++#else
++    GDALAllRegister();
++    GDALDataset* poDS = (GDALDataset*) GDALOpen(shpName.c_str(), GA_ReadOnly);
++#endif
+     if (poDS == NULL) {
+         throw ProcessError("Could not open shape description '" + shpName + "'.");
+     }
diff -Nru sumo-0.23.0+dfsg1/debian/patches/series sumo-0.23.0+dfsg1/debian/patches/series
--- sumo-0.23.0+dfsg1/debian/patches/series	2015-05-04 21:24:34.000000000 +0200
+++ sumo-0.23.0+dfsg1/debian/patches/series	2015-10-20 12:53:14.000000000 +0200
@@ -2,3 +2,4 @@
 20_fix_scripts_headers.patch
 30_add_missing_link.patch
 40_drop_some_buildflags.patch
+50_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