commit:     8d1ce5aab43e8e5d1e5b48dbc97b124f8799398e
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 15 16:36:13 2025 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Sat Mar 15 19:55:31 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d1ce5aa

games-emulation/ppsspp: patch for sdl2-ttf

Closes: https://bugs.gentoo.org/951216
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 .../ppsspp/files/ppsspp-1.18.1-sdl2-ttf.patch      | 74 ++++++++++++++++++++++
 ...pp-1.18.1-r1.ebuild => ppsspp-1.18.1-r2.ebuild} |  2 +
 2 files changed, 76 insertions(+)

diff --git a/games-emulation/ppsspp/files/ppsspp-1.18.1-sdl2-ttf.patch 
b/games-emulation/ppsspp/files/ppsspp-1.18.1-sdl2-ttf.patch
new file mode 100644
index 000000000000..b59090e13187
--- /dev/null
+++ b/games-emulation/ppsspp/files/ppsspp-1.18.1-sdl2-ttf.patch
@@ -0,0 +1,74 @@
+From bd84c7bf7dcefc991aa2af14ca1f42f2c842c54b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= <[email protected]>
+Date: Thu, 9 Jan 2025 20:58:50 +0100
+Subject: [PATCH 1/2] Buildfix for new SDL.
+
+Fixes #19839
+---
+ Common/Render/Text/draw_text_sdl.h | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/Common/Render/Text/draw_text_sdl.h 
b/Common/Render/Text/draw_text_sdl.h
+index 267028638f87..7e0ddd9b422f 100644
+--- a/Common/Render/Text/draw_text_sdl.h
++++ b/Common/Render/Text/draw_text_sdl.h
+@@ -9,8 +9,7 @@
+ #include <fontconfig/fontconfig.h>
+ #endif
+ 
+-// SDL2_ttf's TTF_Font is a typedef of _TTF_Font.
+-struct _TTF_Font;
++struct TTF_Font;
+ 
+ class TextDrawerSDL : public TextDrawer {
+ public:
+@@ -32,9 +31,9 @@ class TextDrawerSDL : public TextDrawer {
+       uint32_t CheckMissingGlyph(std::string_view text);
+       int FindFallbackFonts(uint32_t missingGlyph, int ptSize);
+ 
+-      std::map<uint32_t, _TTF_Font *> fontMap_;
++      std::map<uint32_t, TTF_Font *> fontMap_;
+ 
+-      std::vector<_TTF_Font *> fallbackFonts_;
++      std::vector<TTF_Font *> fallbackFonts_;
+       std::vector<std::pair<std::string, int>> fallbackFontPaths_; // path 
and font face index
+ 
+       std::map<int, int> glyphFallbackFontIndex_;
+
+From 1ba304d83f5b3154928cff4169e812f4eedc3b6e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= <[email protected]>
+Date: Thu, 9 Jan 2025 21:12:00 +0100
+Subject: [PATCH 2/2] Alternate buildfix
+
+---
+ Common/Render/Text/draw_text_sdl.h | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/Common/Render/Text/draw_text_sdl.h 
b/Common/Render/Text/draw_text_sdl.h
+index 7e0ddd9b422f..7c073a8290f7 100644
+--- a/Common/Render/Text/draw_text_sdl.h
++++ b/Common/Render/Text/draw_text_sdl.h
+@@ -5,12 +5,15 @@
+ #include <map>
+ #include "Common/Render/Text/draw_text.h"
+ 
++#if defined(USE_SDL2_TTF)
++
++#include "SDL2/SDL.h"
++#include "SDL2/SDL_ttf.h"
++
+ #if defined(USE_SDL2_TTF_FONTCONFIG)
+ #include <fontconfig/fontconfig.h>
+ #endif
+ 
+-struct TTF_Font;
+-
+ class TextDrawerSDL : public TextDrawer {
+ public:
+       TextDrawerSDL(Draw::DrawContext *draw);
+@@ -42,3 +45,5 @@ class TextDrawerSDL : public TextDrawer {
+       FcConfig *config;
+ #endif
+ };
++
++#endif

diff --git a/games-emulation/ppsspp/ppsspp-1.18.1-r1.ebuild 
b/games-emulation/ppsspp/ppsspp-1.18.1-r2.ebuild
similarity index 96%
rename from games-emulation/ppsspp/ppsspp-1.18.1-r1.ebuild
rename to games-emulation/ppsspp/ppsspp-1.18.1-r2.ebuild
index 79a7ae0733b7..ad007a340549 100644
--- a/games-emulation/ppsspp/ppsspp-1.18.1-r1.ebuild
+++ b/games-emulation/ppsspp/ppsspp-1.18.1-r2.ebuild
@@ -27,6 +27,7 @@ IUSE="discord qt5 test wayland"
 RESTRICT="!test? ( test )"
 
 RDEPEND="
+       >=media-libs/sdl2-ttf-2.24.0
        app-arch/snappy:=
        app-arch/zstd:=
        dev-libs/libzip:=
@@ -57,6 +58,7 @@ BDEPEND="
 PATCHES=(
        "${FILESDIR}/${PN}-1.17.1-SpvBuilder-cstdint.patch"
        "${FILESDIR}/${PN}-1.17.1-cmake-cxx.patch"
+       "${FILESDIR}/${PN}-1.18.1-sdl2-ttf.patch"
        "${FILESDIR}/${PN}-CMakeLists-flags.patch"
 )
 

Reply via email to