From 253fd39e5180f2feb98c0f9869fb2eb9292644c3 Mon Sep 17 00:00:00 2001 From: Violet Purcell Date: Thu, 7 Aug 2025 19:35:11 -0400 Subject: [PATCH] games-simulation/openrct2: fix build with libc++ 21 Signed-off-by: Violet Purcell Part-of: https://github.com/gentoo/gentoo/pull/43378 Closes: https://github.com/gentoo/gentoo/pull/43378 Signed-off-by: Conrad Kostecki --- .../openrct2-0.4.21-libcxx-21-cstdlib.patch | 18 ++++++++++++++++++ .../openrct2/openrct2-0.4.21.ebuild | 2 ++ 2 files changed, 20 insertions(+) create mode 100644 games-simulation/openrct2/files/openrct2-0.4.21-libcxx-21-cstdlib.patch diff --git a/games-simulation/openrct2/files/openrct2-0.4.21-libcxx-21-cstdlib.patch b/games-simulation/openrct2/files/openrct2-0.4.21-libcxx-21-cstdlib.patch new file mode 100644 index 0000000000000..a0b63171621ad --- /dev/null +++ b/games-simulation/openrct2/files/openrct2-0.4.21-libcxx-21-cstdlib.patch @@ -0,0 +1,18 @@ +From https://github.com/OpenRCT2/OpenRCT2/commit/1abd50ff1ff75360c9ad77ec07be15d97d7d643a Mon Sep 17 00:00:00 2001 +From: Violet Purcell <66446404+vimproved@users.noreply.github.com> +Date: Thu, 7 Aug 2025 16:03:03 -0400 +Subject: [PATCH] Add explicit include to Range.hpp (#24918) + +LLVM libc++ 21 shuffled around some includes internally, causing cstdlib +to no longer be transitively included here. Explicitly include it for +size_t. +--- a/src/openrct2/core/Range.hpp ++++ b/src/openrct2/core/Range.hpp +@@ -10,6 +10,7 @@ + #pragma once + + #include ++#include + #include + + template diff --git a/games-simulation/openrct2/openrct2-0.4.21.ebuild b/games-simulation/openrct2/openrct2-0.4.21.ebuild index 49ea80a23d273..88d8aba83d121 100644 --- a/games-simulation/openrct2/openrct2-0.4.21.ebuild +++ b/games-simulation/openrct2/openrct2-0.4.21.ebuild @@ -79,6 +79,8 @@ BDEPEND=" PATCHES=( "${FILESDIR}/${PN}-0.4.1-gtest-1.10.patch" "${FILESDIR}/${PN}-0.4.16-include-additional-paths.patch" + # backport of https://github.com/OpenRCT2/OpenRCT2/commit/1abd50ff1ff75360c9ad77ec07be15d97d7d643a + "${FILESDIR}/${P}-libcxx-21-cstdlib.patch" ) src_unpack() {