aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2022-07-05 21:30:02 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2022-07-06 19:49:32 +0000
commitdd5e9f5cacbc15953e417a6121aae6a06cf53de0 (patch)
tree95800651c9008cee30179fd9706bffc7c96797cb
parent1cb8897f610a381ddf2802eb09acfba97b15b505 (diff)
downloadports-dd5e9f5cacbc15953e417a6121aae6a06cf53de0.tar.gz
ports-dd5e9f5cacbc15953e417a6121aae6a06cf53de0.zip
games/luola: fix build with -fno-common
PR: 264998 Submitted by: fuz@fuz.su
-rw-r--r--games/luola/Makefile8
-rw-r--r--games/luola/files/patch-src__fs.h2
-rw-r--r--games/luola/files/patch-src_pilot.c11
-rw-r--r--games/luola/files/patch-src_pilot.h11
4 files changed, 25 insertions, 7 deletions
diff --git a/games/luola/Makefile b/games/luola/Makefile
index 23ecc7fefc8a..3b3ca7befa31 100644
--- a/games/luola/Makefile
+++ b/games/luola/Makefile
@@ -14,13 +14,9 @@ COMMENT= 2D multiplayer cave-flying game
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING
-BROKEN_FreeBSD_13= ld: error: duplicate symbol: Pilot
-BROKEN_FreeBSD_14= ld: error: duplicate symbol: Pilot
-
-GNU_CONFIGURE= yes
USES= gmake sdl
+GNU_CONFIGURE= yes
USE_SDL= sdl image ttf
-CONFIGURE_ARGS= --program-prefix=''
LIBS+= -lm
PLIST_FILES= bin/${PORTNAME} \
@@ -38,7 +34,7 @@ DESKTOP_ENTRIES="Luola" \
OPTIONS_DEFINE= SDL_GFX SOUND DOCS
OPTIONS_DEFAULT=SDL_GFX SOUND
-SDL_GFX_DESC= Nicer graphics
+SDL_GFX_DESC= Nicer graphics with SDL_gfx
SDL_GFX_USE= SDL=gfx
SDL_GFX_CONFIGURE_ENABLE=sdl-gfx
SOUND_USE= SDL=mixer
diff --git a/games/luola/files/patch-src__fs.h b/games/luola/files/patch-src__fs.h
index 1e947bae8701..989831598ee3 100644
--- a/games/luola/files/patch-src__fs.h
+++ b/games/luola/files/patch-src__fs.h
@@ -4,7 +4,7 @@
#define FILESYSTEM_H
#include <stdio.h>
-+#include <sys/syslimits.h>
++#include <limits.h>
#include "SDL.h"
#include "ldat.h"
diff --git a/games/luola/files/patch-src_pilot.c b/games/luola/files/patch-src_pilot.c
new file mode 100644
index 000000000000..510d72347f3b
--- /dev/null
+++ b/games/luola/files/patch-src_pilot.c
@@ -0,0 +1,11 @@
+--- src/pilot.c.orig 2022-07-02 17:04:58 UTC
++++ src/pilot.c
+@@ -43,6 +43,8 @@
+ #define PILOT_STD_RADIUS 4.1 /* Normal radius for pilot */
+ #define PILOT_PAR_RADIUS 8.0 /* Parachuting radius for pilot */
+
++struct Pilot Pilot = {};
++
+ /* List of active pilots */
+ struct dllist *pilot_list;
+
diff --git a/games/luola/files/patch-src_pilot.h b/games/luola/files/patch-src_pilot.h
new file mode 100644
index 000000000000..6882199fce06
--- /dev/null
+++ b/games/luola/files/patch-src_pilot.h
@@ -0,0 +1,11 @@
+--- src/pilot.h.orig 2022-07-02 17:04:35 UTC
++++ src/pilot.h
+@@ -34,7 +34,7 @@ struct Ship;
+
+ #define PARACHUTE_FRAME 2
+
+-struct Pilot {
++extern struct Pilot {
+ struct Walker walker; /* inherits Walker */
+ SDL_Surface *sprite[3]; /* Normal,Normal2, Parachute */
+ Vector attack_vector; /* Direction where gun is pointed to */