summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author B. Watson2020-02-18 08:46:18 +0100
committer Willy Sudiarto Raharjo2020-02-24 00:10:06 +0100
commitdf8ed37fee1fcd11e3eeca0dd49fa65226be06c2 (patch)
tree2c15997d7281498594b306504bbfc5fb8db36b16
parentadc5a533b2a4ef43568ab4e11cccb0ed5e2b3a7d (diff)
downloadslackbuilds-df8ed37fee1fcd11e3eeca0dd49fa65226be06c2.tar.gz
office/fbpdf: Use mupdf-legacy dep.
Signed-off-by: B. Watson <yalhcru@gmail.com>
-rw-r--r--office/fbpdf/README4
-rw-r--r--office/fbpdf/fbpdf.SlackBuild32
2 files changed, 19 insertions, 17 deletions
diff --git a/office/fbpdf/README b/office/fbpdf/README
index e47293c2b7..7c031b3be1 100644
--- a/office/fbpdf/README
+++ b/office/fbpdf/README
@@ -4,8 +4,8 @@ fbpdf is a framebuffer pdf/djvu file viewer. It can use either mupdf or
poppler libraries for rendering pdf files and it uses djvulibre library
for rendering djvu files.
-By default, the fbpdf2 (poppler support) executable is built, along
-with fbdjvu. If you want mupdf support, install mupdf before running
+By default, the fbpdf2 (poppler support) executable is built, along with
+fbdjvu. If you want mupdf support, install mupdf-legacy before running
this build and it will be auto-detected. The executable that uses mupdf
will be called fbpdf.
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