git: e532faf32655 - main - games/rnd_jue: fix build with -fno-common
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 14 Apr 2023 14:18:01 UTC
The branch main has been updated by fuz:
URL: https://cgit.FreeBSD.org/ports/commit/?id=e532faf32655926a26e0c58b8ca2518332de27d4
commit e532faf32655926a26e0c58b8ca2518332de27d4
Author: Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2023-04-13 09:27:26 +0000
Commit: Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-04-14 14:16:08 +0000
games/rnd_jue: fix build with -fno-common
Turn redefininitions of a bunch of symbols into declarations.
This fixes the build on FreeBSD 13+.
While we are at it, use RLN to avoid a link to an absolute path.
---
games/rnd_jue/Makefile | 9 +++----
games/rnd_jue/files/patch-src-game_em-sound.c | 4 +--
games/rnd_jue/files/patch-src_main.c | 35 +++++++++++++++++++++++++++
3 files changed, 40 insertions(+), 8 deletions(-)
diff --git a/games/rnd_jue/Makefile b/games/rnd_jue/Makefile
index 8ae347a010f5..780f63635871 100644
--- a/games/rnd_jue/Makefile
+++ b/games/rnd_jue/Makefile
@@ -1,6 +1,6 @@
PORTNAME= rnd_jue
-PORTVERSION= 3.3.0.0
-PORTREVISION= 6
+DISTVERSION= 3.3.0.0
+PORTREVISION= 7
CATEGORIES= games
MASTER_SITES= http://www.artsoft.org/RELEASES/unix/rocksndiamonds/:game \
SF/nemysisfreebsdp/${CATEGORIES}/rocksndiamonds/
@@ -20,9 +20,6 @@ WWW= https://www.jb-line.de/rnd/rnd_start_e.html
LICENSE= GPLv2
-BROKEN_FreeBSD_13= ld: error: duplicate symbol: setup
-BROKEN_FreeBSD_14= ld: error: duplicate symbol: setup
-
LIB_DEPENDS+= libsmpeg.so:multimedia/smpeg
EXTRACT_DEPENDS+=${UNZIP_CMD}:archivers/unzip
@@ -83,7 +80,7 @@ do-install:
${INSTALL_DATA} ${WRKDIR}/${PORTNAME}_${s}.png \
${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}/apps/${PORTNAME}.png
.endfor
- ${LN} -sf ${PREFIX}/share/icons/hicolor/48x48/apps/${PORTNAME}.png \
+ ${RLN} ${STAGEDIR}${PREFIX}/share/icons/hicolor/48x48/apps/${PORTNAME}.png \
${STAGEDIR}${PREFIX}/share/pixmaps/
cd ${WRKSRC} && ${COPYTREE_SHARE} "CREDITS ChangeLog docs/elements" \
${STAGEDIR}${DOCSDIR}/
diff --git a/games/rnd_jue/files/patch-src-game_em-sound.c b/games/rnd_jue/files/patch-src-game_em-sound.c
index f04d3bcf4fe8..3dafba08d794 100644
--- a/games/rnd_jue/files/patch-src-game_em-sound.c
+++ b/games/rnd_jue/files/patch-src-game_em-sound.c
@@ -1,5 +1,5 @@
---- src/game_em/sound.c.orig 2007-04-25 23:37:09.000000000 +0200
-+++ src/game_em/sound.c 2012-12-12 02:10:57.000000000 +0100
+--- src/game_em/sound.c.orig 2007-04-25 21:37:09 UTC
++++ src/game_em/sound.c
@@ -10,15 +10,8 @@
#if defined(PLATFORM_LINUX) || defined(PLATFORM_BSD)
diff --git a/games/rnd_jue/files/patch-src_main.c b/games/rnd_jue/files/patch-src_main.c
new file mode 100644
index 000000000000..c709399d3edb
--- /dev/null
+++ b/games/rnd_jue/files/patch-src_main.c
@@ -0,0 +1,35 @@
+--- src/main.c.orig 2023-04-13 09:22:55 UTC
++++ src/main.c
+@@ -41,11 +41,11 @@ SDL_Thread *server_thread;
+ int key_joystick_mapping = 0;
+
+ #if 1
+-boolean redraw[MAX_LEV_FIELDX + 2][MAX_LEV_FIELDY + 2];
++extern boolean redraw[MAX_LEV_FIELDX + 2][MAX_LEV_FIELDY + 2];
+ #else
+-boolean redraw[MAX_BUF_XSIZE][MAX_BUF_YSIZE];
++extern boolean redraw[MAX_BUF_XSIZE][MAX_BUF_YSIZE];
+ #endif
+-int redraw_x1 = 0, redraw_y1 = 0;
++extern int redraw_x1 = 0, redraw_y1 = 0;
+
+ short Feld[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+ short MovPos[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+@@ -75,7 +75,7 @@ short ExplodeDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+ int RunnerVisit[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+ int PlayerVisit[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+
+-int GfxFrame[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
++extern int GfxFrame[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+ int GfxRandom[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+ int GfxElement[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+ int GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+@@ -131,7 +131,7 @@ struct LevelInfo level, level_template;
+ struct PlayerInfo stored_player[MAX_PLAYERS], *local_player = NULL;
+ struct HiScore highscore[MAX_SCORE_ENTRIES];
+ struct TapeInfo tape;
+-struct SetupInfo setup;
++extern struct SetupInfo setup;
+ struct GameInfo game;
+ struct GlobalInfo global;
+ struct BorderInfo border;