Bug#1134149: qmapshack: FTBFS with GDAL 3.13.0
Bas Couwenberg
sebastic at debian.org
Fri Apr 17 05:30:36 BST 2026
Source: qmapshack
Version: 1.20.1-1
Severity: important
Tags: upstream ftbfs patch
User: debian-gis at lists.debian.org
Usertags: gdal-3.13
Dear Maintainer,
Your package FTBFS with GDAL 3.13.0:
error: implicit declaration of function 'MIN' [-Wimplicit-function-declaration]
error: implicit declaration of function 'MAX' [-Wimplicit-function-declaration]
The attached patch fixes the issue.
Kind Regards,
Bas
-------------- next part --------------
diff -Nru qmapshack-1.20.1/debian/patches/gdal-3.13.patch qmapshack-1.20.1/debian/patches/gdal-3.13.patch
--- qmapshack-1.20.1/debian/patches/gdal-3.13.patch 1970-01-01 01:00:00.000000000 +0100
+++ qmapshack-1.20.1/debian/patches/gdal-3.13.patch 2026-04-17 06:14:14.000000000 +0200
@@ -0,0 +1,19 @@
+Description: Fix FTBFS with GDAL 3.13.0.
+ error: 'MIN' was not declared in this scope
+ error: 'MAX' was not declared in this scope
+Author: Bas Couwenberg <sebastic at debian.org>
+
+--- a/src/qmt_map2jnx/main.cpp
++++ b/src/qmt_map2jnx/main.cpp
+@@ -430,7 +430,11 @@ static void printProgress(int current, i
+ static int nLastTick = -1;
+ int nThisTick = (int)(dfComplete * 40.0);
+
++#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3, 13, 0)
++ nThisTick = CPL_MIN(40, CPL_MAX(0, nThisTick));
++#else
+ nThisTick = MIN(40, MAX(0, nThisTick));
++#endif
+
+ // Have we started a new progress run?
+ if (nThisTick < nLastTick && nLastTick >= 39) {
diff -Nru qmapshack-1.20.1/debian/patches/series qmapshack-1.20.1/debian/patches/series
--- qmapshack-1.20.1/debian/patches/series 2025-11-06 15:30:14.000000000 +0100
+++ qmapshack-1.20.1/debian/patches/series 2026-04-17 06:14:14.000000000 +0200
@@ -1 +1,2 @@
proj.patch
+gdal-3.13.patch
More information about the Pkg-grass-devel
mailing list