diff options
-rw-r--r-- | libraries/qwt/README | 11 | ||||
-rw-r--r-- | libraries/qwt/qwt.SlackBuild | 32 |
2 files changed, 24 insertions, 19 deletions
diff --git a/libraries/qwt/README b/libraries/qwt/README index 917a92ae05..e3035aa7de 100644 --- a/libraries/qwt/README +++ b/libraries/qwt/README @@ -1,6 +1,7 @@ -Qwt is an extension to the Qt GUI library from Troll Tech AS. -The Qwt library contains widgets and components which are -primarily useful for technical and scientifical purposes. -It includes a 2-D plotting widget, different kinds of sliders, -and much more. +Qwt is an extension to the Qt GUI library from Troll Tech AS. The Qwt +library contains widgets and components which are primarily useful +for technical and scientifical purposes. It includes a 2-D plotting +widget, different kinds of sliders, and much more. +Optional dependency: qt4. If installed, the package will include qt4 +support. diff --git a/libraries/qwt/qwt.SlackBuild b/libraries/qwt/qwt.SlackBuild index 8f7f990411..1e5fabaf93 100644 --- a/libraries/qwt/qwt.SlackBuild +++ b/libraries/qwt/qwt.SlackBuild @@ -8,6 +8,9 @@ # Modified by the Slackbuilds.org project # Maintained 2015-2021 by Christoph Willing <chris.willing@linux.com> +# 20220222 bkw: Modified by SlackBuilds.org: +# - add optional qt4 support. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=qwt @@ -24,9 +27,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -62,9 +62,18 @@ patch -p0 < $CWD/patch-6.1.2-config.diff chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ + -exec chmod 755 {} \+ -o \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + -exec chmod 644 {} \+ + +if [ -x /usr/lib$LIBDIRSUFFIX/qt4/bin/qmake ]; then + mkdir -p build-qt4 + cd build-qt4 + qmake-qt4 .. LIBDIRSUFFIX=$LIBDIRSUFFIX + make CFLAGS+="$SLKCFLAGS" CXXFLAGS+="$SLKCFLAGS -std=c++11 -fPIC" + make install INSTALL_ROOT=$PKG + cd .. +fi mkdir -p build cd build @@ -75,10 +84,8 @@ cd .. # Rationalise the pkgconfig default filenames ( cd $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig - ln -s qwt.pc Qwt6.pc - if [ -f Qt5Qwt6.pc ]; then - ln -s Qt5Qwt6.pc qwt-qt5.pc - fi + [ -f qwt.pc ] && ln -s qwt.pc Qwt6.pc + [ -f Qt5Qwt6.pc ] && ln -s Qt5Qwt6.pc qwt-qt5.pc ) find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ @@ -86,17 +93,14 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ mv $PKG/usr/doc/man $PKG/usr rm -f $PKG/usr/man/man3/_tmp* -( cd $PKG/usr/man - find . -type f -exec gzip -9 {} \; - for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done -) +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/ mv $PKG/usr/doc/html $PKG/usr/doc/$PRGNAM-$VERSION -cp -a CHANGES* COPYING INSTALL README $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 mkdir -p $PKG/install |