diff options
author | B. Watson <yalhcru@gmail.com> | 2020-02-17 22:36:51 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2020-02-24 06:10:06 +0700 |
commit | a888a13522db0f8ca10968d6391602aecfb19bc5 (patch) | |
tree | d11295ff3aab80e4cdf4b869abd51a354c242b9f /office/mupdf | |
parent | ecdacbdc144adfe82d2ef681cb9844063e3b35d0 (diff) |
office/mupdf: Updated for version 1.16.1.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'office/mupdf')
-rw-r--r-- | office/mupdf/README | 7 | ||||
-rw-r--r-- | office/mupdf/mupdf.SlackBuild | 75 | ||||
-rw-r--r-- | office/mupdf/mupdf.info | 6 | ||||
-rw-r--r-- | office/mupdf/shared_libs.diff | 50 | ||||
-rw-r--r-- | office/mupdf/slack-desc | 6 |
5 files changed, 48 insertions, 96 deletions
diff --git a/office/mupdf/README b/office/mupdf/README index 9c57e36921477..c67d450b067ec 100644 --- a/office/mupdf/README +++ b/office/mupdf/README @@ -12,13 +12,12 @@ features can be added on by integrators if they so desire. Notes: -1. By default, mupdf is built without JavaScript support. If you want -to try mupdf's experimental JavaScript support, build with MUJS=yes in -the script's environment. +1. It's no longer possible to build mupdf without JavaScript support. -2. Two mupdf executables are installed in /usr/bin. mupdf-x11 is the +2. Three mupdf executables are installed in /usr/bin. mupdf-x11 is the regular PDF viewer, and mupdf-x11-curl has support for fetching remote resources from the network (which may be considered a security risk). +mupdf-gl uses OpenGL for rendering (and doesn't support curl). 3. By default, mupdf is now built as shared libraries. If for some reason you need static libs instead, build with STATIC=yes in the diff --git a/office/mupdf/mupdf.SlackBuild b/office/mupdf/mupdf.SlackBuild index bccd04f5cbfb5..cf8e18afdc042 100644 --- a/office/mupdf/mupdf.SlackBuild +++ b/office/mupdf/mupdf.SlackBuild @@ -7,6 +7,7 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20200217 bkw: update for 1.16.1. # 20180623 bkw: BUILD=2, add patch for dynamic linking. Thanks # to Thomas Morper for pointing me in the right direction. # 20180615 bkw: update for 1.13.0, move old change comments to ChangeLog.old @@ -16,8 +17,8 @@ # 20170122 bkw: update for 1.10a. PRGNAM=mupdf -VERSION=${VERSION:-1.13.0} -BUILD=${BUILD:-2} +VERSION=${VERSION:-1.16.1} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -52,44 +53,13 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION-source -tar xvf $CWD/$PRGNAM-$VERSION-source.tar.gz +tar xvf $CWD/$PRGNAM-$VERSION-source.tar.?z cd $PRGNAM-$VERSION-source -# don't find/chown/chmod until after the thirdparty junk is removed. - -# Build against system libs instead of bundled ones. If we didn't do this, -# libmupdf would be useless for building anything else. - -# Everything removed from thirdparty/ has to be installed systemwide, and must -# either be a Slackware core pkg, or mentioned in REQUIRES= in the .info -# file... except mujs, which is mupdf's javascript support lib. If missing, -# we end up with a mupdf with no JS support, which is probably a good idea -# for the default build. If you want javascript, MUJS=yes in the env. - -MUJS="${MUJS:-no}" - -if [ "$MUJS" = "yes" ]; then - mv thirdparty/mujs .keep - rm -rf thirdparty/* - mv .keep thirdparty/mujs - WITH=with -else - rm -rf thirdparty/* - sed -i 's,murun\.o,,' Makefile - sed -i 's,pdf_drop_js.*,;,' source/pdf/pdf-xref.c - sed -i '/murun_main/d' source/tools/mutool.c - WITH=without -fi - 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 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 {} \+ -# ref https://bugs.ghostscript.com/show_bug.cgi?id=697175 -sed -i '/#define *OPJ_STATIC/d' source/fitz/load-jpx.c # Hard-code the version number so it'll stop trying to use git to retrieve # it and spewing harmless but scary 'fatal: Not a git repository' errors. @@ -107,39 +77,29 @@ else LIBTYPE=static fi +# Build against system libs instead of bundled ones. If we didn't do this, +# libmupdf would be useless for building anything else. make verbose=yes \ XCFLAGS="$SLKCFLAGS -DJBIG_NO_MEMENTO" \ - HAVE_MUJS="$MUJS" \ + USE_SYSTEM_LIBS=yes \ build=release \ prefix=/usr \ libdir=/usr/lib$LIBDIRSUFFIX \ mandir=/usr/man \ docdir=/usr/doc/$PRGNAM-$VERSION \ DESTDIR=$PKG \ - all extra-apps install - -# 1.12.0 used to install this stuff with 'make install', 1.13.0 doesn't: -for i in mjsgen muraster mupdf-x11-curl; do - [ -e build/release/$i ] && install -s -m0755 build/release/$i $PKG/usr/bin -done + all install strip $PKG/usr/bin/* - -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 +gzip -9 $PKG/usr/man/man1/*.1 # Compatibility symlinks. Older versions, the binary is just "mupdf". # Separate -curl binary exists in 1.5 but not 1.4. ln -s $PRGNAM-x11 $PKG/usr/bin/$PRGNAM -ln -s $PRGNAM.1.gz $PKG/usr/man/man1/$PRGNAM-x11.1.gz -[ -e $PKG/usr/bin/$PRGNAM-x11-curl ] && \ - ln -s $PRGNAM.1.gz $PKG/usr/man/man1/$PRGNAM-x11-curl.1.gz - -# mujstest is useless if we don't have JS support. Also libmupdfthird.a -# ends up 8 bytes long & has no object code in it. -[ "$MUJS" = "yes" ] || \ - rm -f $PKG/usr/bin/mujstest \ - $PKG/usr/lib$LIBDIRSUFFIX/libmupdfthird.a +for i in x11 x11-curl gl; do + [ -e $PKG/usr/bin/$PRGNAM-$i ] && \ + ln -s $PRGNAM.1.gz $PKG/usr/man/man1/$PRGNAM-$i.1.gz +done # Installed permissions are atrocious (everything 755). find $PKG -type f | xargs chmod 644 @@ -160,7 +120,7 @@ cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png # .pc file taken from debian and parameterized. PCLIBS="-l$PRGNAM -lfreetype -lharfbuzz -ljbig2dec -ljpeg -lcrypto -lopenjp2 -lz -lm" -[ "$MUJS" = "yes" ] && PCLIBS="$PCLIBS -lmupdfthird" +PCLIBS="$PCLIBS -lmupdfthird" mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/pkgconfig/ sed -e "s,@LIB@,lib$LIBDIRSUFFIX,g" \ @@ -175,8 +135,7 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild # slack-desc will conveniently say whether javascript is built in, # and whether libs are shared or static. mkdir -p $PKG/install -sed -e "s,@WITH@,$WITH," \ - -e "s,@LIBTYPE@,$LIBTYPE," \ +sed -e "s,@LIBTYPE@,$LIBTYPE," \ $CWD/slack-desc > $PKG/install/slack-desc cd $PKG diff --git a/office/mupdf/mupdf.info b/office/mupdf/mupdf.info index 1baf451ab3b5b..a53a00deb2729 100644 --- a/office/mupdf/mupdf.info +++ b/office/mupdf/mupdf.info @@ -1,8 +1,8 @@ PRGNAM="mupdf" -VERSION="1.13.0" +VERSION="1.16.1" HOMEPAGE="https://www.mupdf.com/" -DOWNLOAD="https://www.mupdf.com/downloads/archive/mupdf-1.13.0-source.tar.gz" -MD5SUM="447bc5c3305efe9645e12fce759e0198" +DOWNLOAD="https://www.mupdf.com/downloads/archive/mupdf-1.16.1-source.tar.xz" +MD5SUM="11075a1d882451b65c3739b588436d68" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="jbig2dec" diff --git a/office/mupdf/shared_libs.diff b/office/mupdf/shared_libs.diff index 465028f632f80..8d8204b67bb28 100644 --- a/office/mupdf/shared_libs.diff +++ b/office/mupdf/shared_libs.diff @@ -1,7 +1,7 @@ -diff -Naur mupdf-1.13.0-source/Makefile mupdf-1.13.0-source.patched/Makefile ---- mupdf-1.13.0-source/Makefile 2018-04-12 09:14:06.000000000 -0400 -+++ mupdf-1.13.0-source.patched/Makefile 2018-06-23 15:24:50.242018433 -0400 -@@ -14,7 +14,7 @@ +diff -Naur mupdf-1.16.1-source/Makefile mupdf-1.16.1-source.patched/Makefile +--- mupdf-1.16.1-source/Makefile 2019-08-02 10:49:26.000000000 -0400 ++++ mupdf-1.16.1-source.patched/Makefile 2020-02-17 22:15:13.596704068 -0500 +@@ -20,7 +20,7 @@ # Do not specify CFLAGS or LIBS on the make invocation line - specify # XCFLAGS or XLIBS instead. Make ignores any lines in the makefile that # set a variable that was set on the command line. @@ -9,42 +9,36 @@ diff -Naur mupdf-1.13.0-source/Makefile mupdf-1.13.0-source.patched/Makefile +CFLAGS += $(XCFLAGS) -Iinclude -fPIC LIBS += $(XLIBS) -lm - LIBS += $(FREETYPE_LIBS) -@@ -325,10 +325,10 @@ + ifneq ($(threading),no) +@@ -189,17 +189,21 @@ # --- Library --- -MUPDF_LIB = $(OUT)/libmupdf.a --THIRD_LIB = $(OUT)/libmupdfthird.a --THREAD_LIB = $(OUT)/libmuthreads.a --PKCS7_LIB = $(OUT)/libmupkcs7.a +-THIRD_LIB = $(OUT)/libmupdf-third.a +-THREAD_LIB = $(OUT)/libmupdf-threads.a +-PKCS7_LIB = $(OUT)/libmupdf-pkcs7.a +MUPDF_LIB = $(OUT)/libmupdf.so -+THIRD_LIB = $(OUT)/libmupdfthird.so -+THREAD_LIB = $(OUT)/libmuthreads.so -+PKCS7_LIB = $(OUT)/libmupkcs7.so - - MUPDF_OBJ := \ - $(FITZ_OBJ) \ -@@ -355,12 +355,16 @@ - $(ZLIB_OBJ) \ - $(LCMS2_OBJ) ++THIRD_LIB = $(OUT)/libmupdf-third.so ++THREAD_LIB = $(OUT)/libmupdf-threads.so ++PKCS7_LIB = $(OUT)/libmupdf-pkcs7.so -$(MUPDF_LIB) : $(MUPDF_OBJ) +$(MUPDF_LIB) : $(MUPDF_OBJ) $(THIRD_LIB) $(THREAD_LIB) -+ $(LINK_CMD) -shared -Wl,-soname -Wl,libmupdf.so.$(SOMAJOR) -Wl,--no-undefined ++ $(LINK_CMD) -shared -Wl,-soname -Wl,libmupdf.so.$(SOMAJOR) -Wl,--no-undefined $(THIRD_LIBS) $(THIRD_LIB) : $(THIRD_OBJ) -+ $(LINK_CMD) -shared -Wl,-soname -Wl,libmupdfthird.so.$(SOMAJOR) -Wl,--no-undefined ++ $(LINK_CMD) -shared -Wl,-soname -Wl,libmupdf-third.so.$(SOMAJOR) -Wl,--no-undefined $(THREAD_LIB) : $(THREAD_OBJ) -+ $(LINK_CMD) -shared -Wl,-soname -Wl,libmuthreads.so.$(SOMAJOR) -Wl,--no-undefined -lpthread ++ $(LINK_CMD) -shared -Wl,-soname -Wl,libmupdf-threads.so.$(SOMAJOR) -Wl,--no-undefined -lpthread $(PKCS7_LIB) : $(PKCS7_OBJ) -+ $(LINK_CMD) -shared -Wl,-soname -Wl,libmupkcs7.so.$(SOMAJOR) ++ $(LINK_CMD) -shared -Wl,-soname -Wl,libmupfs-pkcs7.so.$(SOMAJOR) -INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB) +INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB) $(THREAD_LIB) $(PKCS7_LIB) - # --- Tools and Apps --- + # --- Main tools and viewers --- -@@ -444,6 +448,14 @@ +@@ -294,6 +298,14 @@ VERSION = $(shell git describe --tags) @@ -59,11 +53,11 @@ diff -Naur mupdf-1.13.0-source/Makefile mupdf-1.13.0-source.patched/Makefile version: sed -i~ -e '/FZ_VERSION /s/".*"/"'$(VERSION)'"/' include/mupdf/fitz/version.h -@@ -482,7 +494,13 @@ - install include/mupdf/pdf/*.h $(DESTDIR)$(incdir)/mupdf/pdf +@@ -331,7 +343,13 @@ + install -m 644 include/mupdf/pdf/*.h $(DESTDIR)$(incdir)/mupdf/pdf install -d $(DESTDIR)$(libdir) -- install $(INSTALL_LIBS) $(DESTDIR)$(libdir) +- install -m 644 $(INSTALL_LIBS) $(DESTDIR)$(libdir) + install -s -m0755 $(INSTALL_LIBS) $(DESTDIR)$(libdir) + ( cd $(DESTDIR)$(libdir) ; \ + for i in $(INSTALL_LIBS); do \ @@ -73,4 +67,4 @@ diff -Naur mupdf-1.13.0-source/Makefile mupdf-1.13.0-source.patched/Makefile + done ) install -d $(DESTDIR)$(bindir) - install $(INSTALL_APPS) $(DESTDIR)$(bindir) + install -m 755 $(TOOL_APPS) $(VIEW_APPS) $(DESTDIR)$(bindir) diff --git a/office/mupdf/slack-desc b/office/mupdf/slack-desc index c04023860d981..eac6630b9ec48 100644 --- a/office/mupdf/slack-desc +++ b/office/mupdf/slack-desc @@ -9,11 +9,11 @@ mupdf: mupdf (a lightweight PDF, CBZ, and XPS viewer and toolkit) mupdf: mupdf: The renderer in MuPDF is tailored for high quality anti-aliased -mupdf: graphics. MuPDF renders text with metrics and spacing accurate to +mupdf: graphics. MuPDF renders text with metrics and spacing accurate to mupdf: within fractions of a pixel for the highest fidelity in reproducing mupdf: the look of a printed page on screen. mupdf: mupdf: https://www.mupdf.com/ mupdf: -mupdf: This package was built @WITH@ JavaSscript support, and installs -mupdf: @LIBTYPE@ libraries. +mupdf: This package installs @LIBTYPE@ libraries. +mupdf: |