[Git][debian-gis-team/saga][master] Add patch to fix FTBFS with GDAL 3.13.0. (closes: #1134153)
Bas Couwenberg (@sebastic)
gitlab at salsa.debian.org
Fri Apr 17 06:39:41 BST 2026
Bas Couwenberg pushed to branch master at Debian GIS Project / saga
Commits:
33281c7b by Bas Couwenberg at 2026-04-17T07:39:33+02:00
Add patch to fix FTBFS with GDAL 3.13.0. (closes: #1134153)
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/gdal-3.13.patch
- + debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -6,6 +6,8 @@ saga (9.9.3+dfsg-2) UNRELEASED; urgency=medium
* Drop Priority: optional, default since dpkg 1.22.13.
* Bump Standards-Version to 4.7.4, changes: priority.
* Drop obsolete Breaks/Replaces.
+ * Add patch to fix FTBFS with GDAL 3.13.0.
+ (closes: #1134153)
-- Bas Couwenberg <sebastic at debian.org> Sat, 25 Oct 2025 13:07:59 +0200
=====================================
debian/patches/gdal-3.13.patch
=====================================
@@ -0,0 +1,75 @@
+Description: Fix FTBFS with GDAL 3.13.0.
+ error: invalid conversion from 'CSLConstList' {aka 'const char* const*'} to 'char**' [-fpermissive]
+ .
+ From GDAL 3.13.0 NEWS:
+ "
+ * GDALMajorObject: Use CSLConstList for GetMetadata, SetMetadata (API breakage)
+ "
+Author: Bas Couwenberg <sebastic at debian.org>
+Forwarded: https://sourceforge.net/p/saga-gis/bugs/336/
+
+--- a/saga-gis/src/tools/io/io_gdal/gdal_driver.cpp
++++ b/saga-gis/src/tools/io/io_gdal/gdal_driver.cpp
+@@ -749,7 +749,11 @@ bool CSG_GDAL_DataSet::Get_MetaData(CSG_
+ {
+ if( m_pDataSet && is_Reading() )
+ {
+- char **pMetaData = GDALGetMetadata(m_pDataSet, 0);
++#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3, 13, 0)
++ CSLConstList pMetaData = GDALGetMetadata(m_pDataSet, 0);
++#else
++ *char **pMetaData = GDALGetMetadata(m_pDataSet, 0);
++#endif
+
+ if( pMetaData )
+ {
+@@ -777,7 +781,11 @@ bool CSG_GDAL_DataSet::Get_MetaData(CSG_
+ {
+ if( m_pDataSet && is_Reading() )
+ {
++#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3, 13, 0)
++ CSLConstList pMetaData = GDALGetMetadata(m_pDataSet, pszDomain);
++#else
+ char **pMetaData = GDALGetMetadata(m_pDataSet, pszDomain);
++#endif
+
+ if( pMetaData )
+ {
+@@ -895,7 +903,11 @@ CSG_String CSG_GDAL_DataSet::Get_MetaDat
+
+ GDALRasterBandH pBand = is_Reading() ? GDALGetRasterBand(m_pDataSet, i + 1) : NULL;
+
++#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3, 13, 0)
++ CSLConstList pMetaData = pBand ? GDALGetMetadata(pBand, NULL) : NULL;
++#else
+ char **pMetaData = pBand ? GDALGetMetadata(pBand, NULL) : NULL;
++#endif
+
+ if( pMetaData )
+ {
+@@ -920,7 +932,11 @@ bool CSG_GDAL_DataSet::Get_MetaData(int
+ {
+ GDALRasterBandH pBand = is_Reading() ? GDALGetRasterBand(m_pDataSet, i + 1) : NULL;
+
++#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3, 13, 0)
++ CSLConstList pMetaData = pBand ? GDALGetMetadata(pBand, NULL) : NULL;
++#else
+ char **pMetaData = pBand ? GDALGetMetadata(pBand, NULL) : NULL;
++#endif
+
+ if( pMetaData )
+ {
+--- a/saga-gis/src/tools/io/io_gdal/ogr_driver.cpp
++++ b/saga-gis/src/tools/io/io_gdal/ogr_driver.cpp
+@@ -546,7 +546,11 @@ CSG_String CSG_OGR_DataSet::Get_Descript
+
+ if( pLayer != NULL )
+ {
++#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3, 13, 0)
++ CSLConstList pMetaData = GDALGetMetadata(pLayer, 0);
++#else
+ char **pMetaData = GDALGetMetadata(pLayer, 0);
++#endif
+
+ if( pMetaData )
+ {
=====================================
debian/patches/series
=====================================
@@ -0,0 +1 @@
+gdal-3.13.patch
View it on GitLab: https://salsa.debian.org/debian-gis-team/saga/-/commit/33281c7b5574dfdf15582ac29d444110fbafcadb
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/saga/-/commit/33281c7b5574dfdf15582ac29d444110fbafcadb
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/20260417/dfbb7886/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list