summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLarry Hajali <larryhaja@gmail.com>2015-01-17 09:46:50 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-01-17 10:07:07 +0700
commit0baa48d6d9b7b53b8c575527c0e792f20eb63001 (patch)
treef387b03cfba3f58ee4881bfef1510ddc3cc6ec3c
parent38f57507d6b53f96d5e0c15810232bd002a72bb4 (diff)
downloadslackbuilds-0baa48d6d9b7b53b8c575527c0e792f20eb63001.tar.gz
libraries/qt5: Added optional documentation and example options.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--libraries/qt5/README8
-rw-r--r--libraries/qt5/qt5.SlackBuild27
2 files changed, 31 insertions, 4 deletions
diff --git a/libraries/qt5/README b/libraries/qt5/README
index e69f943e5a..e1376a9998 100644
--- a/libraries/qt5/README
+++ b/libraries/qt5/README
@@ -10,3 +10,11 @@ slackbuilds.org)
Note: To build Qt5 with Pulseadio then pass USEPULSE=yes to the slackbuild.
USEPULSE=yes ./qt5.SlackBuild
+
+Note2: To build documentation pass DOCS=yes to the slackbuild.
+
+ DOCS=yes ./qt5.SlackBuild
+
+Note3: To build examples pass EXAMPLES=yes to the slackbuild
+
+ EXAMPLES=yes ./qt5.SlackBuild
diff --git a/libraries/qt5/qt5.SlackBuild b/libraries/qt5/qt5.SlackBuild
index 971dae5c2f..4ae5722c02 100644
--- a/libraries/qt5/qt5.SlackBuild
+++ b/libraries/qt5/qt5.SlackBuild
@@ -47,7 +47,7 @@
PRGNAM=qt5
VERSION=${VERSION:-5.4.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -96,7 +96,7 @@ find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Slackware patch to build against MySQL/MariaDB.
patch -p1 < $CWD/patches/qt5.mysql.h.diff
@@ -127,6 +127,13 @@ else
sed -i '/qtwebengine/d' qt.pro
fi
+# Build examples. Default is no.
+if [ "${EXAMPLES:-no}" == "yes" ]; then
+ BUILD_EXAMPLES=""
+else
+ BUILD_EXAMPLES="-nomake examples"
+fi
+
export CFLAGS="$SLKCFLAGS"
export CXXFLAGS="$SLKCFLAGS"
export OPENSOURCE_CXXFLAGS="$SLKCFLAGS"
@@ -153,18 +160,30 @@ export OPENSOURCE_CXXFLAGS="$SLKCFLAGS"
-xcb \
-glib \
-accessibility \
- -nomake examples \
-no-separate-debug-info \
-no-pch \
-no-rpath \
-no-strip \
-release \
$RELOCATIONS \
- $PULSE
+ $PULSE \
+ $BUILD_EXAMPLES
make
make install INSTALL_ROOT=$PKG
+# Install documentation. Default is not to install documentation.
+if [ "${DOCS:-no}" == "yes" ]; then
+ # Recreate Makefiles in order to use the just compiled qdoc.
+ for doc in $(find . -name "Makefile*" | xargs egrep "^\s/usr/lib${LIBDIRSUFFIX}/qt5/bin/" \
+ | cut -d':' -f1)
+ do
+ rm -fv $doc
+ done
+ make docs
+ make install_docs INSTALL_ROOT=$PKG
+fi
+
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true