commit:     43d08015d5cf35c902f6e2d640faa1fe042c1df4
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Nov  6 17:29:56 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Nov  6 17:32:17 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43d08015

games-strategy/s25rttr: fix build w/ boost-1.89

* Fix build w/ boost-1.89 (bug #963310)
* noreturn warning fix while at it

Closes: https://bugs.gentoo.org/963310
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../s25rttr/files/s25rttr-0.9.5-boost-1.89.patch   | 58 ++++++++++++++++++++++
 .../s25rttr/files/s25rttr-0.9.5-noreturn.patch     | 33 ++++++++++++
 games-strategy/s25rttr/s25rttr-0.9.5-r1.ebuild     |  2 +
 3 files changed, 93 insertions(+)

diff --git a/games-strategy/s25rttr/files/s25rttr-0.9.5-boost-1.89.patch 
b/games-strategy/s25rttr/files/s25rttr-0.9.5-boost-1.89.patch
new file mode 100644
index 000000000000..2ff99dcd28bf
--- /dev/null
+++ b/games-strategy/s25rttr/files/s25rttr-0.9.5-boost-1.89.patch
@@ -0,0 +1,58 @@
+https://github.com/Return-To-The-Roots/libsiedler2/compare/a2b0374f5d956080329acd2bcdd73beaf5f6b687...8a2a7e274725c97e797b00ab64b4152a6a18fdc6
+https://bugs.gentoo.org/963310
+
+From 8a2a7e274725c97e797b00ab64b4152a6a18fdc6 Mon Sep 17 00:00:00 2001
+From: Alexander Grund <[email protected]>
+Date: Thu, 18 Sep 2025 16:37:35 +0200
+Subject: [PATCH] Remove "system" component from Boost find_package search
+
+Boost.System is header-only so this is not required and fails with Boost 1.89
+---
+ CMakeLists.txt                           | 2 +-
+ examples/chTransparentIdx/CMakeLists.txt | 4 ++--
+ examples/lstpacker/CMakeLists.txt        | 4 ++--
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/external/libsiedler2/CMakeLists.txt 
b/external/libsiedler2/CMakeLists.txt
+index 6cc0322..6d78db4 100644
+--- a/external/libsiedler2/CMakeLists.txt
++++ b/external/libsiedler2/CMakeLists.txt
+@@ -35,7 +35,7 @@ endif()
+ 
+ 
+ include(RttrBoostCfg)
+-find_package(Boost 1.69 REQUIRED COMPONENTS system filesystem iostreams)
++find_package(Boost 1.69 REQUIRED COMPONENTS filesystem iostreams)
+ 
+ include(RttrTestingCfg)
+ if(isTopLevel)
+diff --git a/external/libsiedler2/examples/chTransparentIdx/CMakeLists.txt 
b/external/libsiedler2/examples/chTransparentIdx/CMakeLists.txt
+index a5a03b2..80ace6c 100644
+--- a/external/libsiedler2/examples/chTransparentIdx/CMakeLists.txt
++++ b/external/libsiedler2/examples/chTransparentIdx/CMakeLists.txt
+@@ -1,8 +1,8 @@
+-# Copyright (C) 2005 - 2021 Settlers Freaks <sf-team at siedler25.org>
++# Copyright (C) 2005 - 2025 Settlers Freaks <sf-team at siedler25.org>
+ #
+ # SPDX-License-Identifier: GPL-2.0-or-later
+ 
+-find_package(Boost 1.69 REQUIRED COMPONENTS system program_options)
++find_package(Boost 1.69 REQUIRED COMPONENTS program_options)
+ 
+ add_executable(chTransparentIdx chTransparentIdx.cpp)
+ 
+diff --git a/external/libsiedler2/examples/lstpacker/CMakeLists.txt 
b/external/libsiedler2/examples/lstpacker/CMakeLists.txt
+index 95b10e4..0b66ea7 100644
+--- a/external/libsiedler2/examples/lstpacker/CMakeLists.txt
++++ b/external/libsiedler2/examples/lstpacker/CMakeLists.txt
+@@ -1,8 +1,8 @@
+-# Copyright (C) 2005 - 2021 Settlers Freaks <sf-team at siedler25.org>
++# Copyright (C) 2005 - 2025 Settlers Freaks <sf-team at siedler25.org>
+ #
+ # SPDX-License-Identifier: GPL-2.0-or-later
+ 
+-find_package(Boost 1.69 REQUIRED COMPONENTS system program_options)
++find_package(Boost 1.69 REQUIRED COMPONENTS program_options)
+ 
+ file(GLOB _sources *.cpp *.h)
+ add_executable(lstpacker ${_sources})

diff --git a/games-strategy/s25rttr/files/s25rttr-0.9.5-noreturn.patch 
b/games-strategy/s25rttr/files/s25rttr-0.9.5-noreturn.patch
new file mode 100644
index 000000000000..858b6a1cb11c
--- /dev/null
+++ b/games-strategy/s25rttr/files/s25rttr-0.9.5-noreturn.patch
@@ -0,0 +1,33 @@
+https://github.com/Return-To-The-Roots/s25client/issues/1812
+
+From 7198609c21eae58c31cee5e88c76dc3eddea603f Mon Sep 17 00:00:00 2001
+From: Alexander Grund <[email protected]>
+Date: Sun, 26 Oct 2025 18:11:57 +0100
+Subject: [PATCH] Add noreturn attributes to Singleton policies
+
+---
+ external/libutil/libs/common/include/s25util/SingletonPolicies.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/external/libutil/libs/common/include/s25util/SingletonPolicies.h 
b/external/libutil/libs/common/include/s25util/SingletonPolicies.h
+index fa2f40b..5ff9e2f 100644
+--- a/external/libutil/libs/common/include/s25util/SingletonPolicies.h
++++ b/external/libutil/libs/common/include/s25util/SingletonPolicies.h
+@@ -16,7 +16,7 @@ using DestructionFunPtr = void (*)();
+ template<typename T>
+ struct DefaultLifetime
+ {
+-    static void OnDeadReference() { throw std::runtime_error("Access to dead 
singleton detected!"); }
++    [[noreturn]] static void OnDeadReference() { throw 
std::runtime_error("Access to dead singleton detected!"); }
+ 
+     static void ScheduleDestruction(T*, DestructionFunPtr pFun) { 
std::atexit(pFun); }
+ };
+@@ -55,7 +55,7 @@ unsigned GetLongevity(T*)
+ template<typename T>
+ struct WithLongevity
+ {
+-    static void OnDeadReference() { throw std::runtime_error("Access to dead 
singleton detected!"); }
++    [[noreturn]] static void OnDeadReference() { throw 
std::runtime_error("Access to dead singleton detected!"); }
+ 
+     static void ScheduleDestruction(T* inst, DestructionFunPtr pFun) { 
SetLongevity(GetLongevity(inst), pFun); }
+ };

diff --git a/games-strategy/s25rttr/s25rttr-0.9.5-r1.ebuild 
b/games-strategy/s25rttr/s25rttr-0.9.5-r1.ebuild
index bbbdcb22504d..a1c66aa28ba2 100644
--- a/games-strategy/s25rttr/s25rttr-0.9.5-r1.ebuild
+++ b/games-strategy/s25rttr/s25rttr-0.9.5-r1.ebuild
@@ -47,6 +47,8 @@ PATCHES=(
        "${FILESDIR}"/${PN}-0.9.5-boost.patch
        "${FILESDIR}"/${PN}-0.9.5-miniupnpc.patch
        "${FILESDIR}"/${PN}-0.9.5-gcc15.patch
+       "${FILESDIR}"/${PN}-0.9.5-boost-1.89.patch
+       "${FILESDIR}"/${PN}-0.9.5-noreturn.patch
 )
 
 # Build type is checked but blank is valid.

Reply via email to