summaryrefslogtreecommitdiffstats
path: root/graphics/brlcad
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/brlcad')
-rw-r--r--graphics/brlcad/brlcad.SlackBuild16
1 files changed, 14 insertions, 2 deletions
diff --git a/graphics/brlcad/brlcad.SlackBuild b/graphics/brlcad/brlcad.SlackBuild
index 782d595a2d..00c0cb4c12 100644
--- a/graphics/brlcad/brlcad.SlackBuild
+++ b/graphics/brlcad/brlcad.SlackBuild
@@ -12,10 +12,19 @@
PRGNAM=brlcad
VERSION=${VERSION:-7.16.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
@@ -30,6 +39,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
set -e
@@ -55,7 +67,7 @@ patch -p1 < $CWD/patches/gcc433.patch
# Do not use in 13.0 stable versions (won't work).
# Newer svn snapshots of brlcad won't need this any longer, but the stable
# 7.16.6 version still does.
-#patch -p1 < $CWD/patches/libpng14x.patch
+patch -p1 < $CWD/patches/libpng14x.patch
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \