commit:     bb68029d96f184f8ab9b92e7e743f7c7979489b7
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 13 09:42:15 2025 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sat Sep 13 09:42:15 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb68029d

games-kids/tuxmath: Apply Debian patch to fix building with GCC 14, EAPI 8

Closes: https://bugs.gentoo.org/925143
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 games-kids/tuxmath/files/tuxmath-2.0.3-gcc14.patch | 51 ++++++++++++++++++++++
 ...ath-2.0.3-r3.ebuild => tuxmath-2.0.3-r4.ebuild} |  3 +-
 2 files changed, 53 insertions(+), 1 deletion(-)

diff --git a/games-kids/tuxmath/files/tuxmath-2.0.3-gcc14.patch 
b/games-kids/tuxmath/files/tuxmath-2.0.3-gcc14.patch
new file mode 100644
index 000000000000..8729d1acea42
--- /dev/null
+++ b/games-kids/tuxmath/files/tuxmath-2.0.3-gcc14.patch
@@ -0,0 +1,51 @@
+https://bugs.gentoo.org/925143
+
+--- a/src/menu.c
++++ b/src/menu.c
+@@ -631,8 +631,8 @@ void LoadMenus(void)
+    0 indicates that a choice has been made. */
+ int RunLoginMenu(void)
+ {
+-    const char *trailer_quit = "Quit";
+-    const char *trailer_back = "Back";
++    char *trailer_quit = "Quit";
++    char *trailer_back = "Back";
+     int n_login_questions = 0;
+     char **user_login_questions = NULL;
+     char *title = NULL;
+--- a/src/titlescreen.c
++++ b/src/titlescreen.c
+@@ -406,7 +406,7 @@ int RenderTitleScreen(void)
+ /* handle titlescreen events (easter egg)
+    this function should be called from event loops
+    return 1 if events require full redraw */
+-int HandleTitleScreenEvents(const SDL_Event* evt)
++int HandleTitleScreenEvents(SDL_Event* evt)
+ {
+     if (evt->type == SDL_KEYDOWN)
+       if (evt->key.keysym.sym == SDLK_F10)
+@@ -418,9 +418,9 @@ int HandleTitleScreenEvents(const SDL_Event* evt)
+ /* handle a resolution switch. Tux et. al. may need to be resized
+    and/or repositioned
+    */
+-int HandleTitleScreenResSwitch(int new_w, int new_h)
++void HandleTitleScreenResSwitch(int new_w, int new_h)
+ {
+-    return RenderTitleScreen();
++    RenderTitleScreen();
+ }
+ 
+ /* handle all titlescreen blitting
+--- a/src/titlescreen.h
++++ b/src/titlescreen.h
+@@ -102,8 +102,8 @@ extern SDL_Event  event;
+ void          TitleScreen(void);
+ int           RenderTitleScreen(void);
+ void          DrawTitleScreen(void);
+-int           HandleTitleScreenEvents(const SDL_Event* evt);
+-int           HandleTitleScreenResSwitch(int new_w, int new_h);
++int           HandleTitleScreenEvents(SDL_Event* evt);
++void          HandleTitleScreenResSwitch(int new_w, int new_h);
+ void          HandleTitleScreenAnimations();
+ void          HandleTitleScreenAnimations_Reset(bool reset);
+ void          ShowMessage(int font_size, const char* str1, const char* str2, 
const char* str3, const char* str4);

diff --git a/games-kids/tuxmath/tuxmath-2.0.3-r3.ebuild 
b/games-kids/tuxmath/tuxmath-2.0.3-r4.ebuild
similarity index 97%
rename from games-kids/tuxmath/tuxmath-2.0.3-r3.ebuild
rename to games-kids/tuxmath/tuxmath-2.0.3-r4.ebuild
index ebfa838ebdcb..2b9a6fa8070f 100644
--- a/games-kids/tuxmath/tuxmath-2.0.3-r3.ebuild
+++ b/games-kids/tuxmath/tuxmath-2.0.3-r4.ebuild
@@ -1,7 +1,7 @@
 # Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 inherit desktop optfeature
 
@@ -36,6 +36,7 @@ BDEPEND="
 PATCHES=(
        "${FILESDIR}"/${P}-blits-to-tmblits.patch
        "${FILESDIR}"/${P}-fno-common.patch
+       "${FILESDIR}"/${P}-gcc14.patch
 )
 
 src_configure() {

Reply via email to