[packages/gdal] upstream fixes for gcc 11
atler
atler at pld-linux.org
Fri Jun 25 14:35:30 CEST 2021
commit f61696cf6c16ad328ec3f690a5858737d4acfdb2
Author: Jan Palus <atler at pld-linux.org>
Date: Fri Jun 25 12:34:46 2021 +0000
upstream fixes for gcc 11
missing "limits" includes
gcc11.patch | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
gdal.spec | 2 ++
2 files changed, 50 insertions(+)
---
diff --git a/gdal.spec b/gdal.spec
index fa2d12b..83d8d0b 100644
--- a/gdal.spec
+++ b/gdal.spec
@@ -64,6 +64,7 @@ Patch5: libx32.patch
Patch7: decl.patch
Patch8: %{name}_tirpcinc.patch
Patch9: jasper.patch
+Patch10: gcc11.patch
URL: http://www.gdal.org/
# 1.x or 2.x supported
BuildRequires: CharLS-devel
@@ -277,6 +278,7 @@ Moduł Pythona GDAL.
%patch7 -p1
%patch8 -p1
%patch9 -p2
+%patch10 -p2
# need to regenerate (old ones don't support perl 5.10)
%{__rm} swig/perl/{gdal_wrap.cpp,gdalconst_wrap.c,ogr_wrap.cpp,osr_wrap.cpp}
diff --git a/gcc11.patch b/gcc11.patch
new file mode 100644
index 0000000..0f87318
--- /dev/null
+++ b/gcc11.patch
@@ -0,0 +1,48 @@
+From 7a18e2669a733ebe3544e4f5c735fd4d2ded5fa3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder at redhat.com>
+Date: Thu, 10 Dec 2020 14:02:44 +0100
+Subject: [PATCH] Add some missing <limits> includes
+
+Otherwise, the builds fails with either gcc11 or recent clang.
+---
+ gdal/ogr/ogrsf_frmts/cad/libopencad/cadobjects.cpp | 1 +
+ gdal/ogr/ogrsf_frmts/cad/libopencad/dwg/r2000.cpp | 1 +
+ gdal/third_party/LercLib/Lerc2.h | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/gdal/ogr/ogrsf_frmts/cad/libopencad/cadobjects.cpp b/gdal/ogr/ogrsf_frmts/cad/libopencad/cadobjects.cpp
+index f59f7d50e2f5..edff5100e1f4 100644
+--- a/gdal/ogr/ogrsf_frmts/cad/libopencad/cadobjects.cpp
++++ b/gdal/ogr/ogrsf_frmts/cad/libopencad/cadobjects.cpp
+@@ -31,6 +31,7 @@
+
+ #include "cadobjects.h"
+
++#include <limits>
+ #include <math.h>
+ #include <algorithm>
+
+diff --git a/gdal/ogr/ogrsf_frmts/cad/libopencad/dwg/r2000.cpp b/gdal/ogr/ogrsf_frmts/cad/libopencad/dwg/r2000.cpp
+index 83951fd7e7fc..6ae837da6467 100644
+--- a/gdal/ogr/ogrsf_frmts/cad/libopencad/dwg/r2000.cpp
++++ b/gdal/ogr/ogrsf_frmts/cad/libopencad/dwg/r2000.cpp
+@@ -36,6 +36,7 @@
+ #include <cassert>
+ #include <cstring>
+ #include <iostream>
++#include <limits>
+ #include <memory>
+ #include <string>
+
+diff --git a/gdal/third_party/LercLib/Lerc2.h b/gdal/third_party/LercLib/Lerc2.h
+index feec95529c83..564f928ee672 100644
+--- a/gdal/third_party/LercLib/Lerc2.h
++++ b/gdal/third_party/LercLib/Lerc2.h
+@@ -27,6 +27,7 @@ Contributors: Thomas Maurer
+ #include <algorithm>
+ #include <cfloat>
+ #include <cmath>
++#include <limits>
+ #include <string>
+ #include <typeinfo>
+ #include "Defines.h"
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/gdal.git/commitdiff/f61696cf6c16ad328ec3f690a5858737d4acfdb2
More information about the pld-cvs-commit
mailing list