From 7b78a1be0cd6e4d5a40a18c5e28330a700e55222 Mon Sep 17 00:00:00 2001 From: David Somero Date: Fri, 4 Jun 2010 01:09:34 -0400 Subject: libraries/perl-Sub-Uplevel: Misc automated cleanups. Signed-off-by: David Somero --- libraries/perl-Sub-Uplevel/perl-Sub-Uplevel.SlackBuild | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/libraries/perl-Sub-Uplevel/perl-Sub-Uplevel.SlackBuild b/libraries/perl-Sub-Uplevel/perl-Sub-Uplevel.SlackBuild index 3ba4f87cc22d..0c15ba932728 100644 --- a/libraries/perl-Sub-Uplevel/perl-Sub-Uplevel.SlackBuild +++ b/libraries/perl-Sub-Uplevel/perl-Sub-Uplevel.SlackBuild @@ -27,14 +27,23 @@ SRCNAM=Sub-Uplevel PRGNAM=perl-Sub-Uplevel VERSION=0.22 -ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -BUILD=${BUILD:-1} +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -CWD=$(pwd) if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" -- cgit v1.2.3