aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 f11f34eb6286..8ddcc1ffe429 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 ..