From e58fcd24f0c0469e947e0c977fbcb0ac0d34714f Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Sun, 22 Jan 2023 19:33:22 -0700 Subject: [PATCH] Add upstream patch to add missing include needed for gcc 13 --- gdal-include.patch | 21 +++++++++++++++++++++ gdal.spec | 9 +++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 gdal-include.patch diff --git a/gdal-include.patch b/gdal-include.patch new file mode 100644 index 0000000..6e826ad --- /dev/null +++ b/gdal-include.patch @@ -0,0 +1,21 @@ +From 412b7fe6604141ee371f5a5a628bab1c5304de76 Mon Sep 17 00:00:00 2001 +From: Even Rouault +Date: Tue, 17 Jan 2023 13:39:05 +0100 +Subject: [PATCH] testcopywords.cpp: fix build error with clang 15.0.7 + +--- + autotest/cpp/testcopywords.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/autotest/cpp/testcopywords.cpp b/autotest/cpp/testcopywords.cpp +index a59d9bf91a3..07a0f448c69 100644 +--- a/autotest/cpp/testcopywords.cpp ++++ b/autotest/cpp/testcopywords.cpp +@@ -30,6 +30,7 @@ + #include "cpl_conv.h" + #include "gdal.h" + ++#include + #include + + GByte *pIn; diff --git a/gdal.spec b/gdal.spec index 5a0a5d8..adddbce 100644 --- a/gdal.spec +++ b/gdal.spec @@ -75,7 +75,9 @@ Patch0: gdal_utils.patch # inlining failed in call to ‘always_inline’ ‘open.localalias’ # See https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2526 for a similar issue Patch1: gdal-fortify-source.patch - +# Add missing include needed for gcc 13 +# https://github.com/OSGeo/gdal/commit/412b7fe6604141ee371f5a5a628bab1c5304de76 +Patch2: gdal-include.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -358,7 +360,7 @@ MinGW Windows Python3 GDAL bindings. %endif %prep -%autosetup -p1 -n %{name}-%{version}-fedora +%autosetup -N -p1 -n %{name}-%{version}-fedora # Delete bundled libraries rm -rf frmts/zlib @@ -375,6 +377,9 @@ rm -rf third_party/LercLib tar xf %{SOURCE1} mv %{name}autotest-%{version} autotest +# Need to patch autotest +%autopatch -p1 + # Copy in PROVENANCE.TXT-fedora cp -a %{SOURCE4} .