summaryrefslogtreecommitdiff
path: root/office/fbpdf/fbpdf.SlackBuild
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2020-02-18 02:46:18 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-02-24 06:10:06 +0700
commitdf8ed37fee1fcd11e3eeca0dd49fa65226be06c2 (patch)
tree2c15997d7281498594b306504bbfc5fb8db36b16 /office/fbpdf/fbpdf.SlackBuild
parentadc5a533b2a4ef43568ab4e11cccb0ed5e2b3a7d (diff)
downloadslackbuilds-df8ed37fee1fcd11e3eeca0dd49fa65226be06c2.tar.gz
office/fbpdf: Use mupdf-legacy dep.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'office/fbpdf/fbpdf.SlackBuild')
-rw-r--r--office/fbpdf/fbpdf.SlackBuild32
1 files changed, 17 insertions, 15 deletions
diff --git a/office/fbpdf/fbpdf.SlackBuild b/office/fbpdf/fbpdf.SlackBuild
index 4c5540d276..dbed12b0ed 100644
--- a/office/fbpdf/fbpdf.SlackBuild
+++ b/office/fbpdf/fbpdf.SlackBuild
@@ -8,12 +8,12 @@
# Source tarball made from: git clone git://repo.or.cz/fbpdf.git
-# 20170313 bkw:
-# - update for 20161202 (commit e31a61b), needed due to mupdf update.
+# 20200218 bkw: mupdf got updated to an incompatible version, use mupdf-legacy.
+# 20170313 bkw: update for 20161202 (commit e31a61b), need due to mupdf update.
PRGNAM=fbpdf
VERSION=${VERSION:-20161202}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -52,11 +52,8 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
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 \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
# This patch has been sent upstream. In my opinion, fbpdf is needlessly
# difficult to use without it.
@@ -65,11 +62,6 @@ find -L . \
[ "${PRISTINE:-no}" != "yes" ] && \
patch -p1 < $CWD/navigation.diff
-# mupdf API keeps changing
-sed -i \
- -e 's,-lmupdf -lmupdfthird,`pkg-config --libs mupdf` -lharfbuzz,' \
- Makefile
-
mkdir -p $PKG/usr/bin
# always build these two.
@@ -77,8 +69,18 @@ make ${PRGNAM}2 fbdjvu
install -s -m0755 ${PRGNAM}2 $PKG/usr/bin
install -s -m0755 fbdjvu $PKG/usr/bin
-# autodetect mupdf, build fbpdf if found (seems OK with mupdf-1.9a)
-if pkg-config --exists mupdf; then
+# autodetect mupdf-legacy, build fbpdf if found
+if [ -d /opt/mupdf-legacy ]; then
+ # Use old libs/headers. Works even if a newer mupdf is installed in /usr.
+ PKG_CONFIG_PATH=/opt/mupdf-legacy/lib$LIBDIRSUFFIX/pkgconfig:$PKG_CONFIG_PATH
+ export PKG_CONFIG_PATH
+
+ # mupdf API keeps changing
+ sed -i \
+ -e '/^CFLAGS/s,$, $(shell pkg-config --cflags mupdf),' \
+ -e 's,-lmupdf -lmupdfthird,$(shell pkg-config --libs mupdf) -lharfbuzz,' \
+ Makefile
+
make clean
make $PRGNAM
install -s -m0755 $PRGNAM $PKG/usr/bin