summaryrefslogtreecommitdiffstats
path: root/games/gzdoom/gzdoom.SlackBuild
diff options
context:
space:
mode:
author B. Watson <yalhcru@gmail.com>2016-08-02 18:00:24 -0400
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2016-08-13 07:22:55 +0700
commit56ecb23094e52ff0e1cc4ae2208ea8315f29359a (patch)
tree763e516e5568b04743e3758e41976101527529b6 /games/gzdoom/gzdoom.SlackBuild
parent0332bc851aa8d0889343be7d4cf6f2d3cf19b7b6 (diff)
downloadslackbuilds-56ecb23094e52ff0e1cc4ae2208ea8315f29359a.tar.gz
slackbuilds-56ecb23094e52ff0e1cc4ae2208ea8315f29359a.tar.xz
games/gzdoom: Updated for version 2.1.1.
Diffstat (limited to 'games/gzdoom/gzdoom.SlackBuild')
-rw-r--r--games/gzdoom/gzdoom.SlackBuild49
1 files changed, 39 insertions, 10 deletions
diff --git a/games/gzdoom/gzdoom.SlackBuild b/games/gzdoom/gzdoom.SlackBuild
index d5738b3063..79d9e04465 100644
--- a/games/gzdoom/gzdoom.SlackBuild
+++ b/games/gzdoom/gzdoom.SlackBuild
@@ -6,6 +6,18 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20160803 bkw:
+# - Updated for 2.1.1. Also for 1.9.1 and 1.8.09 (see README_versions.txt)
+# - Update .info for new HOMEPAGE
+# - Upstream's now doing releases on github, so README.source is
+# no longer needed.
+# - Install executable in /usr/games, not /usr/bin
+# - Get rid of -j1 on make command (parallel builds work now)
+# - Make the game version show up in the window title, instead
+# of <unknown version>.
+# - Fix VERSIONSTR if it's wrong.
+# - i486 => i586
+
# 20140305 bkw:
# - Moved giant block comments about the source to README.source,
# updated them to reflect upstream's change from svn to git.
@@ -21,13 +33,13 @@
# - Add WTFPL
PRGNAM=gzdoom
-VERSION=${VERSION:-1.8.2}
+VERSION=${VERSION:-2.1.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -38,8 +50,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -57,9 +69,12 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
+rm -rf $PRGNAM-g$VERSION $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-g$VERSION.tar.gz || \
+ tar xvf $CWD/g$VERSION.tar.gz || \
+ tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || \
+ tar xvf $CWD/$VERSION.tar.gz
+cd $PRGNAM-g$VERSION || cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -72,6 +87,20 @@ sed -i \
"s,setPluginPath(progdir),setPluginPath(\"/usr/lib$LIBDIRSUFFIX/$PRGNAM\")," \
src/sound/fmodsound.cpp
+# gzdoom in windowed mode wants to display its git tag and hash as part
+# of the window title. For releases this shows up as "<unknown version> 0",
+# which doesn't hurt anything but is ugly.
+# This makes the window title appear as e.g. "GZDOOM 2.1.1 (Aug 3 2016)". The
+# date is the build date.
+patch -p1 < $CWD/window_title_version.diff
+
+# Sometimes upstream forgets to bump the version number, so the window
+# title will read 1.8.08 for version 1.8.09, eg.
+sed -i "/#define *VERSIONSTR/s,\"[^\"]*\",\"$VERSION\"," src/version.h
+
+[ -e $CWD/compilefix.$VERSION.diff ] && \
+ patch -p1 < $CWD/compilefix.$VERSION.diff
+
mkdir -p build
cd build
cmake \
@@ -81,9 +110,9 @@ cd build
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
-DMAN_INSTALL_DIR=/usr/man \
-DCMAKE_BUILD_TYPE=Release ..
- make -j1
- mkdir -p $PKG/usr/bin $PKG/usr/share/games/doom
- install -m0755 -s $PRGNAM $PKG/usr/bin/$PRGNAM
+ make
+ mkdir -p $PKG/usr/games $PKG/usr/share/games/doom
+ install -m0755 -s $PRGNAM $PKG/usr/games/$PRGNAM
install -m0644 *.pk3 $PKG/usr/share/games/doom/
# If fmodapi support was compiled in: