aboutsummaryrefslogtreecommitdiff
path: root/audio/eawpats
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-01-11 01:02:11 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-01-14 08:50:29 +0700
commit8302ca169bb9180188a031c34a045d552d725fa1 (patch)
tree88dc4e6830b3acd5000928b32c78373bb55ec4d3 /audio/eawpats
parentb58dcbfad1d69f7bc268edbfc735714541e205d6 (diff)
audio/eawpats: Handle .cfg symlinks better.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'audio/eawpats')
-rw-r--r--audio/eawpats/doinst.sh5
-rw-r--r--audio/eawpats/douninst.sh9
-rw-r--r--audio/eawpats/eawpats.SlackBuild9
3 files changed, 22 insertions, 1 deletions
diff --git a/audio/eawpats/doinst.sh b/audio/eawpats/doinst.sh
index 0a9be04c3997a..674945c896caa 100644
--- a/audio/eawpats/doinst.sh
+++ b/audio/eawpats/doinst.sh
@@ -17,3 +17,8 @@ config etc/timidity/eawpats.cfg.new
if [ ! -r etc/timidity/timidity.cfg ]; then
( cd etc/timidity ; ln -sf eawpats.cfg timidity.cfg )
fi
+
+# SDL 1.2's SDL_mixer still uses the obsolete location for timidity.cfg:
+if [ ! -r etc/timidity.cfg ]; then
+ ( cd etc ; ln -sf timidity/eawpats.cfg timidity.cfg )
+fi
diff --git a/audio/eawpats/douninst.sh b/audio/eawpats/douninst.sh
new file mode 100644
index 0000000000000..b5df94f31ca8b
--- /dev/null
+++ b/audio/eawpats/douninst.sh
@@ -0,0 +1,9 @@
+# remove symlinks, if they belong to us.
+
+[ -e etc/timidity.cfg ] && \
+ [ "$( readlink etc/timidity.cfg )" == "timidity/eawpats.cfg" ] && \
+ rm -f etc/timidity.cfg
+
+[ -e etc/timidity/timidity.cfg ] && \
+ [ "$( readlink etc/timidity/timidity.cfg )" == "eawpats.cfg" ] && \
+ rm -f etc/timidity/timidity.cfg
diff --git a/audio/eawpats/eawpats.SlackBuild b/audio/eawpats/eawpats.SlackBuild
index 3fcc8735a0aca..295d67e7b6dce 100644
--- a/audio/eawpats/eawpats.SlackBuild
+++ b/audio/eawpats/eawpats.SlackBuild
@@ -11,6 +11,12 @@
# This is the original author's site, but it's more polite to download
# from the gentoo mirror (see .info file)
+# 20230111 bkw: BUILD=4, symlink eawpats.cfg to /etc/timidity.cfg (the
+# "old" location), since SDL 1.2's SDL_mixer still uses it. Makes the
+# music work in odamex (and probably various other games). Also add
+# a douninst.sh that will remove the symlinks if they still point
+# to eawpats.cfg.
+
# 20191201 bkw: symlink eawpats.cfg to timidity.cfg in doinst.sh,
# if there's no timidity.cfg already. This makes things Just Work(tm).
@@ -29,7 +35,7 @@ PRGNAM=eawpats
VERSION=${VERSION:-12}
SRCVER=${VERSION}_full
ARCH=noarch
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-4}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -77,6 +83,7 @@ mv * $PKG/usr/share/sounds/$PRGNAM
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
+cat $CWD/douninst.sh > $PKG/install/douninst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE