aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Somero <xgizzmo@slackbuilds.org>2010-06-04 01:05:29 -0400
committerDavid Somero <xgizzmo@slackbuilds.org>2010-06-04 01:05:29 -0400
commit39e16db50fc663b7f4774f26a8da8ea8f6e04dc1 (patch)
treef6bdc1b95360c8c7ce25cab4ec5f0847ca08ac6a
parentd562b2449cf254928de35d62c843ccbbe1cfef3a (diff)
graphics/nvidia-cg-toolkit: Misc automated cleanups.
Signed-off-by: David Somero <xgizzmo@slackbuilds.org>
-rw-r--r--graphics/nvidia-cg-toolkit/nvidia-cg-toolkit.SlackBuild14
1 files changed, 13 insertions, 1 deletions
diff --git a/graphics/nvidia-cg-toolkit/nvidia-cg-toolkit.SlackBuild b/graphics/nvidia-cg-toolkit/nvidia-cg-toolkit.SlackBuild
index 9e9c119fae95..7b23d4efde57 100644
--- a/graphics/nvidia-cg-toolkit/nvidia-cg-toolkit.SlackBuild
+++ b/graphics/nvidia-cg-toolkit/nvidia-cg-toolkit.SlackBuild
@@ -24,10 +24,19 @@
PRGNAM=nvidia-cg-toolkit
VERSION=2.2_October2009
-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) 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
@@ -42,6 +51,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
TARGET="x86_64"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
set -e