aboutsummaryrefslogtreecommitdiff
path: root/games/battalion
diff options
context:
space:
mode:
authorEmanuel Haupt <ehaupt@FreeBSD.org>2011-10-18 13:05:40 +0000
committerEmanuel Haupt <ehaupt@FreeBSD.org>2011-10-18 13:05:40 +0000
commit41a6ef01a2f0bdfed919cf2fc1e859d7598f6e56 (patch)
tree1c828d803883a91067cde0fd6a756acaaae33919 /games/battalion
parentf7ced924e950cb0a1a7c2718ba81d91753254c42 (diff)
downloadports-41a6ef01a2f0bdfed919cf2fc1e859d7598f6e56.tar.gz
ports-41a6ef01a2f0bdfed919cf2fc1e859d7598f6e56.zip
Notes
Diffstat (limited to 'games/battalion')
-rw-r--r--games/battalion/Makefile64
-rw-r--r--games/battalion/distinfo4
-rw-r--r--games/battalion/files/patch-aa58
-rw-r--r--games/battalion/files/patch-ab12
-rw-r--r--games/battalion/files/patch-ac12
-rw-r--r--games/battalion/pkg-plist80
6 files changed, 75 insertions, 155 deletions
diff --git a/games/battalion/Makefile b/games/battalion/Makefile
index be4e4c284a37..4f45f0eda1a6 100644
--- a/games/battalion/Makefile
+++ b/games/battalion/Makefile
@@ -6,48 +6,58 @@
#
PORTNAME= battalion
-PORTVERSION= 1.4
-PORTREVISION= 3
+PORTVERSION= 1.4b
CATEGORIES= games
MASTER_SITES= http://www.evl.uic.edu/aej/BATTALION/
-DISTFILES= battalionSource1.4.tar.Z battalionSUN4.tar.gz
+DISTNAME= ${PORTNAME}${PORTVERSION}
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} battalionSUN4.tar.gz
+EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= ports@FreeBSD.org
COMMENT= Monsters, explosions, destruction game for X Window System
-WRKSRC= ${WRKDIR}/battalionSource
+USE_BZIP2= yes
+USE_GL= glu
+MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS}" LIBS="${LDFLAGS}"
+MAKE_JOBS_SAFE= yes
-ALL_TARGET= # empty
-USE_GL= glu gl
-MAKE_ENV= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
- PTHREAD_LIBS="${PTHREAD_LIBS}"
+CFLAGS+= -I${LOCALBASE}/include/X11 -I${LOCALBASE}/include \
+ -DLINUXVERSION -DLINUXAUDIO
+LDFLAGS= -L${LOCALBASE}/lib
MAN6= battalion.6
+post-extract:
+ @${GZCAT} ${DISTDIR}/battalionSUN4.tar.gz | \
+ (cd ${WRKDIR} && ${TAR} --unlink -xf -)
+ @${RM} -f ${WRKSRC}/*.o
+
+post-patch:
+ @${REINPLACE_CMD} -e \
+ '/dataPtr/s| = getenv.*| = "${DATADIR}";|' ${WRKSRC}/battalion.c
+ @${REINPLACE_CMD} -e \
+ 's|<malloc\.h>|<stdlib.h>| ; \
+ s|<linux/soundcard\.h>|<sys/soundcard.h>|' ${WRKSRC}/soundIt.c
+
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/battalion ${PREFIX}/bin
${INSTALL_MAN} ${WRKDIR}/battalionSUN4/battalion.man \
- ${PREFIX}/man/man6/battalion.6
- @${MKDIR} ${PREFIX}/share/battalion
+ ${MAN6PREFIX}/man/man6/battalion.6
+ @${MKDIR} ${DATADIR}
${INSTALL_DATA} ${WRKDIR}/battalionSUN4/battalion.data/battalion.sho \
- ${PREFIX}/share/battalion
- @${MKDIR} ${PREFIX}/share/battalion/DATA
- ${INSTALL_DATA} ${WRKDIR}/battalionSUN4/battalion.data/DATA/*.data \
- ${PREFIX}/share/battalion/DATA
- @${MKDIR} ${PREFIX}/share/battalion/MUSIC
- ${INSTALL_DATA} ${WRKDIR}/battalionSUN4/battalion.data/MUSIC/*.au \
- ${PREFIX}/share/battalion/MUSIC
- @${MKDIR} ${PREFIX}/share/battalion/SOUNDS
- ${INSTALL_DATA} ${WRKDIR}/battalionSUN4/battalion.data/SOUNDS/*.au \
- ${PREFIX}/share/battalion/SOUNDS
- @${MKDIR} ${PREFIX}/share/battalion/TEXTURES
- ${INSTALL_DATA} ${WRKDIR}/battalionSUN4/battalion.data/TEXTURES/*.tex \
- ${PREFIX}/share/battalion/TEXTURES
+ ${DATADIR}
+ @${MKDIR} ${DATADIR}/DATA
+ ${INSTALL_DATA} ${WRKSRC}/DATA/*.data ${DATADIR}/DATA
+ @${MKDIR} ${DATADIR}/MUSIC
+ ${INSTALL_DATA} ${WRKSRC}/MUSIC/*.au ${DATADIR}/MUSIC
+ @${MKDIR} ${DATADIR}/SOUNDS
+ ${INSTALL_DATA} ${WRKSRC}/SOUNDS/*.au ${DATADIR}/SOUNDS
+ @${MKDIR} ${DATADIR}/TEXTURES
+ ${INSTALL_DATA} ${WRKSRC}/TEXTURES/*.tex ${DATADIR}/TEXTURES
.if !defined(NOPORTDOCS)
- @${MKDIR} ${PREFIX}/share/doc/battalion
- ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/battalion
- ${INSTALL_DATA} ${WRKDIR}/battalionSUN4/HELP/*.gif \
- ${PREFIX}/share/doc/battalion
+ @${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKDIR}/battalionSUN4/HELP/*.gif ${DOCSDIR}
.endif
.include <bsd.port.mk>
diff --git a/games/battalion/distinfo b/games/battalion/distinfo
index b6fea0cd6fa0..ef2478e5ba08 100644
--- a/games/battalion/distinfo
+++ b/games/battalion/distinfo
@@ -1,4 +1,4 @@
-SHA256 (battalionSource1.4.tar.Z) = 2a8871b990dfe69df5a9d3af7f97c8cf12aa0b357ff9b0dc86e8573965e06889
-SIZE (battalionSource1.4.tar.Z) = 186221
+SHA256 (battalion1.4b.tar.bz2) = f9506f8fbb544a77373e01f8bda93ac339433b0ea84296fe0c287f2bf37bf8b3
+SIZE (battalion1.4b.tar.bz2) = 1103031
SHA256 (battalionSUN4.tar.gz) = b805518e773095aa747cff62dd9f193ca8293743e6636f3e2f3a283fb6d8afd2
SIZE (battalionSUN4.tar.gz) = 1593265
diff --git a/games/battalion/files/patch-aa b/games/battalion/files/patch-aa
deleted file mode 100644
index cda0266b3a50..000000000000
--- a/games/battalion/files/patch-aa
+++ /dev/null
@@ -1,58 +0,0 @@
---- Makefile.orig Thu Jan 16 08:31:58 1997
-+++ Makefile Thu Nov 6 14:56:38 2003
-@@ -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
-
-
- # STEP 2: IF YOU WANT TO COMPILE WITH THE MESA LIBRARIES THEN
-@@ -51,9 +51,9 @@
- # with the other Makefile.)
- #
- # ------------------------------------------------------------
--OS = -DSGIVERSION
-+#OS = -DSGIVERSION
- # or
--#OS = -DSUNVERSION
-+OS = -DSUNVERSION
- # or
- #OS = -DLINUXVERSION
- # or
-@@ -77,8 +77,8 @@
- # in audio.c then everything works fine.
- #
- # ------------------------------------------------------------
--AUDIOLIB = -laudio -laudiofile
--AUDIODEF = -DSGIAUDIO
-+#AUDIOLIB = -laudio -laudiofile
-+#AUDIODEF = -DSGIAUDIO
-
-
- # STEP 6: IF YOU ARE COMPILING FOR A SUN AND WANT (RUDIMENTARY)
-@@ -91,7 +91,7 @@
-
- # STEP 7: CHOOSE ANY OPTIMIZATIONS OR ADD ANY SPECIAL INCLUSIONS
- # ------------------------------------------------------------
--CFLAGS = -O -I/usr/local/X11/include -I/usr/demo/SOUND/ -I./.
-+CFLAGS+= -I${LOCALBASE}/include -DPREFIX=\"${PREFIX}\"
-
-
- # STEP 8: ADD ANY SPECIAL LIBRARY PATHS
-@@ -106,12 +106,12 @@
- TARGET = battalion
-
- OBJ = battalion.o audio.o net.o gprim.o graphics.o objects.o text.o update.o tk.o font.o
--LIBS = -L./. -L/usr/X11R6/lib -lm -lX11 -lXext
-+LIBS = -L./. -L${LOCALBASE}/lib -lm -lX11 -lXext -lcompat $(PTHREAD_LIBS)
-
- all: $(TARGET)
-
- $(OBJ): $(?:.o=.c)
-- $(CC) $(CFLAGS) $(LIBFLAG) $(OS) $(WHICHLIB) $(AUDIODEF) -c $?
-+ $(CC) $(CFLAGS) $(PTHREAD_CFLAGS) $(LIBFLAG) $(OS) $(WHICHLIB) $(AUDIODEF) -c $?
-
- $(TARGET): $(OBJ)
- $(CC) -o $(TARGET) $(OBJ) $(LIBFLAGS) $(GLIB) $(LIBS) $(AUDIOLIB)
diff --git a/games/battalion/files/patch-ab b/games/battalion/files/patch-ab
deleted file mode 100644
index 2cf03af86541..000000000000
--- a/games/battalion/files/patch-ab
+++ /dev/null
@@ -1,12 +0,0 @@
---- battalion.c.orig Thu Jan 16 16:31:59 1997
-+++ battalion.c Wed Mar 29 13:10:21 1998
-@@ -2867,7 +2867,8 @@
- roadFile = fopen(fullPath, "rb");
- #else
-
-- dataPtr = getenv("BATTALIONDATADIR");
-+/* dataPtr = getenv("BATTALIONDATADIR"); */
-+ dataPtr = PREFIX "/share/battalion";
- if (dataPtr != NULL)
- {
- strcpy(dataPath, dataPtr);
diff --git a/games/battalion/files/patch-ac b/games/battalion/files/patch-ac
deleted file mode 100644
index add8c0d83324..000000000000
--- a/games/battalion/files/patch-ac
+++ /dev/null
@@ -1,12 +0,0 @@
---- battalion.h.orig Fri Jan 17 01:31:59 1997
-+++ battalion.h Sat Apr 1 00:37:23 2000
-@@ -59,7 +59,9 @@
- #endif
-
- #ifndef MACVERSION
-+#ifndef __STDC__
- #include <malloc.h>
-+#endif
- #include <pwd.h>
- #endif
-
diff --git a/games/battalion/pkg-plist b/games/battalion/pkg-plist
index 06fecb74e95f..70b8379e2584 100644
--- a/games/battalion/pkg-plist
+++ b/games/battalion/pkg-plist
@@ -1,45 +1,37 @@
bin/battalion
-share/battalion/battalion.sho
-share/battalion/DATA/road.data
-share/battalion/DATA/tank.data
-share/battalion/DATA/tree.data
-share/battalion/MUSIC/1.au
-share/battalion/MUSIC/2.au
-share/battalion/MUSIC/3.au
-share/battalion/MUSIC/4.au
-share/battalion/MUSIC/5.au
-share/battalion/MUSIC/d1.au
-share/battalion/MUSIC/d2.au
-share/battalion/MUSIC/d3.au
-share/battalion/MUSIC/d4.au
-share/battalion/MUSIC/d5.au
-share/battalion/SOUNDS/beam.au
-share/battalion/SOUNDS/boom.au
-share/battalion/SOUNDS/crash.au
-share/battalion/SOUNDS/monsterbeam.au
-share/battalion/SOUNDS/rocket.au
-share/battalion/SOUNDS/slag.au
-share/battalion/SOUNDS/tank.au
-share/battalion/SOUNDS/tech.au
-share/battalion/TEXTURES/road.tex
-share/battalion/TEXTURES/screenleft.tex
-share/battalion/TEXTURES/screenright.tex
-share/battalion/TEXTURES/treewood.tex
-%%PORTDOCS%%share/doc/battalion/README
-%%PORTDOCS%%share/doc/battalion/bathelp01.gif
-%%PORTDOCS%%share/doc/battalion/bathelp02.gif
-%%PORTDOCS%%share/doc/battalion/bathelp03.gif
-%%PORTDOCS%%share/doc/battalion/bathelp04.gif
-%%PORTDOCS%%share/doc/battalion/bathelp05.gif
-%%PORTDOCS%%share/doc/battalion/bathelp06.gif
-%%PORTDOCS%%share/doc/battalion/bathelp07.gif
-%%PORTDOCS%%share/doc/battalion/bathelp08.gif
-%%PORTDOCS%%share/doc/battalion/bathelp09.gif
-%%PORTDOCS%%share/doc/battalion/bathelp10.gif
-%%PORTDOCS%%share/doc/battalion/bathelp11.gif
-@dirrm share/battalion/DATA
-@dirrm share/battalion/MUSIC
-@dirrm share/battalion/SOUNDS
-@dirrm share/battalion/TEXTURES
-@dirrm share/battalion
-%%PORTDOCS%%@dirrm share/doc/battalion
+%%DATADIR%%/battalion.sho
+%%DATADIR%%/DATA/road.data
+%%DATADIR%%/DATA/tank.data
+%%DATADIR%%/DATA/tree.data
+%%DATADIR%%/MUSIC/1.au
+%%DATADIR%%/MUSIC/2.au
+%%DATADIR%%/SOUNDS/beam.au
+%%DATADIR%%/SOUNDS/boom.au
+%%DATADIR%%/SOUNDS/crash.au
+%%DATADIR%%/SOUNDS/monsterbeam.au
+%%DATADIR%%/SOUNDS/rocket.au
+%%DATADIR%%/SOUNDS/slag.au
+%%DATADIR%%/SOUNDS/tank.au
+%%DATADIR%%/SOUNDS/tech.au
+%%DATADIR%%/TEXTURES/road.tex
+%%DATADIR%%/TEXTURES/screenleft.tex
+%%DATADIR%%/TEXTURES/screenright.tex
+%%DATADIR%%/TEXTURES/treewood.tex
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/bathelp01.gif
+%%PORTDOCS%%%%DOCSDIR%%/bathelp02.gif
+%%PORTDOCS%%%%DOCSDIR%%/bathelp03.gif
+%%PORTDOCS%%%%DOCSDIR%%/bathelp04.gif
+%%PORTDOCS%%%%DOCSDIR%%/bathelp05.gif
+%%PORTDOCS%%%%DOCSDIR%%/bathelp06.gif
+%%PORTDOCS%%%%DOCSDIR%%/bathelp07.gif
+%%PORTDOCS%%%%DOCSDIR%%/bathelp08.gif
+%%PORTDOCS%%%%DOCSDIR%%/bathelp09.gif
+%%PORTDOCS%%%%DOCSDIR%%/bathelp10.gif
+%%PORTDOCS%%%%DOCSDIR%%/bathelp11.gif
+@dirrm %%DATADIR%%/MUSIC
+@dirrm %%DATADIR%%/SOUNDS
+@dirrm %%DATADIR%%/TEXTURES
+@dirrm %%DATADIR%%/DATA
+@dirrm %%DATADIR%%
+%%PORTDOCS%%@dirrm %%DOCSDIR%%