aboutsummaryrefslogtreecommitdiff
path: root/games/widelands/widelands.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/widelands/widelands.SlackBuild')
-rw-r--r--games/widelands/widelands.SlackBuild30
1 files changed, 18 insertions, 12 deletions
diff --git a/games/widelands/widelands.SlackBuild b/games/widelands/widelands.SlackBuild
index 9b8e2b187f7cd..c673c5f469e32 100644
--- a/games/widelands/widelands.SlackBuild
+++ b/games/widelands/widelands.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for widelands
-# Copyright 2008-2010 Heinz Wiesinger, Amsterdam, The Netherlands
+# Copyright 2008-2012 Heinz Wiesinger, Amsterdam, The Netherlands
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,8 +23,8 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=widelands
-VERSION=build15
-BUILD=${BUILD:-2}
+VERSION=build17
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -65,13 +65,19 @@ cd $PRGNAM-$VERSION-src
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-patch -p0 < $CWD/widelands-0.15-gcc45.patch
+# Fix compiling with gcc 4.7
+patch -p0 -i $CWD/widelands-gcc47.patch
-# make locale install dir configurable
-localedir="WLBUILD_INSTALL_LOCALEDIR"
-old="$localedir \"\${CMAKE_INSTALL_PREFIX}/\${WL_INSTALL_DATADIR}/locale\""
-new="$localedir \${WL_INSTALL_LOCALEDIR}"
-sed -i "s|$old|$new|" CMakeLists.txt
+# Don't use static boost libraries
+sed -i "s|Boost_USE_STATIC_LIBS ON|Boost_USE_STATIC_LIBS OFF|" \
+ CMakeLists.txt
+
+# Fix wrong datadir declaration
+old="std::string(INSTALL_PREFIX) + '/' + INSTALL_DATADIR"
+sed -i "s|INSTALL_PREFIX \"/\" INSTALL_DATADIR|INSTALL_DATADIR|" \
+ src/wlapplication.cc
+sed -i "s|$old|std::string(INSTALL_DATADIR)|" \
+ src/wlapplication.cc
mkdir -p build1
cd build1
@@ -79,10 +85,10 @@ cd build1
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
- -DLIB_SUFFIX=${LIBDIRSUFFIX} \
-DCMAKE_BUILD_TYPE=Release \
- -DWL_INSTALL_LOCALEDIR="/usr/share/locale" \
- -DWL_INSTALL_BINDIR="bin" \
+ -DWL_INSTALL_PREFIX=/usr \
+ -DWL_INSTALL_DATADIR=/usr/share/widelands \
+ -DWL_INSTALL_BINDIR=/usr/bin \
..
make
make install DESTDIR=$PKG