summaryrefslogtreecommitdiffstats
path: root/games/commandergenius/commandergenius.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/commandergenius/commandergenius.SlackBuild')
-rw-r--r--games/commandergenius/commandergenius.SlackBuild17
1 files changed, 13 insertions, 4 deletions
diff --git a/games/commandergenius/commandergenius.SlackBuild b/games/commandergenius/commandergenius.SlackBuild
index c05627ef76..0323dab4fa 100644
--- a/games/commandergenius/commandergenius.SlackBuild
+++ b/games/commandergenius/commandergenius.SlackBuild
@@ -6,10 +6,16 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
-# 20170122 bkw: updated for 1.9.8.1beta
+# 20170301 bkw:
+# - updated for 1.9.8.7beta
+# - fix the build for the case where SDL2 is installed but SDL2_image is not.
+# - update man page (level= option, correct author's full name)
+# - use github long-form URL
+
+# 20170122 bkw: updated for 1.9.8.1beta.
PRGNAM=commandergenius
-VERSION=${VERSION:-1.9.8.1beta}
+VERSION=${VERSION:-1.9.8.7beta}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -59,7 +65,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $SRCNAM-$SRCVER
-tar xvf $CWD/$SRCNAM-$SRCVER.tar.gz || tar xvf $CWD/v$SRCVER.tar.gz
+tar xvf $CWD/$SRCNAM-$SRCVER.tar.gz
cd $SRCNAM-$SRCVER
chown -R root:root .
@@ -70,10 +76,13 @@ find -L . -type d -a -exec chmod 755 '{}' '+'
# placate desktop-file-validate
sed -i 's,Application;,,' share/$DESKTOP
+# Apply upstream fix for building with SDL-1.2
+patch -p1 < $CWD/a67003b_sdl_12_compatibility.diff
+
# SDL 2 is optional. I prefer it, others may not.
SDLOPT="-DUSE_SDL2=no"
SDLVER=1
-if sdl2-config --version 2>/dev/null && [ "${SDL2:-yes}" != "no" ]; then
+if pkg-config --exists sdl2 SDL2_image && [ "${SDL2:-yes}" != "no" ]; then
SDLOPT="-DUSE_SDL2=yes"
SDLVER=2
fi