From d908f9bedac346dcdcbd93ce30f34974afbdbdb8 Mon Sep 17 00:00:00 2001 From: dsomero Date: Sun, 23 May 2010 13:07:48 -0400 Subject: graphics/brlcad: Miscellaneous cleanups and enable libpng patch. --- graphics/brlcad/brlcad.SlackBuild | 16 ++++++++++++++-- 1 file 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" \ -- cgit v1.2.3