aboutsummaryrefslogtreecommitdiffstats
path: root/games/vavoom
diff options
context:
space:
mode:
authoralepulver <alepulver@FreeBSD.org>2007-12-13 21:56:59 +0800
committeralepulver <alepulver@FreeBSD.org>2007-12-13 21:56:59 +0800
commit41b9cbc1a131d551ae01d167cacda006a3c0fe56 (patch)
tree4e20a28881bfe0321be548644af13cf34ad8018f /games/vavoom
parent9c40539d958dcc15484de9832490de8930fd6257 (diff)
downloadfreebsd-ports-gnome-41b9cbc1a131d551ae01d167cacda006a3c0fe56.tar.gz
freebsd-ports-gnome-41b9cbc1a131d551ae01d167cacda006a3c0fe56.tar.zst
freebsd-ports-gnome-41b9cbc1a131d551ae01d167cacda006a3c0fe56.zip
- Add "-f" option to wrapper to fix/recreate symlinks after an update.
- Add information about this in pkg-message. - Bump PORTREVISION.
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%% "$@"