git: 715d818696d6 - main - games/xtron: unbreak on 13+, minor modernization

From: Dmitry Marakasov <amdmi3_at_FreeBSD.org>
Date: Wed, 13 Apr 2022 18:46:27 UTC
The branch main has been updated by amdmi3:

URL: https://cgit.FreeBSD.org/ports/commit/?id=715d818696d6f48ef4125fe99181439e1ff248e5

commit 715d818696d6f48ef4125fe99181439e1ff248e5
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2022-04-13 17:35:31 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2022-04-13 18:41:55 +0000

    games/xtron: unbreak on 13+, minor modernization
---
 games/xtron/Makefile            | 13 +++++++------
 games/xtron/files/patch-xtron.c | 12 ++++++++++++
 games/xtron/files/patch-xtron.h | 16 ++++++++++++++++
 3 files changed, 35 insertions(+), 6 deletions(-)

diff --git a/games/xtron/Makefile b/games/xtron/Makefile
index 60dfc7887e33..7e4cebfe6568 100644
--- a/games/xtron/Makefile
+++ b/games/xtron/Makefile
@@ -5,15 +5,14 @@ PORTVERSION=	1.1a
 PORTREVISION=	3
 CATEGORIES=	games
 MASTER_SITES=	SUNSITE/games/arcade
-EXTRACT_SUFX=	.tgz
 
 MAINTAINER=	amdmi3@FreeBSD.org
 COMMENT=	Avoid running into walls, your own tail, and that of your opponent
 
-BROKEN_FreeBSD_13=	duplicate symbol: b
-BROKEN_FreeBSD_14=	duplicate symbol: b
+LICENSE=	GPLv1+
+LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		xorg
+USES=		xorg tar:tgz
 USE_XORG=	x11 xpm
 
 PLIST_FILES=	bin/${PORTNAME} lib/X11/app-defaults/Tron
@@ -34,10 +33,12 @@ post-patch:
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
-	${MKDIR} ${STAGEDIR}${DATADIR}
+	@${MKDIR} ${STAGEDIR}${DATADIR}
 	${INSTALL_DATA} ${WRKSRC}/pixmaps/* ${STAGEDIR}${DATADIR}/
 	${INSTALL_DATA} ${WRKSRC}/xtronrc ${STAGEDIR}${PREFIX}/lib/X11/app-defaults/Tron
-	${MKDIR} ${STAGEDIR}${DOCSDIR}
+
+do-install-DOCS-on:
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 	${INSTALL_DATA} ${WRKSRC}/CHANGES ${STAGEDIR}${DOCSDIR}
 	${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
 
diff --git a/games/xtron/files/patch-xtron.c b/games/xtron/files/patch-xtron.c
new file mode 100644
index 000000000000..14592683ed5c
--- /dev/null
+++ b/games/xtron/files/patch-xtron.c
@@ -0,0 +1,12 @@
+--- xtron.c.orig	1995-04-16 12:48:44 UTC
++++ xtron.c
+@@ -21,6 +21,9 @@
+ 
+ #include "xtron.h"
+ 
++struct Player p[2];
++struct Board b;
++
+ void plr_setup(void)
+ {
+   int i;
diff --git a/games/xtron/files/patch-xtron.h b/games/xtron/files/patch-xtron.h
new file mode 100644
index 000000000000..4a32829718c4
--- /dev/null
+++ b/games/xtron/files/patch-xtron.h
@@ -0,0 +1,16 @@
+--- xtron.h.orig	1995-04-16 12:48:20 UTC
++++ xtron.h
+@@ -40,11 +40,11 @@ struct Player {
+   int alive;
+   enum directions plr_dir;
+   enum play_types plr_type; 
+-} p[2];
++};
+ 
+ struct Board {
+   short int contents[200][200];
+-} b;
++};
+  
+ void plr_setup(void);
+ int plr_checkmove(int p_num, int new_val, int axis_type, enum directions dir);