aboutsummaryrefslogtreecommitdiff
path: root/games/vavoom
diff options
context:
space:
mode:
authorAlejandro Pulver <alepulver@FreeBSD.org>2007-12-13 13:56:59 +0000
committerAlejandro Pulver <alepulver@FreeBSD.org>2007-12-13 13:56:59 +0000
commit749041f316141b81cf2860f34b38832bd916038e (patch)
tree01defe89a722dfaa22278520ab45a1248ddb0d1d /games/vavoom
parent335e4e3d2be07672427a70c9741e7065d8364371 (diff)
downloadports-749041f316141b81cf2860f34b38832bd916038e.tar.gz
ports-749041f316141b81cf2860f34b38832bd916038e.zip
Notes
Diffstat (limited to 'games/vavoom')
-rw-r--r--games/vavoom/Makefile1
-rw-r--r--games/vavoom/files/pkg-message.in3
-rw-r--r--games/vavoom/files/vavoom.in30
3 files changed, 25 insertions, 9 deletions
diff --git a/games/vavoom/Makefile b/games/vavoom/Makefile
index 26ef42b61c1a..3b041ce83c7c 100644
--- a/games/vavoom/Makefile
+++ b/games/vavoom/Makefile
@@ -7,6 +7,7 @@
PORTNAME= vavoom
PORTVERSION= 1.25
+PORTREVISION= 1
CATEGORIES= games
MASTER_SITES= SF
diff --git a/games/vavoom/files/pkg-message.in b/games/vavoom/files/pkg-message.in
index 3533cf4b800d..ee397d6ada67 100644
--- a/games/vavoom/files/pkg-message.in
+++ b/games/vavoom/files/pkg-message.in
@@ -20,4 +20,7 @@ need VORBIS (build options).
If you enabled LAUNCHER (build option), run "vlaunch" for a launcher GUI.
+If updating an old installation, or added/changed extras, run the wrapper with
+the "-f" parameter to fix/recreate the symlinks. Then run as normal.
+
==============================================================================
diff --git a/games/vavoom/files/vavoom.in b/games/vavoom/files/vavoom.in
index 9b056eaa01dd..93e5da99758b 100644
--- a/games/vavoom/files/vavoom.in
+++ b/games/vavoom/files/vavoom.in
@@ -3,23 +3,35 @@
# The executable needs to run from its data directory, so we mirror it to
# ~/.vavoom (with symlinks) and run it from there.
+CMD="vavoom"
+WRAPDIR=~/.vavoom
+
+make_symlinks()
+{
+ cd %%DATADIR%%/basev || exit 1
+ find * -type d -exec mkdir -p ${WRAPDIR}/basev/{} \;
+ find * -type f -exec ln -sf %%DATADIR%%/basev/{} ${WRAPDIR}/basev/{} \;
+}
+
if [ "$1" = "-s" ]
then
CMD="vavoom-dedicated"
shift
-else
- CMD="vavoom"
+elif [ "$1" = "-f" -a -d ${WRAPDIR} ]
+then
+ echo "Fixing symlinks in ${WRAPDIR} directory." 1>&2
+ find -L ${WRAPDIR} -type l -delete
+ make_symlinks
+ exit 0
fi
-if [ -d ~/.vavoom ]
+if [ -d ${WRAPDIR} ]
then
- echo "Using existing ~/.vavoom directory."
+ echo "Using existing ${WRAPDIR} directory." 1>&2
else
- echo "Creating ~/.vavoom directory."
- cd %%DATADIR%%/basev || exit 1
- find * -type d -exec mkdir -p ~/.vavoom/basev/{} \;
- find * -type f -exec ln -sf %%DATADIR%%/basev/{} ~/.vavoom/basev/{} \;
+ echo "Creating ${WRAPDIR} directory." 1>&2
+ make_symlinks
fi
-cd ~/.vavoom || exit 1
+cd ${WRAPDIR} || exit 1
exec %%PREFIX%%/libexec/vavoom/${CMD} -iwaddir %%DMDIR%% "$@"