diff options
Diffstat (limited to 'games/bsnes/bsnes.SlackBuild')
-rw-r--r-- | games/bsnes/bsnes.SlackBuild | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/games/bsnes/bsnes.SlackBuild b/games/bsnes/bsnes.SlackBuild index 4306b15aab..dabf64c9bd 100644 --- a/games/bsnes/bsnes.SlackBuild +++ b/games/bsnes/bsnes.SlackBuild @@ -7,10 +7,19 @@ PRGNAM=bsnes VERSION=${VERSION:-0.058} SRCVER=${VERSION:2} -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 @@ -27,6 +36,8 @@ elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" +else + SLKCFLAGS="-O2" fi set -e |