commit:     42a569143b23ca59301ba828816f980ccfbb4ec4
Author:     Kostadin Shishmanov <kostadinshishmanov <AT> protonmail <DOT> com>
AuthorDate: Thu Mar 13 14:34:06 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Mar 13 14:57:34 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42a56914

games-strategy/wesnoth: fix build with gcc 15

Closes: https://bugs.gentoo.org/938229
Signed-off-by: Kostadin Shishmanov <kostadinshishmanov <AT> protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/41061
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../wesnoth/files/wesnoth-1.18.3-gcc15.patch       | 29 ++++++++++++++++++++++
 games-strategy/wesnoth/wesnoth-1.18.3.ebuild       |  5 +++-
 2 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/games-strategy/wesnoth/files/wesnoth-1.18.3-gcc15.patch 
b/games-strategy/wesnoth/files/wesnoth-1.18.3-gcc15.patch
new file mode 100644
index 000000000000..37cf8e731a55
--- /dev/null
+++ b/games-strategy/wesnoth/files/wesnoth-1.18.3-gcc15.patch
@@ -0,0 +1,29 @@
+https://bugs.gentoo.org/938229
+
+From 1fb93b68d15c7c039f04d0145ad47fb3102ec359 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <[email protected]>
+Date: Sat, 24 Aug 2024 22:21:47 +0100
+Subject: [PATCH] filesystem.hpp: include missing <cstdint>
+
+Without the change build fails on upcoming `gcc-15` as:
+
+    In file included from src/desktop/paths.cpp:20:
+    src/filesystem.hpp:232:13: error: 'uint8_t' was not declared in this scope
+      232 | std::vector<uint8_t> read_file_binary(const std::string& fname);
+          |             ^~~~~~~
+---
+ src/filesystem.hpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/filesystem.hpp b/src/filesystem.hpp
+index 38bf6952b452c..3cdb4b6ae7120 100644
+--- a/src/filesystem.hpp
++++ b/src/filesystem.hpp
+@@ -21,6 +21,7 @@
+ #pragma once
+ 
+ #include <ctime>
++#include <cstdint>
+ #include <fstream>
+ #include <iosfwd>
+ #include <memory>

diff --git a/games-strategy/wesnoth/wesnoth-1.18.3.ebuild 
b/games-strategy/wesnoth/wesnoth-1.18.3.ebuild
index f12b18fb00fc..3f4d36f79c73 100644
--- a/games-strategy/wesnoth/wesnoth-1.18.3.ebuild
+++ b/games-strategy/wesnoth/wesnoth-1.18.3.ebuild
@@ -43,7 +43,10 @@ BDEPEND="
        virtual/pkgconfig
 "
 
-PATCHES=( "${FILESDIR}"/${PN}-1.18.3-boost-1.87.patch )
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.18.3-boost-1.87.patch
+       "${FILESDIR}"/${PN}-1.18.3-gcc15.patch
+)
 
 src_prepare() {
        cmake_src_prepare

Reply via email to