[Git][debian-gis-team/merkaartor][master] Add upstream patch to fix FTBFS with GDAL 3.12.0. (closes: #1118726)

Bas Couwenberg (@sebastic) gitlab at salsa.debian.org
Fri Oct 24 16:57:45 BST 2025



Bas Couwenberg pushed to branch master at Debian GIS Project / merkaartor


Commits:
e19e38d4 by Bas Couwenberg at 2025-10-24T17:53:29+02:00
Add upstream patch to fix FTBFS with GDAL 3.12.0. (closes: #1118726)

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/gdal-3.12.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -3,6 +3,8 @@ merkaartor (0.20.0+ds-3) UNRELEASED; urgency=medium
   * Team upload.
   * Update lintian overrides.
   * Drop Rules-Requires-Root: no, default since dpkg 1.22.13.
+  * Add upstream patch to fix FTBFS with GDAL 3.12.0.
+    (closes: #1118726)
 
  -- Bas Couwenberg <sebastic at debian.org>  Fri, 12 Sep 2025 17:40:15 +0200
 


=====================================
debian/patches/gdal-3.12.patch
=====================================
@@ -0,0 +1,33 @@
+Subject: Fix FTBFS with GDAL 3.12.0.
+Author: Ladislav Láska <krakonos at krakonos.org>
+Origin: https://github.com/openstreetmap/merkaartor/pull/316
+Forwarded: not-needed
+
+--- a/src/ImportExport/ImportExportGdal.cpp
++++ b/src/ImportExport/ImportExportGdal.cpp
+@@ -337,7 +337,7 @@ bool ImportExportGdal::importGDALDataset
+     qDebug(lc_importExportGdal) << "Layers #" << poDS->GetLayerCount();
+     OGRLayer  *poLayer = poDS->GetLayer(0);
+ 
+-    OGRSpatialReference * theSrs = poLayer->GetSpatialRef(); // Note: Contrary to other OGR objects, the spatial ref must NOT be released by our code!
++    const OGRSpatialReference * theSrs = poLayer->GetSpatialRef(); // Note: Contrary to other OGR objects, the spatial ref must NOT be released by our code!
+     toWGS84 = NULL;
+ 
+     if (theSrs) {
+@@ -351,7 +351,6 @@ bool ImportExportGdal::importGDALDataset
+                 qDebug("GDAL: couldn't initialise EPSG:27700: %d: %s", ogrError, CPLGetLastErrorMsg());
+                 the27700Srs->Release();
+             } else {
+-                theSrs->Release();
+                 theSrs = the27700Srs;
+             }
+         }
+@@ -390,7 +389,7 @@ bool ImportExportGdal::importGDALDataset
+                 Feature* F = parseGeometry(aLayer, poGeometry);
+                 if (F) {
+                     for (int i=0; i<poFeature->GetFieldCount(); ++i) {
+-                        OGRFieldDefn  *fd = poFeature->GetFieldDefnRef(i);
++                        const OGRFieldDefn  *fd = poFeature->GetFieldDefnRef(i);
+                         QString k = QString::fromUtf8(fd->GetNameRef());
+                         if (k == "osm_id") {
+                             F->setId(IFeature::FId(F->getType(), (qint64)poFeature->GetFieldAsDouble(i)));


=====================================
debian/patches/series
=====================================
@@ -1 +1,2 @@
 no-git-version.patch
+gdal-3.12.patch



View it on GitLab: https://salsa.debian.org/debian-gis-team/merkaartor/-/commit/e19e38d4b9b545486ec72ea35e7aed8b4b614bf6

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/merkaartor/-/commit/e19e38d4b9b545486ec72ea35e7aed8b4b614bf6
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20251024/0f291d1d/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list