Source: qmapshack
Version: 1.20.1-1
Severity: important
Tags: upstream ftbfs patch
User: [email protected]
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
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 <[email protected]>
+
+--- 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
_______________________________________________
Pkg-grass-devel mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-grass-devel

Reply via email to