diff options
Diffstat (limited to 'academic/qtoctave/qtoctave.SlackBuild')
-rw-r--r-- | academic/qtoctave/qtoctave.SlackBuild | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/academic/qtoctave/qtoctave.SlackBuild b/academic/qtoctave/qtoctave.SlackBuild index f88c5236f817..fd5aa04ef199 100644 --- a/academic/qtoctave/qtoctave.SlackBuild +++ b/academic/qtoctave/qtoctave.SlackBuild @@ -7,26 +7,39 @@ PRGNAM=qtoctave VERSION=${VERSION:-0.8.1} -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 OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686 -DNDEBUG" + SLKCFLAGS="-O2 -march=i486 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686 -DNDEBUG" + SLKCFLAGS="-O2 -march=i686 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC -DNDEBUG" + SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi + set -e # Exit on most errors rm -rf $PKG @@ -42,6 +55,9 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +# Fix building with gcc4.4 +patch -p2 < $CWD/qtoctave-0.8.1-gcc4.4.patch + cmake \ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \ -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \ |