summaryrefslogtreecommitdiffstats
path: root/source/xap/xfractint/xfractint.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/xap/xfractint/xfractint.SlackBuild')
-rwxr-xr-xsource/xap/xfractint/xfractint.SlackBuild40
1 files changed, 35 insertions, 5 deletions
diff --git a/source/xap/xfractint/xfractint.SlackBuild b/source/xap/xfractint/xfractint.SlackBuild
index 1ae5e6fef..e6b8bb4d3 100755
--- a/source/xap/xfractint/xfractint.SlackBuild
+++ b/source/xap/xfractint/xfractint.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2007, 2008, 2009 Patrick Volkerding, Sebeka, MN, USA
+# Copyright 2007, 2008, 2009, 2012 Patrick Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,16 +22,46 @@
PKGNAM=xfractint
-VERSION=${VERSION:-20.04p09}
-ARCH=${ARCH:-x86_64}
+VERSION=${VERSION:-20.04p11}
BUILD=${BUILD:-1}
-if [ "$ARCH" = "i486" ]; then
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i486 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7lh ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
CWD=$(pwd)
@@ -42,7 +72,7 @@ mkdir -p $TMP $PKG
cd $TMP
rm -rf ${PKGNAM}-${VERSION}
-tar xvf $CWD/xfractint-${VERSION}.tar.bz2 || exit 1
+tar xvf $CWD/xfractint-${VERSION}.tar.xz || exit 1
cd ${PKGNAM}-${VERSION} || exit 1
rm -f unix/calmanfx.o # contains i386 code