summaryrefslogtreecommitdiff
path: root/libraries/qwt
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-04-19 20:33:34 -0400
committerB. Watson <yalhcru@gmail.com>2022-04-19 20:33:34 -0400
commit16c6a38dc0460195a31bb9f68961752b3429f36c (patch)
tree860bb5c91b77fd76f3d16ca9a6684e5bf055d0a6 /libraries/qwt
parent596c4689aac327fcd75f596b469cc7916760b3dd (diff)
downloadslackbuilds-16c6a38dc0460195a31bb9f68961752b3429f36c.tar.gz
libraries/qwt: Don't build examples by defalt.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'libraries/qwt')
-rw-r--r--libraries/qwt/README4
-rw-r--r--libraries/qwt/qwt.SlackBuild28
2 files changed, 25 insertions, 7 deletions
diff --git a/libraries/qwt/README b/libraries/qwt/README
index e3035aa7de..e72ff35b3c 100644
--- a/libraries/qwt/README
+++ b/libraries/qwt/README
@@ -5,3 +5,7 @@ widget, different kinds of sliders, and much more.
Optional dependency: qt4. If installed, the package will include qt4
support.
+
+If you're interested in developing software that uses qwt, you might
+want to build this with EXAMPLES=yes in the environment. This will
+compile the example programs and install them in the doc dir.
diff --git a/libraries/qwt/qwt.SlackBuild b/libraries/qwt/qwt.SlackBuild
index 1e5fabaf93..15ad9c54d2 100644
--- a/libraries/qwt/qwt.SlackBuild
+++ b/libraries/qwt/qwt.SlackBuild
@@ -8,6 +8,10 @@
# Modified by the Slackbuilds.org project
# Maintained 2015-2021 by Christoph Willing <chris.willing@linux.com>
+# 20220419 bkw: Modified by SlackBuilds.org, BUILD=3:
+# - don't build and install the example binaries by default;
+# add EXAMPLES=yes option.
+
# 20220222 bkw: Modified by SlackBuilds.org:
# - add optional qt4 support.
@@ -15,7 +19,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=qwt
VERSION=${VERSION:-6.1.6}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -66,6 +70,12 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
+# 20220419 bkw: don't build the examples by default. they're not
+# particularly useful. the sources to the examples are installed in
+# the doc dir, if users want to play with them.
+[ "${EXAMPLES:-no}" != "yes" ] &&
+ sed -i '/^QWT_CONFIG.*QwtExamples/s,^,#,' qwtconfig.pri
+
if [ -x /usr/lib$LIBDIRSUFFIX/qt4/bin/qmake ]; then
mkdir -p build-qt4
cd build-qt4
@@ -95,13 +105,17 @@ mv $PKG/usr/doc/man $PKG/usr
rm -f $PKG/usr/man/man3/_tmp*
gzip -9 $PKG/usr/man/man*/*
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/examples
-cp -a build/examples/bin $PKG/usr/doc/$PRGNAM-$VERSION/examples/
-cp -a examples/* $PKG/usr/doc/$PRGNAM-$VERSION/examples/
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC/examples
+cp -a examples/* $PKGDOC/examples/
+if [ "${EXAMPLES:-no}" = "yes" ]; then
+ mkdir -p $PKGDOC/examples/bin
+ install -s -m0755 build/examples/bin/* $PKGDOC/examples/bin
+fi
-mv $PKG/usr/doc/html $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a CHANGES* COPYING README $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+mv $PKG/usr/doc/html $PKGDOC
+cp -a CHANGES* COPYING README $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc