From 7321fbe203bff44d3a24706e25c3269f6a2c857c Mon Sep 17 00:00:00 2001 From: dsomero Date: Sun, 23 May 2010 20:48:39 -0400 Subject: academic/qtoctave: Miscellaneous cleanups and patch. Cleaned up build and added a patch for gcc4.4. --- academic/qtoctave/qtoctave-0.8.1-gcc4.4.patch | 8 ++++++++ academic/qtoctave/qtoctave.SlackBuild | 24 ++++++++++++++++++++---- 2 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 academic/qtoctave/qtoctave-0.8.1-gcc4.4.patch (limited to 'academic/qtoctave') diff --git a/academic/qtoctave/qtoctave-0.8.1-gcc4.4.patch b/academic/qtoctave/qtoctave-0.8.1-gcc4.4.patch new file mode 100644 index 0000000000..4bc26f858c --- /dev/null +++ b/academic/qtoctave/qtoctave-0.8.1-gcc4.4.patch @@ -0,0 +1,8 @@ +diff -Naur qtoctave-0.8.1/qtoctave/src/search_dialog.cpp qtoctave-0.8.1.new/qtoctave/src/search_dialog.cpp +--- qtoctave-0.8.1/qtoctave/src/search_dialog.cpp 2008-09-21 05:00:30.000000000 -0400 ++++ qtoctave-0.8.1.new/qtoctave/src/search_dialog.cpp 2009-07-31 09:04:20.000000000 -0400 +@@ -1,3 +1,4 @@ ++#include + #include "search_dialog.h" + + SearchDialog::SearchDialog(QWidget *parent): QDialog(parent) diff --git a/academic/qtoctave/qtoctave.SlackBuild b/academic/qtoctave/qtoctave.SlackBuild index f88c5236f8..fd5aa04ef1 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" \ -- cgit v1.2.3