aboutsummaryrefslogtreecommitdiff
path: root/games/gzdoom-legacy
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2017-06-11 08:06:47 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-06-11 08:06:47 +0700
commita60b83ab535000233419b09e70ad6cdb7a50c61d (patch)
treed017837695d622e9c6c66951d16d56ecbd4df599 /games/gzdoom-legacy
parent5c39c64ff575807371fc703be8cf6d05cbe60ec1 (diff)
games/gzdoom-legacy: Added (OpenGL port of DOOM).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/gzdoom-legacy')
-rw-r--r--games/gzdoom-legacy/README24
-rw-r--r--games/gzdoom-legacy/README_SBo.txt55
-rw-r--r--games/gzdoom-legacy/README_versions.txt28
-rw-r--r--games/gzdoom-legacy/doinst.sh10
-rw-r--r--games/gzdoom-legacy/gzdoom-legacy.SlackBuild147
-rw-r--r--games/gzdoom-legacy/gzdoom-legacy.info10
-rw-r--r--games/gzdoom-legacy/gzdoom.desktop8
-rw-r--r--games/gzdoom-legacy/gzdoom.pngbin0 -> 1618 bytes
-rw-r--r--games/gzdoom-legacy/slack-desc19
-rw-r--r--games/gzdoom-legacy/window_title_version.diff29
10 files changed, 330 insertions, 0 deletions
diff --git a/games/gzdoom-legacy/README b/games/gzdoom-legacy/README
new file mode 100644
index 0000000000000..e242f3eb6f478
--- /dev/null
+++ b/games/gzdoom-legacy/README
@@ -0,0 +1,24 @@
+Enhanced OpenGL port of the official DOOM source code that also supports
+Heretic, Hexen, and Strife.
+
+This is "gzdoom-legacy", which supports older versions of gzdoom that
+run smoothly on older/slower hardware. If you're looking for the latest
+version, you want the regular "gzdoom" build. Note that gzdoom-legacy
+and gzdoom conflict: only install one or the other.
+
+Optional compile-time dependencies: fluidsynth and OpenAL. These are
+auto-detected.
+
+See README_SBo.txt for optional runtime dependencies.
+
+This script can be used to build gzdoom 1.8.09, 1.9.1, or 2.3.2. For
+more information, see README_versions.txt.
+
+*Note: if you're upgrading from gzdoom-1.5.x to 1.9.x or 2.x, the
+config file location has changed. To keep your old settings:
+
+ mkdir -p ~/.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-legacy/README_SBo.txt b/games/gzdoom-legacy/README_SBo.txt
new file mode 100644
index 0000000000000..66d71b6d5e470
--- /dev/null
+++ b/games/gzdoom-legacy/README_SBo.txt
@@ -0,0 +1,55 @@
+Game Data
+---------
+gzdoom is only a game engine. To actually play the game, you'll need the
+game data (IWAD file) from one or more of the supported games. These
+include Doom, Ultimate Doom, Final Doom, FreeDoom, Heretic, Hexen,
+and Strife. Place the .wad file(s) in /usr/share/games/doom.
+
+If you don't own any of the supported games, you can install one or more
+of these slackbuilds.org packages to get a playable game:
+
+- freedoom
+- doom_shareware_data
+- heretic_shareware_data
+- hexen_demo_data
+- chexquest3
+
+Sound Backend
+-------------
+The default sound backend is FMOD. If OpenAL was found when the package
+was built, it can be used instead of FMOD. From the main menu:
+
+Options -> Sound Options -> Sound Backend.
+
+If you have issues with positional audio, try switching to OpenAL. However,
+some mods (notably Brutal Doom) require FMOD for correct audio support.
+Unfortunately there are probably some other mods that only work with
+OpenAL :(
+
+If you use FMOD, set "FMOD Options -> Output System" to either "ALSA"
+or "PulseAudio". Otherwise, the default is OSS emulation, which doesn't
+share the soundcard nicely with other apps.
+
+Music Support
+-------------
+To hear the in-game music, there are several options. In the game menu,
+select "Options | Sound Options" and set "MIDI Device" to one of the
+below:
+
+1. FMOD (the default) - Install ff8dls and set the console variable
+snd_midipatchset to "/usr/share/sounds/dls/ff8.dls" (from the in-game
+console or by editing ~/.config/gzdoom/zdoom.ini). Alternatively,
+if you dual-boot with Windows, use something like
+/dosC/windows/system32/drivers/gm.dls (replace dosC with the mountpoint
+of your C: drive in Windows).
+
+2. FluidSynth - Install fluidsynth (before building gzdoom) and
+fluid-soundfont.
+
+3. Timidity - Install TiMidity++ and either eawpats or freepats, and
+set up /etc/timidity/timidity.cfg to use it.
+
+4. GUS or OPL - Nothing extra required; these are software emulations
+of classic soundcards from the early 1990s. They may sound "clunky" to
+modern ears, but they may also bring back fond memories for long-time
+Doom players.
diff --git a/games/gzdoom-legacy/README_versions.txt b/games/gzdoom-legacy/README_versions.txt
new file mode 100644
index 0000000000000..56be5eae3d2e6
--- /dev/null
+++ b/games/gzdoom-legacy/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.4.0 - latest version of gzdoom 2.x.
+
+By default, 2.4.0 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="http://urchlay.naptime.net/~urchlay/src/g1.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-legacy/doinst.sh b/games/gzdoom-legacy/doinst.sh
new file mode 100644
index 0000000000000..4a25de5e6fbd1
--- /dev/null
+++ b/games/gzdoom-legacy/doinst.sh
@@ -0,0 +1,10 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
+
diff --git a/games/gzdoom-legacy/gzdoom-legacy.SlackBuild b/games/gzdoom-legacy/gzdoom-legacy.SlackBuild
new file mode 100644
index 0000000000000..295f2dcc18ca4
--- /dev/null
+++ b/games/gzdoom-legacy/gzdoom-legacy.SlackBuild
@@ -0,0 +1,147 @@
+#!/bin/sh
+
+# Slackware build script for gzdoom
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# 20170610 bkw:
+# - Renamed to gzdoom-legacy. Too much effort to keep testing old
+# gzdoom versions every time there's a new release, so the regular
+# gzdoom build will only support the newest version. If you're
+# wondering why I keep supporting old versions, it's because I have
+# old hardware. Doom is from the 1990s, it shouldn't need a $5000
+# gaming rig to play properly in 2017.
+
+# 20170324 bkw:
+# - Updated for 2.4.0.
+
+# 20170207 bkw:
+# - BUILD=2
+# - Get rid of private fmodapi, now that the SBo fmodapi has been updated
+# to a new enough version. Re-add fmodapi to REQUIRES.
+# - Fix download link so we always get the correct filename.
+
+# 20170113 bkw:
+# - Updated for 2.3.2. 1.9.1 and 1.8.09 still work, too.
+# - Use newer version of fmodapi. Due to licensing confusion, the
+# fmodapi version on SBo hasn't been upgraded in forever. So this
+# build now uses its own dedicated fmodapi, which installs to
+# a private directory (won't conflict with system fmodapi, if present).
+
+PRGNAM=gzdoom-legacy
+SRCNAM=gzdoom
+VERSION=${VERSION:-2.4.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $SRCNAM-g$VERSION $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-g$VERSION.tar.gz || \
+ tar xvf $CWD/g$VERSION.tar.gz || \
+ tar xvf $CWD/$SRCNAM-$VERSION.tar.gz || \
+ tar xvf $CWD/$VERSION.tar.gz
+cd $SRCNAM-g$VERSION || cd $SRCNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \+ -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \+
+
+# fmodapi support tries to find its lib in the current dir, fix it:
+sed -i \
+ "s,setPluginPath(progdir),setPluginPath(\"/usr/lib$LIBDIRSUFFIX/$SRCNAM\")," \
+ 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
+
+# This isn't currently used, but was in the past, and will be again I'm sure.
+[ -e $CWD/compilefix.$VERSION.diff ] && \
+ patch -p1 < $CWD/compilefix.$VERSION.diff
+
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS -DSHARE_DIR=\\\"/usr/share/games/doom\\\"" \
+ -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS -DSHARE_DIR=\\\"/usr/share/games/doom\\\"" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DMAN_INSTALL_DIR=/usr/man \
+ -DFMOD_LIBRARY=/usr/lib${LIBDIRSUFFIX}/libfmodex${LIBDIRSUFFIX}.so \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make VERBOSE=1
+ mkdir -p $PKG/usr/games $PKG/usr/share/games/doom
+ install -m0755 -s $SRCNAM $PKG/usr/games/$SRCNAM
+ install -m0644 *.pk3 $PKG/usr/share/games/doom/
+
+ # If fmodapi support was compiled in:
+ if [ -e liboutput_sdl.so ]; then
+ mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/$SRCNAM
+ install -m0755 -s liboutput_sdl.so $PKG/usr/lib$LIBDIRSUFFIX/$SRCNAM/liboutput_sdl.so
+ fi
+cd ..
+
+# .desktop written for this SlackBuild
+mkdir -p $PKG/usr/share/applications
+cat $CWD/$SRCNAM.desktop > $PKG/usr/share/applications/$SRCNAM.desktop
+
+# PNG converted from Windows icon
+mkdir -p $PKG/usr/share/pixmaps
+cat $CWD/$SRCNAM.png > $PKG/usr/share/pixmaps/$SRCNAM.png
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a docs/* $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+cat $CWD/README_SBo.txt > $PKG/usr/doc/$PRGNAM-$VERSION/README_SBo.txt
+
+# Fix DOS CRLF line endings. The stuff in licenses/ is already OK, for 2.3.2.
+sed -i 's/\r//' $PKG/usr/doc/$PRGNAM-$VERSION/*.*
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/games/gzdoom-legacy/gzdoom-legacy.info b/games/gzdoom-legacy/gzdoom-legacy.info
new file mode 100644
index 0000000000000..4fdd6f12cee44
--- /dev/null
+++ b/games/gzdoom-legacy/gzdoom-legacy.info
@@ -0,0 +1,10 @@
+PRGNAM="gzdoom-legacy"
+VERSION="2.4.0"
+HOMEPAGE="http://gzdoom.drdteam.org/"
+DOWNLOAD="https://github.com/coelckers/gzdoom/archive/g2.4.0/gzdoom-g2.4.0.tar.gz"
+MD5SUM="2337388b44cd206ddbb3a2c44c78d3cc"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="SDL2 fmodapi"
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"
diff --git a/games/gzdoom-legacy/gzdoom.desktop b/games/gzdoom-legacy/gzdoom.desktop
new file mode 100644
index 0000000000000..a822cf1da0af5
--- /dev/null
+++ b/games/gzdoom-legacy/gzdoom.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Type=Application
+Name=GZDoom
+GenericName=OpenGL Enhanced Doom Engine
+Icon=gzdoom
+Exec=/usr/games/gzdoom %F
+Terminal=false
+Categories=Game;ActionGame;
diff --git a/games/gzdoom-legacy/gzdoom.png b/games/gzdoom-legacy/gzdoom.png
new file mode 100644
index 0000000000000..013cf60890680
--- /dev/null
+++ b/games/gzdoom-legacy/gzdoom.png
Binary files differ
diff --git a/games/gzdoom-legacy/slack-desc b/games/gzdoom-legacy/slack-desc
new file mode 100644
index 0000000000000..18c19805b0591
--- /dev/null
+++ b/games/gzdoom-legacy/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+gzdoom-legacy: gzdoom-legacy (OpenGL port of DOOM)
+gzdoom-legacy:
+gzdoom-legacy: Enhanced OpenGL port of the official DOOM source code that also
+gzdoom-legacy: supports Heretic, Hexen, and Strife.
+gzdoom-legacy:
+gzdoom-legacy: This is an older version of gzdoom, for use on older/slower systems.
+gzdoom-legacy:
+gzdoom-legacy:
+gzdoom-legacy:
+gzdoom-legacy:
+gzdoom-legacy:
diff --git a/games/gzdoom-legacy/window_title_version.diff b/games/gzdoom-legacy/window_title_version.diff
new file mode 100644
index 0000000000000..749b655465db2
--- /dev/null
+++ b/games/gzdoom-legacy/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;
+ }