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, 11 insertions, 19 deletions
diff --git a/games/widelands/widelands.SlackBuild b/games/widelands/widelands.SlackBuild
index 86e553bc86c5a..a9da6173f4b00 100644
--- a/games/widelands/widelands.SlackBuild
+++ b/games/widelands/widelands.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for widelands
-# Copyright 2008-2012 Heinz Wiesinger, Amsterdam, The Netherlands
+# Copyright 2008-2017 Heinz Wiesinger, Amsterdam, The Netherlands
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,13 +23,13 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=widelands
-VERSION=build17
+VERSION=build19
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -40,8 +40,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -72,17 +72,6 @@ find -L . \
# Fix compiling with gcc 4.7
patch -p0 -i $CWD/widelands-gcc47.patch
-# 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
cmake \
@@ -92,21 +81,24 @@ cd build1
-DCMAKE_BUILD_TYPE=Release \
-DWL_INSTALL_PREFIX=/usr \
-DWL_INSTALL_DATADIR=/usr/share/widelands \
- -DWL_INSTALL_BINDIR=/usr/bin \
..
make
make install DESTDIR=$PKG
cd ..
+mkdir -p $PKG/usr/bin
+mv $PKG/usr/{widelands,wl_map_object_info,wl_render_richtext,wl_map_info} $PKG/usr/bin
+
mkdir -p $PKG/usr/share/applications
install -m 0644 $CWD/widelands.desktop \
$PKG/usr/share/applications/widelands.desktop
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a ChangeLog COPYING CREDITS WL_RELEASE $PKG/usr/doc/$PRGNAM-$VERSION/
+mv $PKG/usr/{VERSION,ChangeLog,CREDITS,COPYING} $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a WL_RELEASE $PKG/usr/doc/$PRGNAM-$VERSION/
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install