aboutsummaryrefslogtreecommitdiff
path: root/misc/ibus/ibus.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'misc/ibus/ibus.SlackBuild')
-rw-r--r--misc/ibus/ibus.SlackBuild14
1 files changed, 13 insertions, 1 deletions
diff --git a/misc/ibus/ibus.SlackBuild b/misc/ibus/ibus.SlackBuild
index dbbbb508b72a3..13cd85c4750a5 100644
--- a/misc/ibus/ibus.SlackBuild
+++ b/misc/ibus/ibus.SlackBuild
@@ -29,10 +29,19 @@
PRGNAM=ibus
VERSION=${VERSION:-1.3.1}
-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
+
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
@@ -42,6 +51,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
CWD=$(pwd)