diff options
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 |
commit | 86ec40d6d3f58187bf9cf4330a0a0dcefb22001d (patch) | |
tree | 782e79b90008bfa01333e0bf2c5eb0b5a24ea6ad /games/commandergenius | |
parent | 775b3c7c6c3a15665b0c0df5d09d9889f742c3c8 (diff) |
games/commandergenius: Updated for version 2.2.2.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'games/commandergenius')
-rw-r--r-- | games/commandergenius/README | 8 | ||||
-rwxr-xr-x[-rw-r--r--] | games/commandergenius/commandergenius.SlackBuild | 56 | ||||
-rw-r--r-- | games/commandergenius/commandergenius.info | 12 |
3 files changed, 24 insertions, 52 deletions
diff --git a/games/commandergenius/README b/games/commandergenius/README index e25add7e710e..681095b08257 100644 --- a/games/commandergenius/README +++ b/games/commandergenius/README @@ -41,7 +41,7 @@ if the games are installed to ~/.CommanderGenius/games/keen2 and If you *don't* want the HQP to be used, use different directory names for the above (e.g. ckeen2 and ckeen3). -commandergenius can be built with either SDL 1.2 or SDL 2.0. By default, -SDL2 is used if SDL2 and SDL2_image are both found, otherwise SDL1 is -used. To build with SDL1 even if SDL2 and SDL2_image are installed, set -'SDL2=no' in the script's environment. +Note: When upgrading to version 2.2.2, you may have to delete your old +config. The SlackBuild author had to do this to get audio to work: + +$ rm -rf ~/.CommanderGenius/ diff --git a/games/commandergenius/commandergenius.SlackBuild b/games/commandergenius/commandergenius.SlackBuild index 796719cef036..d4c54cc7163e 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" \ diff --git a/games/commandergenius/commandergenius.info b/games/commandergenius/commandergenius.info index 8b9ae2ef1143..eae81db98a26 100644 --- a/games/commandergenius/commandergenius.info +++ b/games/commandergenius/commandergenius.info @@ -1,12 +1,10 @@ PRGNAM="commandergenius" -VERSION="2.0.0.0" -HOMEPAGE="https://github.com/gerstrong/Commander-Genius" -DOWNLOAD="https://sourceforge.net/projects/slackbuildsdirectlinks/files/commandergenius/Commander-Genius-200Release.tar.gz \ - https://sourceforge.net/projects/slackbuildsdirectlinks/files/commandergenius/GsKit-f925d1362f0bc99598141a97d5a200d5e6a41391.tar.gz" -MD5SUM="634cb2b0ccd4dd8750825dae18730c36 \ - a18b787298f1615f171f613397ee8d9b" +VERSION="2.2.2" +HOMEPAGE="https://gitlab.com/Dringgstein/Commander-Genius" +DOWNLOAD="https://gitlab.com/Dringgstein/Commander-Genius/-/archive/v2.2.2/Commander-Genius-v2.2.2.tar.bz2" +MD5SUM="976c721a943e26f94db63f813bba936a" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="" +REQUIRES="SDL2 python3" MAINTAINER="B. Watson" EMAIL="yalhcru@gmail.com" |