1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

Fix build of games/xinvaders on 13 and 14

There are symbols declared in vaders.h with `ext` as storage class qualifier.
Those are either `extern` or (blank) depending on `MAIN` being defined.
Some of them duplicate symbols that are defined in spacers.c, though.
Those ought to be `extern` in all cases, rather than also defined in
main.c (because the storage class qualifier is blank then).

Reported by:	antoine
This commit is contained in:
Adriaan de Groot 2021-01-27 19:52:31 +00:00
parent 82c19e650d
commit 969169043b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=563101
2 changed files with 16 additions and 11 deletions

View File

@ -3,15 +3,13 @@
PORTNAME= xinvaders
PORTVERSION= 2.1.1
PORTREVISION= 10
PORTREVISION= 11
CATEGORIES= games
MASTER_SITES= SUNSITE/games/arcade/invaders
MAINTAINER= ports@FreeBSD.org
COMMENT= Shoot-em-up them nasty little bugs
BROKEN_FreeBSD_13= duplicate symbol: basedestroyed
BROKEN_FreeBSD_14= duplicate symbol: basedestroyed
NO_CDROM= don't sell for profit
USES= gettext xorg

View File

@ -11,7 +11,7 @@
+ int width, height; /* Size of window. */
+ int scale;
+ Boolean debug;
+
+ /* Base info: */
+ int basewait; /* Number of milliseconds to wait between */
+ /* moving base. */
@ -73,7 +73,7 @@
+#define defaultback app_data.defaultback
+#define vaderfont app_data.vaderfont
+#endif
+
/*
* Actual vaders definitions.
*/
@ -85,7 +85,7 @@
ext int level;
ext Display *dpy;
@@ -111,30 +178,17 @@ ext int basesleft;
@@ -111,54 +178,31 @@ ext int basesleft;
/* Base info: */
@ -96,7 +96,8 @@
-ext Pixel basepixel;
-ext Pixel buildingpixel;
ext Boolean basedestroyed; /* TRUE if the base is non-existant */
-ext Boolean basedestroyed; /* TRUE if the base is non-existant */
+extern Boolean basedestroyed; /* TRUE if the base is non-existant */
/* Vader info: */
@ -115,8 +116,12 @@
- /* moving spacers. */
ext int spacerappear; /* same, but for the interval between appearances */
ext Boolean spacer_shown; /* Currnet_Spacer is something */
@@ -144,21 +198,11 @@ ext int spacer_counter; /* number of cy
-ext Boolean spacer_shown; /* Currnet_Spacer is something */
-ext int spacer_counter; /* number of cycles to create a spacer */
+extern Boolean spacer_shown; /* Currnet_Spacer is something */
+extern int spacer_counter; /* number of cycles to create a spacer */
/* Shot info. */
ext XtIntervalId shottimerid;
ext XtIntervalId vshottimerid;
@ -128,8 +133,10 @@
- /* once. */
-ext int maxvshots; /* How many shots are allowed to exist at */
- /* once. */
ext int numshots; /* how many shots (from the base) there are right now. */
ext int numvshots; /* how many shots (from vaders) there are right now. */
-ext int numshots; /* how many shots (from the base) there are right now. */
-ext int numvshots; /* how many shots (from vaders) there are right now. */
+extern int numshots; /* how many shots (from the base) there are right now. */
+extern int numvshots; /* how many shots (from vaders) there are right now. */
/* Score info */