From 831def21f26427feb8a3b137e1d20254276b00a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Bar=C4=87?= Date: Sun, 10 Dec 2023 17:57:28 +0100 Subject: [PATCH] games-emulation/melonds: include algorithm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: https://github.com/melonDS-emu/melonDS/pull/1874 Closes: https://bugs.gentoo.org/918666 Signed-off-by: Maciej Barć --- .../melonds-0.9.5-DSi_Camera-algorithm.patch | 24 +++++++++++++++++++ .../melonds/melonds-0.9.5-r4.ebuild | 13 +++++++--- 2 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 games-emulation/melonds/files/melonds-0.9.5-DSi_Camera-algorithm.patch diff --git a/games-emulation/melonds/files/melonds-0.9.5-DSi_Camera-algorithm.patch b/games-emulation/melonds/files/melonds-0.9.5-DSi_Camera-algorithm.patch new file mode 100644 index 0000000000000..17971f1327c0d --- /dev/null +++ b/games-emulation/melonds/files/melonds-0.9.5-DSi_Camera-algorithm.patch @@ -0,0 +1,24 @@ +From e63e29ca91ba5fc1630634fbb9f064b9cce6cc1f Mon Sep 17 00:00:00 2001 +From: orbea +Date: Sat, 11 Nov 2023 10:31:10 -0800 +Subject: [PATCH] DSi_Camera: fix gcc-14 build issue + +melonDS/src/DSi_Camera.cpp:190:23: error: 'clamp' is not a member of 'std' + 190 | r1 = std::clamp(r1, 0, 255); g1 = std::clamp(g1, 0, 255); b1 = std::clamp(b1, 0, 255); + | ^~~~~ +--- + src/DSi_Camera.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/DSi_Camera.cpp b/src/DSi_Camera.cpp +index 749162932..2b259c590 100644 +--- a/src/DSi_Camera.cpp ++++ b/src/DSi_Camera.cpp +@@ -16,6 +16,7 @@ + with melonDS. If not, see http://www.gnu.org/licenses/. + */ + ++#include + #include + #include + #include "DSi.h" diff --git a/games-emulation/melonds/melonds-0.9.5-r4.ebuild b/games-emulation/melonds/melonds-0.9.5-r4.ebuild index a2ea52c0b2972..5171a6bad8ec0 100644 --- a/games-emulation/melonds/melonds-0.9.5-r4.ebuild +++ b/games-emulation/melonds/melonds-0.9.5-r4.ebuild @@ -38,10 +38,17 @@ RDEPEND=" net-libs/libpcap net-libs/libslirp " -DEPEND="${RDEPEND}" -BDEPEND="kde-frameworks/extra-cmake-modules:0" +DEPEND=" + ${RDEPEND} +" +BDEPEND=" + kde-frameworks/extra-cmake-modules:0 +" -PATCHES=( "${FILESDIR}"/${P}-no-ccache-detection.patch ) +PATCHES=( + "${FILESDIR}/${PN}-0.9.5-DSi_Camera-algorithm.patch" + "${FILESDIR}/${PN}-0.9.5-no-ccache-detection.patch" +) # used for JIT recompiler QA_EXECSTACK="usr/bin/melonDS"