aboutsummaryrefslogtreecommitdiff
path: root/games/wolf3d
diff options
context:
space:
mode:
authorAlejandro Pulver <alepulver@FreeBSD.org>2006-04-12 22:25:35 +0000
committerAlejandro Pulver <alepulver@FreeBSD.org>2006-04-12 22:25:35 +0000
commit9231615331e7d9858131e8d96e3dd9ed96c79676 (patch)
treec8da82ae2d0fbda8fa75b072e65e43839d3fd6b1 /games/wolf3d
parentc1a0e53b9c49c18207a235a15e2026db0caf5683 (diff)
downloadports-9231615331e7d9858131e8d96e3dd9ed96c79676.tar.gz
ports-9231615331e7d9858131e8d96e3dd9ed96c79676.zip
Notes
Diffstat (limited to 'games/wolf3d')
-rw-r--r--games/wolf3d/Makefile84
-rw-r--r--games/wolf3d/distinfo5
-rw-r--r--games/wolf3d/files/patch-Makefile38
-rw-r--r--games/wolf3d/files/pkg-message.in16
-rw-r--r--games/wolf3d/files/wolf3d.in67
-rw-r--r--games/wolf3d/pkg-descr6
-rw-r--r--games/wolf3d/pkg-message8
-rw-r--r--games/wolf3d/pkg-plist36
8 files changed, 188 insertions, 72 deletions
diff --git a/games/wolf3d/Makefile b/games/wolf3d/Makefile
index bb92dee1d7e9..259d99a54a0b 100644
--- a/games/wolf3d/Makefile
+++ b/games/wolf3d/Makefile
@@ -7,45 +7,87 @@
PORTNAME= wolf3d
PORTVERSION= 20011028
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= games
MASTER_SITES= http://www.icculus.org/wolf3d/:wolf \
http://cvsup.theplanet.com/distfiles/:wolf \
- http://www.liquidx.org/distfiles/:wolfdata
-DISTFILES= wolf3d-20011028.tar.gz:wolf wolfdata.tar.gz:wolfdata
+ http://www.liquidx.org/distfiles/:sw \
+DISTNAME= wolf3d-${PORTVERSION}
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:wolf
MAINTAINER= tlp@liquidx.org
COMMENT= "Wolfenstein 3D Linux" by Steven Fuller (1992)
USE_SDL= sdl
-USE_GZIP= yes
-USE_X_PREFIX= yes
-USE_REINPLACE= yes
-
-post-patch:
- @${REINPLACE_CMD} -e 's|gcc|${CC}|' ${WRKSRC}/Makefile
- @${REINPLACE_CMD} -e 's|sdl-config|sdl11-config|' ${WRKSRC}/Makefile
- @${REINPLACE_CMD} -e 's|OBJS += sd_null.o|#OBJS += sd_null.o|' ${WRKSRC}/Makefile
- @${REINPLACE_CMD} -e 's|#OBJS += sd_oss.o fmopl.o|OBJS += sd_oss.o fmopl.o|' ${WRKSRC}/Makefile
- @${REINPLACE_CMD} -e 's|/usr/X11R6/lib|${X11BASE}/lib|' ${WRKSRC}/Makefile
- @${CAT} ${FILESDIR}/wolf3d.in | ${SED} -e 's,%%PREFIX%%,${PREFIX},g' > ${WRKDIR}/wolf3d
+
+OPTIONS= WOLF_SW "Install shareware data for Wolfenstein 3D" on \
+ SPEAR_SW "Install shareware data for Spear of Destiny" off
+
+SUB_FILES= pkg-message wolf3d
+
+WOLF_BIN= sdlwolf3d
+WOLF_VERS= wf ws sf ss
+
+WF_CF= -DWMODE=1
+WS_CF= -DWMODE=0
+SF_CF= -DWMODE=3
+SS_CF= -DWMODE=2
+
+.include <bsd.port.pre.mk>
+
+.if !defined(WITHOUT_WOLF_SW)
+DISTFILES+= wolfdata${EXTRACT_SUFX}:sw
+PLIST_SUB+= WOLF_SW=""
+.else
+PLIST_SUB+= WOLF_SW="@comment "
+.endif
+
+.if defined(WITH_SPEAR_SW)
+DISTFILES+= speardata${EXTRACT_SUFX}:sw
+PLIST_SUB+= SPEAR_SW=""
+.else
+PLIST_SUB+= SPEAR_SW="@comment "
+.endif
+
+post-extract:
+.if defined(WITH_SPEAR_SW)
+ @${MV} ${WRKDIR}/audit.sdm ${WRKDIR}/audiot.sdm
+.endif
+
+do-build:
+.for f in ${WOLF_VERS}
+ @cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} WF=${${f:U}_CF} ${ALL_TARGET}
+ @cd ${WRKSRC} && ${MV} ${WOLF_BIN} ${WOLF_BIN}-${f}
+ @cd ${WRKSRC}; ${MAKE} clean
+.endfor
do-install:
${MKDIR} ${PREFIX}/libexec/wolf3d
+.for f in ${WOLF_VERS}
+ ${INSTALL_PROGRAM} ${WRKSRC}/${WOLF_BIN}-${f} ${PREFIX}/libexec/wolf3d
+.endfor
${INSTALL_SCRIPT} ${WRKDIR}/wolf3d ${PREFIX}/bin/wolf3d
- ${INSTALL_PROGRAM} ${WRKSRC}/sdlwolf3d ${PREFIX}/libexec/wolf3d/sdlwolf3d
- ${INSTALL_DATA} ${WRKDIR}/wolfdata/* ${PREFIX}/libexec/wolf3d
+
+ ${MKDIR} ${DATADIR}
+.if !defined(WITHOUT_WOLF_SW)
+ ${INSTALL_DATA} ${WRKDIR}/wolfdata/* ${DATADIR}
+.endif
+.if defined(WITH_SPEAR_SW)
+ ${INSTALL_DATA} ${WRKDIR}/*.sdm ${DATADIR}
+.endif
+
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
${MKDIR} ${DOCSDIR}/docs
${INSTALL_DATA} ${WRKSRC}/docs/* ${DOCSDIR}/docs
- ${INSTALL_DATA} ${WRKSRC}/IDEAS ${DOCSDIR}/IDEAS
- ${INSTALL_DATA} ${WRKSRC}/NOTES ${DOCSDIR}/NOTES
- ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}/README
- ${INSTALL_DATA} ${WRKSRC}/TODO ${DOCSDIR}/TODO
+. for f in IDEAS NOTES README TODO
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}/IDEAS
+. endfor
.endif
post-install:
+ @${ECHO_CMD}
@${CAT} ${PKGMESSAGE}
+ @${ECHO_CMD}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/games/wolf3d/distinfo b/games/wolf3d/distinfo
index 1ffca87e50e7..8d66299bacb1 100644
--- a/games/wolf3d/distinfo
+++ b/games/wolf3d/distinfo
@@ -1,6 +1,11 @@
MD5 (wolf3d-20011028.tar.gz) = d085fc3b00eb2773e15491098461eb4b
SHA256 (wolf3d-20011028.tar.gz) = 9a1bde32bee0e78a82ad98ee6176e3bf93ec4fa70d1353ad63e1f9f6a30c72fb
+SHA256 (wolf3d-20011028.tar.gz) = 9a1bde32bee0e78a82ad98ee6176e3bf93ec4fa70d1353ad63e1f9f6a30c72fb
SIZE (wolf3d-20011028.tar.gz) = 134539
MD5 (wolfdata.tar.gz) = b73bba3a02c0f12cc56f01c8c9a2c3db
SHA256 (wolfdata.tar.gz) = 46766d1c7aa98809042c24873571db6366b082babd6cfaf81a319e0bae4950e9
+SHA256 (wolfdata.tar.gz) = 46766d1c7aa98809042c24873571db6366b082babd6cfaf81a319e0bae4950e9
+MD5 (speardata.tar.gz) = 5794d94ff0351116601728e16278425e
+SHA256 (speardata.tar.gz) = cdbd9c72701677f195546e9bbe12a8e39e3b6e995bf545f9c35fbd2cfd491fcb
+SIZE (speardata.tar.gz) = 557831
SIZE (wolfdata.tar.gz) = 565585
diff --git a/games/wolf3d/files/patch-Makefile b/games/wolf3d/files/patch-Makefile
new file mode 100644
index 000000000000..e5448adb329c
--- /dev/null
+++ b/games/wolf3d/files/patch-Makefile
@@ -0,0 +1,38 @@
+--- Makefile.orig Thu Sep 27 20:58:29 2001
++++ Makefile Sun Apr 9 10:34:17 2006
+@@ -1,7 +1,8 @@
+-CC = gcc
++#CC = gcc
+ #CC = gcc-3.0
+
+-CFLAGS = -g -Wall -pedantic
++CFLAGS += -O2 -fomit-frame-pointer -ffast-math -funroll-loops
++#CFLAGS = -g -Wall -pedantic
+ #CFLAGS = -g -O2 -Wall -pedantic
+ #CFLAGS = -Wall -O6 -fomit-frame-pointer -ffast-math -funroll-loops -mpentiumpro -mcpu=pentiumpro -march=pentiumpro
+ #CFLAGS = -g -Wall -pedantic -std=gnu99
+@@ -17,18 +18,18 @@
+ XOBJS = $(OBJS) $(ROBJS) vi_xlib.o
+ DOBJS = $(OBJS) $(ROBJS) vi_sdl.o
+
+-LFLAGS = -lm
++LFLAGS += -lm
+
+-OBJS += sd_null.o
+-#OBJS += sd_oss.o fmopl.o
++#OBJS += sd_null.o
++OBJS += sd_oss.o fmopl.o
+ #CFLAGS += -D_REENTRANT
+ #LFLAGS += -lpthread
+
+-CFLAGS += `sdl-config --cflags`
++CFLAGS += `$(SDL_CONFIG) --cflags`
+
+ SLFLAGS = $(LFLAGS) -lvga
+-XLFLAGS = $(LFLAGS) -L/usr/X11R6/lib -lX11 -lXext
+-DLFLAGS = $(LFLAGS) `sdl-config --libs` -L/usr/X11R6/lib -lX11 -lXext
++XLFLAGS = $(LFLAGS) -L$(X11BASE)/lib -lX11 -lXext
++DLFLAGS = $(LFLAGS) `$(SDL_CONFIG) --libs` -L$(X11BASE)/lib -lX11 -lXext
+
+ NASM = nasm
+
diff --git a/games/wolf3d/files/pkg-message.in b/games/wolf3d/files/pkg-message.in
new file mode 100644
index 000000000000..8e751bd5f5ff
--- /dev/null
+++ b/games/wolf3d/files/pkg-message.in
@@ -0,0 +1,16 @@
+==============================================================================
+
+QuakeForge has been installed.
+
+If you have sound problems try increasing the sound rate. This can be done
+with the variable "snd_rate". Standard values could be 22050 and 44100.
+
+To do this when calling the program do (for example):
+
+nq-glx +set snd_speed 44100
+
+Alternatively you can put it in the global configuration file (as root):
+
+echo "set snd_speed 44100" >> %%PREFIX%%/etc/quakeforge.conf
+
+==============================================================================
diff --git a/games/wolf3d/files/wolf3d.in b/games/wolf3d/files/wolf3d.in
index 28e026ff93dc..772c64ede26c 100644
--- a/games/wolf3d/files/wolf3d.in
+++ b/games/wolf3d/files/wolf3d.in
@@ -1,13 +1,26 @@
#!/bin/sh
+#
# wolf3d - wolf3d-20011028 wrapper script
#
# 2004 Travis Poppe
+#
-USERDIR=$HOME/.wolf3d
+USERDIR="$HOME/.wolf3d"
+WOLF_BIN="sdlwolf3d"
-if [ -d $USERDIR ]; then
- echo "wolf3d appears to be installed to $USERDIR/"
+msg_game()
+{
+ echo "Please provide a \"-game\" parameter with one of the following values:"
+ echo ""
+ echo "wf - Wolfenstein 3D (full version)"
+ echo "ws - Wolfenstein 3D (shareware version)"
+ echo "sf - Spear of Destiny (full version)"
+ echo "ss - Spear of Destiny (shareware version)"
echo ""
+}
+
+msg_options()
+{
echo "Basic options:"
echo ""
echo "-nowait Skips introduction"
@@ -19,28 +32,30 @@ if [ -d $USERDIR ]; then
echo "-demotest Starts wolf3d in demonstration mode"
echo "-version Reports game version"
echo ""
+}
- cd $USERDIR
- ./sdlwolf3d $*
- exit
-fi
+if [ "$1" = "-game" -a -n "`echo $2 | grep -E '^(wf|ws|sf|ss)$'`" ]
+then
+ GAME="$2"
+ shift; shift
-mkdir $USERDIR
-ln -s %%PREFIX%%/libexec/wolf3d/* $USERDIR
-
-echo "Installed wolf3d to $USERDIR/"
-echo ""
-echo "Basic options:"
-echo ""
-echo "-nowait Skips introduction"
-echo "-nojoy Disables joystick"
-echo "-nomouse Disables mouse"
-echo "-x2 Increases screen size by x2"
-echo "-x3 Increases screen size by x3"
-echo "-fullscreen Enables fullscreen mode"
-echo "-demotest Starts wolf3d in demonstration mode"
-echo "-version Reports game version"
-echo ""
-
-cd $USERDIR
-./sdlwolf3d $*
+ if [ ! -d $USERDIR ]
+ then
+ mkdir $USERDIR
+ ln -s %%PREFIX%%/libexec/wolf3d/* $USERDIR
+ ln -s %%DATADIR%%/* $USERDIR
+
+ echo "wolf3d was installed to $USERDIR/"
+ else
+ echo "wolf3d appears to be installed to $USERDIR/"
+ fi
+
+ msg_options
+
+ cd $USERDIR || exit 1
+ exec ./${WOLF_BIN}-${GAME} "$@"
+else
+ msg_game
+
+ exit 1
+fi
diff --git a/games/wolf3d/pkg-descr b/games/wolf3d/pkg-descr
index 141e65fa65fe..c7cda494b1cc 100644
--- a/games/wolf3d/pkg-descr
+++ b/games/wolf3d/pkg-descr
@@ -1,8 +1,6 @@
This is a October 28, 2001 Snapshot of "Wolfenstein 3D Linux" by Steven
-Fuller. It is an unofficial Linux port of the id Software game,
-Wolfenstein 3D (1992).
-
-This port uses the shareware data files.
+Fuller. It is an unofficial Linux port of the id Software game,
+Wolfenstein 3D (1992). It also supports Spear of Destiny.
WWW: http://www.icculus.org/wolf3d/
diff --git a/games/wolf3d/pkg-message b/games/wolf3d/pkg-message
deleted file mode 100644
index 207dcbd8fe1e..000000000000
--- a/games/wolf3d/pkg-message
+++ /dev/null
@@ -1,8 +0,0 @@
--------------------------------------------------------------------------------
-This port's wrapper script will install the wolf3d data to your home directory
-the first time you run it. If for some odd reason you already have a directory
-called .wolf3d in your home directory, you must (re)move it before this port
-will function correctly.
-
--tlp
--------------------------------------------------------------------------------
diff --git a/games/wolf3d/pkg-plist b/games/wolf3d/pkg-plist
index 017b68b03c8e..f7ff2eba0260 100644
--- a/games/wolf3d/pkg-plist
+++ b/games/wolf3d/pkg-plist
@@ -1,19 +1,29 @@
bin/wolf3d
-libexec/wolf3d/audiohed.wl1
-libexec/wolf3d/audiot.wl1
-libexec/wolf3d/gamemaps.wl1
-libexec/wolf3d/maphead.wl1
-libexec/wolf3d/sdlwolf3d
-libexec/wolf3d/vgadict.wl1
-libexec/wolf3d/vgagraph.wl1
-libexec/wolf3d/vgahead.wl1
-libexec/wolf3d/vswap.wl1
+libexec/wolf3d/sdlwolf3d-sf
+libexec/wolf3d/sdlwolf3d-ss
+libexec/wolf3d/sdlwolf3d-wf
+libexec/wolf3d/sdlwolf3d-ws
+%%PORTDOCS%%%%DOCSDIR%%/IDEAS
%%PORTDOCS%%%%DOCSDIR%%/docs/goodstuf.txt
%%PORTDOCS%%%%DOCSDIR%%/docs/release.txt
-%%PORTDOCS%%%%DOCSDIR%%/IDEAS
-%%PORTDOCS%%%%DOCSDIR%%/NOTES
-%%PORTDOCS%%%%DOCSDIR%%/README
-%%PORTDOCS%%%%DOCSDIR%%/TODO
+%%WOLF_SW%%%%DATADIR%%/audiohed.wl1
+%%WOLF_SW%%%%DATADIR%%/audiot.wl1
+%%WOLF_SW%%%%DATADIR%%/gamemaps.wl1
+%%WOLF_SW%%%%DATADIR%%/maphead.wl1
+%%WOLF_SW%%%%DATADIR%%/vgadict.wl1
+%%WOLF_SW%%%%DATADIR%%/vgagraph.wl1
+%%WOLF_SW%%%%DATADIR%%/vgahead.wl1
+%%WOLF_SW%%%%DATADIR%%/vswap.wl1
+%%SPEAR_SW%%%%DATADIR%%/audiohed.sdm
+%%SPEAR_SW%%%%DATADIR%%/audiot.sdm
+%%SPEAR_SW%%%%DATADIR%%/config.sdm
+%%SPEAR_SW%%%%DATADIR%%/gamemaps.sdm
+%%SPEAR_SW%%%%DATADIR%%/maphead.sdm
+%%SPEAR_SW%%%%DATADIR%%/vgadict.sdm
+%%SPEAR_SW%%%%DATADIR%%/vgagraph.sdm
+%%SPEAR_SW%%%%DATADIR%%/vgahead.sdm
+%%SPEAR_SW%%%%DATADIR%%/vswap.sdm
+@dirrm %%DATADIR%%
%%PORTDOCS%%@dirrm %%DOCSDIR%%/docs
%%PORTDOCS%%@dirrm %%DOCSDIR%%
@dirrm libexec/wolf3d