From 65b93141db9c769de5e3071eed72179342ce41e5 Mon Sep 17 00:00:00 2001 From: Ryan Carsten Schmidt Date: Fri, 11 Oct 2024 11:48:04 -0500 Subject: [PATCH] xgalaga: Fix implicit int errors Closes: https://trac.macports.org/ticket/71057 --- games/xgalaga/Portfile | 13 ++++++------ games/xgalaga/files/implicit-int.patch | 29 ++++++++++++++++++++++++++ games/xgalaga/files/implicit.patch | 3 ++- 3 files changed, 38 insertions(+), 7 deletions(-) create mode 100644 games/xgalaga/files/implicit-int.patch diff --git a/games/xgalaga/Portfile b/games/xgalaga/Portfile index cd60e004dc9..9a9b7ec5619 100644 --- a/games/xgalaga/Portfile +++ b/games/xgalaga/Portfile @@ -5,22 +5,23 @@ PortSystem 1.0 name xgalaga version 2.1.1.0 revision 2 +checksums rmd160 b55a97187b61ffe7c072ecd784cf9a16fe568c26 \ + sha256 adcfbfd04876f5197c60b37af0ad89a629e553d6e09314a4b3b5c70f6c634f9b \ + size 331621 + categories games x11 license GPL-2 -platforms darwin maintainers nomaintainer description xgalaga is a rework of the Galaga shooting game. long_description ${description} -homepage http://sourceforge.net/projects/xgalaga/ +homepage https://sourceforge.net/projects/xgalaga/ master_sites sourceforge -checksums md5 f37c3377b245d2d53b33eb489966bf28 \ - sha1 ef40ad833d2434b0643d4c00202bd75ec14b94ac \ - rmd160 b55a97187b61ffe7c072ecd784cf9a16fe568c26 patchfiles patch-Makefile.in.diff \ patch-main.c.diff \ - implicit.patch + implicit.patch \ + implicit-int.patch depends_lib port:xorg-libX11 \ port:xorg-libXext \ diff --git a/games/xgalaga/files/implicit-int.patch b/games/xgalaga/files/implicit-int.patch new file mode 100644 index 00000000000..5b1edcba1f0 --- /dev/null +++ b/games/xgalaga/files/implicit-int.patch @@ -0,0 +1,29 @@ +Fix: + +error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] + +https://sourceforge.net/p/xgalaga/bugs/5/ +--- linux-joystick.c.orig 2008-03-05 15:58:16.000000000 -0600 ++++ linux-joystick.c 2024-10-11 11:46:36.000000000 -0500 +@@ -81,5 +81,6 @@ + } + } + #else ++int + js_device=0; + #endif /* __linux__ */ +--- title.c.orig 2008-03-05 15:58:16.000000000 -0600 ++++ title.c 2024-10-11 11:43:07.000000000 -0500 +@@ -17,9 +17,9 @@ + #include "proto.h" + + /* for scrolling credits */ +-const LINESIZE= 70; +-const VISIBLELINES=7; +-const SPEEDFACTOR=5; ++const int LINESIZE= 70; ++const int VISIBLELINES=7; ++const int SPEEDFACTOR=5; + char *gchLBuf; + int giCreditLines=0, giActCreditLine=0; + diff --git a/games/xgalaga/files/implicit.patch b/games/xgalaga/files/implicit.patch index 934dc4fe76d..59efe822938 100644 --- a/games/xgalaga/files/implicit.patch +++ b/games/xgalaga/files/implicit.patch @@ -1,8 +1,9 @@ Fix: error: implicit declaration of function 'read' is invalid in C99 [-Werror,-Wimplicit-function-declaration] - error: implicit declaration of function 'close' is invalid in C99 [-Werror,-Wimplicit-function-declaration] + +https://sourceforge.net/p/xgalaga/bugs/5/ --- title.c.orig 2008-03-05 15:58:16.000000000 -0600 +++ title.c 2020-11-15 10:45:46.000000000 -0600 @@ -5,6 +5,9 @@