diff options
Diffstat (limited to 'office/fbpdf/fbpdf.SlackBuild')
-rw-r--r-- | office/fbpdf/fbpdf.SlackBuild | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/office/fbpdf/fbpdf.SlackBuild b/office/fbpdf/fbpdf.SlackBuild index 02891669f2..33b522be1a 100644 --- a/office/fbpdf/fbpdf.SlackBuild +++ b/office/fbpdf/fbpdf.SlackBuild @@ -10,7 +10,7 @@ PRGNAM=fbpdf VERSION=${VERSION:-20140822} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -57,9 +57,13 @@ find -L . \ # This patch has been sent upstream. In my opinion, fbpdf is needlessly # difficult to use without it. +# ...a year later, and upstream never responded to my email (not even to +# say "no"). It's staying here though. [ "${PRISTINE:-no}" != "yes" ] && \ patch -p1 < $CWD/navigation.diff +# mupdf API keeps changing + sed -i \ -e 's,-lmupdf -lmujs,`pkg-config --libs mupdf`,' \ -e 's,-lopenjpeg,-lopenjp2,' \ @@ -72,11 +76,16 @@ make ${PRGNAM}2 fbdjvu install -s -m0755 ${PRGNAM}2 $PKG/usr/bin install -s -m0755 fbdjvu $PKG/usr/bin -# autodetect mupdf. -pkg-config --exists mupdf && \ - make clean && \ - make $PRGNAM && \ +# autodetect mupdf, apply patch if needed. +if pkg-config --exists mupdf; then + MUPDFVER="$( pkg-config --modversion mupdf 2>/dev/null | \ + sed 's,^[0-9]*\.\([0-9][0-9]*\).*,\1,' )" + [ "$MUPDFVER" != "" -a "$MUPDFVER" -gt "6" ] && + patch -p1 < $CWD/mupdf-1.7a.diff + make clean + make $PRGNAM install -s -m0755 $PRGNAM $PKG/usr/bin +fi # man page written for this build. mkdir -p $PKG/usr/man/man1 |