1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

games/xtron: unbreak on 13+, minor modernization

This commit is contained in:
Dmitry Marakasov 2022-04-13 20:35:31 +03:00
parent 70d74edf9c
commit 715d818696
3 changed files with 35 additions and 6 deletions

View File

@ -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}

View File

@ -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;

View File

@ -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);