From 376ce3db3fd7c6e65981ee59e64b5ee1af6ce5bd Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 19 Apr 2010 23:19:16 -0500 Subject: games/micropolis: Updated for version 20100418. --- games/micropolis/micropolis.SlackBuild | 42 ++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 20 deletions(-) (limited to 'games/micropolis/micropolis.SlackBuild') diff --git a/games/micropolis/micropolis.SlackBuild b/games/micropolis/micropolis.SlackBuild index 0328097cf4..97859f7443 100644 --- a/games/micropolis/micropolis.SlackBuild +++ b/games/micropolis/micropolis.SlackBuild @@ -2,6 +2,9 @@ # Slackware build script for Micropolis +# Now maintained by B. Watson , please don't bother +# Chess with questions about this build (bother me instead) + # Copyright 2008-2009 Chess Griffin # All rights reserved. # @@ -23,9 +26,9 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=micropolis -VERSION=20080222 +VERSION=20100418 ARCH=${ARCH:-i486} -BUILD=${BUILD:-2} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} CWD=$(pwd) @@ -44,14 +47,17 @@ elif [ "$ARCH" = "i686" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi -set -e # Exit on most errors +set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION +rm -rf $PRGNAM tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 cd $PRGNAM chown -R root:root . @@ -61,27 +67,23 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +# Force our CFLAGS +find . -iname \*makefile\* -o -iname \*.mk \ + | xargs sed -i -e '/FLAG/s/-O[^ ]*/$(SLKCFLAGS) /' + # comment out the next line to disable the airplane crash disaster sed -i -e 's/-DNO_AIRCRASH//' src/sim/makefile -# I don't see an easy way to use custom CFLAGS without extensive patching, -# so we won't. If someone wants to spend some time on a patch for this to -# send upstream, feel free. It shouldn't be too difficult, but I've got -# too many other priorities right now. --rworkman -make PREFIX=/usr DOCDIR=/usr/doc/$PRGNAM-$VERSION +make PREFIX=/usr DOCDIR=/usr/doc/$PRGNAM-$VERSION SLKCFLAGS="$SLKCFLAGS" make install PREFIX=/usr DOCDIR=/usr/doc/$PRGNAM-$VERSION DESTDIR=$PKG -( cd $PKG - find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ - xargs strip --strip-unneeded 2> /dev/null || true - find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ - xargs strip --strip-unneeded 2> /dev/null -) - -( 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 -) +# Make .desktop file pass desktop-file-validate +sed -i -e \ + '/^Encoding/d' -e 's/\.png$//' \ + $PKG/usr/share/applications/$PRGNAM.desktop + +find $PKG | xargs 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 $DOCS $PKG/usr/doc/$PRGNAM-$VERSION -- cgit v1.2.3