diff options
author | garbled <garbled> | 1998-09-13 20:24:28 +0000 |
---|---|---|
committer | garbled <garbled> | 1998-09-13 20:24:28 +0000 |
commit | fe1f68d94938000230e9229a191fd309b1ab8703 (patch) | |
tree | 916a9c324ce0068f7257c730d14bc6db51b15844 /games/battalion/patches | |
parent | d589732bc3f132520cf412880ac75a2ac6ceb76d (diff) | |
download | pkgsrc-fe1f68d94938000230e9229a191fd309b1ab8703.tar.gz |
Make this pkg use /var/games for scorefiles. (all games should do this
eventually)
Diffstat (limited to 'games/battalion/patches')
-rw-r--r-- | games/battalion/patches/patch-aa | 46 | ||||
-rw-r--r-- | games/battalion/patches/patch-ab | 24 |
2 files changed, 52 insertions, 18 deletions
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, "/"); |