aboutsummaryrefslogtreecommitdiff
path: root/libraries/qwt/qwt.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/qwt/qwt.SlackBuild')
-rw-r--r--libraries/qwt/qwt.SlackBuild18
1 files changed, 12 insertions, 6 deletions
diff --git a/libraries/qwt/qwt.SlackBuild b/libraries/qwt/qwt.SlackBuild
index fb75b7372c390..6454f8d46d8cb 100644
--- a/libraries/qwt/qwt.SlackBuild
+++ b/libraries/qwt/qwt.SlackBuild
@@ -10,7 +10,7 @@
PRGNAM=qwt
VERSION=${VERSION:-5.1.1}
ARCH=${ARCH:-i486}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
CWD=$(pwd)
@@ -18,14 +18,18 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-QMAKE=${QMAKE:-$(which qmake)}
-
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+ BASELIBDIR="lib${LIBDIRSUFFIX}"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+ BASELIBDIR="lib${LIBDIRSUFFIX}"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ BASELIBDIR="lib${LIBDIRSUFFIX}"
fi
set -e # Exit on most errors
@@ -43,8 +47,10 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-sed -i "s%/usr/local/qwt-5.1.1%/usr%" qwtconfig.pri
-$QMAKE INSTALLBASE=/usr CONFIG+=QwtExamples
+patch -p1 < $CWD/qwt-5.1.1-qwtconfig.pri.patch
+sed -i "s%@BASELIBDIR@%$BASELIBDIR%" qwtconfig.pri
+
+qmake INSTALLBASE=/usr CONFIG+=QwtExamples
make \
CFLAGS+="$SLKCFLAGS" \
CXXFLAGS+="$SLKCFLAGS"
@@ -73,4 +79,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}