aboutsummaryrefslogtreecommitdiff
path: root/games/wesnoth/wesnoth.SlackBuild
diff options
context:
space:
mode:
authorChess Griffin <chess@chessgriffin.com>2010-05-22 10:34:59 -0400
committerChess Griffin <chess@chessgriffin.com>2010-05-23 23:13:06 -0500
commit4716923d35be4ea65be3b3e0654f6f1c050b11a7 (patch)
tree5ec8fbc187e9e309da28e6142c3c54da4aa02c7c /games/wesnoth/wesnoth.SlackBuild
parent37d6a2681251a9bdd94a9508df3493a12c16cfcd (diff)
games/wesnoth: Patched to build with libpng on 13.1
Also miscellaneous SlackBuild script cleanups
Diffstat (limited to 'games/wesnoth/wesnoth.SlackBuild')
-rw-r--r--games/wesnoth/wesnoth.SlackBuild22
1 files changed, 17 insertions, 5 deletions
diff --git a/games/wesnoth/wesnoth.SlackBuild b/games/wesnoth/wesnoth.SlackBuild
index 1649e33b85694..ed88088c72050 100644
--- a/games/wesnoth/wesnoth.SlackBuild
+++ b/games/wesnoth/wesnoth.SlackBuild
@@ -26,10 +26,19 @@
PRGNAM=wesnoth
VERSION=${VERSION:-1.8}
-ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -46,6 +55,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
if [ "$SERVER" = "yes" ]; then
@@ -68,6 +80,7 @@ rm -rf $TMP/$PRGNAM-$VERSION
cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
+patch -p1 < $CWD/wesnoth-libpng-1.4.0.patch
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -103,10 +116,9 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install-strip DESTDIR=$PKG
-( cd $PKG/usr/man
- find . -type f -exec gzip -9 {} \;
- for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
-)
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz
+ $i.gz ; rm $i ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a ABOUT-NLS COPYING INSTALL README changelog copyright \