summaryrefslogtreecommitdiffstats
path: root/games/bsdgames
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2003-11-11 09:00:51 +0000
committermarkm <markm@FreeBSD.org>2003-11-11 09:00:51 +0000
commit45cbb1c3a12d8ddc8d97d4dec41de015f70d7f86 (patch)
treee861dd6046b88aaee1e4153337e14c1099a9553b /games/bsdgames
parentc7294f3fbd30d92d168aaa1cf0627e45112efb5a (diff)
downloadFreeBSD-ports-45cbb1c3a12d8ddc8d97d4dec41de015f70d7f86.zip
FreeBSD-ports-45cbb1c3a12d8ddc8d97d4dec41de015f70d7f86.tar.gz
Bunch 'o fixes for the BSD games, many from NetBSD.
Submitted by: "Stephen J. Roznowski" <sjr@comcast.net> PR: 12727
Diffstat (limited to 'games/bsdgames')
-rw-r--r--games/bsdgames/Makefile5
-rw-r--r--games/bsdgames/distinfo2
-rw-r--r--games/bsdgames/files/Makefile37
-rw-r--r--games/bsdgames/files/misc.h2
-rw-r--r--games/bsdgames/files/patch-adventure::adventure.611
-rw-r--r--games/bsdgames/files/patch-larn::Makefile11
-rw-r--r--games/bsdgames/files/patch-phantasia::io.c26
-rw-r--r--games/bsdgames/files/patch-phantasia::phantdefs.h13
-rw-r--r--games/bsdgames/files/patch-rogue::inventory.c23
-rw-r--r--games/bsdgames/files/patch-rogue::message.c13
-rw-r--r--games/bsdgames/files/patch-rogue::move.c12
-rw-r--r--games/bsdgames/files/patch-rogue::object.c12
-rw-r--r--games/bsdgames/files/patch-rogue::pack.c13
-rw-r--r--games/bsdgames/files/patch-rogue::rogue.h28
-rw-r--r--games/bsdgames/files/patch-rogue::save.c82
-rw-r--r--games/bsdgames/files/patch-rogue::score.c12
-rw-r--r--games/bsdgames/files/patch-rogue::use.c12
-rw-r--r--games/bsdgames/files/patch-sail::dr_1.c10
-rw-r--r--games/bsdgames/files/patch-sail::misc.c10
-rw-r--r--games/bsdgames/files/patch-sail::pl_1.c10
-rw-r--r--games/bsdgames/files/patch-trek::utility.c28
21 files changed, 2 insertions, 370 deletions
diff --git a/games/bsdgames/Makefile b/games/bsdgames/Makefile
index 6b2781c..7af438a 100644
--- a/games/bsdgames/Makefile
+++ b/games/bsdgames/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= freebsd-games
-PORTVERSION= 5.0
-PORTREVISION= 1
+PORTVERSION= 5.1
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR=markm
@@ -51,12 +50,10 @@ MANCOMPRESSED= maybe
IGNOREFILES= freebsd-games-5.0.tar.bz2
post-extract:
- @${CP} ${FILESDIR}/Makefile ${BUILD_WRKSRC}
@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} \
${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} extract)
post-patch:
- @${CP} ${FILESDIR}/misc.h ${WRKSRC}/sail
@${FIND} ${WRKSRC} -name '*.c' -or -name '*.h' -or -name '*.6' -or \
-name 'index' | ${XARGS} ${REINPLACE_CMD} -e \
's|share/games|local/share/games|g' \
diff --git a/games/bsdgames/distinfo b/games/bsdgames/distinfo
index 62e2385b..48cd8b2 100644
--- a/games/bsdgames/distinfo
+++ b/games/bsdgames/distinfo
@@ -1 +1 @@
-MD5 (freebsd-games-5.0.tar.bz2) = IGNORE
+MD5 (freebsd-games-5.1.tar.bz2) = IGNORE
diff --git a/games/bsdgames/files/Makefile b/games/bsdgames/files/Makefile
deleted file mode 100644
index ca13bed..0000000
--- a/games/bsdgames/files/Makefile
+++ /dev/null
@@ -1,37 +0,0 @@
-# $FreeBSD$
-.include "Makefile.inc"
-
-GAMES= adventure arithmetic atc backgammon battlestar bs canfield cribbage \
- fish hack hangman larn mille phantasia piano pig quiz robots rogue \
- sail snake trek worm wump
-all: ${GAMES}
-.for I in ${GAMES}
- cd ${I} && make depend && make all
-.endfor
-
-install: ${GAMES}
- mtree -deU -f var.mtree -p ${VARDIR}
- mtree -deU -f share.mtree -p ${SHAREDIR}
-.for I in ${GAMES}
- cd ${I} && make install
-.endfor
-
-clean: ${GAMES}
-.for I in ${GAMES}
- cd ${I} && make clean
-.endfor
-
-extract: ${GAMES}
-
-.for I in ${GAMES}
-${I}:
- cvs -d `pwd`/cvs get ${I}
-.endfor
-
-commit:
-.for I in ${GAMES}
- cvs -d `pwd`/cvs commit -F ./commitmsg ${I}
-.endfor
-
-distclean:
- rm -rf ${GAMES}
diff --git a/games/bsdgames/files/misc.h b/games/bsdgames/files/misc.h
deleted file mode 100644
index 9c46f5f..0000000
--- a/games/bsdgames/files/misc.h
+++ /dev/null
@@ -1,2 +0,0 @@
-log(struct ship *s);
-
diff --git a/games/bsdgames/files/patch-adventure::adventure.6 b/games/bsdgames/files/patch-adventure::adventure.6
deleted file mode 100644
index d749bf2..0000000
--- a/games/bsdgames/files/patch-adventure::adventure.6
+++ /dev/null
@@ -1,11 +0,0 @@
---- adventure/adventure.6.orig Sun Sep 7 23:21:31 2003
-+++ adventure/adventure.6 Sun Sep 7 23:21:50 2003
-@@ -56,3 +56,8 @@
- .Dq quit ;
- to save a game for later resumption, enter
- .Dq suspend .
-+.Sh AUTHORS
-+The game
-+.Nm
-+was originally written in Fortran by Will Crowther and Don Woods.
-+It was later translated to C and enhanced by Jim Gillogly (jim@rand.org).
diff --git a/games/bsdgames/files/patch-larn::Makefile b/games/bsdgames/files/patch-larn::Makefile
deleted file mode 100644
index 3c32855..0000000
--- a/games/bsdgames/files/patch-larn::Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- larn/Makefile.orig Sat Jul 26 00:06:00 2003
-+++ larn/Makefile Sat Jul 26 00:06:22 2003
-@@ -54,7 +54,7 @@
-
- PROG= larn
- MAN= larn.6
--CFLAGS+=-DBSD -DVER=12 -DSUBVER=0 -DNONAP -DUIDSCORE -fwritable-strings
-+CFLAGS+=-DBSD -DVER=12 -DSUBVER=0 -DNONAP -DUIDSCORE -fwritable-strings -DNOVARARGS
- SRCS= main.c object.c create.c tok.c display.c global.c data.c io.c \
- monster.c store.c diag.c help.c config.c nap.c bill.c scores.c \
- signal.c moreobj.c movem.c regen.c fortune.c savelev.c
diff --git a/games/bsdgames/files/patch-phantasia::io.c b/games/bsdgames/files/patch-phantasia::io.c
deleted file mode 100644
index 29f05cf..0000000
--- a/games/bsdgames/files/patch-phantasia::io.c
+++ /dev/null
@@ -1,26 +0,0 @@
-Index: phantasia/io.c
-===================================================================
-RCS file: /var/fcvs/src/games/phantasia/Attic/io.c,v
-retrieving revision 1.6
-diff -u -r1.6 io.c
---- phantasia/io.c 16 Nov 1999 02:57:33 -0000 1.6
-+++ phantasia/io.c 10 Sep 2003 09:52:52 -0000
-@@ -79,6 +79,9 @@
- case CH_NEWLINE: /* terminate string */
- break;
-
-+ case CH_CR: /* terminate string */
-+ break;
-+
- case CH_REDRAW: /* redraw screen */
- clearok(stdscr, TRUE);
- continue;
-@@ -91,7 +94,7 @@
-
- *inptr = '\0'; /* terminate string */
- }
-- while (ch != CH_NEWLINE && inptr < cp + mx);
-+ while (ch != CH_NEWLINE && ch != CH_CR && inptr < cp + mx);
- }
- /* */
- /************************************************************************
diff --git a/games/bsdgames/files/patch-phantasia::phantdefs.h b/games/bsdgames/files/patch-phantasia::phantdefs.h
deleted file mode 100644
index bb9328a..0000000
--- a/games/bsdgames/files/patch-phantasia::phantdefs.h
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: phantasia/phantdefs.h
-===================================================================
-RCS file: /var/fcvs/src/games/phantasia/Attic/phantdefs.h,v
-retrieving revision 1.1.1.1
-diff -u -r1.1.1.1 phantdefs.h
---- phantasia/phantdefs.h 4 Sep 1994 04:03:06 -0000 1.1.1.1
-+++ phantasia/phantdefs.h 10 Sep 2003 09:53:25 -0000
-@@ -136,4 +136,5 @@
- #define CH_KILL '\030' /* kill character (ctrl-X) */
- #define CH_ERASE '\010' /* erase character (ctrl-H) */
- #define CH_NEWLINE '\n' /* newline */
-+#define CH_CR '\r' /* carriage return */
- #define CH_REDRAW '\014' /* redraw screen character (ctrl-L) */
diff --git a/games/bsdgames/files/patch-rogue::inventory.c b/games/bsdgames/files/patch-rogue::inventory.c
deleted file mode 100644
index c76aed8..0000000
--- a/games/bsdgames/files/patch-rogue::inventory.c
+++ /dev/null
@@ -1,23 +0,0 @@
-$FreeBSD$
-
---- rogue/inventory.c 30 Nov 1999 03:49:23 -0000 1.4
-+++ rogue/inventory.c 21 Aug 2003 19:58:45 -0000
-@@ -415,14 +415,14 @@
- mix_colors()
- {
- short i, j, k;
-- char *t;
-+ char t[MAX_ID_TITLE_LEN];
-
- for (i = 0; i <= 32; i++) {
- j = get_rand(0, (POTIONS - 1));
- k = get_rand(0, (POTIONS - 1));
-- t = id_potions[j].title;
-- id_potions[j].title = id_potions[k].title;
-- id_potions[k].title = t;
-+ memcpy(t, id_potions[j].title, MAX_ID_TITLE_LEN);
-+ memcpy(id_potions[j].title, id_potions[k].title, MAX_ID_TITLE_LEN);
-+ memcpy(id_potions[k].title, t, MAX_ID_TITLE_LEN);
- }
- }
-
diff --git a/games/bsdgames/files/patch-rogue::message.c b/games/bsdgames/files/patch-rogue::message.c
deleted file mode 100644
index 47e0c69..0000000
--- a/games/bsdgames/files/patch-rogue::message.c
+++ /dev/null
@@ -1,13 +0,0 @@
-$FreeBSD$
-
---- rogue/message.c 20 Jul 2000 10:35:07 -0000 1.7.2.1
-+++ rogue/message.c 21 Aug 2003 19:58:51 -0000
-@@ -60,7 +60,7 @@
- char msgs[NMESSAGES][DCOLS] = {"", "", "", "", ""};
- short msg_col = 0, imsg = -1;
- boolean msg_cleared = 1, rmsg = 0;
--char hunger_str[8] = "";
-+char hunger_str[HUNGER_STR_LEN] = "";
- const char *more = "-more-";
-
- extern boolean cant_int, did_int, interrupted, save_is_interactive, flush;
diff --git a/games/bsdgames/files/patch-rogue::move.c b/games/bsdgames/files/patch-rogue::move.c
deleted file mode 100644
index d505053..0000000
--- a/games/bsdgames/files/patch-rogue::move.c
+++ /dev/null
@@ -1,12 +0,0 @@
-$FreeBSD$
-
---- rogue/move.c 30 Nov 1999 03:49:24 -0000 1.7
-+++ rogue/move.c 21 Aug 2003 20:02:38 -0000
-@@ -64,7 +64,6 @@
- extern short cur_level, max_level;
- extern short bear_trap, haste_self, confused;
- extern short e_rings, regeneration, auto_search;
--extern char hunger_str[];
- extern boolean being_held, interrupted, r_teleport, passgo;
-
- one_move_rogue(dirch, pickup)
diff --git a/games/bsdgames/files/patch-rogue::object.c b/games/bsdgames/files/patch-rogue::object.c
deleted file mode 100644
index f2e3a23..0000000
--- a/games/bsdgames/files/patch-rogue::object.c
+++ /dev/null
@@ -1,12 +0,0 @@
-$FreeBSD$
-
---- rogue/object.c 30 Nov 1999 03:49:25 -0000 1.5
-+++ rogue/object.c 21 Aug 2003 20:04:13 -0000
-@@ -159,7 +159,6 @@
-
- extern short cur_level, max_level;
- extern short party_room;
--extern char *error_file;
- extern boolean is_wood[];
-
- put_objects()
diff --git a/games/bsdgames/files/patch-rogue::pack.c b/games/bsdgames/files/patch-rogue::pack.c
deleted file mode 100644
index 3f77987..0000000
--- a/games/bsdgames/files/patch-rogue::pack.c
+++ /dev/null
@@ -1,13 +0,0 @@
-$FreeBSD$
-
---- rogue/pack.c 30 Nov 1999 03:49:25 -0000 1.8
-+++ rogue/pack.c 21 Aug 2003 20:07:28 -0000
-@@ -342,7 +342,7 @@
- char desc[DCOLS];
-
- if (rogue.armor) {
-- message("your already wearing some", 0);
-+ message("you're already wearing some", 0);
- return;
- }
- ch = pack_letter("wear what?", ARMOR);
diff --git a/games/bsdgames/files/patch-rogue::rogue.h b/games/bsdgames/files/patch-rogue::rogue.h
deleted file mode 100644
index 760d7bc..0000000
--- a/games/bsdgames/files/patch-rogue::rogue.h
+++ /dev/null
@@ -1,28 +0,0 @@
-$FreeBSD$
-
---- rogue/rogue.h 17 Dec 2001 12:43:23 -0000 1.3.2.1
-+++ rogue/rogue.h 21 Aug 2003 20:04:36 -0000
-@@ -194,9 +194,12 @@
-
- #define MAX_OPT_LEN 40
-
-+#define HUNGER_STR_LEN 8
-+
-+#define MAX_ID_TITLE_LEN 64
- struct id {
- short value;
-- char *title;
-+ char title[MAX_ID_TITLE_LEN];
- char *real;
- unsigned short id_status;
- };
-@@ -472,3 +475,9 @@
- short second; /* 0 - 59 */
- };
-
-+/*
-+ * external routine declarations.
-+ */
-+extern char hunger_str[HUNGER_STR_LEN];
-+extern char login_name[MAX_OPT_LEN];
-+extern const char *error_file;
diff --git a/games/bsdgames/files/patch-rogue::save.c b/games/bsdgames/files/patch-rogue::save.c
deleted file mode 100644
index 70ebdc91..0000000
--- a/games/bsdgames/files/patch-rogue::save.c
+++ /dev/null
@@ -1,82 +0,0 @@
-$FreeBSD$
-
---- rogue/save.c 30 Nov 1999 03:49:27 -0000 1.6
-+++ rogue/save.c 21 Aug 2003 20:03:37 -0000
-@@ -63,8 +63,6 @@
-
- extern boolean detect_monster;
- extern short cur_level, max_level;
--extern char hunger_str[];
--extern char login_name[];
- extern short party_room;
- extern short foods;
- extern boolean is_wood[];
-@@ -102,15 +100,23 @@
- {
- FILE *fp;
- int file_id;
-- char name_buffer[80];
-+ char *name_buffer;
-+ size_t len;
- char *hptr;
- struct rogue_time rt_buf;
-
- if (sfile[0] == '~') {
- if (hptr = md_getenv("HOME")) {
-- (void) strcpy(name_buffer, hptr);
-- (void) strcat(name_buffer, sfile+1);
-- sfile = name_buffer;
-+ len = strlen(hptr) + strlen(sfile);
-+ name_buffer = md_malloc(len);
-+ if (name_buffer == NULL) {
-+ message("out of memory for save file name", 0);
-+ sfile = error_file;
-+ } else {
-+ (void) strcpy(name_buffer, hptr);
-+ (void) strcat(name_buffer, sfile+1);
-+ sfile = name_buffer;
-+ }
- }
- }
- /* revoke */
-@@ -199,10 +205,10 @@
- r_read(fp, (char *) &detect_monster, sizeof(detect_monster));
- r_read(fp, (char *) &cur_level, sizeof(cur_level));
- r_read(fp, (char *) &max_level, sizeof(max_level));
-- read_string(hunger_str, fp);
-+ read_string(hunger_str, fp, sizeof hunger_str);
-
-- (void) strcpy(tbuf, login_name);
-- read_string(login_name, fp);
-+ (void) strlcpy(tbuf, login_name, sizeof tbuf);
-+ read_string(login_name, fp, sizeof login_name);
- if (strcmp(tbuf, login_name)) {
- clean_up("you're not the original player");
- }
-@@ -345,7 +351,7 @@
- r_read(fp, (char *) &(id_table[i].value), sizeof(short));
- r_read(fp, (char *) &(id_table[i].id_status),
- sizeof(unsigned short));
-- read_string(id_table[i].title, fp);
-+ read_string(id_table[i].title, fp, MAX_ID_TITLE_LEN);
- }
- }
- }
-@@ -362,13 +368,16 @@
- r_write(fp, s, n);
- }
-
--read_string(s, fp)
-+read_string(s, fp, len)
- char *s;
- FILE *fp;
-+size_t len;
- {
- short n;
-
- r_read(fp, (char *) &n, sizeof(short));
-+ if (n > len)
-+ clean_up("read_string: corrupt game file");
- r_read(fp, s, n);
- xxxx(s, n);
- }
diff --git a/games/bsdgames/files/patch-rogue::score.c b/games/bsdgames/files/patch-rogue::score.c
deleted file mode 100644
index e95b1fa..0000000
--- a/games/bsdgames/files/patch-rogue::score.c
+++ /dev/null
@@ -1,12 +0,0 @@
-$FreeBSD$
-
---- rogue/score.c 30 Nov 1999 03:49:27 -0000 1.4
-+++ rogue/score.c 21 Aug 2003 20:03:30 -0000
-@@ -58,7 +58,6 @@
- #include "rogue.h"
- #include "pathnames.h"
-
--extern char login_name[];
- extern char *m_names[];
- extern short max_level;
- extern boolean score_only, no_skull, msg_cleared;
diff --git a/games/bsdgames/files/patch-rogue::use.c b/games/bsdgames/files/patch-rogue::use.c
deleted file mode 100644
index 0698159..0000000
--- a/games/bsdgames/files/patch-rogue::use.c
+++ /dev/null
@@ -1,12 +0,0 @@
-$FreeBSD$
-
---- rogue/use.c 30 Nov 1999 03:49:29 -0000 1.4
-+++ rogue/use.c 21 Aug 2003 20:06:00 -0000
-@@ -68,7 +68,6 @@
- const char *strange_feeling = "you have a strange feeling for a moment, then it passes";
-
- extern short bear_trap;
--extern char hunger_str[];
- extern short cur_room;
- extern long level_points[];
- extern boolean being_held;
diff --git a/games/bsdgames/files/patch-sail::dr_1.c b/games/bsdgames/files/patch-sail::dr_1.c
deleted file mode 100644
index 0741175..0000000
--- a/games/bsdgames/files/patch-sail::dr_1.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- sail/dr_1.c.orig Sat Jul 26 00:11:20 2003
-+++ sail/dr_1.c Sat Jul 26 00:11:33 2003
-@@ -40,6 +40,7 @@
- #endif /* not lint */
-
- #include "driver.h"
-+#include "misc.h"
-
- unfoul()
- {
diff --git a/games/bsdgames/files/patch-sail::misc.c b/games/bsdgames/files/patch-sail::misc.c
deleted file mode 100644
index 89cf5ca..0000000
--- a/games/bsdgames/files/patch-sail::misc.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- sail/misc.c.orig Sat Jul 26 00:09:23 2003
-+++ sail/misc.c Sat Jul 26 00:09:38 2003
-@@ -41,6 +41,7 @@
-
- #include "externs.h"
- #include "pathnames.h"
-+#include "misc.h"
-
- #define distance(x,y) (abs(x) >= abs(y) ? abs(x) + abs(y)/2 : abs(y) + abs(x)/2)
-
diff --git a/games/bsdgames/files/patch-sail::pl_1.c b/games/bsdgames/files/patch-sail::pl_1.c
deleted file mode 100644
index b3a0ec2..0000000
--- a/games/bsdgames/files/patch-sail::pl_1.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- sail/pl_1.c.orig Sat Jul 26 00:10:30 2003
-+++ sail/pl_1.c Sat Jul 26 00:10:42 2003
-@@ -40,6 +40,7 @@
- #endif /* not lint */
-
- #include "player.h"
-+#include "misc.h"
- #include <sys/types.h>
- #include <sys/wait.h>
-
diff --git a/games/bsdgames/files/patch-trek::utility.c b/games/bsdgames/files/patch-trek::utility.c
deleted file mode 100644
index 0586c40..0000000
--- a/games/bsdgames/files/patch-trek::utility.c
+++ /dev/null
@@ -1,28 +0,0 @@
---- trek/utility.c.orig Sat Jul 26 00:02:02 2003
-+++ trek/utility.c Sat Jul 26 00:14:18 2003
-@@ -43,7 +43,7 @@
- ** ASSORTED UTILITY ROUTINES
- */
- #include <stdio.h>
--#include <varargs.h>
-+#include <stdarg.h>
-
- /*
- ** BLOCK MOVE
-@@ -143,14 +143,12 @@
- ** SYSTEM ERROR
- */
-
--syserr(fmt, va_alist)
--const char *fmt;
--va_dcl
-+syserr(char *fmt,...)
- {
- va_list ap;
- extern int errno;
-
-- va_start(ap);
-+ va_start(ap,fmt);
- printf("\n\07TREK SYSERR: ");
- vfprintf(stdout, fmt, ap);
- printf("\n");
OpenPOWER on IntegriCloud