summaryrefslogtreecommitdiffstats
path: root/games/odamex/odamex.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/odamex/odamex.SlackBuild')
-rw-r--r--games/odamex/odamex.SlackBuild37
1 files changed, 30 insertions, 7 deletions
diff --git a/games/odamex/odamex.SlackBuild b/games/odamex/odamex.SlackBuild
index f11f34eb62..9a52a368f5 100644
--- a/games/odamex/odamex.SlackBuild
+++ b/games/odamex/odamex.SlackBuild
@@ -2,10 +2,23 @@
# Slackware build script for odamex
-# Written by B. Watson (yalhcru@gmail.com)
+# Written by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20231120 bkw: update for v10.4.0.
+# 20230707 bkw: FTBFS, when agar is installed. our agar is 1.7.0,
+# apparently too new for odamex-10.3.0. agar was added to SBo
+# in May 2023; until then, odamex didn't have ag-odalaunch and
+# it wasn't a problem. so just disable agar completely.
+# 20230110 bkw: update for v10.3.0. SDL2 builds are still broken,
+# game segfaults after picking an IWAD. SDL 1.2 builds are OK.
+# 20220319 bkw: fix build on 32-bit.
+# 20220208 bkw: BUILD=3, add the missing .diff...
+# 20211231 bkw: BUILD=2.
+# - the SDL2 segfault will likely be fixed soon (reported to PV, along
+# with a patch). add SDL2 environment variable, default to no.
+
# 20211028 bkw: update for v0.9.5.
# - had to switch to SDL 1 to avoid SDL2_Mixer-related segfaults.
# unfortunately I can't get the music to work with SDL 1...
@@ -27,7 +40,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=odamex
-VERSION=${VERSION:-0.9.5}
+VERSION=${VERSION:-10.4.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -40,9 +53,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -80,7 +90,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-src-$VERSION
-tar xvf $CWD/$PRGNAM-src-$VERSION.tar.bz2
+tar xvf $CWD/$PRGNAM-src-$VERSION.tar.xz
cd $PRGNAM-src-$VERSION
chown -R root:root .
@@ -89,6 +99,14 @@ chown -R root:root .
find . -type f -exec chmod 644 {} \+
find . -type d -exec chmod 755 {} \+
+SDL12ARG=ON
+[ "${SDL2:-no}" = "yes" ] && SDL12ARG=OFF
+
+# 20220101 bkw: do not use systemwide install of portmidi, if it exists.
+# This is to avoid a hidden portmidi dependency breaking the odamex
+# binary when portmidi gets removed or upgraded.
+patch -p1 < $CWD/use_bundled_portmidi.diff
+
# Make the launcher look in /usr/games for the odamex binary rather
# than the current directory. User can override with the settings
# dialog, this just sets the default.
@@ -96,6 +114,10 @@ sed -i 's,OdaGetInstallDir(),"/usr/games",g' \
odalaunch/src/dlg_main.cpp \
odalaunch/src/dlg_config.cpp
+# 20220319 bkw: cmake brokenness, fix manually.
+sed -i '/-march=pentium-m/d' client/CMakeLists.txt
+SLKCFLAGS+=" -msse -msse2"
+
rm -rf build
mkdir -p build
cd build
@@ -105,7 +127,8 @@ cd build
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_BINDIR=games \
-DwxWidgets_CONFIG_EXECUTABLE=$WXCONFIG \
- -DUSE_SDL12=ON \
+ -DUSE_SDL12=$SDL12ARG \
+ -DNO_AG-ODALAUNCH_TARGET=ON \
-DCMAKE_BUILD_TYPE=Release ..
make VERBOSE=1
cd ..