summaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
author B. Watson2022-01-01 21:24:55 +0100
committer Willy Sudiarto Raharjo2022-01-04 01:55:39 +0100
commit5cc94cee5d5dcdd349b599a0ee9ca1bb7bcf5af9 (patch)
tree1eb7b767ac31ea40e0e5bc5b10f8835e701e32d9 /games
parentc6825afff435317c8c6422c28a3bf3f95a648834 (diff)
downloadslackbuilds-5cc94cee5d5dcdd349b599a0ee9ca1bb7bcf5af9.tar.gz
games/odamex: Add SDL2 option.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games')
-rw-r--r--games/odamex/odamex.SlackBuild19
1 files changed, 14 insertions, 5 deletions
diff --git a/games/odamex/odamex.SlackBuild b/games/odamex/odamex.SlackBuild
index f11f34eb62..8ddcc1ffe4 100644
--- a/games/odamex/odamex.SlackBuild
+++ b/games/odamex/odamex.SlackBuild
@@ -6,6 +6,10 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 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...
@@ -28,7 +32,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=odamex
VERSION=${VERSION:-0.9.5}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -40,9 +44,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
@@ -89,6 +90,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.
@@ -105,7 +114,7 @@ cd build
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_BINDIR=games \
-DwxWidgets_CONFIG_EXECUTABLE=$WXCONFIG \
- -DUSE_SDL12=ON \
+ -DUSE_SDL12=$SDL12ARG \
-DCMAKE_BUILD_TYPE=Release ..
make VERBOSE=1
cd ..