games/wesnoth: Patched to build with libpng on 13.1

Also miscellaneous SlackBuild script cleanups
This commit is contained in:
Chess Griffin 2010-05-22 10:34:59 -04:00
parent 37d6a26812
commit 4716923d35
2 changed files with 31 additions and 5 deletions

View file

@ -0,0 +1,14 @@
diff -Nur wesnoth-1.8.orig/src/tools/exploder_utils.cpp wesnoth-1.8/src/tools/exploder_utils.cpp
--- wesnoth-1.8.orig/src/tools/exploder_utils.cpp 2010-01-01 15:16:49.000000000 +0200
+++ wesnoth-1.8/src/tools/exploder_utils.cpp 2010-04-08 17:38:03.066201123 +0300
@@ -174,8 +174,8 @@
//TODO: review whether providing NULL error handlers is something
//sensible
png_struct* png_ptr = png_create_write_struct
- (PNG_LIBPNG_VER_STRING, reinterpret_cast<png_voidp>(png_voidp_NULL),
- png_error_ptr_NULL, png_error_ptr_NULL);
+ (PNG_LIBPNG_VER_STRING, reinterpret_cast<png_voidp>(NULL),
+ NULL, NULL);
if(!png_ptr)
throw exploder_failure("Unable to initialize the png write structure");

View file

@ -26,10 +26,19 @@
PRGNAM=wesnoth PRGNAM=wesnoth
VERSION=${VERSION:-1.8} VERSION=${VERSION:-1.8}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1} BUILD=${BUILD:-1}
TAG=${TAG:-_SBo} 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) CWD=$(pwd)
TMP=${TMP:-/tmp/SBo} TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM PKG=$TMP/package-$PRGNAM
@ -46,6 +55,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC" SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64" LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi fi
if [ "$SERVER" = "yes" ]; then if [ "$SERVER" = "yes" ]; then
@ -68,6 +80,7 @@ rm -rf $TMP/$PRGNAM-$VERSION
cd $TMP cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION cd $PRGNAM-$VERSION
patch -p1 < $CWD/wesnoth-libpng-1.4.0.patch
chown -R root:root . chown -R root:root .
find . \ find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@ -103,10 +116,9 @@ CXXFLAGS="$SLKCFLAGS" \
make make
make install-strip DESTDIR=$PKG make install-strip DESTDIR=$PKG
( cd $PKG/usr/man find $PKG/usr/man -type f -exec gzip -9 {} \;
find . -type f -exec gzip -9 {} \; for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz
for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done $i.gz ; rm $i ; done
)
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a ABOUT-NLS COPYING INSTALL README changelog copyright \ cp -a ABOUT-NLS COPYING INSTALL README changelog copyright \