Index: head/graphics/mupdf/Makefile =================================================================== --- head/graphics/mupdf/Makefile (revision 493795) +++ head/graphics/mupdf/Makefile (revision 493796) @@ -1,70 +1,71 @@ # Created by: Martin Dieringer # $FreeBSD$ PORTNAME= mupdf DISTVERSION= 1.14.0 DISTVERSIONSUFFIX= -source +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= graphics MASTER_SITES= http://www.mupdf.com/downloads/ \ http://www.mupdf.com/downloads/archive/ MAINTAINER= uzsolt@uzsolt.hu 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 USES= cpe compiler:c++11-lang gl gmake jpeg pkgconfig USE_XORG= x11 xcursor xext xinerama xrandr USE_GL= gl glut CPE_VENDOR= artifex USE_LDCONFIG= yes # pkg-config to avoid the conflict with openjpeg15 CFLAGS+= `pkg-config --cflags libopenjp2` MAKE_ARGS= build=release prefix=${PREFIX} mandir=${PREFIX}/man verbose=yes \ XCFLAGS+="-I${WRKSRC}/include/mupdf -fPIC" \ XLIBS+="-L${LOCALBASE}/lib -L${WRKSRC}/build/release" \ SOVERSION=${DISTVERSION} ALL_TARGET= all extra OPTIONS_DEFINE= DOCS JS SCROLL OPTIONS_DEFAULT= SCROLL 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 PLIST_SUB= SOVERSION=${PORTVERSION} post-patch: @${REINPLACE_CMD} -e 's/-pipe -O2 //' \ ${WRKSRC}/Makerules @${REINPLACE_CMD} -e 's/-ldl //' ${WRKSRC}/Makerules \ ${WRKSRC}/Makethird post-install: ${MV} ${STAGEDIR}${PREFIX}/bin/mupdf-x11 \ ${STAGEDIR}${PREFIX}/bin/mupdf ${INSTALL_PROGRAM} \ ${WRKSRC}/build/release/mjsgen \ ${WRKSRC}/build/release/mujstest \ ${WRKSRC}/build/release/muraster \ ${STAGEDIR}${PREFIX}/bin ${LN} -s libmupdf.so.${PORTVERSION} \ ${STAGEDIR}${PREFIX}/lib/libmupdf.so ${LN} -s libmupdf-third.so.${PORTVERSION} \ ${STAGEDIR}${PREFIX}/lib/libmupdf-third.so .include Index: head/graphics/mupdf/files/patch-Makerules =================================================================== --- head/graphics/mupdf/files/patch-Makerules (revision 493795) +++ head/graphics/mupdf/files/patch-Makerules (revision 493796) @@ -1,105 +1,106 @@ --- Makerules.orig 2018-10-04 09:19:28 UTC +++ Makerules @@ -24,28 +24,28 @@ ifeq ($(build),debug) CFLAGS += -pipe -g LDFLAGS += -g $(LDREMOVEUNREACH) else ifeq ($(build),release) - CFLAGS += -pipe -O2 -DNDEBUG -fomit-frame-pointer + CFLAGS += -DNDEBUG -fomit-frame-pointer LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s else ifeq ($(build),small) CFLAGS += -pipe -Os -DNDEBUG -fomit-frame-pointer LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s else ifeq ($(build),valgrind) - CFLAGS += -pipe -O2 -DNDEBUG -DPACIFY_VALGRIND -fno-omit-frame-pointer + CFLAGS += -DNDEBUG -DPACIFY_VALGRIND -fno-omit-frame-pointer LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s else ifeq ($(build),sanitize) CFLAGS += -pipe -g -fno-omit-frame-pointer $(SANITIZE_FLAGS) LDFLAGS += -g $(SANITIZE_FLAGS) else ifeq ($(build),sanitize-release) - CFLAGS += -pipe -O2 -DNDEBUG -fno-omit-frame-pointer $(SANITIZE_FLAGS) + CFLAGS += -DNDEBUG -fno-omit-frame-pointer $(SANITIZE_FLAGS) LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s $(SANITIZE_FLAGS) else ifeq ($(build),profile) - CFLAGS += -pipe -O2 -DNDEBUG -pg + CFLAGS += -DNDEBUG -pg LDFLAGS += -pg else ifeq ($(build),coverage) CFLAGS += -pipe -g -pg -fprofile-arcs -ftest-coverage LIBS += -lgcov else ifeq ($(build),native) - CFLAGS += -pipe -O2 -DNDEBUG -fomit-frame-pointer -march=native + CFLAGS += -DNDEBUG -fomit-frame-pointer -march=native LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s else ifeq ($(build),memento) CFLAGS += -pipe -g -DMEMENTO @@ -55,7 +55,7 @@ else ifeq ($(build),memento) LIBS += -ldl endif else ifeq ($(build),gperf) - CFLAGS += -pipe -O2 -DNDEBUG -fomit-frame-pointer -DGPERF + CFLAGS += -DNDEBUG -fomit-frame-pointer -DGPERF LIBS += -lprofiler else $(error unknown build setting: '$(build)') -@@ -143,7 +143,58 @@ else ifeq ($(OS),Linux) +@@ -143,7 +143,59 @@ else ifeq ($(OS),Linux) PTHREAD_LIBS := -lpthread endif -endif +else ifeq ($(OS),FreeBSD) + PTHREAD_LIBS := -lthr +# alphabetical order + # curl + USE_SYSTEM_CURL := yes + SYS_CURL_CFLAGS := $(shell pkg-config --cflags libcurl) + SYS_CURL_LIBS := $(shell pkg-config --libs libcurl) + # freetype + USE_SYSTEM_FREETYPE := yes + SYS_FREETYPE_CFLAGS := $(shell pkg-config --cflags freetype2) + SYS_FREETYPE_LIBS := $(shell pkg-config --libs freetype2) + # glut ++ HAVE_GLUT := yes + USE_SYSTEM_GLUT := yes + SYS_GLUT_CFLAGS := + SYS_GLUT_LIBS := -lglut -lGL + # harfbuzz + USE_SYSTEM_HARFBUZZ := yes + SYS_HARFBUZZ_CFLAGS := $(shell pkg-config --cflags harfbuzz) + SYS_HARFBUZZ_LIBS := $(shell pkg-config --libs harfbuzz) + # jbig2dec + USE_SYSTEM_JBIG2DEC := yes + SYS_JBIG2DEC_CFLAGS := + SYS_JIB2DEC_LIBS := -ljbig2dec + # lcms2 - needs a patched version of lcms2 + USE_SYSTEM_LCMS2 := no + # libcrypto + HAVE_LIBCRYPTO := no + SYS_LIBCRYPTO_CFLAGS := + SYS_LIBCRYPTO_LIBS := + # libjpeg + USE_SYSTEM_LIBJPEG := yes + SYS_LIBJPEG_CFLAGS := $(shell pkg-config --cflags libjpeg) + SYS_LIBJPEG_LIBS := $(shell pkg-config --libs libjpeg) + # openjpeg + USE_SYSTEM_OPENJPEG := yes + SYS_OPENJPEG_CFLAGS := $(shell pkg-config --cflags libopenjp2) + SYS_OPENJPEG_LIBS := $(shell pkg-config --libs libopenjp2) + # openssl + HAVE_OPENSSL_SSL := no + # pthread + HAVE_PTHREAD := yes + SYS_PTHREAD_CFLAGS := + SYS_PTHREAD_LIBS := -lpthread + # x11 + HAVE_X11 := yes + X11_CFLAGS := $(shell pkg-config --cflags x11 xext) + X11_LIBS := $(shell pkg-config --libs x11 xext) + # zlib + USE_SYSTEM_ZLIB := yes + SYS_ZLIB_CFLAGS := $(shell pkg-config --cflags zlib) + SYS_ZLIB_LIBS := $(shell pkg-config --libs zlib) +endif # FreeBSD # The following section has various cross compilation configurations. # Index: head/graphics/mupdf/files/patch-thirdparty_lcms2_src_cmsmd5.c =================================================================== --- head/graphics/mupdf/files/patch-thirdparty_lcms2_src_cmsmd5.c (revision 493795) +++ head/graphics/mupdf/files/patch-thirdparty_lcms2_src_cmsmd5.c (revision 493796) @@ -1,63 +1,63 @@ --- thirdparty/lcms2/src/cmsmd5.c.orig 2018-01-23 19:37:31 UTC +++ thirdparty/lcms2/src/cmsmd5.c @@ -29,7 +29,7 @@ #ifdef CMS_USE_BIG_ENDIAN static -void byteReverse(cmsUInt8Number * buf, cmsUInt32Number longs) +void byteReverse(cmsContext ContextID, cmsUInt8Number * buf, cmsUInt32Number longs) { do { -@@ -42,7 +42,7 @@ void byteReverse(cmsUInt8Number * buf, c +@@ -42,7 +42,7 @@ void byteReverse(cmsUInt8Number * buf, cmsUInt32Number } #else -#define byteReverse(buf, len) +#define byteReverse(ContextID, buf, len) #endif -@@ -196,7 +196,7 @@ void MD5add(cmsHANDLE Handle, cmsUInt8Nu +@@ -196,7 +196,7 @@ void MD5add(cmsHANDLE Handle, cmsUInt8Number* buf, cms } memmove(p, buf, t); - byteReverse(ctx->in, 16); + byteReverse(ctx->ContextID, ctx->in, 16); MD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in); buf += t; -@@ -205,7 +205,7 @@ void MD5add(cmsHANDLE Handle, cmsUInt8Nu +@@ -205,7 +205,7 @@ void MD5add(cmsHANDLE Handle, cmsUInt8Number* buf, cms while (len >= 64) { memmove(ctx->in, buf, 64); - byteReverse(ctx->in, 16); + byteReverse(ctx->ContextID, ctx->in, 16); MD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in); buf += 64; len -= 64; -@@ -232,21 +232,21 @@ void MD5finish(cmsProfileID* ProfileID, +@@ -232,21 +232,21 @@ void MD5finish(cmsProfileID* ProfileID, cmsHANDLE Han if (count < 8) { memset(p, 0, count); - byteReverse(ctx->in, 16); + byteReverse(ctx->ContextID, ctx->in, 16); MD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in); memset(ctx->in, 0, 56); } else { memset(p, 0, count - 8); } - byteReverse(ctx->in, 14); + byteReverse(ctx->ContextID, ctx->in, 14); ((cmsUInt32Number *) ctx->in)[14] = ctx->bits[0]; ((cmsUInt32Number *) ctx->in)[15] = ctx->bits[1]; MD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in); - byteReverse((cmsUInt8Number *) ctx->buf, 4); + byteReverse(ctx->ContextID, (cmsUInt8Number *) ctx->buf, 4); memmove(ProfileID ->ID8, ctx->buf, 16); _cmsFree(ctx ->ContextID, ctx); Index: head/graphics/mupdf/pkg-plist =================================================================== --- head/graphics/mupdf/pkg-plist (revision 493795) +++ head/graphics/mupdf/pkg-plist (revision 493796) @@ -1,124 +1,125 @@ bin/mjsgen bin/mujstest bin/mupdf +bin/mupdf-gl bin/muraster bin/mutool include/mupdf/fitz.h include/mupdf/fitz/annotation.h include/mupdf/fitz/archive.h include/mupdf/fitz/band-writer.h include/mupdf/fitz/bidi.h include/mupdf/fitz/bitmap.h include/mupdf/fitz/buffer.h include/mupdf/fitz/color-management.h include/mupdf/fitz/colorspace.h include/mupdf/fitz/compress.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/geometry.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/outline.h include/mupdf/fitz/output-pcl.h include/mupdf/fitz/output-pclm.h include/mupdf/fitz/output-png.h include/mupdf/fitz/output-pnm.h include/mupdf/fitz/output-ps.h include/mupdf/fitz/output-psd.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-util.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/util.h include/mupdf/fitz/version.h include/mupdf/fitz/writer.h include/mupdf/fitz/xml.h include/mupdf/memento.h include/mupdf/pdf-tools.h include/mupdf/pdf.h include/mupdf/pdf/annot.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/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/ucdn.h -lib/libmupdf.so -lib/libmupdf.so.%%SOVERSION%% lib/libmupdf-third.so lib/libmupdf-third.so.%%SOVERSION%% +lib/libmupdf.so +lib/libmupdf.so.%%SOVERSION%% man/man1/mupdf.1.gz man/man1/mutool.1.gz %%PORTDOCS%%%%DOCSDIR%%/CHANGES %%PORTDOCS%%%%DOCSDIR%%/COPYING %%PORTDOCS%%%%DOCSDIR%%/README %%PORTDOCS%%%%DOCSDIR%%/android-sdk.html %%PORTDOCS%%%%DOCSDIR%%/artifex-logo.png %%PORTDOCS%%%%DOCSDIR%%/building.html %%PORTDOCS%%%%DOCSDIR%%/coding-overview.html %%PORTDOCS%%%%DOCSDIR%%/coding-progressive.html %%PORTDOCS%%%%DOCSDIR%%/coding-style.html %%PORTDOCS%%%%DOCSDIR%%/examples/bbox-device.js %%PORTDOCS%%%%DOCSDIR%%/examples/create-thumbnail.js %%PORTDOCS%%%%DOCSDIR%%/examples/draw-device.js %%PORTDOCS%%%%DOCSDIR%%/examples/draw-document.js %%PORTDOCS%%%%DOCSDIR%%/examples/example.c %%PORTDOCS%%%%DOCSDIR%%/examples/fix-s22pdf.js %%PORTDOCS%%%%DOCSDIR%%/examples/jpx-to-pdf.js %%PORTDOCS%%%%DOCSDIR%%/examples/multi-threaded.c %%PORTDOCS%%%%DOCSDIR%%/examples/pdf-create-lowlevel.js %%PORTDOCS%%%%DOCSDIR%%/examples/pdf-create.js %%PORTDOCS%%%%DOCSDIR%%/examples/pdf-merge.js %%PORTDOCS%%%%DOCSDIR%%/examples/trace-device.js %%PORTDOCS%%%%DOCSDIR%%/index.html %%PORTDOCS%%%%DOCSDIR%%/manual-mupdf-gl.html %%PORTDOCS%%%%DOCSDIR%%/manual-mutool-clean.html %%PORTDOCS%%%%DOCSDIR%%/manual-mutool-convert.html %%PORTDOCS%%%%DOCSDIR%%/manual-mutool-create.html %%PORTDOCS%%%%DOCSDIR%%/manual-mutool-draw.html %%PORTDOCS%%%%DOCSDIR%%/manual-mutool-extract.html %%PORTDOCS%%%%DOCSDIR%%/manual-mutool-merge.html %%PORTDOCS%%%%DOCSDIR%%/manual-mutool-portfolio.html %%PORTDOCS%%%%DOCSDIR%%/manual-mutool-run.html %%PORTDOCS%%%%DOCSDIR%%/manual-mutool-show.html %%PORTDOCS%%%%DOCSDIR%%/manual-mutool-trace.html %%PORTDOCS%%%%DOCSDIR%%/style.css %%PORTDOCS%%%%DOCSDIR%%/template.html %%PORTDOCS%%%%DOCSDIR%%/thirdparty.html