summaryrefslogtreecommitdiff
path: root/games/odamex/odamex.SlackBuild
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2014-09-12 01:48:01 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-09-12 01:48:01 +0700
commit538723a8c78022162b9c06a063eee10aa0fd6712 (patch)
tree67790cd43ac5c1c953cc86da82a5271fc6ad1a66 /games/odamex/odamex.SlackBuild
parent22555f0baf770b0e7075e6e3b57bd1fd2e55c8bb (diff)
downloadslackbuilds-538723a8c78022162b9c06a063eee10aa0fd6712.tar.gz
games/odamex: Don't trust wx-config.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/odamex/odamex.SlackBuild')
-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 ..