aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authordsomero <xgizzmo@gmail.com>2010-05-23 13:07:48 -0400
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-23 23:29:11 -0500
commitd908f9bedac346dcdcbd93ce30f34974afbdbdb8 (patch)
tree18fe969b560a31438743199e47b7f4b004fe61c8 /graphics
parent55382320c4f68f2210a60f232e8ddc8a89914b83 (diff)
graphics/brlcad: Miscellaneous cleanups and enable libpng patch.
Diffstat (limited to 'graphics')
-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 782d595a2d606..00c0cb4c12e21 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" \