aboutsummaryrefslogtreecommitdiffstats
path: root/games/vavoom
diff options
context:
space:
mode:
authorbarner <barner@FreeBSD.org>2005-11-17 20:00:51 +0800
committerbarner <barner@FreeBSD.org>2005-11-17 20:00:51 +0800
commitfa9a0063355185baece8eebf2ef05fd5db7e524f (patch)
tree5379660ed3768e704103b5ca48b5d2c12b10d26b /games/vavoom
parent4f464c0c9580adf2d1d78495781ffb47c032bcc6 (diff)
downloadfreebsd-ports-gnome-fa9a0063355185baece8eebf2ef05fd5db7e524f.tar.gz
freebsd-ports-gnome-fa9a0063355185baece8eebf2ef05fd5db7e524f.tar.zst
freebsd-ports-gnome-fa9a0063355185baece8eebf2ef05fd5db7e524f.zip
- Integrate with "doom-data".
- Unbreak on 6.x - Add OPTIONS. - Use program's install target. - Make wrapper scripts. - Add installuser target - Add SHA256 - Respect CC and friends PR: ports/86448 Submitted by: Alejandro Pulver <alejandro@varnet.biz> Tweaked by: Igor Pokrovsky <ip@doom.homeunix.org>, barner Approved by: Igor Pokrovsky <ip@doom.homeunix.org> (maintainer)
Diffstat (limited to 'games/vavoom')
-rw-r--r--games/vavoom/Makefile44
-rw-r--r--games/vavoom/distinfo1
-rw-r--r--games/vavoom/files/patch-Makefile15
-rw-r--r--games/vavoom/files/patch-utils_acc_Makefile2
-rw-r--r--games/vavoom/files/patch-utils_glbsp_Plugin.mak2
-rw-r--r--games/vavoom/files/patch-utils_glvis_Makefile2
-rw-r--r--games/vavoom/files/patch-utils_vlumpy_Makefile2
-rw-r--r--games/vavoom/files/pkg-message.in19
-rw-r--r--games/vavoom/files/vavoom.in10
-rw-r--r--games/vavoom/pkg-message17
-rw-r--r--games/vavoom/pkg-plist1
11 files changed, 80 insertions, 35 deletions
diff --git a/games/vavoom/Makefile b/games/vavoom/Makefile
index 979a7a3fbec2..a7778f940abb 100644
--- a/games/vavoom/Makefile
+++ b/games/vavoom/Makefile
@@ -36,18 +36,26 @@ MAKE_ARGS= "USE_SDL=1"
MAKE_ARGS+= "USE_AL=1"
.endif
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 600000
-BROKEN= Does not build on FreeBSD 6.X
+.ifdef (WITH_OPTIMIZED_CFLAGS)
+MAKE_ARGS+= OPT_CFLAGS="-O3 -ffast-math -fomit-frame-pointer"
.endif
-.ifndef (WITH_OPENAL)
+SUB_FILES= pkg-message vavoom
+SUB_LIST= "PREFIX=${PREFIX}" "PORTSDIR=${PORTSDIR}"
+
+.include "${.CURDIR}/../doom-data/Makefile.include"
+
+.include <bsd.port.pre.mk>
+
pre-everything::
- @${ECHO_CMD} "********************************************************************"
- @${ECHO_CMD} "You can define WITH_OPENAL=yes to build Vavoom with 3D sound support"
- @${ECHO_CMD} "********************************************************************"
+ @${ECHO_CMD} ""
+.ifndef (WITH_OPENAL)
+ @${ECHO_CMD} "Define WITH_OPENAL=yes to build Vavoom with 3D sound support"
+.endif
+.ifndef (WITH_OPTIMIZED_CFLAGS)
+ @${ECHO_CMD} "Define WITH_OPTIMIZED_CFLAGS=yes to build Vavoom optimized for speed"
.endif
+ @${ECHO_CMD} ""
post-patch:
@${REINPLACE_CMD} -i '' -e 's|SDL\/||g' ${WRKSRC}/source/*.cpp
@@ -60,6 +68,9 @@ do-install:
${INSTALL_PROGRAM} ${WRKSRC}/Vavoom ${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/VavoomSV ${PREFIX}/bin
+# install wrapper script
+ ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${PREFIX}/bin
+
@${MKDIR} ${DATADIR}
@${MKDIR} ${DATADIR}/basev
${INSTALL_DATA} ${WRKSRC}/basev/default.cfg ${DATADIR}/basev
@@ -80,9 +91,18 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/docs/vavmref.txt ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/docs/vavoom.txt ${DOCSDIR}
.endif
-
-post-install:
- @${SED} -e 's|%%PREFIX%%|${PREFIX}|; s|%%DATADIR%%|${DATADIR}|' \
- <${PKGMESSAGE}
+ @${CAT} ${PKGMESSAGE}
+
+# Run this target as a user from which you will play Vavoom. It will create
+# required symlinks in users home directory. This should be done only once.
+installuser:
+ cd ${DATADIR} && \
+ ${FIND} . -type d -exec ${MKDIR} -p ~/.${PORTNAME}/{} \; && \
+ ${FIND} . -type f -exec ${LN} -sf ${DATADIR}/{} ~/.${PORTNAME}/{} \;
+.if exists(${DMDIR})
+ cd ${DMDIR} && \
+ ${FIND} . -type d -exec ${MKDIR} -p ~/.${PORTNAME}/{} \; && \
+ ${FIND} . -type f -exec ${LN} -sf ${DMDIR}/{} ~/.${PORTNAME}/{} \;
+.endif
.include <bsd.port.post.mk>
diff --git a/games/vavoom/distinfo b/games/vavoom/distinfo
index 6b3f29b06273..763cb176bbb8 100644
--- a/games/vavoom/distinfo
+++ b/games/vavoom/distinfo
@@ -1,2 +1,3 @@
MD5 (v117_src.zip) = 97f4eea73c7cf83a8686e237f52aba9b
+SHA256 (v117_src.zip) = 4e3732727cea0b1ab38938c982d870bbd682c9472a0cc183629fcaa684079d8d
SIZE (v117_src.zip) = 4207773
diff --git a/games/vavoom/files/patch-Makefile b/games/vavoom/files/patch-Makefile
index a4035167a959..4f655da1142a 100644
--- a/games/vavoom/files/patch-Makefile
+++ b/games/vavoom/files/patch-Makefile
@@ -38,12 +38,23 @@
-ASM_ARGS = -c -W -Wall $(ARCH) -x assembler-with-cpp
+#ARCH ?= -march=pentiumpro
+#export ARCH
-+C_ARGS = -c ${CFLAGS} -I${X11BASE}/include `${SDL_CONFIG} --cflags` -W -Wall -ffast-math
-+CPP_ARGS = -c ${CXXFLAGS} -I${X11BASE}/include `${SDL_CONFIG} --cflags` -W -Wall -ffast-math
++C_ARGS = -c ${CFLAGS} -I${X11BASE}/include `${SDL_CONFIG} --cflags` -W -Wall
++CPP_ARGS = -c ${CXXFLAGS} -I${X11BASE}/include `${SDL_CONFIG} --cflags` -W -Wall
+ASM_ARGS = -c ${CFLAGS} -I${X11BASE}/include `${SDL_CONFIG} --cflags` -W -Wall -x assembler-with-cpp
LINK_ARGS = -Wall
ifdef DEBUG
+@@ -333,8 +333,8 @@
+
+ else
+
+-C_ARGS += -O3 -fomit-frame-pointer
+-CPP_ARGS += -O3 -fomit-frame-pointer
++C_ARGS += ${OPT_CFLAGS}
++CPP_ARGS += ${OPT_CFLAGS}
+ LINK_ARGS += -s
+
+ endif
@@ -350,7 +350,7 @@
exe: Vavoom$(EXE)
diff --git a/games/vavoom/files/patch-utils_acc_Makefile b/games/vavoom/files/patch-utils_acc_Makefile
index a10bf6ec0adb..eaea39e5f35e 100644
--- a/games/vavoom/files/patch-utils_acc_Makefile
+++ b/games/vavoom/files/patch-utils_acc_Makefile
@@ -5,7 +5,7 @@
endif
-CFLAGS = -Wall -O3 -ffast-math -fomit-frame-pointer -march=pentiumpro
-+CFLAGS += -Wall -O3 -ffast-math -fomit-frame-pointer
++CFLAGS += -Wall ${OPT_CFLAGS}
OBJS = \
acc.o \
diff --git a/games/vavoom/files/patch-utils_glbsp_Plugin.mak b/games/vavoom/files/patch-utils_glbsp_Plugin.mak
index 234599e992d2..d2d4e155010a 100644
--- a/games/vavoom/files/patch-utils_glbsp_Plugin.mak
+++ b/games/vavoom/files/patch-utils_glbsp_Plugin.mak
@@ -8,7 +8,7 @@
-CFLAGS=-O3 -Wall -DGLBSP_PLUGIN -DUNIX -DINLINE_G=inline
-AR=ar rc
+#CC=gcc
-+CFLAGS+=-O3 -Wall -DGLBSP_PLUGIN -DUNIX -DINLINE_G=inline
++CFLAGS+=${OPT_CFLAGS} -Wall -DGLBSP_PLUGIN -DUNIX -DINLINE_G=inline
+#AR=ar rc
RANLIB=ranlib
diff --git a/games/vavoom/files/patch-utils_glvis_Makefile b/games/vavoom/files/patch-utils_glvis_Makefile
index 23b02a1cf0cd..6e07d6b03fcd 100644
--- a/games/vavoom/files/patch-utils_glvis_Makefile
+++ b/games/vavoom/files/patch-utils_glvis_Makefile
@@ -5,7 +5,7 @@
endif
-CFLAGS = -Wall -O3 -ffast-math -fomit-frame-pointer -march=pentiumpro
-+CFLAGS += -Wall -O3 -ffast-math -fomit-frame-pointer
++CFLAGS += -Wall ${OPT_CFLAGS}
LIB_OBJS = cmdlib.o wadlib.o level.o flow.o
OBJS = glvis.o
LIBS += -lm
diff --git a/games/vavoom/files/patch-utils_vlumpy_Makefile b/games/vavoom/files/patch-utils_vlumpy_Makefile
index adfb7d03e4ca..de9f2548c6c8 100644
--- a/games/vavoom/files/patch-utils_vlumpy_Makefile
+++ b/games/vavoom/files/patch-utils_vlumpy_Makefile
@@ -5,7 +5,7 @@
endif
-CFLAGS = -Wall -O3 -ffast-math -fomit-frame-pointer -march=pentiumpro
-+CFLAGS += -Wall -O3 -ffast-math -fomit-frame-pointer
++CFLAGS += -Wall ${OPT_CFLAGS}
OBJS = cmdlib.o imglib.o scrlib.o wadlib.o vlumpy.o
all: ../bin/vlumpy$(EXE)
diff --git a/games/vavoom/files/pkg-message.in b/games/vavoom/files/pkg-message.in
new file mode 100644
index 000000000000..22bd23977763
--- /dev/null
+++ b/games/vavoom/files/pkg-message.in
@@ -0,0 +1,19 @@
+*****************************************************************************
+* In order to run Vavoom you will need original IWAD file from either:
+* Doom, Doom II, TNT, Plutonia, Heretic, Hexen or Strife.
+* You should install any of them using games/doom-data meta port.
+*
+* Vavoom needs to be run from a directory containing its data files and
+* IWAD files taken from original games. So before starting to play Vavoom
+* you should create required symlinks in users home directory.
+* This process is automated by 'installuser' target in vavoom port makefile.
+* You can run something like this after installing the port:
+* cd %%PORTSDIR%%/games/vavoom && make installuser
+* This should be done only once on per user basis.
+*
+* Once done you are ready to play Vavoom. Run it as
+* %%PREFIX%%/bin/vavoom ...
+* or as
+* %%PREFIX%%/bin/vavoom -s ...
+* to start its dedicated server.
+*****************************************************************************
diff --git a/games/vavoom/files/vavoom.in b/games/vavoom/files/vavoom.in
new file mode 100644
index 000000000000..bf22d688eb9d
--- /dev/null
+++ b/games/vavoom/files/vavoom.in
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+if test $# = 1 && test $1 = "-s"; then
+ EXE="VavoomSV"
+ shift
+else
+ EXE="Vavoom"
+fi
+
+cd ~/.vavoom && %%PREFIX%%/bin/${EXE} $*
diff --git a/games/vavoom/pkg-message b/games/vavoom/pkg-message
deleted file mode 100644
index 1c40a36425e4..000000000000
--- a/games/vavoom/pkg-message
+++ /dev/null
@@ -1,17 +0,0 @@
-*****************************************************************************
-* In order to run Vavoom you will need original IWAD file from either:
-* Doom, Doom II, TNT, Plutonia, Heretic, Hexen or Strife.
-*
-* Manually do the following:
-* 1. Make directory for Vavoom data
-* mkdir ${HOME}/vavoom
-* 2. Copy Vavoom data into this directory
-* cp -r %%DATADIR%%/basev ${HOME}/vavoom
-* 3. Copy IWAD from original game here as well
-* cp /where/is/doom.wad ${HOME}/vavoom
-* 4. Execute Vavoom from directory with game data
-* cd ${HOME}/vavoom && %%PREFIX%%/bin/Vavoom -opengl
-* or
-* cd ${HOME}/vavoom && %%PREFIX%%/bin/Vavoom -opengl -openal
-* if you compiled Vavoom with OpenAL support
-*****************************************************************************
diff --git a/games/vavoom/pkg-plist b/games/vavoom/pkg-plist
index c158903d0141..9d8a91703050 100644
--- a/games/vavoom/pkg-plist
+++ b/games/vavoom/pkg-plist
@@ -1,3 +1,4 @@
+bin/vavoom
bin/Vavoom
bin/VavoomSV
%%DATADIR%%/basev/doom/wad0.wad