summaryrefslogtreecommitdiffstats
path: root/games/commandergenius/commandergenius.SlackBuild
diff options
context:
space:
mode:
author B. Watson <yalhcru@gmail.com>2018-07-10 17:10:40 -0400
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2018-07-14 06:56:00 +0700
commit86ec40d6d3f58187bf9cf4330a0a0dcefb22001d (patch)
tree782e79b90008bfa01333e0bf2c5eb0b5a24ea6ad /games/commandergenius/commandergenius.SlackBuild
parent775b3c7c6c3a15665b0c0df5d09d9889f742c3c8 (diff)
downloadslackbuilds-86ec40d6d3f58187bf9cf4330a0a0dcefb22001d.tar.gz
slackbuilds-86ec40d6d3f58187bf9cf4330a0a0dcefb22001d.tar.xz
games/commandergenius: Updated for version 2.2.2.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'games/commandergenius/commandergenius.SlackBuild')
-rwxr-xr-x[-rw-r--r--]games/commandergenius/commandergenius.SlackBuild56
1 files changed, 15 insertions, 41 deletions
diff --git a/games/commandergenius/commandergenius.SlackBuild b/games/commandergenius/commandergenius.SlackBuild
index 796719cef0..d4c54cc716 100644..100755
--- a/games/commandergenius/commandergenius.SlackBuild
+++ b/games/commandergenius/commandergenius.SlackBuild
@@ -6,6 +6,14 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20180709 bkw: updated for 2.2.2
+# - upstream moved the project from github to gitlab. one nice side-effect
+# of this is that the GsKit stuff is now included in the release tarball,
+# which simplifies this script quite a bit. the downside of that is that
+# this script can no longer build older versions.
+# - SDL2 and python3 are now required.
+
+# 20180101 bkw: updated for 2.0.0
# 20171222 bkw: updated for 1.9.9.8beta
# 20170826 bkw: updated for 1.9.9.5beta
# 20170725 bkw: updated for 1.9.9.2beta
@@ -17,7 +25,7 @@
# 20170122 bkw: updated for 1.9.8.1beta.
PRGNAM=commandergenius
-VERSION=${VERSION:-2.0.0.0}
+VERSION=${VERSION:-2.2.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -34,9 +42,6 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-# note that upstream has -O3 hardcoded *after* the specified flags,
-# so the -O2 here doesn't actually do anything. The -fPIC and arch/tune
-# stuff still applies though.
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
@@ -59,37 +64,16 @@ SRCNAM="Commander-Genius"
EXENAME="CGeniusExe"
DESKTOP="cgenius.desktop"
-# the real VERSION is from version.h in the source. the tarball names
-# omit the dots.
-
-if echo "$VERSION" | grep -q beta; then
- # This works for the 1.9.x.x betas:
- SRCVER="$( echo $VERSION | sed 's,\.,,g' )"
-else
- # Now upstream's actual version number is 2.0.0.0 but the tarball/dir
- # name only has two zeroes in it:
- SRCVER="200Release"
-fi
-
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $SRCNAM-$SRCVER
-tar xvf $CWD/$SRCNAM-$SRCVER.tar.gz
-cd $SRCNAM-$SRCVER
+rm -rf $SRCNAM-v$VERSION
+# OSX and Windows stuff takes up 31MB in /tmp, no need to extract it.
+tar xvf $CWD/$SRCNAM-v$VERSION.tar.bz2 \
+ --wildcards --exclude='*/dlls' --exclude='*/Build/Xcode'
+cd $SRCNAM-v$VERSION
chown -R root:root .
-# Why doesn't upstream include this in his release tarball? Probably
-# because it's autogenerated & github doesn't automagically include
-# submodules. It's a bit of a PITA to deal with this, appears impossible
-# to find the correct commit of GsKit to use without cloning the
-# Commander-Genius repo (which kinda defeats the purpose of having
-# release tarballs...)
-GSVER=${GSVER:-f925d1362f0bc99598141a97d5a200d5e6a41391}
-tar xvf $CWD/GsKit-$GSVER.tar.gz
-rm -rf GsKit
-mv GsKit-$GSVER GsKit
-
# permissions are blethcherous, please don't revert to template here.
find -L . -type f -a -exec chmod 644 '{}' '+'
find -L . -type d -a -exec chmod 755 '{}' '+'
@@ -97,20 +81,10 @@ find -L . -type d -a -exec chmod 755 '{}' '+'
# placate desktop-file-validate
sed -i 's,Application;,,' share/$DESKTOP
-# SDL 2 is optional. I prefer it, others may not.
-SDLOPT="-DUSE_SDL2=no"
-SDLVER=1
-if pkg-config --exists sdl2 SDL2_image && [ "${SDL2:-yes}" != "no" ]; then
- SDLOPT="-DUSE_SDL2=yes"
- SDLVER=2
-fi
-
-echo "=== Building with $SDLOPT"
-
mkdir -p build
cd build
cmake \
- $SDLOPT \
+ -DUSE_SDL2=yes \
-DGAMES_SHAREDIR:STRING=/usr/share/games \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \