diff options
author | Robby Workman <rworkman@slackbuilds.org> | 2010-05-24 00:51:50 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-24 16:10:22 -0500 |
commit | 0f781813c2d40147fd1a111fac6514694bf24ffc (patch) | |
tree | cbb8f4afbc48fcf9c457c2ce4b073d253a7b4942 /games/vbam/vbam.SlackBuild | |
parent | e4d29e0e7ec8e7d3a4afd534f826f18a6b6324bd (diff) |
games/vbam: Patched to build on 13.1
The patch is mine, so if it's wrong, blame me. :-)
Diffstat (limited to 'games/vbam/vbam.SlackBuild')
-rw-r--r-- | games/vbam/vbam.SlackBuild | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/games/vbam/vbam.SlackBuild b/games/vbam/vbam.SlackBuild index fb3fb9d7aa22f..4e671377fd8c0 100644 --- a/games/vbam/vbam.SlackBuild +++ b/games/vbam/vbam.SlackBuild @@ -20,10 +20,19 @@ PRGNAM=vbam VERSION=r856 -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 @@ -38,29 +47,36 @@ elif [ "$ARCH" = "i686" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi +set -e + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT -cd $TMP || exit 1 +cd $TMP rm -rf $PRGNAM-$VERSION -tar -xjvf $CWD/$PRGNAM-$VERSION.tar.bz2 || exit 1 -cd $PRGNAM-$VERSION || exit 1 +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 +cd $PRGNAM-$VERSION chown -R root:root . find . \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ -exec chmod 755 {} \; -o \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +# Fix an invalid conversion from const char to char +patch -p1 < $CWD/vbam-r856-debugger.cpp.diff + cmake . \ -DCMAKE_C_FLAGS="$SLKCFLAGS" \ -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \ -DCMAKE_INSTALL_PREFIX="/usr" \ - -DNO_GTK=1 \ - || exit 1 + -DNO_GTK=1 -make || exit 1 -make install DESTDIR=$PKG || exit 1 +make +make install DESTDIR=$PKG find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true |