Index: head/graphics/mupdf/Makefile =================================================================== --- head/graphics/mupdf/Makefile (revision 431508) +++ head/graphics/mupdf/Makefile (revision 431509) @@ -1,73 +1,67 @@ # Created by: Martin Dieringer # $FreeBSD$ PORTNAME= mupdf -PORTVERSION= 1.9a -PORTREVISION= 1 +PORTVERSION= 1.10a DISTVERSIONSUFFIX= -source PORTEPOCH= 1 CATEGORIES= graphics MASTER_SITES= http://www.mupdf.com/downloads/ \ http://www.mupdf.com/downloads/archive/ MAINTAINER= udvzsolt@gmail.com COMMENT= Lightweight PDF viewer and toolkit LICENSE= AGPLv3 LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libcurl.so:ftp/curl \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ libjbig2dec.so:graphics/jbig2dec \ libopenjp2.so:graphics/openjpeg CFLAGS+= -I${WRKSRC}/include/mupdf LIBS+= -L${LOCALBASE}/lib MAKE_ARGS= build=release prefix=${PREFIX} mandir=${PREFIX}/man verbose=yes USES= cpe compiler:c++11-lang gmake jpeg pkgconfig USE_XORG= x11 xcursor xext xinerama xrandr -USE_GL= gl +USE_GL= gl CPE_VENDOR= artifex -WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-source - -OPTIONS_DEFINE= SCROLL JS +OPTIONS_DEFINE= JS SCROLL OPTIONS_DEFAULT=SCROLL -SCROLL_DESC= Build with scroll hacks JS_DESC= JavaScript support (V8 engine) +SCROLL_DESC= Build with scroll hacks +JS_LIB_DEPENDS= libv8.so:lang/v8 +JS_MAKE_ARGS= V8_PRESENT=1 V8LIBS=-lv8 SCROLL_EXTRA_PATCHES= ${FILESDIR}/scroll_hack-platform__x11__pdfapp.c -JS_LIB_DEPENDS= libv8.so:lang/v8 -JS_MAKE_ARGS= V8_PRESENT=1 V8LIBS=-lv8 post-patch: @${REINPLACE_CMD} -e 's/-pipe -O2 //' \ -e 's|/usr/local|${LOCALBASE}|' \ -e 's/Linux/FreeBSD/' \ ${WRKSRC}/Makerules @${RM} -r ${WRKSRC}/thirdparty/curl \ - ${WRKSRC}/thirdparty/jbig2dec \ ${WRKSRC}/thirdparty/freetype \ ${WRKSRC}/thirdparty/harfbuzz \ - ${WRKSRC}/thirdparty/jpeg \ - ${WRKSRC}/thirdparty/openjpeg \ - ${WRKSRC}/thirdparty/zlib + ${WRKSRC}/thirdparty/jbig2dec \ + ${WRKSRC}/thirdparty/jpeg \ + ${WRKSRC}/thirdparty/openjpeg \ + ${WRKSRC}/thirdparty/zlib post-build: (cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} \ ${MAKEFILE} ${MAKE_ARGS} OUT=build/pic XCFLAGS=-fpic libs) post-install: ${INSTALL_DATA} ${WRKSRC}/build/pic/libmupdf.a \ ${STAGEDIR}${PREFIX}/lib/libmupdf_pic.a ${INSTALL_DATA} ${WRKSRC}/build/pic/libmupdfthird.a \ ${STAGEDIR}${PREFIX}/lib/libmupdfthird_pic.a ${MV} ${STAGEDIR}${PREFIX}/bin/mupdf-x11 ${STAGEDIR}${PREFIX}/bin/mupdf -.for binary in mutool mujstest mupdf mupdf-gl mupdf-x11-curl - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${binary} -.endfor .include Index: head/graphics/mupdf/distinfo =================================================================== --- head/graphics/mupdf/distinfo (revision 431508) +++ head/graphics/mupdf/distinfo (revision 431509) @@ -1,3 +1,3 @@ -TIMESTAMP = 1466328793 -SHA256 (mupdf-1.9a-source.tar.gz) = 8015c55f4e6dd892d3c50db4f395c1e46660a10b460e2ecd180a497f55bbc4cc -SIZE (mupdf-1.9a-source.tar.gz) = 20493793 +TIMESTAMP = 1484401133 +SHA256 (mupdf-1.10a-source.tar.gz) = aacc1f36b9180f562022ef1ab3439b009369d944364f3cff8a2a898834e3a836 +SIZE (mupdf-1.10a-source.tar.gz) = 42264707 Index: head/graphics/mupdf/files/patch-source_pdf_pdf-xref.c =================================================================== --- head/graphics/mupdf/files/patch-source_pdf_pdf-xref.c (revision 431508) +++ head/graphics/mupdf/files/patch-source_pdf_pdf-xref.c (nonexistent) @@ -1,25 +0,0 @@ -$OpenBSD: patch-source_pdf_pdf-xref_c,v 1.1 2016/08/27 20:58:48 jca Exp $ - - CVE-2016-6265 - - http://git.ghostscript.com/?p=mupdf.git;a=commitdiff;h=fa1936405b6a84e5c9bb440912c23d532772f958 - ---- source/pdf/pdf-xref.c.orig 2016-04-21 11:14:32 UTC -+++ source/pdf/pdf-xref.c -@@ -1191,8 +1191,14 @@ pdf_load_xref(fz_context *ctx, pdf_docum - fz_throw(ctx, FZ_ERROR_GENERIC, "object offset out of range: %d (%d 0 R)", (int)entry->ofs, i); - } - if (entry->type == 'o') -- if (entry->ofs <= 0 || entry->ofs >= xref_len || pdf_get_xref_entry(ctx, doc, entry->ofs)->type != 'n') -- fz_throw(ctx, FZ_ERROR_GENERIC, "invalid reference to an objstm that does not exist: %d (%d 0 R)", (int)entry->ofs, i); -+ { -+ /* Read this into a local variable here, because pdf_get_xref_entry -+ * may solidify the xref, hence invalidating "entry", meaning we -+ * need a stashed value for the throw. */ -+ fz_off_t ofs = entry->ofs; -+ if (ofs <= 0 || ofs >= xref_len || pdf_get_xref_entry(ctx, doc, ofs)->type != 'n') -+ fz_throw(ctx, FZ_ERROR_GENERIC, "invalid reference to an objstm that does not exist: %d (%d 0 R)", (int)ofs, i); -+ } - } - } - Property changes on: head/graphics/mupdf/files/patch-source_pdf_pdf-xref.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/graphics/mupdf/files/patch-source_pdf_pdf-shade.c =================================================================== --- head/graphics/mupdf/files/patch-source_pdf_pdf-shade.c (revision 431508) +++ head/graphics/mupdf/files/patch-source_pdf_pdf-shade.c (nonexistent) @@ -1,17 +0,0 @@ -$OpenBSD: patch-source_pdf_pdf-shade_c,v 1.1 2016/08/27 20:58:48 jca Exp $ - - CVE-2016-6525 - - http://git.ghostscript.com/?p=mupdf.git;a=commitdiff;h=39b0f07dd960f34e7e6bf230ffc3d87c41ef0f2e;hp=fa1936405b6a84e5c9bb440912c23d532772f958 - ---- source/pdf/pdf-shade.c.orig 2016-04-21 11:14:32 UTC -+++ source/pdf/pdf-shade.c -@@ -206,7 +206,7 @@ pdf_load_mesh_params(fz_context *ctx, pd - obj = pdf_dict_get(ctx, dict, PDF_NAME_Decode); - if (pdf_array_len(ctx, obj) >= 6) - { -- n = (pdf_array_len(ctx, obj) - 4) / 2; -+ n = fz_mini(FZ_MAX_COLORS, (pdf_array_len(ctx, obj) - 4) / 2); - shade->u.m.x0 = pdf_to_real(ctx, pdf_array_get(ctx, obj, 0)); - shade->u.m.x1 = pdf_to_real(ctx, pdf_array_get(ctx, obj, 1)); - shade->u.m.y0 = pdf_to_real(ctx, pdf_array_get(ctx, obj, 2)); Property changes on: head/graphics/mupdf/files/patch-source_pdf_pdf-shade.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/graphics/mupdf/files/patch-scripts_fontdump.c =================================================================== --- head/graphics/mupdf/files/patch-scripts_fontdump.c (revision 431508) +++ head/graphics/mupdf/files/patch-scripts_fontdump.c (revision 431509) @@ -1,10 +1,10 @@ ---- scripts/fontdump.c.orig 2016-04-21 11:14:32 UTC +--- scripts/fontdump.c.orig 2016-11-28 13:34:04 UTC +++ scripts/fontdump.c @@ -50,7 +50,6 @@ main(int argc, char **argv) fprintf(fo, "#ifndef __STRICT_ANSI__\n"); fprintf(fo, "#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)\n"); fprintf(fo, "#if !defined(__ICC)\n"); - fprintf(fo, "#define HAVE_INCBIN\n"); fprintf(fo, "#endif\n"); fprintf(fo, "#endif\n"); fprintf(fo, "#endif\n"); Index: head/graphics/mupdf/files/patch-source__fitz__load-jpx.c =================================================================== --- head/graphics/mupdf/files/patch-source__fitz__load-jpx.c (revision 431508) +++ head/graphics/mupdf/files/patch-source__fitz__load-jpx.c (revision 431509) @@ -1,27 +1,19 @@ ---- source/fitz/load-jpx.c.orig 2016-04-21 11:14:32 UTC +--- source/fitz/load-jpx.c.orig 2016-11-28 13:34:04 UTC +++ source/fitz/load-jpx.c -@@ -1,14 +1,6 @@ - #include "mupdf/fitz.h" +@@ -481,15 +481,7 @@ fz_load_jpx_info(fz_context *ctx, unsign + #else /* HAVE_LURATECH */ + -/* Without the definition of OPJ_STATIC, compilation fails on windows - * due to the use of __stdcall. We believe it is required on some - * linux toolchains too. */ -#define OPJ_STATIC -#ifndef _MSC_VER -#define OPJ_HAVE_STDINT_H -#endif - -#include +#include - static void fz_opj_error_callback(const char *msg, void *client_data) - { -@@ -117,7 +109,7 @@ fz_load_jpx(fz_context *ctx, unsigned ch - opj_stream_set_read_function(stream, fz_opj_stream_read); - opj_stream_set_skip_function(stream, fz_opj_stream_skip); - opj_stream_set_seek_function(stream, fz_opj_stream_seek); -- opj_stream_set_user_data(stream, &sb); -+ opj_stream_set_user_data(stream, &sb,NULL); - /* Set the length to avoid an assert */ - opj_stream_set_user_data_length(stream, size); - + /* OpenJPEG does not provide a safe mechanism to intercept + * allocations. In the latest version all allocations go Index: head/graphics/mupdf/pkg-plist =================================================================== --- head/graphics/mupdf/pkg-plist (revision 431508) +++ head/graphics/mupdf/pkg-plist (revision 431509) @@ -1,93 +1,97 @@ bin/mujstest bin/mupdf bin/mupdf-gl bin/mupdf-x11-curl +bin/muraster bin/mutool include/mupdf/fitz.h include/mupdf/fitz/annotation.h +include/mupdf/fitz/archive.h include/mupdf/fitz/bidi.h include/mupdf/fitz/bitmap.h include/mupdf/fitz/buffer.h include/mupdf/fitz/colorspace.h include/mupdf/fitz/compressed-buffer.h +include/mupdf/fitz/config.h include/mupdf/fitz/context.h include/mupdf/fitz/crypt.h include/mupdf/fitz/device.h include/mupdf/fitz/display-list.h include/mupdf/fitz/document.h include/mupdf/fitz/filter.h 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 include/mupdf/fitz/math.h include/mupdf/fitz/outline.h include/mupdf/fitz/output-pcl.h include/mupdf/fitz/output-png.h include/mupdf/fitz/output-pnm.h include/mupdf/fitz/output-ps.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 include/mupdf/fitz/pool.h include/mupdf/fitz/separation.h include/mupdf/fitz/shade.h include/mupdf/fitz/store.h include/mupdf/fitz/stream.h include/mupdf/fitz/string.h include/mupdf/fitz/structured-text.h include/mupdf/fitz/system.h include/mupdf/fitz/text.h +include/mupdf/fitz/track-usage.h include/mupdf/fitz/transition.h include/mupdf/fitz/tree.h include/mupdf/fitz/ucdn.h -include/mupdf/fitz/unzip.h include/mupdf/fitz/util.h include/mupdf/fitz/version.h +include/mupdf/fitz/writer.h include/mupdf/fitz/xml.h include/mupdf/html.h include/mupdf/memento.h include/mupdf/pdf.h include/mupdf/pdf-tools.h include/mupdf/pdf/annot.h include/mupdf/pdf/appearance.h include/mupdf/pdf/clean.h include/mupdf/pdf/cmap.h include/mupdf/pdf/crypt.h include/mupdf/pdf/document.h include/mupdf/pdf/event.h include/mupdf/pdf/field.h include/mupdf/pdf/font.h -include/mupdf/pdf/graft.h include/mupdf/pdf/interpret.h include/mupdf/pdf/javascript.h include/mupdf/pdf/name-table.h include/mupdf/pdf/object.h include/mupdf/pdf/output-pdf.h include/mupdf/pdf/page.h include/mupdf/pdf/parse.h include/mupdf/pdf/resource.h include/mupdf/pdf/widget.h include/mupdf/pdf/xref.h -include/mupdf/xps.h +include/mupdf/svg.h lib/libmupdf.a lib/libmupdfthird.a lib/libmupdfthird_pic.a lib/libmupdf_pic.a man/man1/mupdf.1.gz man/man1/mutool.1.gz %%PORTDOCS%%%%DOCSDIR%%/CHANGES %%PORTDOCS%%%%DOCSDIR%%/COPYING %%PORTDOCS%%%%DOCSDIR%%/README %%PORTDOCS%%%%DOCSDIR%%/naming.txt %%PORTDOCS%%%%DOCSDIR%%/overview.txt %%PORTDOCS%%%%DOCSDIR%%/progressive.txt %%PORTDOCS%%%%DOCSDIR%%/refcount.txt %%PORTDOCS%%%%DOCSDIR%%/thirdparty.txt +%%PORTDOCS%%%%DOCSDIR%%/types.txt