commit:     47d2d92992937035d0bd44800f8d67178650bb0c
Author:     NHOrus <jy6x2b32pie9 <AT> yahoo <DOT> com>
AuthorDate: Sat Feb 14 12:00:01 2026 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sun Feb 22 09:20:32 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47d2d929

games-arcade/penguin-command: Fix build with C23

Missing function declaration, wrong function usage.

Closes: https://bugs.gentoo.org/966225
Signed-off-by: NHOrus <jy6x2b32pie9 <AT> yahoo.com>
Part-of: https://github.com/gentoo/gentoo/pull/45811
Closes: https://github.com/gentoo/gentoo/pull/45811
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 .../files/penguin-command-1.6.11-C23.patch         | 29 ++++++++++++++++++++++
 .../penguin-command-1.6.11-r1.ebuild               |  4 ++-
 2 files changed, 32 insertions(+), 1 deletion(-)

diff --git 
a/games-arcade/penguin-command/files/penguin-command-1.6.11-C23.patch 
b/games-arcade/penguin-command/files/penguin-command-1.6.11-C23.patch
new file mode 100644
index 000000000000..55f21bf6550a
--- /dev/null
+++ b/games-arcade/penguin-command/files/penguin-command-1.6.11-C23.patch
@@ -0,0 +1,29 @@
+https://bugs.gentoo.org/966225
+Porting to C23, lock and unlock are implicitly work on global Screen
+Used include with function declaration instead of re-declaring it for
+missing function.
+--- a/src/gfx.c
++++ b/src/gfx.c
+@@ -260,11 +260,11 @@
+ 
+ void LinePart(Sint32 X1, Sint32 Y1, Sint32 X2, Sint32 Y2, Sint32 lower, 
Sint32 upper, Uint32 Color)
+ {
+-   lock(Screen);
++   lock();
+ 
+    /* Draw the line */
+    DoLinePart(Screen, X1, Y1, X2, Y2, lower, upper, Color, &PutPixel);
+-   unlock(Screen);
++   unlock();
+ }
+ 
+ void Update()
+--- a/src/joystick.c
++++ b/src/joystick.c
+@@ -1,5 +1,6 @@
+ #include <SDL.h>
+ #include "joystick.h"
++#include "gfx.h" //for ComplainAndExit()
+ 
+ static SDL_Joystick *joy=NULL;
+ 

diff --git a/games-arcade/penguin-command/penguin-command-1.6.11-r1.ebuild 
b/games-arcade/penguin-command/penguin-command-1.6.11-r1.ebuild
index 3f7f550a247a..7ce5ff3ac4cc 100644
--- a/games-arcade/penguin-command/penguin-command-1.6.11-r1.ebuild
+++ b/games-arcade/penguin-command/penguin-command-1.6.11-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -18,6 +18,8 @@ DEPEND="media-libs/libsdl[sound,joystick,video]
        media-libs/sdl-image[jpeg,png]"
 RDEPEND="${DEPEND}"
 
+PATCHES=( "${FILESDIR}/${P}-C23.patch" )
+
 src_install() {
        default
        newicon data/gfx/icon.xpm ${PN}.xpm

Reply via email to