summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games/odamex/odamex.SlackBuild15
1 files changed, 14 insertions, 1 deletions
diff --git a/games/odamex/odamex.SlackBuild b/games/odamex/odamex.SlackBuild
index 0b92db5f84..bc27ff3d42 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.
+# 20140910 bkw:
+# - explicitly use the correct config script for wx, instead of relying
+# on /usr/bin/wx-config
+
# 20140827 bkw:
# - update for 0.7.0
# - require wxGTK3 (which is wx 3.x) instead of wxPython (wx 2.x)
@@ -16,7 +20,7 @@
PRGNAM=odamex
VERSION=${VERSION:-0.7.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -48,6 +52,14 @@ fi
set -e
+# We can't trust the /usr/bin/wx-config symlink.
+# Find the correct wx-config, if it exists. User can override by setting WXVER
+# in the env, or by setting WXCONFIG to the full path.
+WXVER=${WXVER:-3.0}
+WXMAYBE="$( ls /usr/lib$LIBDIRSUFFIX/wx/config/*-$WXVER 2>/dev/null | head -1 )"
+WXCONFIG=${WXCONFIG:-$WXMAYBE}
+WXCONFIG=${WXCONFIG:-/usr/bin/wx-config}
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
@@ -74,6 +86,7 @@ cd build
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
+ -DwxWidgets_CONFIG_EXECUTABLE=$WXCONFIG \
-DCMAKE_BUILD_TYPE=Release ..
make VERBOSE=1
cd ..