development/gambas3: Add Qt5 detection.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Willy Sudiarto Raharjo 2016-10-28 23:23:24 +07:00
parent 6b2e4ca754
commit 07d84c0c1f

View file

@ -24,14 +24,14 @@
PRGNAM=gambas3
VERSION=${VERSION:-3.8.4}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
SHORT_PRGNAM=${PRGNAM%$(cut -d . -f 1 <<< $VERSION)}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@ -42,8 +42,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@ -56,6 +56,15 @@ else
LIBDIRSUFFIX=""
fi
# Add Qt5 detection
# REMINDER: Remove when upgrading to 3.9.x
QT5=`pkg-config --exists Qt5Core`
if [ "$?" -eq 0 ]; then
qt5="--enable-qt5"
else
qt5="--disable-qt5"
fi
set -e
rm -rf $PKG
@ -73,7 +82,8 @@ CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--build=$ARCH-slackware-linux
--build=$ARCH-slackware-linux \
$qt5
make
make -j1 install-strip DESTDIR=$PKG XDG_UTILS=""