diff options
Diffstat (limited to 'office/mupdf')
-rw-r--r-- | office/mupdf/README | 7 | ||||
-rw-r--r-- | office/mupdf/man_page.diff | 36 | ||||
-rw-r--r-- | office/mupdf/mupdf.SlackBuild | 52 | ||||
-rw-r--r-- | office/mupdf/mupdf.info | 10 | ||||
-rw-r--r-- | office/mupdf/shared_libfitz.diff | 109 | ||||
-rw-r--r-- | office/mupdf/slack-desc | 9 |
6 files changed, 205 insertions, 18 deletions
diff --git a/office/mupdf/README b/office/mupdf/README index 99511b47a9..8300c279ef 100644 --- a/office/mupdf/README +++ b/office/mupdf/README @@ -1,6 +1,11 @@ -mupdf is a lightweight PDF viewer and toolkit. +mupdf is a lightweight PDF, CBZ, and XPS viewer and toolkit. The renderer in MuPDF is tailored for high quality anti-aliased graphics. MuPDF renders text with metrics and spacing accurate to within fractions of a pixel for the highest fidelity in reproducing the look of a printed page on screen. + +MuPDF is also small, fast, and yet complete. It supports PDF 1.7 with +transparency, encryption, hyperlinks, annotations, searching and more. It +also reads XPS and OpenXPS documents. MuPDF is written modularly, so +features can be added on by integrators if they so desire. diff --git a/office/mupdf/man_page.diff b/office/mupdf/man_page.diff new file mode 100644 index 0000000000..9f3e79a2f2 --- /dev/null +++ b/office/mupdf/man_page.diff @@ -0,0 +1,36 @@ +diff -Naur mupdf-1.2-source/apps/man/mudraw.1 mupdf-1.2-source.patched/apps/man/mudraw.1 +--- mupdf-1.2-source/apps/man/mudraw.1 2013-02-13 09:25:07.000000000 -0500 ++++ mupdf-1.2-source.patched/apps/man/mudraw.1 2013-06-19 02:15:42.000000000 -0400 +@@ -83,7 +83,6 @@ + Comma separated list of ranges to render. + .SH SEE ALSO + .BR mupdf (1), +-.BR mupdfclean (1). +-.BR mupdfshow (1). ++.BR mutool (1). + .SH AUTHOR + MuPDF is Copyright 2006-2012 Artifex Software, Inc. +diff -Naur mupdf-1.2-source/apps/man/mupdf.1 mupdf-1.2-source.patched/apps/man/mupdf.1 +--- mupdf-1.2-source/apps/man/mupdf.1 2013-02-13 09:25:07.000000000 -0500 ++++ mupdf-1.2-source.patched/apps/man/mupdf.1 2013-06-19 02:31:19.000000000 -0400 +@@ -13,6 +13,9 @@ + .SH OPTIONS + A description of each of the supported options is included below. + .TP ++.B \-b bits ++Set anti-aliasing quality in bits (0=off, 8=best). ++.TP + .B \-p password + Uses the given password to open an encrypted PDF file. + The password is tried both as user and owner password. +@@ -85,8 +88,7 @@ + Sending a \fBSIGHUP\fR signal to the mupdf process will also cause the viewed + file to be reloaded automatically, for use in e.g. build scripts. + .SH SEE ALSO +-.BR mupdfclean (1), +-.BR mupdfdraw (1), +-.BR mupdfshow (1). ++.BR mutool (1), ++.BR mudraw (1). + .SH AUTHOR + MuPDF is Copyright 2006-2012 Artifex Software, Inc. diff --git a/office/mupdf/mupdf.SlackBuild b/office/mupdf/mupdf.SlackBuild index 608b81cb1b..3da86c19b2 100644 --- a/office/mupdf/mupdf.SlackBuild +++ b/office/mupdf/mupdf.SlackBuild @@ -4,9 +4,22 @@ # Written by Hubert Hesse (slackbuilds@hubertscorner.de) +# Modified 20130618 by B. Watson (yalhcru@gmail.com): +# - Took over maintenance +# - Updated for mupdf 1.2 +# - Build library shared, not static +# - Build with system zlib, libjpeg, openjpeg, jbig2dec, libtiff, libpng, +# liblcms2 instead of bundled sources (which made the lib + exes *huge*). +# Also, the included libjpeg is too new (it broke zathura-pdf-mupdf). +# - Include mutool in package (instead of just its man page) +# - Add CHANGES CONTRIBUTORS doc/* to /usr/doc +# - Use DESTDIR libdir mandir instead of patching makefile +# - Updated README & slack-desc to mention XPS and CBZ +# - Fix the man pages slightly + PRGNAM=mupdf -VERSION=${VERSION:-1.1} -BUILD=${BUILD:-4} +VERSION=${VERSION:-1.2} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -41,7 +54,7 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION-source -tar xvf $CWD/$PRGNAM-$VERSION-source.tar.gz +unzip $CWD/$PRGNAM-$VERSION-source.zip cd $PRGNAM-$VERSION-source chown -R root:root . find . \ @@ -50,23 +63,40 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -sed -i "s,(prefix)/lib,(prefix)/lib$LIBDIRSUFFIX," Makefile +# We want a shared library, not static. +# This patch based on http://bugs.ghostscript.com/show_bug.cgi?id=693009 +# with the following changes: +# - actually applies to mupdf-1.2 +# - links the applications dynamically +# - doesn't even build/install the static lib by default +# - adds mutool to list of stuff installed to $prefix/bin +patch -p1 < $CWD/shared_libfitz.diff + +# 'see also' mentions nonexistent stuff (mupdfclean, mupdfshow), also +# the -b option to mupdf was missing. +patch -p1 < $CWD/man_page.diff -CFLAGS="$SLKCFLAGS" make build=release prefix=/usr -make build=release prefix=$PKG/usr install +# Build against system libs instead of shipped ones +sed -i 's,libopenjpeg,libopenjpeg1,' Makerules +rm -rf thirdparty + +make build=release prefix=/usr XCFLAGS="$SLKCFLAGS" +make \ + build=release \ + prefix=/usr \ + libdir=/usr/lib$LIBDIRSUFFIX \ + mandir=/usr/man \ + DESTDIR=$PKG \ + install 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 -mkdir -p $PKG/usr/man -mv $PKG/usr/share/man/man1 $PKG/usr/man/man1 -rm -rf $PKG/usr/share - 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 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a README COPYING $PKG/usr/doc/$PRGNAM-$VERSION +cp -a README COPYING CHANGES CONTRIBUTORS doc/* $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install diff --git a/office/mupdf/mupdf.info b/office/mupdf/mupdf.info index 6f94269f83..a882d57e50 100644 --- a/office/mupdf/mupdf.info +++ b/office/mupdf/mupdf.info @@ -1,10 +1,10 @@ PRGNAM="mupdf" -VERSION="1.1" +VERSION="1.2" HOMEPAGE="http://www.mupdf.com/" -DOWNLOAD="http://mupdf.googlecode.com/files/mupdf-1.1-source.tar.gz" -MD5SUM="f7b5fd753f40aca207e9afd70d8f8edf" +DOWNLOAD="http://mupdf.googlecode.com/files/mupdf-1.2-source.zip" +MD5SUM="230e7d679f54c91edd1ebe54f6f8bc15" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="jbig2dec openjpeg" -MAINTAINER="Hubert Hesse" -EMAIL="slackbuilds@hubertscorner.de" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" diff --git a/office/mupdf/shared_libfitz.diff b/office/mupdf/shared_libfitz.diff new file mode 100644 index 0000000000..86e9109e0c --- /dev/null +++ b/office/mupdf/shared_libfitz.diff @@ -0,0 +1,109 @@ +diff -Naur mupdf-1.2-source/Makefile mupdf-1.2-source.patched/Makefile +--- mupdf-1.2-source/Makefile 2013-02-13 09:25:07.000000000 -0500 ++++ mupdf-1.2-source.patched/Makefile 2013-06-19 00:18:06.000000000 -0400 +@@ -12,7 +12,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. +-CFLAGS += $(XCFLAGS) -Ifitz -Ipdf -Ixps -Icbz -Iscripts ++CFLAGS += $(XCFLAGS) -fPIC -Ifitz -Ipdf -Ixps -Icbz -Iscripts + LIBS += $(XLIBS) -lfreetype -ljbig2dec -ljpeg -lopenjpeg -lz -lm + LIBS_V8 = $(LIBS) $(V8LIBS) + +@@ -37,6 +37,7 @@ + CC_CMD = $(QUIET_CC) $(CC) $(CFLAGS) -o $@ -c $< + CXX_CMD = $(QUIET_CXX) $(CXX) $(CFLAGS) -o $@ -c $< + AR_CMD = $(QUIET_AR) $(AR) cr $@ $^ ++SO_CMD = $(QUIET_LINK) $(CC) -fPIC --shared -Wl,-soname -Wl,`basename $@ | sed 's,\.[^.]*$$,,'` $^ -o $@ + LINK_CMD = $(QUIET_LINK) $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) + LINK_V8_CMD = $(QUIET_LINK) $(CXX) $(LDFLAGS) -o $@ $^ $(LIBS_V8) + MKDIR_CMD = $(QUIET_MKDIR) mkdir -p $@ +@@ -79,7 +80,9 @@ + + # --- Fitz, MuPDF, MuXPS and MuCBZ library --- + +-FITZ_LIB := $(OUT)/libfitz.a ++FITZ_LIB_A := $(OUT)/libfitz.a ++FITZ_LIB_SO := $(OUT)/libfitz.so.1.0 ++FITZ_LIB_SO1 := $(OUT)/libfitz.so.1 + FITZ_V8_LIB := $(OUT)/libfitzv8.a + + FITZ_SRC := $(notdir $(wildcard fitz/*.c draw/*.c)) +@@ -91,10 +94,10 @@ + MUXPS_SRC := $(notdir $(wildcard xps/*.c)) + MUCBZ_SRC := $(notdir $(wildcard cbz/*.c)) + +-$(FITZ_LIB) : $(addprefix $(OUT)/, $(FITZ_SRC:%.c=%.o)) +-$(FITZ_LIB) : $(addprefix $(OUT)/, $(MUPDF_SRC:%.c=%.o)) +-$(FITZ_LIB) : $(addprefix $(OUT)/, $(MUXPS_SRC:%.c=%.o)) +-$(FITZ_LIB) : $(addprefix $(OUT)/, $(MUCBZ_SRC:%.c=%.o)) ++FITZ_OBJECT_FILES := $(addprefix $(OUT)/, $(FITZ_SRC:%.c=%.o)) \ ++ $(addprefix $(OUT)/, $(MUPDF_SRC:%.c=%.o)) \ ++ $(addprefix $(OUT)/, $(MUXPS_SRC:%.c=%.o)) \ ++ $(addprefix $(OUT)/, $(MUCBZ_SRC:%.c=%.o)) + + $(FITZ_V8_LIB) : $(addprefix $(OUT)/, $(FITZ_SRC:%.c=%.o)) + $(FITZ_V8_LIB) : $(addprefix $(OUT)/, $(MUPDF_V8_SRC:%.c=%.o)) +@@ -102,9 +105,19 @@ + $(FITZ_V8_LIB) : $(addprefix $(OUT)/, $(MUXPS_SRC:%.c=%.o)) + $(FITZ_V8_LIB) : $(addprefix $(OUT)/, $(MUCBZ_SRC:%.c=%.o)) + +-libs: $(FITZ_LIB) $(THIRD_LIBS) + libs_v8: libs $(FITZ_V8_LIB) + ++$(FITZ_LIB_A) : $(FITZ_OBJECT_FILES) ++$(FITZ_LIB_SO) : $(FITZ_OBJECT_FILES) ++ ++libs: $(FITZ_LIB_A) $(FITZ_LIB_SO1) $(THIRD_LIBS) ++ ++$(FITZ_LIB_SO) : ++ $(SO_CMD) ++ ++$(FITZ_LIB_SO1) : $(FITZ_LIB_SO) ++ @cd $(OUT) && ln -s `basename $(FITZ_LIB_SO)` libfitz.so.1 ++ + # --- Generated CMAP, FONT and JAVASCRIPT files --- + + CMAPDUMP := $(OUT)/cmapdump +@@ -162,14 +175,14 @@ + # --- Tools and Apps --- + + MUDRAW := $(addprefix $(OUT)/, mudraw) +-$(MUDRAW) : $(FITZ_LIB) $(THIRD_LIBS) ++$(MUDRAW) : $(FITZ_LIB_SO1) $(THIRD_LIBS) + + MUTOOL := $(addprefix $(OUT)/, mutool) +-$(MUTOOL) : $(addprefix $(OUT)/, pdfclean.o pdfextract.o pdfinfo.o pdfposter.o pdfshow.o) $(FITZ_LIB) $(THIRD_LIBS) ++$(MUTOOL) : $(addprefix $(OUT)/, pdfclean.o pdfextract.o pdfinfo.o pdfposter.o pdfshow.o) $(FITZ_LIB_SO1) $(THIRD_LIBS) + + ifeq "$(NOX11)" "" + MUVIEW := $(OUT)/mupdf +-$(MUVIEW) : $(FITZ_LIB) $(THIRD_LIBS) ++$(MUVIEW) : $(FITZ_LIB_SO1) $(THIRD_LIBS) + $(MUVIEW) : $(addprefix $(OUT)/, x11_main.o x11_image.o pdfapp.o) + $(LINK_CMD) $(X11_LIBS) + +@@ -208,18 +221,19 @@ + incdir ?= $(prefix)/include + mandir ?= $(prefix)/share/man + +-install: $(FITZ_LIB) $(MUVIEW) $(MUDRAW) $(MUTOOL) ++install: $(FITZ_LIB_SO) $(MUVIEW) $(MUDRAW) $(MUTOOL) + install -d $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(DESTDIR)$(incdir) $(DESTDIR)$(mandir)/man1 +- install $(FITZ_LIB) $(DESTDIR)$(libdir) ++ install $(FITZ_LIB_SO) $(DESTDIR)$(libdir) ++ ln -s `basename $(FITZ_LIB_SO)` $(DESTDIR)$(libdir)/libfitz.so + install fitz/memento.h fitz/fitz.h pdf/mupdf.h xps/muxps.h cbz/mucbz.h $(DESTDIR)$(incdir) +- install $(MUVIEW) $(MUDRAW) $(MUBUSY) $(DESTDIR)$(bindir) ++ install $(MUVIEW) $(MUDRAW) $(MUTOOL) $(MUBUSY) $(DESTDIR)$(bindir) + install $(wildcard apps/man/*.1) $(DESTDIR)$(mandir)/man1 + + # --- Clean and Default --- + + all: all-nojs $(JSTARGETS) + +-all-nojs: $(THIRD_LIBS) $(FITZ_LIB) $(MUVIEW) $(MUDRAW) $(MUTOOL) ++all-nojs: $(THIRD_LIBS) $(FITZ_LIB_SO) $(MUVIEW) $(MUDRAW) $(MUTOOL) + + third: $(THIRD_LIBS) + diff --git a/office/mupdf/slack-desc b/office/mupdf/slack-desc index 2d6a7f1044..2c7c16a20c 100644 --- a/office/mupdf/slack-desc +++ b/office/mupdf/slack-desc @@ -1,5 +1,12 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + |-----handy-ruler------------------------------------------------------| -mupdf: mupdf (a lightweight PDF viewer and toolkit) +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 |