summaryrefslogtreecommitdiff
path: root/games/bsdgames
diff options
context:
space:
mode:
authorJohan van Selst <johans@FreeBSD.org>2007-05-28 08:28:46 +0000
committerJohan van Selst <johans@FreeBSD.org>2007-05-28 08:28:46 +0000
commit58636876c5ba35bd4337ac4b3f508bd751463207 (patch)
treea13aedf54bb9ba9da57957148ffc7f5af6312fb7 /games/bsdgames
parentUse more concise expressions for splitting the user:group string. (diff)
Fix build of hack and rogue with gcc 4.2
Notes
Notes: svn path=/head/; revision=192165
Diffstat (limited to 'games/bsdgames')
-rw-r--r--games/bsdgames/Makefile4
-rw-r--r--games/bsdgames/files/patch-hack_hack.shk.c46
-rw-r--r--games/bsdgames/files/patch-hack_hack.termcap.c21
-rw-r--r--games/bsdgames/files/patch-rogue_Makefile11
4 files changed, 74 insertions, 8 deletions
diff --git a/games/bsdgames/Makefile b/games/bsdgames/Makefile
index b42c67c5ca3a..f7fe953d1947 100644
--- a/games/bsdgames/Makefile
+++ b/games/bsdgames/Makefile
@@ -59,10 +59,6 @@ PATHNAME_FILES= atc/atc.6 \
.include <bsd.port.pre.mk>
-.if ${OSVERSION} >= 700042
-BROKEN= Broken with gcc 4.2
-.endif
-
post-extract:
@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} \
${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} extract)
diff --git a/games/bsdgames/files/patch-hack_hack.shk.c b/games/bsdgames/files/patch-hack_hack.shk.c
new file mode 100644
index 000000000000..3c936b353a23
--- /dev/null
+++ b/games/bsdgames/files/patch-hack_hack.shk.c
@@ -0,0 +1,46 @@
+--- hack/hack.shk.c.orig Sun May 27 21:36:53 2007
++++ hack/hack.shk.c Sun May 27 21:38:28 2007
+@@ -131,11 +131,11 @@ struct bill_x *bp = bill;
+ }
+ }
+
++static void findshk();
++
+ inshop(){
+ int roomno = inroom(u.ux,u.uy);
+
+- static void findshk();
+-
+ /* Did we just leave a shop? */
+ if(u.uinshop &&
+ (u.uinshop != roomno + 1 || shlevel != dlevel || !shopkeeper)) {
+@@ -308,14 +308,14 @@ struct monst *shkp;
+ }
+ }
+
++static int dopayobj();
++
+ dopay(){
+ long ltmp;
+ struct bill_x *bp;
+ struct monst *shkp;
+ int pass, tmp;
+
+- static int dopayobj();
+-
+ multi = 0;
+ (void) inshop();
+ for(shkp = fmon; shkp; shkp = shkp->nmon)
+@@ -692,10 +692,11 @@ quit:
+ return(0);
+ }
+
++static int realhunger();
++
+ static
+ getprice(obj) struct obj *obj; {
+ int tmp, ac;
+- static int realhunger();
+
+ switch(obj->olet){
+ case AMULET_SYM:
diff --git a/games/bsdgames/files/patch-hack_hack.termcap.c b/games/bsdgames/files/patch-hack_hack.termcap.c
index de8fd532021c..eefbf4a52eea 100644
--- a/games/bsdgames/files/patch-hack_hack.termcap.c
+++ b/games/bsdgames/files/patch-hack_hack.termcap.c
@@ -1,6 +1,20 @@
---- hack/hack.termcap.c.orig Sat Mar 6 22:18:53 2004
-+++ hack/hack.termcap.c Thu Mar 11 18:42:47 2004
-@@ -35,7 +35,8 @@
+--- hack/hack.termcap.c.orig Tue Nov 16 11:26:38 1999
++++ hack/hack.termcap.c Sun May 27 21:39:48 2007
+@@ -11,10 +11,11 @@
+ extern long *alloc();
+
+ static char tbuf[512];
+-static char *HO, *CL, *CE, *UP, *CM, *ND, *XD, *BC, *SO, *SE, *TI, *TE;
++static char *HO, *CL, *CE, *CM, *ND, *XD, *SO, *SE, *TI, *TE;
++char *UP, *BC;
+ static char *VS, *VE;
+ static int SG;
+-static char PC = '\0';
++char PC = '\0';
+ char *CD; /* tested in pri.c: docorner() */
+ int CO, LI; /* used in pri.c and whatis.c */
+
+@@ -35,7 +36,8 @@ startup()
flags.nonull = 1;
if(pc = tgetstr("pc", &tbufptr))
PC = *pc;
@@ -10,4 +24,3 @@
if(!tgetflag("bs"))
error("Terminal must backspace.");
BC = tbufptr;
-
diff --git a/games/bsdgames/files/patch-rogue_Makefile b/games/bsdgames/files/patch-rogue_Makefile
new file mode 100644
index 000000000000..3a819d26158f
--- /dev/null
+++ b/games/bsdgames/files/patch-rogue_Makefile
@@ -0,0 +1,11 @@
+--- rogue/Makefile.orig Sun May 27 21:36:53 2007
++++ rogue/Makefile Sun May 27 21:40:48 2007
+@@ -2,7 +2,7 @@
+ # $FreeBSD$
+
+ PROG= rogue
+-CFLAGS+=-DUNIX -fwritable-strings
++CFLAGS+=-DUNIX
+ SRCS= hit.c init.c inventory.c level.c machdep.c main.c \
+ message.c monster.c move.c object.c pack.c play.c random.c ring.c \
+ room.c save.c score.c spec_hit.c throw.c trap.c use.c zap.c