mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
academic/qtoctave: Miscellaneous cleanups and patch.
Cleaned up build and added a patch for gcc4.4.
This commit is contained in:
parent
2d344bfb2f
commit
7321fbe203
2 changed files with 28 additions and 4 deletions
8
academic/qtoctave/qtoctave-0.8.1-gcc4.4.patch
Normal file
8
academic/qtoctave/qtoctave-0.8.1-gcc4.4.patch
Normal file
|
@ -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 <cstdio>
|
||||
#include "search_dialog.h"
|
||||
|
||||
SearchDialog::SearchDialog(QWidget *parent): QDialog(parent)
|
|
@ -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" \
|
||||
|
|
Loading…
Reference in a new issue