aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorTim Vanderhoek <hoek@FreeBSD.org>2005-03-07 02:01:51 +0000
committerTim Vanderhoek <hoek@FreeBSD.org>2005-03-07 02:01:51 +0000
commitc1fabdde51de2fdfa3821ad5e1e06d82e9709aff (patch)
treef70640c9f578fda7812dd84dec6303222babd07f /games
parent2691f0a49f58e614eb1a259836145c0f5861239f (diff)
downloadports-c1fabdde51de2fdfa3821ad5e1e06d82e9709aff.tar.gz
ports-c1fabdde51de2fdfa3821ad5e1e06d82e9709aff.zip
Notes
Diffstat (limited to 'games')
-rw-r--r--games/tvp/Makefile4
-rw-r--r--games/tvp/files/patch-aprez_aprez.c14
-rw-r--r--games/tvp/files/patch-prez_parse.y87
3 files changed, 98 insertions, 7 deletions
diff --git a/games/tvp/Makefile b/games/tvp/Makefile
index 390c28df401a..d61b9274f8f5 100644
--- a/games/tvp/Makefile
+++ b/games/tvp/Makefile
@@ -35,10 +35,6 @@ DOCFILES= aprez.txt libass.txt president.txt prez.txt xprez.txt
.include <bsd.port.pre.mk>
-.if ${OSVERSION} >= 502126
-BROKEN= "Does not compile on FreeBSD >= 5.x"
-.endif
-
post-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${PREFIX}/share/doc/tvp
diff --git a/games/tvp/files/patch-aprez_aprez.c b/games/tvp/files/patch-aprez_aprez.c
index 59546edc258d..21b7178c68d6 100644
--- a/games/tvp/files/patch-aprez_aprez.c
+++ b/games/tvp/files/patch-aprez_aprez.c
@@ -1,9 +1,17 @@
$FreeBSD$
---- aprez/aprez.c.orig Sun Feb 1 22:31:50 2004
-+++ aprez/aprez.c Sun Feb 1 22:31:21 2004
-@@ -484,18 +484,18 @@
+--- aprez/aprez.c.orig
++++ aprez/aprez.c
+@@ -266,6 +266,7 @@
+ SGBtot[3][0], SGBtot[3][1], SGBtot[3][2],
+ SGBtot[3][3]);
+ dontdothis:
++ 1;
+ } /* if (!ass_turn (game)) */
+
+ /* Take someone's turn... */
+@@ -484,18 +485,18 @@
tcsetattr (fileno(stdin), TCSANOW, &term);
}
if (i == 'h') {
diff --git a/games/tvp/files/patch-prez_parse.y b/games/tvp/files/patch-prez_parse.y
new file mode 100644
index 000000000000..46d811f5a2ef
--- /dev/null
+++ b/games/tvp/files/patch-prez_parse.y
@@ -0,0 +1,87 @@
+
+$FreeBSD$
+
+--- prez/parse.y.orig
++++ prez/parse.y
+@@ -40,6 +40,10 @@
+ int message (const char *, ...);
+ void savegame (const char *);
+ void play_ai (void);
++void bigmessage (const char * mesg);
++int yylex (void);
++void loadgame (const char * file);
++void yyerror (const char * errmesg);
+
+ game_t SGBgame; /* The game we're playing!! :) */
+ int SGBplaysinround; /* How many plays have taken place in this round */
+@@ -351,17 +355,17 @@
+ "\tQUIT\n");
+ }
+ | command PLAY set '\n' {
++ int okay_to_play_ai;
+ int goer = ass_turn (SGBgame);
+ hand_t h = ass_Hand (
+ ass_GamePlayer (SGBgame, ass_turn (SGBgame)));
+
++ okay_to_play_ai = 1;
+ if (ptypes[goer-1] == tAI) {
+ message ("You can't make moves for an AI. "
+ "Try just \"PLAY\"\n");
+- goto falsebreak;
+- }
+-
+- if (ass_turn (SGBgame)) {
++ okay_to_play_ai = 0;
++ } else if (ass_turn (SGBgame)) {
+ if (!ass_setlt (ass_GameDown (SGBgame), &$3)) {
+ message ("You can't lay that set!!\n");
+ message ("Maybe you should do \"PLAY pass\" "
+@@ -397,9 +401,9 @@
+ } else
+ message ("You must \"DEAL\" first.\n");
+
+- play_ai ();
+-
+-falsebreak:
++ if (okay_to_play_ai) {
++ play_ai ();
++ }
+ }
+ | command PLAY '\n' {
+ #ifdef DEBUG
+@@ -555,6 +559,8 @@
+ | ACE_T { $$ = ACE; }
+ | TWO_T { $$ = TWO; }
+ | JOKER_T { $$ = JOKER; }
++;
++
+ %%
+
+ void
+@@ -625,7 +631,7 @@
+ yylex (void) {
+ static char s[81]; /* What kind of initialization guarantees
+ * am I given here????? */
+- static return_nl_f = 0; /* Return a \n token? */
++ static int return_nl_f = 0; /* Return a \n token? */
+ char * t = NULL;
+ int i;
+
+@@ -696,7 +702,7 @@
+ */
+ int
+ message (const char * mesg, ...) {
+- static on = 1;
++ static int on = 1;
+ va_list va;
+ int x;
+
+@@ -874,7 +880,7 @@
+
+
+ int
+-main (char *c, char **v) {
++main (int c, char **v) {
+ int i;
+
+ printf ("TVP, prez CLI, Copyright (C) 1997, Timothy M. Vanderhoek\n"