diff options
author | wiz <wiz@pkgsrc.org> | 2014-04-21 16:14:40 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2014-04-21 16:14:40 +0000 |
commit | bd72f9a2e6efd11dd9f16912cba27a9b964db937 (patch) | |
tree | 72f00616b3f8eb56d4289cb52e33c0daa13b64ef /print | |
parent | 4def95713a24d428a3343c45c5be4358bce2d2bf (diff) | |
download | pkgsrc-bd72f9a2e6efd11dd9f16912cba27a9b964db937.tar.gz |
Update to 1.4, provided by Leonardo Taccari in PR 48759.
List of changes on master since MuPDF 1.3
* Headline changes:
* CMYK rendering (mudraw PWG and PAM formats)
* TIFF viewer (with multi-page support).
* Added MuJS Javascript interpreter.
* MuJS is the default, V8 and JavaScriptCore are compile time options.
* Javascript support has to be explicitly enabled with pdf_enable_js.
* All viewers now have JavaScript enabled in the default builds.
* Viewers:
* X11: Horizontal scroll wheel support.
* X11: Status bar display with warnings.
* Android: Digital signatures.
* iOS: Links, form filling, annotation editing, and javascript.
* iOS: Reflow mode.
* WinRT: Printing.
* WinRT: Improved zooming behaviour.
* Tools:
* mudraw: Banded rendering with -B /band-height/.
* mudraw: Select output format with -F /format/.
* mudraw: Write to stdout if you use '-' as the output file name.
* mudraw: Add TGA output format.
* mudraw: Improved SVG output.
* mutool show: Write output to file instead of stdout with -o /filename/.
* mutool clean: Clean content streams with -s option.
* Annotations:
* Improved font handling.
* Form fields.
* Free text.
* Sticky notes.
* Optimizations:
* glyph cache: Partial eviction.
* glyph cache: Run-length compressed glyphs.
* Smarter handling of subpixel metrics in text rendering.
* Optimized blitting functions.
* Optimized gradient mesh drawing.
* API changes and additions:
* fz_stream API reworked: replace "read" function with "next".
* "Rebind" functions to associate context bound objects with another context:
fz_output, fz_stream, fz_device and fz_document.
* Introduce "document handlers" to detect and open different file types.
* Must now call fz_register_document_handlers() to register the defaults.
* May register your own handlers as well to work with fz_open_document.
* Hook to load system fonts: fz_install_load_system_font_funcs.
* PDF xref cache flushing functions (mark/clear/clear-to-mark).
* Add our own "printf" set of functions to format strings and write to fz_output:
* Format %f as short as possible while preserving precision.
* Has %C for formatting a unicode character as UTF-8.
* Has %M to format fz_matrix.
* Has %R to format fz_rect.
* Has %q and %( to format strings with escaped characters.
* PDF process interface: allow PDF interpreter to do more than just draw!
* Content stream state cleaning filter.
* Content stream rewriting filter.
* PDF digital signatures.
* Stroke states may now be stored on the stack.
* Improved fz_path internals.
* Gradient mesh drawing interface has been improved.
* Save files with incremental updates.
Diffstat (limited to 'print')
-rw-r--r-- | print/mupdf/Makefile | 18 | ||||
-rw-r--r-- | print/mupdf/PLIST | 10 | ||||
-rw-r--r-- | print/mupdf/distinfo | 20 | ||||
-rw-r--r-- | print/mupdf/files/mupdf.pc | 2 | ||||
-rw-r--r-- | print/mupdf/options.mk | 5 | ||||
-rw-r--r-- | print/mupdf/patches/patch-Makethird | 41 | ||||
-rw-r--r-- | print/mupdf/patches/patch-ab | 28 | ||||
-rw-r--r-- | print/mupdf/patches/patch-ac | 150 | ||||
-rw-r--r-- | print/mupdf/patches/patch-ae | 96 | ||||
-rw-r--r-- | print/mupdf/patches/patch-ba | 73 | ||||
-rw-r--r-- | print/mupdf/patches/patch-bb | 13 | ||||
-rw-r--r-- | print/mupdf/patches/patch-bc | 13 | ||||
-rw-r--r-- | print/mupdf/patches/patch-bd | 13 |
13 files changed, 214 insertions, 268 deletions
diff --git a/print/mupdf/Makefile b/print/mupdf/Makefile index 9a207f4e88d..070634ea4c7 100644 --- a/print/mupdf/Makefile +++ b/print/mupdf/Makefile @@ -1,10 +1,9 @@ -# $NetBSD: Makefile,v 1.21 2014/02/14 17:49:41 drochner Exp $ +# $NetBSD: Makefile,v 1.22 2014/04/21 16:14:40 wiz Exp $ -DISTNAME= mupdf-1.3-source +DISTNAME= mupdf-1.4-source PKGNAME= ${DISTNAME:S/-source//} -PKGREVISION= 2 CATEGORIES= print -MASTER_SITES= http://mupdf.googlecode.com/files/ +MASTER_SITES= http://mupdf.com/downloads/ MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://mupdf.com/ @@ -25,14 +24,21 @@ INSTALL_MAKE_FLAGS+= prefix=${PREFIX} INSTALL_MAKE_FLAGS+= mandir=${PREFIX}/${PKGMANDIR} LDFLAGS= ${COMPILER_RPATH_FLAG}${X11BASE}/lib MAKE_FLAGS+= LDFLAGS=${LDFLAGS:Q} -MAKE_FLAGS+= V8_PRESENT=no MAKE_FLAGS+= build=release .include "options.mk" # Remove thirdparty directory in order to use the libraries provided by pkgsrc +# mujs directory is an exception and should not be removed (MuJS is the +# default Javascript interpreter for mupdf). post-extract: - ${RM} -fr ${WRKSRC}/thirdparty + ${RM} -fr \ + ${WRKSRC}/thirdparty/curl \ + ${WRKSRC}/thirdparty/freetype \ + ${WRKSRC}/thirdparty/jbig2dec \ + ${WRKSRC}/thirdparty/jpeg \ + ${WRKSRC}/thirdparty/openjpeg \ + ${WRKSRC}/thirdparty/zlib post-build: sed -e "s,@PREFIX@,${PREFIX}," ${FILESDIR}/mupdf.pc > ${WRKSRC}/mupdf.pc diff --git a/print/mupdf/PLIST b/print/mupdf/PLIST index 6c8e773aaa4..e62dd43b9d5 100644 --- a/print/mupdf/PLIST +++ b/print/mupdf/PLIST @@ -1,5 +1,6 @@ -@comment $NetBSD: PLIST,v 1.6 2014/01/09 14:25:23 mef Exp $ +@comment $NetBSD: PLIST,v 1.7 2014/04/21 16:14:40 wiz Exp $ bin/mudraw +bin/mujstest bin/mupdf bin/mutool include/mupdf/cbz.h @@ -19,6 +20,7 @@ include/mupdf/fitz/font.h include/mupdf/fitz/function.h include/mupdf/fitz/getopt.h include/mupdf/fitz/glyph-cache.h +include/mupdf/fitz/glyph.h include/mupdf/fitz/hash.h include/mupdf/fitz/image.h include/mupdf/fitz/link.h @@ -30,6 +32,7 @@ include/mupdf/fitz/output-png.h include/mupdf/fitz/output-pnm.h include/mupdf/fitz/output-pwg.h include/mupdf/fitz/output-svg.h +include/mupdf/fitz/output-tga.h include/mupdf/fitz/output.h include/mupdf/fitz/path.h include/mupdf/fitz/pixmap.h @@ -41,6 +44,8 @@ include/mupdf/fitz/structured-text.h include/mupdf/fitz/system.h include/mupdf/fitz/text.h include/mupdf/fitz/transition.h +include/mupdf/fitz/tree.h +include/mupdf/fitz/version.h include/mupdf/fitz/write-document.h include/mupdf/fitz/xml.h include/mupdf/img.h @@ -62,8 +67,9 @@ include/mupdf/pdf/parse.h include/mupdf/pdf/resource.h include/mupdf/pdf/widget.h include/mupdf/pdf/xref.h +include/mupdf/tiff.h include/mupdf/xps.h -lib/libmupdf-js-none.la +lib/libmujs.la lib/libmupdf.la lib/pkgconfig/mupdf.pc man/man1/mudraw.1 diff --git a/print/mupdf/distinfo b/print/mupdf/distinfo index 7a958aca660..2cb54bd7534 100644 --- a/print/mupdf/distinfo +++ b/print/mupdf/distinfo @@ -1,13 +1,9 @@ -$NetBSD: distinfo,v 1.12 2014/02/20 23:15:27 wiz Exp $ +$NetBSD: distinfo,v 1.13 2014/04/21 16:14:40 wiz Exp $ -SHA1 (mupdf-1.3-source.tar.gz) = 082325aceb5565b07b82c2b6cc52a97533e03cf9 -RMD160 (mupdf-1.3-source.tar.gz) = 5f898cfaa3a54c7c34835411b0d386914edee2f8 -Size (mupdf-1.3-source.tar.gz) = 14594969 bytes -SHA1 (patch-Makethird) = 37b0be98bf859ec9d995dd7a3c05c191be42a479 -SHA1 (patch-ab) = d3258d2c37743a3c4bc1949d3246e71d81e4d69e -SHA1 (patch-ac) = d63f79f608aed2f237b9d3e8e557a342b0e1c420 -SHA1 (patch-ae) = df35d031a816eceac5bdfd5ddb298adea4a48ce0 -SHA1 (patch-ba) = eeb839953619c08d222b3400bab38b738c08b465 -SHA1 (patch-bb) = 82002ae6fe2eef67c1ee64123434298765716047 -SHA1 (patch-bc) = 02b2cb087dd94165f71126636b82976917cd0d7f -SHA1 (patch-bd) = f8d4d1f7f638df4a39279294868dad8ac1ac5a33 +SHA1 (mupdf-1.4-source.tar.gz) = 805f9b37de371638eddb2f964837fecec8b64b4a +RMD160 (mupdf-1.4-source.tar.gz) = 368140a0f825483268faaf778328bc6c3f4d461f +Size (mupdf-1.4-source.tar.gz) = 13253644 bytes +SHA1 (patch-Makethird) = 950daf9a235f0da97d6a20dedd59bc8bd1c3e274 +SHA1 (patch-ab) = 896d37f15718fed8880b56643bb131406cfe6861 +SHA1 (patch-ac) = 87c4dbd17ff737f5edcfcf41c97add12722456ee +SHA1 (patch-ae) = bad4b6b8c669c752c6318bb564d1176daac30d19 diff --git a/print/mupdf/files/mupdf.pc b/print/mupdf/files/mupdf.pc index e10c0ed849d..45c39b849d3 100644 --- a/print/mupdf/files/mupdf.pc +++ b/print/mupdf/files/mupdf.pc @@ -5,6 +5,6 @@ includedir=${prefix}/include Name: mupdf Description: library for PDF files -Version: 1.3 +Version: 1.4 Libs: -Wl,-R${libdir} -L${libdir} -lmupdf Cflags: -I${includedir} diff --git a/print/mupdf/options.mk b/print/mupdf/options.mk index c9900d4c1a4..ac7fbeafb21 100644 --- a/print/mupdf/options.mk +++ b/print/mupdf/options.mk @@ -1,4 +1,4 @@ -# $NetBSD: options.mk,v 1.1 2014/01/09 14:26:15 mef Exp $ +# $NetBSD: options.mk,v 1.2 2014/04/21 16:14:40 wiz Exp $ PKG_OPTIONS_VAR= PKG_OPTIONS.mupdf PKG_SUPPORTED_OPTIONS= curl @@ -9,8 +9,7 @@ PKG_SUPPORTED_OPTIONS= curl # curl support # .if !empty(PKG_OPTIONS:Mcurl) +MAKE_FLAGS+= HAVE_CURL=yes .include "../../www/curl/buildlink3.mk" .include "../../mk/pthread.buildlink3.mk" -.else -MAKE_FLAGS+= NOCURL=yes .endif diff --git a/print/mupdf/patches/patch-Makethird b/print/mupdf/patches/patch-Makethird index 167ba287c86..a4f2f56f97e 100644 --- a/print/mupdf/patches/patch-Makethird +++ b/print/mupdf/patches/patch-Makethird @@ -1,15 +1,36 @@ -$NetBSD: patch-Makethird,v 1.1 2014/01/09 14:25:23 mef Exp $ +$NetBSD: patch-Makethird,v 1.2 2014/04/21 16:14:40 wiz Exp $ -libcurl (www/curl) support. By default mupdf can be installed with curl -support *only* building it in ${WRKSRC}/thirdparty. +o mujs building support with libtool +o libcurl (www/curl) support. By default mupdf can be installed with curl + support *only* building it in ${WRKSRC}/thirdparty. ---- Makethird.orig 2013-08-14 12:41:20.000000000 +0000 +--- Makethird.orig 2014-04-11 15:10:41.000000000 +0000 +++ Makethird -@@ -444,5 +444,6 @@ $(CURL_OUT)/%.o: $(CURL_DIR)/lib/%.c | $ - CURL_CFLAGS := -I$(CURL_DIR)/include - CURL_LIBS := $(SYS_CURL_DEPS) - else --NOCURL := yes +@@ -50,14 +50,14 @@ endif + + ifneq "$(wildcard $(MUJS_DIR)/README)" "" + +-MUJS_LIB := $(OUT)/libmujs.a ++MUJS_LIB := $(OUT)/libmujs.la + MUJS_OUT := $(OUT)/mujs + MUJS_SRC := one.c + +-$(MUJS_LIB): $(addprefix $(MUJS_OUT)/, $(MUJS_SRC:%.c=%.o)) ++$(MUJS_LIB): $(addprefix $(MUJS_OUT)/, $(MUJS_SRC:%.c=%.lo)) + $(MUJS_OUT): + $(MKDIR_CMD) +-$(MUJS_OUT)/%.o: $(MUJS_DIR)/%.c | $(MUJS_OUT) ++$(MUJS_OUT)/%.lo: $(MUJS_DIR)/%.c | $(MUJS_OUT) + $(CC_CMD) + + MUJS_CFLAGS := -I$(MUJS_DIR) +@@ -456,6 +456,9 @@ CURL_LIBS := $(SYS_CURL_DEPS) + HAVE_CURL := yes + endif + +CURL_CFLAGS := $(SYS_CURL_CFLAGS) +CURL_LIBS := $(SYS_CURL_LIBS) $(SYS_CURL_DEPS) - endif ++ + # --- X11 --- + + ifeq "$(HAVE_X11)" "yes" diff --git a/print/mupdf/patches/patch-ab b/print/mupdf/patches/patch-ab index e11a04123f5..5215a04e9f1 100644 --- a/print/mupdf/patches/patch-ab +++ b/print/mupdf/patches/patch-ab @@ -1,21 +1,23 @@ -$NetBSD: patch-ab,v 1.5 2014/01/09 14:25:23 mef Exp $ +$NetBSD: patch-ab,v 1.6 2014/04/21 16:14:40 wiz Exp $ o Handle the various operating systems in the same way avoiding hardcoding o Build and link with openjpeg-2.0 o libcurl (www/curl) support ---- Makerules.orig 2013-08-14 12:41:20.000000000 +0000 +--- Makerules.orig 2014-04-11 15:10:41.000000000 +0000 +++ Makerules -@@ -24,52 +24,26 @@ else +@@ -25,37 +25,6 @@ else $(error unknown build setting: '$(build)') endif -# Windows (MINGW) build doesn't use system libraries. -ifeq "$(OS)" "MINGW" --NOX11 ?= yes - -# Mac OS X doesn't have pkg-config so we hard code paths. --else ifeq "$(OS)" "Darwin" +-else ifeq "$(OS)" "MACOS" +- +-HAVE_X11 ?= yes +- -SYS_OPENSSL_CFLAGS = -DHAVE_OPENSSL -SYS_OPENSSL_LIBS = -lcrypto - @@ -31,16 +33,22 @@ o libcurl (www/curl) support -SYS_JPEG_LIBS = -ljpeg -SYS_ZLIB_LIBS = -lz - --RANLIB_CMD = ranlib $@ +-CC = xcrun cc +-AR = xcrun ar +-LD = xcrun ld +-RANLIB_CMD = xcrun ranlib $@ - --# Other Unixes use pkg-config for system libraries. --else +-# Linux uses pkg-config for system libraries. +-else ifeq "$(OS)" "Linux" - + HAVE_X11 ?= yes + ifeq "$(shell pkg-config --exists libcrypto && echo yes)" "yes" - SYS_OPENSSL_CFLAGS = -DHAVE_OPENSSL $(shell pkg-config --cflags libcrypto) +@@ -63,22 +32,21 @@ SYS_OPENSSL_CFLAGS = -DHAVE_OPENSSL $(sh SYS_OPENSSL_LIBS = $(shell pkg-config --libs libcrypto) endif +-# TODO: use pkg-config for system CURL +SYS_CURL_CFLAGS = $(shell pkg-config --cflags libcurl) SYS_CURL_DEPS = -lpthread -lrt +SYS_CURL_LIBS = $(shell pkg-config --libs libcurl) @@ -52,7 +60,7 @@ o libcurl (www/curl) support SYS_FREETYPE_LIBS = $(shell pkg-config --libs freetype2) -SYS_OPENJPEG_CFLAGS = $(shell pkg-config --cflags libopenjpeg1) -SYS_OPENJPEG_LIBS = $(shell pkg-config --libs libopenjpeg1) -+SYS_OPENJPEG_CFLAGS = -I@PREFIX@/include/openjpeg-2.0 ++SYS_OPENJPEG_CFLAGS = -I/usr/pkg/include/openjpeg-2.0 +SYS_OPENJPEG_LIBS = -lopenjp2 SYS_JBIG2DEC_LIBS = -ljbig2dec SYS_JPEG_LIBS = -ljpeg diff --git a/print/mupdf/patches/patch-ac b/print/mupdf/patches/patch-ac index f902a49924a..7ba714f3f15 100644 --- a/print/mupdf/patches/patch-ac +++ b/print/mupdf/patches/patch-ac @@ -1,17 +1,18 @@ -$NetBSD: patch-ac,v 1.7 2014/02/20 23:15:27 wiz Exp $ +$NetBSD: patch-ac,v 1.8 2014/04/21 16:14:40 wiz Exp $ o libtool support o Install target cleanup o Install only one "mupdf" binary, prefer the featureful one and always install it as "mupdf" +o libmujs support: install like a non-thirdparty mupdf's library ---- Makefile.orig 2013-08-14 12:41:20.000000000 +0000 +--- Makefile.orig 2014-04-11 15:10:41.000000000 +0000 +++ Makefile @@ -41,22 +41,12 @@ CFLAGS += $(ZLIB_CFLAGS) # --- Commands --- --ifeq "$(verbose)" "" +-ifneq "$(verbose)" "yes" -QUIET_AR = @ echo ' ' ' ' AR $@ ; -QUIET_CC = @ echo ' ' ' ' CC $@ ; -QUIET_CXX = @ echo ' ' ' ' CXX $@ ; @@ -36,55 +37,70 @@ o Install only one "mupdf" binary, prefer the featureful one and always # --- File lists --- -@@ -67,6 +57,7 @@ ALL_DIR += $(OUT)/cbz - ALL_DIR += $(OUT)/img - ALL_DIR += $(OUT)/tools - ALL_DIR += $(OUT)/platform/x11 -+ALL_DIR += $(OUT)/platform/x11/curl - - FITZ_HDR := include/mupdf/fitz.h $(wildcard include/mupdf/fitz/*.h) - PDF_HDR := include/mupdf/pdf.h $(wildcard include/mupdf/pdf/*.h) -@@ -86,14 +77,14 @@ XPS_SRC_HDR := $(wildcard source/xps/*.h - CBZ_SRC_HDR := $(wildcard source/cbz/*.h) +@@ -90,33 +80,33 @@ CBZ_SRC_HDR := $(wildcard source/cbz/*.h IMG_SRC_HDR := $(wildcard source/img/*.h) + TIFF_SRC_HDR := $(wildcard source/tiff/*.h) -FITZ_OBJ := $(subst source/, $(OUT)/, $(addsuffix .o, $(basename $(FITZ_SRC)))) -PDF_OBJ := $(subst source/, $(OUT)/, $(addsuffix .o, $(basename $(PDF_SRC)))) -XPS_OBJ := $(subst source/, $(OUT)/, $(addsuffix .o, $(basename $(XPS_SRC)))) -CBZ_OBJ := $(subst source/, $(OUT)/, $(addsuffix .o, $(basename $(CBZ_SRC)))) -IMG_OBJ := $(subst source/, $(OUT)/, $(addsuffix .o, $(basename $(IMG_SRC)))) +-TIFF_OBJ := $(subst source/, $(OUT)/, $(addsuffix .o, $(basename $(TIFF_SRC)))) +FITZ_OBJ := $(subst source/, $(OUT)/, $(addsuffix .lo, $(basename $(FITZ_SRC)))) +PDF_OBJ := $(subst source/, $(OUT)/, $(addsuffix .lo, $(basename $(PDF_SRC)))) +XPS_OBJ := $(subst source/, $(OUT)/, $(addsuffix .lo, $(basename $(XPS_SRC)))) +CBZ_OBJ := $(subst source/, $(OUT)/, $(addsuffix .lo, $(basename $(CBZ_SRC)))) +IMG_OBJ := $(subst source/, $(OUT)/, $(addsuffix .lo, $(basename $(IMG_SRC)))) - --PDF_JS_V8_OBJ := $(OUT)/pdf/js/pdf-js.o $(OUT)/pdf/js/pdf-jsimp-cpp.o $(OUT)/pdf/js/pdf-jsimp-v8.o --PDF_JS_NONE_OBJ := $(OUT)/pdf/js/pdf-js-none.o -+PDF_JS_V8_OBJ := $(OUT)/pdf/js/pdf-js.lo $(OUT)/pdf/js/pdf-jsimp-cpp.lo $(OUT)/pdf/js/pdf-jsimp-v8.lo -+PDF_JS_NONE_OBJ := $(OUT)/pdf/js/pdf-js-none.lo ++TIFF_OBJ := $(subst source/, $(OUT)/, $(addsuffix .lo, $(basename $(TIFF_SRC)))) + + # --- Choice of Javascript library --- + + ifeq "$(HAVE_MUJS)" "yes" +-PDF_OBJ += $(OUT)/pdf/js/pdf-js.o +-PDF_OBJ += $(OUT)/pdf/js/pdf-jsimp-mu.o ++PDF_OBJ += $(OUT)/pdf/js/pdf-js.lo ++PDF_OBJ += $(OUT)/pdf/js/pdf-jsimp-mu.lo + THIRD_LIBS += $(MUJS_LIB) + LIBS += $(MUJS_LIBS) + CFLAGS += $(MUJS_CFLAGS) + else ifeq "$(HAVE_JSCORE)" "yes" +-PDF_OBJ += $(OUT)/pdf/js/pdf-js.o +-PDF_OBJ += $(OUT)/pdf/js/pdf-jsimp-jscore.o ++PDF_OBJ += $(OUT)/pdf/js/pdf-js.lo ++PDF_OBJ += $(OUT)/pdf/js/pdf-jsimp-jscore.lo + LIBS += $(JSCORE_LIBS) + CFLAGS += $(JSCORE_CFLAGS) + else ifeq "$(HAVE_V8)" "yes" +-PDF_OBJ += $(OUT)/pdf/js/pdf-js.o +-PDF_OBJ += $(OUT)/pdf/js/pdf-jsimp-cpp.o $(OUT)/pdf/js/pdf-jsimp-v8.o ++PDF_OBJ += $(OUT)/pdf/js/pdf-js.lo ++PDF_OBJ += $(OUT)/pdf/js/pdf-jsimp-cpp.lo $(OUT)/pdf/js/pdf-jsimp-v8.lo + LIBS += $(V8_LIBS) + CFLAGS += $(V8_CFLAGS) + else +-PDF_OBJ += $(OUT)/pdf/js/pdf-js-none.o ++PDF_OBJ += $(OUT)/pdf/js/pdf-js-none.lo + endif $(FITZ_OBJ) : $(FITZ_HDR) $(FITZ_SRC_HDR) - $(PDF_OBJ) : $(FITZ_HDR) $(PDF_HDR) $(PDF_SRC_HDR) -@@ -106,14 +97,14 @@ $(PDF_JS_NONE_OBJ) := $(FITZ_HDR) $(PDF +@@ -128,41 +118,44 @@ $(TIFF_OBJ) : $(FITZ_HDR) $(IMG_HDR) $(T # --- Library --- -MUPDF_LIB := $(OUT)/libmupdf.a --MUPDF_JS_NONE_LIB := $(OUT)/libmupdf-js-none.a +MUPDF_LIB := $(OUT)/libmupdf.la -+MUPDF_JS_NONE_LIB := $(OUT)/libmupdf-js-none.la - $(MUPDF_LIB) : $(FITZ_OBJ) $(PDF_OBJ) $(XPS_OBJ) $(CBZ_OBJ) $(IMG_OBJ) - $(MUPDF_JS_NONE_LIB) : $(PDF_JS_NONE_OBJ) + $(MUPDF_LIB) : $(FITZ_OBJ) $(PDF_OBJ) $(XPS_OBJ) $(CBZ_OBJ) $(IMG_OBJ) $(TIFF_OBJ) - ifeq "$(V8_PRESENT)" "yes" --MUPDF_JS_V8_LIB := $(OUT)/libmupdf-js-v8.a -+MUPDF_JS_V8_LIB := $(OUT)/libmupdf-js-v8.la - $(MUPDF_JS_V8_LIB) : $(PDF_JS_V8_OBJ) - endif +-INSTALL_LIBS := $(MUPDF_LIB) ++INSTALL_LIBS := $(MUPDF_LIB) ++ifeq "$(HAVE_MUJS)" "yes" ++INSTALL_LIBS += $(MUJS_LIB) ++endif + + # --- Rules --- -@@ -124,31 +115,29 @@ INSTALL_LIBS := $(MUPDF_LIB) $(MUPDF_JS_ $(ALL_DIR) $(OUT) $(GEN) : $(MKDIR_CMD) @@ -92,7 +108,7 @@ o Install only one "mupdf" binary, prefer the featureful one and always +$(OUT)/%.la : $(RM_CMD) $(AR_CMD) -- $(RANLIB_CMD) + $(RANLIB_CMD) -$(OUT)/%: $(OUT)/%.o +$(OUT)/%: $(OUT)/%.lo @@ -112,10 +128,9 @@ o Install only one "mupdf" binary, prefer the featureful one and always -$(OUT)/platform/x11/%.o : platform/x11/%.c | $(ALL_DIR) +$(OUT)/platform/x11/%.lo : platform/x11/%.c | $(ALL_DIR) - $(CC_CMD) $(X11_CFLAGS) $(CURL_CFLAGS) + $(CC_CMD) $(X11_CFLAGS) -$(OUT)/platform/x11/curl/%.o : platform/x11/%.c | $(ALL_DIR) -- mkdir -p $(OUT)/platform/x11/curl +$(OUT)/platform/x11/curl/%.lo : platform/x11/%.c | $(ALL_DIR) $(CC_CMD) $(X11_CFLAGS) $(CURL_CFLAGS) -DHAVE_CURL @@ -124,7 +139,7 @@ o Install only one "mupdf" binary, prefer the featureful one and always # --- Generated CMAP, FONT and JAVASCRIPT files --- -@@ -208,41 +197,41 @@ endif +@@ -222,23 +215,23 @@ endif generate: $(CMAP_GEN) $(FONT_GEN) $(JAVASCRIPT_GEN) $(ADOBECA_GEN) @@ -142,66 +157,65 @@ o Install only one "mupdf" binary, prefer the featureful one and always # --- Tools and Apps --- MUDRAW := $(addprefix $(OUT)/, mudraw) - $(MUDRAW) : $(MUPDF_LIB) $(MUPDF_JS_NONE_LIB) $(THIRD_LIBS) --$(MUDRAW) : $(addprefix $(OUT)/tools/, mudraw.o) -+$(MUDRAW) : $(addprefix $(OUT)/tools/, mudraw.lo) +-MUDRAW_OBJ := $(addprefix $(OUT)/tools/, mudraw.o) ++MUDRAW_OBJ := $(addprefix $(OUT)/tools/, mudraw.lo) + $(MUDRAW_OBJ) : $(FITZ_HDR) + $(MUDRAW) : $(MUPDF_LIB) $(THIRD_LIBS) + $(MUDRAW) : $(MUDRAW_OBJ) $(LINK_CMD) MUTOOL := $(addprefix $(OUT)/, mutool) - $(MUTOOL) : $(MUPDF_LIB) $(MUPDF_JS_NONE_LIB) $(THIRD_LIBS) --$(MUTOOL) : $(addprefix $(OUT)/tools/, mutool.o pdfclean.o pdfextract.o pdfinfo.o pdfposter.o pdfshow.o) -+$(MUTOOL) : $(addprefix $(OUT)/tools/, mutool.lo pdfclean.lo pdfextract.lo pdfinfo.lo pdfposter.lo pdfshow.lo) +-MUTOOL_OBJ := $(addprefix $(OUT)/tools/, mutool.o pdfclean.o pdfextract.o pdfinfo.o pdfposter.o pdfshow.o) ++MUTOOL_OBJ := $(addprefix $(OUT)/tools/, mutool.lo pdfclean.lo pdfextract.lo pdfinfo.lo pdfposter.lo pdfshow.lo) + $(MUTOOL_OBJ): $(FITZ_HDR) $(PDF_HDR) + $(MUTOOL) : $(MUPDF_LIB) $(THIRD_LIBS) + $(MUTOOL) : $(MUTOOL_OBJ) +@@ -246,24 +239,24 @@ $(MUTOOL) : $(MUTOOL_OBJ) + + MJSGEN := $(OUT)/mjsgen + $(MJSGEN) : $(MUPDF_LIB) $(THIRD_LIBS) +-$(MJSGEN) : $(addprefix $(OUT)/tools/, mjsgen.o) ++$(MJSGEN) : $(addprefix $(OUT)/tools/, mjsgen.lo) $(LINK_CMD) - ifeq "$(V8_PRESENT)" "yes" - MUJSTEST_V8 := $(OUT)/mujstest-v8 - $(MUJSTEST_V8) : $(MUPDF_LIB) $(MUPDF_JS_V8_LIB) $(THIRD_LIBS) --$(MUJSTEST_V8) : $(addprefix $(OUT)/platform/x11/, jstest_main.o pdfapp.o) -+$(MUJSTEST_V8) : $(addprefix $(OUT)/platform/x11/, jstest_main.lo pdfapp.lo) - $(LINK_CMD) $(V8_LIBS) - endif + MUJSTEST := $(OUT)/mujstest + $(MUJSTEST) : $(MUPDF_LIB) $(THIRD_LIBS) +-$(MUJSTEST) : $(addprefix $(OUT)/platform/x11/, jstest_main.o pdfapp.o) ++$(MUJSTEST) : $(addprefix $(OUT)/platform/x11/, jstest_main.lo pdfapp.lo) + $(LINK_CMD) - ifeq "$(NOX11)" "" + ifeq "$(HAVE_X11)" "yes" -MUVIEW_X11 := $(OUT)/mupdf-x11 +MUVIEW_X11 := $(OUT)/platform/x11/mupdf - $(MUVIEW_X11) : $(MUPDF_LIB) $(MUPDF_JS_NONE_LIB) $(THIRD_LIBS) + $(MUVIEW_X11) : $(MUPDF_LIB) $(THIRD_LIBS) -$(MUVIEW_X11) : $(addprefix $(OUT)/platform/x11/, x11_main.o x11_image.o pdfapp.o) +$(MUVIEW_X11) : $(addprefix $(OUT)/platform/x11/, x11_main.lo x11_image.lo pdfapp.lo) $(LINK_CMD) $(X11_LIBS) - ifeq "$(NOCURL)" "" + ifeq "$(HAVE_CURL)" "yes" -MUVIEW_X11_CURL := $(OUT)/mupdf-x11-curl +MUVIEW_X11_CURL := $(OUT)/platform/x11/curl/mupdf - $(MUVIEW_X11_CURL) : $(MUPDF_LIB) $(MUPDF_JS_NONE_LIB) $(THIRD_LIBS) $(CURL_LIB) + $(MUVIEW_X11_CURL) : $(MUPDF_LIB) $(THIRD_LIBS) $(CURL_LIB) -$(MUVIEW_X11_CURL) : $(addprefix $(OUT)/platform/x11/curl/, x11_main.o x11_image.o pdfapp.o curl_stream.o) +$(MUVIEW_X11_CURL) : $(addprefix $(OUT)/platform/x11/curl/, x11_main.lo x11_image.lo pdfapp.lo curl_stream.lo) $(LINK_CMD) $(X11_LIBS) $(CURL_LIBS) endif endif -@@ -251,7 +240,7 @@ ifeq "$(V8_PRESENT)" "yes" - ifeq "$(NOX11)" "" - MUVIEW_X11_V8 := $(OUT)/mupdf-x11-v8 - $(MUVIEW_X11_V8) : $(MUPDF_LIB) $(MUPDF_JS_V8_LIB) $(THIRD_LIBS) --$(MUVIEW_X11_V8) : $(addprefix $(OUT)/platform/x11/, x11_main.o x11_image.o pdfapp.o) -+$(MUVIEW_X11_V8) : $(addprefix $(OUT)/platform/x11/, x11_main.lo x11_image.lo pdfapp.lo) - $(LINK_CMD) $(X11_LIBS) $(V8_LIBS) - endif - endif -@@ -260,7 +249,12 @@ MUVIEW := $(MUVIEW_X11) - MUVIEW_V8 := $(MUVIEW_X11_V8) +@@ -271,7 +264,12 @@ endif + MUVIEW := $(MUVIEW_X11) MUVIEW_CURL := $(MUVIEW_X11_CURL) --INSTALL_APPS := $(MUDRAW) $(MUTOOL) $(MUVIEW) $(MUJSTEST_V8) $(MUVIEW_V8) $(MUVIEW_CURL) -+INSTALL_APPS := $(MUDRAW) $(MUTOOL) -+ifeq "$(NOCURL)" "" +-INSTALL_APPS := $(MUDRAW) $(MUTOOL) $(MUVIEW) $(MUJSTEST) $(MUVIEW_CURL) ++INSTALL_APPS := $(MUDRAW) $(MUTOOL) $(MUJSTEST) ++ifeq "$(HAVE_CURL)" "yes" +INSTALL_APPS += $(MUVIEW_CURL) -+else ifeq "$(NOX11)" "" ++else ifeq "$(HAVE_X11)" "yes" +INSTALL_APPS += $(MUVIEW) +endif - # --- Format man pages --- + # --- Update version string header --- -@@ -286,24 +280,26 @@ libs: $(INSTALL_LIBS) +@@ -304,24 +302,26 @@ libs: $(INSTALL_LIBS) apps: $(INSTALL_APPS) install: libs apps diff --git a/print/mupdf/patches/patch-ae b/print/mupdf/patches/patch-ae index 67db8543dac..4ce63959c46 100644 --- a/print/mupdf/patches/patch-ae +++ b/print/mupdf/patches/patch-ae @@ -1,8 +1,8 @@ -$NetBSD: patch-ae,v 1.3 2014/01/09 14:25:23 mef Exp $ +$NetBSD: patch-ae,v 1.4 2014/04/21 16:14:40 wiz Exp $ Avoid namespace conflicts with bswap(3). ---- source/fitz/crypt-sha2.c.orig 2013-08-14 12:41:20.000000000 +0000 +--- source/fitz/crypt-sha2.c.orig 2014-04-11 15:10:41.000000000 +0000 +++ source/fitz/crypt-sha2.c @@ -17,7 +17,7 @@ static inline int isbigendian(void) return *(char*)&one == 0; @@ -11,64 +11,72 @@ Avoid namespace conflicts with bswap(3). -static inline unsigned int bswap32(unsigned int num) +static inline unsigned int mup_bswap32(unsigned int num) { - if (!isbigendian()) - { -@@ -29,7 +29,7 @@ static inline unsigned int bswap32(unsig - return num; + return ( (((num) << 24)) + | (((num) << 8) & 0x00FF0000) +@@ -25,7 +25,7 @@ static inline unsigned int bswap32(unsig + | (((num) >> 24)) ); } -static inline uint64_t bswap64(uint64_t num) +static inline uint64_t mup_bswap64(uint64_t num) { - if (!isbigendian()) - { -@@ -107,7 +107,7 @@ transform256(unsigned int state[8], cons - + return ( (((num) << 56)) + | (((num) << 40) & 0x00FF000000000000ULL) +@@ -99,7 +99,7 @@ transform256(unsigned int state[8], unsi /* ensure big-endian integers */ - for (j = 0; j < 16; j++) -- data[j] = bswap32(data_xe[j]); -+ data[j] = mup_bswap32(data_xe[j]); + if (!isbigendian()) + for (j = 0; j < 16; j++) +- data[j] = bswap32(data[j]); ++ data[j] = mup_bswap32(data[j]); /* Copy state[] to working vars. */ memcpy(T, state, sizeof(T)); -@@ -198,12 +198,12 @@ void fz_sha256_final(fz_sha256 *context, - context->count[1] = (context->count[1] << 3) + (context->count[0] >> 29); - context->count[0] = context->count[0] << 3; +@@ -192,8 +192,8 @@ void fz_sha256_final(fz_sha256 *context, -- context->buffer.u32[14] = bswap32(context->count[1]); -- context->buffer.u32[15] = bswap32(context->count[0]); -+ context->buffer.u32[14] = mup_bswap32(context->count[1]); -+ context->buffer.u32[15] = mup_bswap32(context->count[0]); - transform256(context->state, context->buffer.u32); - - for (j = 0; j < 8; j++) -- ((unsigned int *)digest)[j] = bswap32(context->state[j]); -+ ((unsigned int *)digest)[j] = mup_bswap32(context->state[j]); - memset(context, 0, sizeof(fz_sha256)); - } + if (!isbigendian()) + { +- context->buffer.u32[14] = bswap32(context->count[1]); +- context->buffer.u32[15] = bswap32(context->count[0]); ++ context->buffer.u32[14] = mup_bswap32(context->count[1]); ++ context->buffer.u32[15] = mup_bswap32(context->count[0]); + } + else + { +@@ -204,7 +204,7 @@ void fz_sha256_final(fz_sha256 *context, -@@ -268,7 +268,7 @@ transform512(uint64_t state[8], const ui + if (!isbigendian()) + for (j = 0; j < 8; j++) +- context->state[j] = bswap32(context->state[j]); ++ context->state[j] = mup_bswap32(context->state[j]); + memcpy(digest, &context->state[0], 32); + memset(context, 0, sizeof(fz_sha256)); +@@ -271,7 +271,7 @@ transform512(uint64_t state[8], uint64_t /* ensure big-endian integers */ - for (j = 0; j < 16; j++) -- data[j] = bswap64(data_xe[j]); -+ data[j] = mup_bswap64(data_xe[j]); + if (!isbigendian()) + for (j = 0; j < 16; j++) +- data[j] = bswap64(data[j]); ++ data[j] = mup_bswap64(data[j]); /* Copy state[] to working vars. */ memcpy(T, state, sizeof(T)); -@@ -359,12 +359,12 @@ void fz_sha512_final(fz_sha512 *context, - context->count[1] = (context->count[1] << 3) + (context->count[0] >> 29); - context->count[0] = context->count[0] << 3; +@@ -364,8 +364,8 @@ void fz_sha512_final(fz_sha512 *context, -- context->buffer.u64[14] = bswap64(context->count[1]); -- context->buffer.u64[15] = bswap64(context->count[0]); -+ context->buffer.u64[14] = mup_bswap64(context->count[1]); -+ context->buffer.u64[15] = mup_bswap64(context->count[0]); - transform512(context->state, context->buffer.u64); + if (!isbigendian()) + { +- context->buffer.u64[14] = bswap64(context->count[1]); +- context->buffer.u64[15] = bswap64(context->count[0]); ++ context->buffer.u64[14] = mup_bswap64(context->count[1]); ++ context->buffer.u64[15] = mup_bswap64(context->count[0]); + } + else + { +@@ -376,7 +376,7 @@ void fz_sha512_final(fz_sha512 *context, - for (j = 0; j < 8; j++) -- ((uint64_t *)digest)[j] = bswap64(context->state[j]); -+ ((uint64_t *)digest)[j] = mup_bswap64(context->state[j]); - memset(context, 0, sizeof(fz_sha512)); - } + if (!isbigendian()) + for (j = 0; j < 8; j++) +- context->state[j] = bswap64(context->state[j]); ++ context->state[j] = mup_bswap64(context->state[j]); + memcpy(digest, &context->state[0], 64); + memset(context, 0, sizeof(fz_sha512)); diff --git a/print/mupdf/patches/patch-ba b/print/mupdf/patches/patch-ba deleted file mode 100644 index 07eaa7278b2..00000000000 --- a/print/mupdf/patches/patch-ba +++ /dev/null @@ -1,73 +0,0 @@ -$NetBSD: patch-ba,v 1.1 2014/02/14 17:49:41 drochner Exp $ - -http://bugs.ghostscript.com/show_bug.cgi?id=694957 - ---- source/xps/xps-common.c.orig 2013-08-14 12:41:20.000000000 +0000 -+++ source/xps/xps-common.c -@@ -89,7 +89,7 @@ xps_begin_opacity(xps_document *doc, con - if (scb_color_att) - { - fz_colorspace *colorspace; -- float samples[32]; -+ float samples[FZ_MAX_COLORS]; - xps_parse_color(doc, base_uri, scb_color_att, &colorspace, samples); - opacity = opacity * samples[0]; - } -@@ -208,12 +208,13 @@ void - xps_parse_color(xps_document *doc, char *base_uri, char *string, - fz_colorspace **csp, float *samples) - { -+ fz_context *ctx = doc->ctx; - char *p; - int i, n; - char buf[1024]; - char *profile; - -- *csp = fz_device_rgb(doc->ctx); -+ *csp = fz_device_rgb(ctx); - - samples[0] = 1; - samples[1] = 0; -@@ -259,7 +260,7 @@ xps_parse_color(xps_document *doc, char - profile = strchr(buf, ' '); - if (!profile) - { -- fz_warn(doc->ctx, "cannot find icc profile uri in '%s'", string); -+ fz_warn(ctx, "cannot find icc profile uri in '%s'", string); - return; - } - -@@ -267,12 +268,17 @@ xps_parse_color(xps_document *doc, char - p = strchr(profile, ' '); - if (!p) - { -- fz_warn(doc->ctx, "cannot find component values in '%s'", profile); -+ fz_warn(ctx, "cannot find component values in '%s'", profile); - return; - } - - *p++ = 0; - n = count_commas(p) + 1; -+ if (n > FZ_MAX_COLORS) -+ { -+ fz_warn(ctx, "ignoring %d color components (max %d allowed)", n - FZ_MAX_COLORS, FZ_MAX_COLORS); -+ n = FZ_MAX_COLORS; -+ } - i = 0; - while (i < n) - { -@@ -292,10 +298,10 @@ xps_parse_color(xps_document *doc, char - /* TODO: load ICC profile */ - switch (n) - { -- case 2: *csp = fz_device_gray(doc->ctx); break; -- case 4: *csp = fz_device_rgb(doc->ctx); break; -- case 5: *csp = fz_device_cmyk(doc->ctx); break; -- default: *csp = fz_device_gray(doc->ctx); break; -+ case 2: *csp = fz_device_gray(ctx); break; -+ case 4: *csp = fz_device_rgb(ctx); break; -+ case 5: *csp = fz_device_cmyk(ctx); break; -+ default: *csp = fz_device_gray(ctx); break; - } - } - } diff --git a/print/mupdf/patches/patch-bb b/print/mupdf/patches/patch-bb deleted file mode 100644 index 9a3a4f84c37..00000000000 --- a/print/mupdf/patches/patch-bb +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-bb,v 1.1 2014/02/14 17:49:41 drochner Exp $ - ---- source/xps/xps-glyphs.c.orig 2013-08-14 12:41:20.000000000 +0000 -+++ source/xps/xps-glyphs.c -@@ -591,7 +591,7 @@ xps_parse_glyphs(xps_document *doc, cons - - if (fill_att) - { -- float samples[32]; -+ float samples[FZ_MAX_COLORS]; - fz_colorspace *colorspace; - - xps_parse_color(doc, base_uri, fill_att, &colorspace, samples); diff --git a/print/mupdf/patches/patch-bc b/print/mupdf/patches/patch-bc deleted file mode 100644 index c6e07fccbca..00000000000 --- a/print/mupdf/patches/patch-bc +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-bc,v 1.1 2014/02/14 17:49:41 drochner Exp $ - ---- source/xps/xps-gradient.c.orig 2013-08-14 12:41:20.000000000 +0000 -+++ source/xps/xps-gradient.c -@@ -38,7 +38,7 @@ xps_parse_gradient_stops(xps_document *d - struct stop *stops, int maxcount) - { - fz_colorspace *colorspace; -- float sample[8]; -+ float sample[FZ_MAX_COLORS]; - float rgb[3]; - int before, after; - int count; diff --git a/print/mupdf/patches/patch-bd b/print/mupdf/patches/patch-bd deleted file mode 100644 index 8ea1d63cee4..00000000000 --- a/print/mupdf/patches/patch-bd +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-bd,v 1.1 2014/02/14 17:49:41 drochner Exp $ - ---- source/xps/xps-path.c.orig 2013-08-14 12:41:20.000000000 +0000 -+++ source/xps/xps-path.c -@@ -826,7 +826,7 @@ xps_parse_path(xps_document *doc, const - - fz_stroke_state *stroke = NULL; - fz_matrix transform; -- float samples[32]; -+ float samples[FZ_MAX_COLORS]; - fz_colorspace *colorspace; - fz_path *path = NULL; - fz_path *stroke_path = NULL; |