summaryrefslogtreecommitdiffstats
path: root/source/ap/qpdf/qpdf.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/qpdf/qpdf.SlackBuild')
-rwxr-xr-xsource/ap/qpdf/qpdf.SlackBuild43
1 files changed, 23 insertions, 20 deletions
diff --git a/source/ap/qpdf/qpdf.SlackBuild b/source/ap/qpdf/qpdf.SlackBuild
index 72377daf6..9be9357a0 100755
--- a/source/ap/qpdf/qpdf.SlackBuild
+++ b/source/ap/qpdf/qpdf.SlackBuild
@@ -4,7 +4,7 @@
# Copyright 2011-2012 Binh Nguyen <binhvng@gmail.com>
# Copyright 2014 Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-# Copyright 2015, 2017, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2015, 2017, 2018, 2022 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -78,29 +78,32 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --infodir=/usr/info \
- --docdir=/usr/doc/$PKGNAM-$VERSION \
- --localedir=/usr/share/locale \
- --disable-static \
- --build=$ARCH-slackware-linux || exit 1
-
-make $NUMJOBS || exit 1
-make install DESTDIR=$PKG || exit 1
-
-# Don't ship .la files:
-rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.la
+# Configure, build, and install:
+mkdir cmake-build
+cd cmake-build
+ cmake \
+ -DCMAKE_C_FLAGS="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX="$LIBDIRSUFFIX" \
+ -DDOC_INSTALL_DIR="doc" \
+ -DMAN_INSTALL_DIR=/usr/man \
+ -DINSTALL_EXAMPLES=OFF \
+ -DBUILD_STATIC_LIBS=OFF \
+ .. || exit 1
+ make $NUMJOBS || make || exit 1
+ make install DESTDIR=$PKG || exit 1
+cd ..
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
+rm -r $PKG/usr/share/doc
+if [ ! -d $PKG/usr/man ]; then
+ mv $PKG/usr/share/man $PKG/usr
+ rmdir $PKG/usr/share 2> /dev/null
+fi
+
find $PKG/usr/man -type f -exec gzip -9 {} \+
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done