commit:     db53498a2cd426ca48e30e0020e5af454abd2357
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jun  7 18:23:14 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jun  7 18:26:14 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db53498a

games-strategy/colobot: Fix building with gcc-14

Closes: https://bugs.gentoo.org/922895
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 games-strategy/colobot/colobot-0.2.1_alpha.ebuild            |  8 +++++++-
 games-strategy/colobot/files/colobot-0.2.1_alpha-gcc14.patch | 12 ++++++++++++
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/games-strategy/colobot/colobot-0.2.1_alpha.ebuild 
b/games-strategy/colobot/colobot-0.2.1_alpha.ebuild
index 731b33cd8a2d..b1ad12a0b717 100644
--- a/games-strategy/colobot/colobot-0.2.1_alpha.ebuild
+++ b/games-strategy/colobot/colobot-0.2.1_alpha.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -50,6 +50,12 @@ DEPEND+="
 "
 
 src_prepare() {
+       local PATCHES=(
+               # fixed upstream as part of:
+               # 
https://github.com/colobot/colobot/commit/1b69589302c2ac92c6befd2880a03b4b07c7f820
+               "${FILESDIR}/${P}-gcc14.patch"
+       )
+
        cmake_src_prepare
 
        # we need to call it explicitly to help Ninja figure out the deps

diff --git a/games-strategy/colobot/files/colobot-0.2.1_alpha-gcc14.patch 
b/games-strategy/colobot/files/colobot-0.2.1_alpha-gcc14.patch
new file mode 100644
index 000000000000..198aa6ab1a00
--- /dev/null
+++ b/games-strategy/colobot/files/colobot-0.2.1_alpha-gcc14.patch
@@ -0,0 +1,12 @@
+diff --git a/src/level/scoreboard.cpp b/src/level/scoreboard.cpp
+index 87c4451..abc44fe 100644
+--- a/src/level/scoreboard.cpp
++++ b/src/level/scoreboard.cpp
+@@ -31,6 +31,7 @@
+ #include "ui/displaytext.h"
+ 
+ #include <boost/lexical_cast.hpp>
++#include <algorithm>
+ 
+ void CScoreboard::CScoreboardRule::Read(CLevelParserLine* line)
+ {

Reply via email to