[packages/wesnoth] upstream fix for gcc >= 13

atler atler at pld-linux.org
Wed Jul 5 20:26:26 CEST 2023


commit e1af5098ad6e18310f8c60923e19281b1c19b399
Author: Jan Palus <atler at pld-linux.org>
Date:   Wed Jul 5 20:04:59 2023 +0200

    upstream fix for gcc >= 13
    
    from: https://github.com/wesnoth/wesnoth/pull/6726

 gcc13.patch  | 39 +++++++++++++++++++++++++++++++++++++++
 wesnoth.spec |  2 ++
 2 files changed, 41 insertions(+)
---
diff --git a/wesnoth.spec b/wesnoth.spec
index dcae1d3..e56d9d3 100644
--- a/wesnoth.spec
+++ b/wesnoth.spec
@@ -20,6 +20,7 @@ Source1:	%{name}d.init
 Source2:	%{name}.tmpfiles
 Source3:	%{name}.sysconfig
 Source4:	%{name}d.service
+Patch0:		gcc13.patch
 URL:		http://www.wesnoth.org/
 BuildRequires:	SDL2-devel >= 2.0.8
 BuildRequires:	SDL2_image-devel >= 2.0.2
@@ -117,6 +118,7 @@ Ten pakiet zawiera pliki danych dla gry Wesnoth.
 
 %prep
 %setup -q
+%patch0 -p1
 
 # don't install locales in %{_datadir}/%{name}
 %{__sed} -i 's,${DATADIR}/${LOCALEDIR},${LOCALEDIR},' CMakeLists.txt
diff --git a/gcc13.patch b/gcc13.patch
new file mode 100644
index 0000000..a425e17
--- /dev/null
+++ b/gcc13.patch
@@ -0,0 +1,39 @@
+From f073493ebc279cefa391d364c48265058795e1d2 Mon Sep 17 00:00:00 2001
+From: Martin Liska <mliska at suse.cz>
+Date: Mon, 23 May 2022 13:44:39 +0200
+Subject: [PATCH] Fix building with GCC 13.
+
+Fixes the following issue:
+base64.hpp:23:49: error: 'uint8_t' was not declared in this scope
+
+and:
+deprecation.hpp:20:22: error: found ':' in nested-name-specifier, expected '::'
+---
+ src/deprecation.hpp          | 1 +
+ src/serialization/base64.hpp | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/src/deprecation.hpp b/src/deprecation.hpp
+index 33736df1b22c..ee09e73be1d0 100644
+--- a/src/deprecation.hpp
++++ b/src/deprecation.hpp
+@@ -14,6 +14,7 @@
+ 
+ #pragma once
+ 
++#include <cstdint>
+ #include <string>
+ 
+ /** See https://wiki.wesnoth.org/CompatibilityStandards for more info. */
+diff --git a/src/serialization/base64.hpp b/src/serialization/base64.hpp
+index dbb3b3d32652..c5d8dd32d3fd 100644
+--- a/src/serialization/base64.hpp
++++ b/src/serialization/base64.hpp
+@@ -15,6 +15,7 @@
+ 
+ #pragma once
+ 
++#include <cstdint>
+ #include <string_view>
+ #include <vector>
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/wesnoth.git/commitdiff/5a7be3db79ef9e2a0efd32f274befb7fe763d013



More information about the pld-cvs-commit mailing list