aboutsummaryrefslogtreecommitdiff
path: root/games/gzdoom
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2016-08-02 18:00:24 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-08-13 07:22:55 +0700
commit56ecb23094e52ff0e1cc4ae2208ea8315f29359a (patch)
tree763e516e5568b04743e3758e41976101527529b6 /games/gzdoom
parent0332bc851aa8d0889343be7d4cf6f2d3cf19b7b6 (diff)
games/gzdoom: Updated for version 2.1.1.
Diffstat (limited to 'games/gzdoom')
-rw-r--r--games/gzdoom/README12
-rw-r--r--games/gzdoom/README.source21
-rw-r--r--games/gzdoom/README_versions.txt28
-rw-r--r--games/gzdoom/gzdoom.SlackBuild49
-rw-r--r--games/gzdoom/gzdoom.desktop2
-rw-r--r--games/gzdoom/gzdoom.info10
-rw-r--r--games/gzdoom/window_title_version.diff29
7 files changed, 111 insertions, 40 deletions
diff --git a/games/gzdoom/README b/games/gzdoom/README
index 9e7b2ff3873ea..97118b21e64fc 100644
--- a/games/gzdoom/README
+++ b/games/gzdoom/README
@@ -5,8 +5,14 @@ Optional compile-time dependency: fluidsynth (autodetected).
See README_SBo.txt for optional runtime dependencies.
-*Note: if you're upgrading from gzdoom-1.5.x, the config file location
-has changed. To keep your old settings:
+This script can be used to build gzdoom 1.8.09, 1.9.1, or 2.1.1. For
+more information, see README_versions.txt.
+
+*Note: if you're upgrading from gzdoom-1.5.x to 1.9.x or 2.0.x, the
+config file location has changed. To keep your old settings:
mkdir -p ~/.config/gzdoom
- cp ~/.gzdoom/zdoom.ini ~/.config/gzdoom
+ cp ~/.gzdoom/zdoom.ini ~/.config/gzdoom/gzdoom.ini
+
+If you're upgrading from gzdoom 1.7 or 1.8:
+ mv ~/.config/gzdoom/zdoom.ini ~/.config/gzdoom/gzdoom.ini
diff --git a/games/gzdoom/README.source b/games/gzdoom/README.source
deleted file mode 100644
index d3f91ba59d12f..0000000000000
--- a/games/gzdoom/README.source
+++ /dev/null
@@ -1,21 +0,0 @@
-A note about the source: upstream doesn't do release tarballs. The source
-is only available via git (older versions used svn). What I had to do
-to get the 1.8.2 source: download the windows binary, run strings on it
-to find the git commit hash, then clone the git repo and check out that
-revision. Then I spent a couple hours trying to patch it so it would
-compile, then said "hell with it" and used the latest git (which compiles
-and runs fine). So my VERSION is a lie, which might cause problems if
-you want to play multiplayer with people using the windows 1.8.2 binary
-release. Blame upstream, not me.
-
-For reference, the windows binary's commit hash is:
-cbdfa61619ee99db541361b8ca174d58848e4
-
-The one in my tarball is: 4a23b97963d8e57d4c62efa41323910df903d
-
-gzdoom's build process requires it to be built from a git checkout.
-It uses the .git stuff to define a GIT_REVISION variable. That's why
-the source tarball contains a .git/ dir. If it doesn't, you end up with
-a gzdoom that announces itself as revision <unknown> (shows up in the
-console and titlebar of the window). Also the revision is used to check
-savegame compatibility, so it's not just cosmetic.
diff --git a/games/gzdoom/README_versions.txt b/games/gzdoom/README_versions.txt
new file mode 100644
index 0000000000000..03aa98c54f96a
--- /dev/null
+++ b/games/gzdoom/README_versions.txt
@@ -0,0 +1,28 @@
+
+This SlackBuild script can be used to build older versions
+of gzdoom. Supported versions:
+
+1.8.09 - last version to use SDL1 (good for older/slower systems).
+1.9.1 - last version to not require OpenGL 3.0 (good for nouveau).
+2.2.1 - latest version of gzdoom (best choice for fast modern systems).
+
+By default, 2.2.1 is built (as per the .info file). If you'd like to
+try one of the others, download the source, save it in the SlackBuild
+directory, and run gzdoom.SlackBuild with VERSION=1.8.09 or VERSION=1.9.1
+set in the environment. If you use sbopkg, you can create a custom .info
+file, and copy the lines below:
+
+For 1.8.09:
+
+VERSION="1.8.09"
+DOWNLOAD="https://github.com/coelckers/gzdoom/archive/1.8.09.tar.gz"
+MD5SUM="ddc1dd8aef254312031184be6dec21e6"
+
+Note that SDL2 is not required for 1.8.09 (you can remove it from REQUIRES
+in the .info file, if you like).
+
+For 1.9.1:
+
+VERSION="1.9.1"
+DOWNLOAD="https://github.com/coelckers/gzdoom/archive/g1.9.1.tar.gz"
+MD5SUM="0fb38fcf73084f9a798f9d3af643d02e"
diff --git a/games/gzdoom/gzdoom.SlackBuild b/games/gzdoom/gzdoom.SlackBuild
index d5738b3063a9c..79d9e04465b81 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:
diff --git a/games/gzdoom/gzdoom.desktop b/games/gzdoom/gzdoom.desktop
index 08629b8d457c7..a822cf1da0af5 100644
--- a/games/gzdoom/gzdoom.desktop
+++ b/games/gzdoom/gzdoom.desktop
@@ -3,6 +3,6 @@ Type=Application
Name=GZDoom
GenericName=OpenGL Enhanced Doom Engine
Icon=gzdoom
-Exec=gzdoom %F
+Exec=/usr/games/gzdoom %F
Terminal=false
Categories=Game;ActionGame;
diff --git a/games/gzdoom/gzdoom.info b/games/gzdoom/gzdoom.info
index cfbf92b710efb..16c19e00c6b3f 100644
--- a/games/gzdoom/gzdoom.info
+++ b/games/gzdoom/gzdoom.info
@@ -1,10 +1,10 @@
PRGNAM="gzdoom"
-VERSION="1.8.2"
-HOMEPAGE="http://www.osnanet.de/c.oelckers/gzdoom/"
-DOWNLOAD="http://urchlay.naptime.net/~urchlay/src/gzdoom-1.8.2.tar.gz"
-MD5SUM="ec19f5b8b0106c0ead3240c0693c4807"
+VERSION="2.1.1"
+HOMEPAGE="http://gzdoom.drdteam.org/"
+DOWNLOAD="https://github.com/coelckers/gzdoom/archive/g2.1.1.tar.gz"
+MD5SUM="f01edcdf598a94c66a9bc14e52d76fff"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="fmodapi"
+REQUIRES="SDL2 fmodapi"
MAINTAINER="B. Watson"
EMAIL="yalhcru@gmail.com"
diff --git a/games/gzdoom/window_title_version.diff b/games/gzdoom/window_title_version.diff
new file mode 100644
index 0000000000000..749b655465db2
--- /dev/null
+++ b/games/gzdoom/window_title_version.diff
@@ -0,0 +1,29 @@
+diff -Naur gzdoom-g2.1.1.orig/src/gitinfo.cpp gzdoom-g2.1.1/src/gitinfo.cpp
+--- gzdoom-g2.1.1.orig/src/gitinfo.cpp 2016-02-23 04:20:43.000000000 -0500
++++ gzdoom-g2.1.1/src/gitinfo.cpp 2016-08-03 15:18:12.164389643 -0400
+@@ -44,22 +44,15 @@
+
+ const char *GetGitHash()
+ {
+- return GIT_HASH;
++ return "release";
+ }
+
+ const char *GetGitTime()
+ {
+- return GIT_TIME;
++ return __DATE__;
+ }
+
+ const char *GetVersionString()
+ {
+- if (GetGitDescription()[0] == '\0')
+- {
+- return VERSIONSTR;
+- }
+- else
+- {
+- return GIT_DESCRIPTION;
+- }
++ return VERSIONSTR;
+ }