summaryrefslogtreecommitdiff
path: root/games/battalion
diff options
context:
space:
mode:
authorgarbled <garbled@pkgsrc.org>1998-09-13 20:24:28 +0000
committergarbled <garbled@pkgsrc.org>1998-09-13 20:24:28 +0000
commitffa5ec0eff6fd60c11dfbd9c23bd336f786822fd (patch)
tree916a9c324ce0068f7257c730d14bc6db51b15844 /games/battalion
parenta8877eabd79ea6cb2c2e1e01c57c1784a85554fe (diff)
downloadpkgsrc-ffa5ec0eff6fd60c11dfbd9c23bd336f786822fd.tar.gz
Make this pkg use /var/games for scorefiles. (all games should do this
eventually)
Diffstat (limited to 'games/battalion')
-rw-r--r--games/battalion/Makefile4
-rw-r--r--games/battalion/patches/patch-aa46
-rw-r--r--games/battalion/patches/patch-ab24
-rw-r--r--games/battalion/pkg/PLIST3
4 files changed, 55 insertions, 22 deletions
diff --git a/games/battalion/Makefile b/games/battalion/Makefile
index 95851d04de0..03944600944 100644
--- a/games/battalion/Makefile
+++ b/games/battalion/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 1998/08/27 14:06:07 garbled Exp $
+# $NetBSD: Makefile,v 1.6 1998/09/13 20:24:28 garbled Exp $
#
DISTNAME= battalion
@@ -31,7 +31,7 @@ do-install:
${INSTALL_DATA} ${WRKDIR}/battalionSUN4/battalion.data/battalion.sho ${PREFIX}/share/battalion/battalion.data
${INSTALL_MAN} ${WRKDIR}/battalionSUN4/battalion.man ${PREFIX}/man/man6/battalion.6
${INSTALL_DATA} ${WRKDIR}/battalionSUN4/HELP/* ${PREFIX}/share/battalion/HELP
- ${INSTALL} -c -o root -g games -m 0664 /dev/null ${PREFIX}/share/battalion/battalion_hiscore
+ ${INSTALL} -c -o root -g games -m 0664 /dev/null /var/games//battalion_hiscore
pre-clean:
@${RM} -rf ${WRKDIR}/battalionSUN4
diff --git a/games/battalion/patches/patch-aa b/games/battalion/patches/patch-aa
index 5265e35472b..cfb3dc7cd74 100644
--- a/games/battalion/patches/patch-aa
+++ b/games/battalion/patches/patch-aa
@@ -1,13 +1,17 @@
-$NetBSD: patch-aa,v 1.3 1998/08/27 14:06:09 garbled Exp $
-
--- Makefile.orig Thu Jan 16 09:31:58 1997
-+++ Makefile Sat Jul 25 09:22:54 1998
-@@ -25,3 +25,3 @@
++++ Makefile Sun Sep 13 12:55:28 1998
+@@ -23,7 +23,7 @@
+ # (the program should compile with no warning messages - if you
+ # see a warning message please let me know about it)
# ------------------------------------------------------------
-CC = CC
+CC = cc
-@@ -39,5 +39,5 @@
+
+ # STEP 2: IF YOU WANT TO COMPILE WITH THE MESA LIBRARIES THEN
+@@ -37,9 +37,9 @@
+ # MESA OR OPENGL
+ #
# ------------------------------------------------------------
-#GLIB = -lMesaGL -lMesaGLU
+GLIB = -lMesaGL -lMesaGLU
@@ -15,33 +19,53 @@ $NetBSD: patch-aa,v 1.3 1998/08/27 14:06:09 garbled Exp $
-GLIB = -lGL -lGLU
+#GLIB = -lGL -lGLU
-@@ -53,3 +53,3 @@
+
+ # STEP 4: CHOOSE WHICH HARDWARE / OS YOU ARE RUNNING
+@@ -51,7 +51,7 @@
+ # with the other Makefile.)
+ #
# ------------------------------------------------------------
-OS = -DSGIVERSION
+#OS = -DSGIVERSION
# or
-@@ -79,4 +79,4 @@
+ #OS = -DSUNVERSION
+ # or
+@@ -77,8 +77,8 @@
+ # in audio.c then everything works fine.
+ #
# ------------------------------------------------------------
-AUDIOLIB = -laudio -laudiofile
-AUDIODEF = -DSGIAUDIO
+#AUDIOLIB = -laudio -laudiofile
+#AUDIODEF = -DSGIAUDIO
-@@ -93,4 +93,5 @@
+
+ # STEP 6: IF YOU ARE COMPILING FOR A SUN AND WANT (RUDIMENTARY)
+@@ -91,13 +91,15 @@
+
+ # STEP 7: CHOOSE ANY OPTIMIZATIONS OR ADD ANY SPECIAL INCLUSIONS
# ------------------------------------------------------------
-CFLAGS = -O -I/usr/local/X11/include -I/usr/demo/SOUND/ -I./.
-
+CFLAGS = -O $(DEFS) -I$(X11BASE)/include -I./.
+DATADIR = $(PREFIX)/share/battalion/
-+DEFS = -DDATADIR=\"$(DATADIR)\"
++VARDIR = /var/games/
++DEFS = -DDATADIR=\"$(DATADIR)\" -DVARDIR=\"$(VARDIR)\"
-@@ -99,3 +100,3 @@
+ # STEP 8: ADD ANY SPECIAL LIBRARY PATHS
+ # (USEFUL TO POINT TO WHERE THE MESA LIBRARIES RESIDE)
# ------------------------------------------------------------
-LIBFLAGS =
+LIBFLAGS = -Wl,-R$(X11BASE)/lib -L$(X11BASE)/lib -lcompat
-@@ -117,2 +118,4 @@
+ # you should now be able to type 'make' and everything should be fine ...
+
+@@ -115,6 +117,8 @@
+
+ $(TARGET): $(OBJ)
$(CC) -o $(TARGET) $(OBJ) $(LIBFLAGS) $(GLIB) $(LIBS) $(AUDIOLIB)
+
+install:
+ clean:
+ rm -f $(OBJ)
diff --git a/games/battalion/patches/patch-ab b/games/battalion/patches/patch-ab
index 8ea994d2fe3..1e89bbdeda5 100644
--- a/games/battalion/patches/patch-ab
+++ b/games/battalion/patches/patch-ab
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.2 1998/08/07 10:40:38 agc Exp $
-
--- battalion.c.orig Thu Jan 16 09:31:59 1997
-+++ battalion.c Sat Jul 25 08:58:02 1998
-@@ -2876,7 +2876,12 @@
++++ battalion.c Sun Sep 13 12:51:53 1998
+@@ -2874,11 +2874,16 @@
+
+ if (dataPath[strlen(dataPath)-1] != '/')
strcat(dataPath, "/");
-
- strcpy(fullPath, dataPath);
@@ -19,7 +19,11 @@ $NetBSD: patch-ab,v 1.2 1998/08/07 10:40:38 agc Exp $
+ roadFile = fopen(fullPath, "rb");
+
#endif
-@@ -2900,6 +2905,6 @@
+
+ if (roadFile != NULL)
+@@ -2898,10 +2903,10 @@
+ else
+ */
{
- roadFile = fopen("./battalion.data/battalion.sho", "rb");
+ roadFile = fopen(DATADIR "battalion.data/battalion.sho", "rb");
@@ -28,8 +32,14 @@ $NetBSD: patch-ab,v 1.2 1998/08/07 10:40:38 agc Exp $
- strcpy(dataPath, "./battalion.data/");
+ strcpy(dataPath, DATADIR "battalion.data/");
fclose(roadFile);
-@@ -2992,3 +2997,3 @@
+ }
+ else
+@@ -2990,7 +2995,7 @@
+ if (dataPtr != NULL)
+ strcpy(scoredataPath, dataPtr);
else
- strcpy(scoredataPath, "/usr/tmp");
-+ strcpy(scoredataPath, DATADIR);
++ strcpy(scoredataPath, VARDIR);
+ if (scoredataPath[strlen(scoredataPath)-1] != '/')
+ strcat(scoredataPath, "/");
diff --git a/games/battalion/pkg/PLIST b/games/battalion/pkg/PLIST
index a519d6e1eec..96eb7308bb1 100644
--- a/games/battalion/pkg/PLIST
+++ b/games/battalion/pkg/PLIST
@@ -1,7 +1,6 @@
-@comment $NetBSD: PLIST,v 1.1 1998/08/06 21:07:40 frueauf Exp $
+@comment $NetBSD: PLIST,v 1.2 1998/09/13 20:24:28 garbled Exp $
bin/battalion
man/man6/battalion.6
-share/battalion/battalion_hiscore
share/battalion/HELP/bathelp01.gif
share/battalion/HELP/bathelp02.gif
share/battalion/HELP/bathelp03.gif