xgalaga: Fix implicit int errors

Closes: https://trac.macports.org/ticket/71057
This commit is contained in:
Ryan Carsten Schmidt
2024-10-11 11:48:04 -05:00
parent b96a0c1f6e
commit 65b93141db
3 changed files with 38 additions and 7 deletions
+7 -6
View File
@@ -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 \
+29
View File
@@ -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;
+2 -1
View File
@@ -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 @@