summaryrefslogtreecommitdiff
path: root/source/d/swig/swig.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/d/swig/swig.SlackBuild')
-rwxr-xr-xsource/d/swig/swig.SlackBuild20
1 files changed, 16 insertions, 4 deletions
diff --git a/source/d/swig/swig.SlackBuild b/source/d/swig/swig.SlackBuild
index 44f3d53f..aa4ea374 100755
--- a/source/d/swig/swig.SlackBuild
+++ b/source/d/swig/swig.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/sh
# Copyright 2009 Robby Workman, Northport, Alabama, USA
-# Copyright 2009 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,9 +21,19 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERSION=1.3.38
-ARCH=${ARCH:-x86_64}
-BUILD=${BUILD:-1}
+PKGNAM=swig
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-2}
+
+# 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}
@@ -35,6 +45,8 @@ elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
fi
NUMJOBS=${NUMJOBS:--j6}