diff options
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/lxml/lxml.SlackBuild | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/libraries/lxml/lxml.SlackBuild b/libraries/lxml/lxml.SlackBuild index 8e5eedd62a..d92042034d 100644 --- a/libraries/lxml/lxml.SlackBuild +++ b/libraries/lxml/lxml.SlackBuild @@ -4,10 +4,19 @@ PRGNAM=lxml VERSION=${VERSION:-2.2.6} -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 @@ -19,6 +28,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 @@ -36,7 +47,6 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -CFLAGS="$SLKCFLAGS" \ python setup.py install --root=$PKG find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ |