diff options
author | Kurt Jaeger <pi@FreeBSD.org> | 2014-08-04 20:19:28 +0000 |
---|---|---|
committer | Kurt Jaeger <pi@FreeBSD.org> | 2014-08-04 20:19:28 +0000 |
commit | d9d7c9a7b90be0f595d929bd412006b76c98fb16 (patch) | |
tree | 774d839d5d044c66a5331014fbe3be10add31f54 /graphics | |
parent | e59577307d1d2e6edbd1470ffe5ddc10e5ef458f (diff) | |
download | ports-d9d7c9a7b90be0f595d929bd412006b76c98fb16.tar.gz ports-d9d7c9a7b90be0f595d929bd412006b76c98fb16.zip |
Notes
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/mupdf/Makefile | 32 | ||||
-rw-r--r-- | graphics/mupdf/distinfo | 4 | ||||
-rw-r--r-- | graphics/mupdf/files/patch-Makefile | 67 | ||||
-rw-r--r-- | graphics/mupdf/files/patch-platform__x11__x11_main.c (renamed from graphics/mupdf/files/patch-apps_x11_main.c) | 6 | ||||
-rw-r--r-- | graphics/mupdf/files/patch-source__fitz__load-jpx.c | 20 | ||||
-rw-r--r-- | graphics/mupdf/files/scroll_hack-apps_pdfapp.c | 47 | ||||
-rw-r--r-- | graphics/mupdf/files/scroll_hack-platform__x11__pdfapp.c | 49 | ||||
-rw-r--r-- | graphics/mupdf/pkg-plist | 88 |
8 files changed, 179 insertions, 134 deletions
diff --git a/graphics/mupdf/Makefile b/graphics/mupdf/Makefile index c472c7d01920..79fb2a72cb6e 100644 --- a/graphics/mupdf/Makefile +++ b/graphics/mupdf/Makefile @@ -2,15 +2,14 @@ # $FreeBSD$ PORTNAME= mupdf -PORTVERSION= 1.2 -PORTREVISION= 2 +PORTVERSION= 1.5 PORTEPOCH= 1 CATEGORIES= graphics MASTER_SITES= GOOGLE_CODE \ http://www.mupdf.com/download/ -EXTRACT_SUFX= -source.zip +EXTRACT_SUFX= -source.tar.gz -MAINTAINER= lichray@gmail.com +MAINTAINER= udvzsolt@gmail.com COMMENT= Lightweight PDF viewer and toolkit LICENSE= AGPLv3 @@ -18,11 +17,13 @@ LICENSE= AGPLv3 LIB_DEPENDS= libfreetype.so:${PORTSDIR}/print/freetype2 \ libjpeg.so:${PORTSDIR}/graphics/jpeg \ libjbig2dec.so:${PORTSDIR}/graphics/jbig2dec \ - libopenjpeg.so:${PORTSDIR}/graphics/openjpeg15 + libopenjp2.so:${PORTSDIR}/graphics/openjpeg MAKE_ARGS+= build=release prefix=${PREFIX} verbose=1 mandir=${PREFIX}/man \ - XCFLAGS=-I${LOCALBASE}/include -USES= pkgconfig gmake zip + HAVE_X11=yes \ + XCFLAGS="`pkg-config --cflags freetype2` -I ${LOCALBASE}/include" \ + XLIBS="`pkg-config --libs freetype2 libopenjp2 x11 xext` -ljpeg -ljbig2dec" +USES= pkgconfig gmake USE_XORG= x11 xext WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-source @@ -42,7 +43,7 @@ CFLAGS+= -mfpmath=sse .endif .if ${PORT_OPTIONS:MSCROLL} -EXTRA_PATCHES+= ${FILESDIR}/scroll_hack-apps_pdfapp.c +EXTRA_PATCHES+= ${FILESDIR}/scroll_hack-platform__x11__pdfapp.c .endif .if ${PORT_OPTIONS:MJS} @@ -50,17 +51,16 @@ LIB_DEPENDS+= libv8.so:${PORTSDIR}/lang/v8 MAKE_ARGS+= V8_PRESENT=1 V8LIBS=-lv8 .endif -post-patch: .SILENT - ${REINPLACE_CMD} \ - -e '/install:/,/^$$/ { /-d/d; }' \ - -e '/install.*bindir)$$/s/install/$$(BSD_INSTALL_PROGRAM)/' \ - -e '/install.*libdir)$$/s/install/$$(BSD_INSTALL_DATA)/' \ - -e '/install.*incdir)$$/s/install/$$(BSD_INSTALL_DATA)/' \ - -e '/install.*man1$$/s/install/$$(BSD_INSTALL_MAN)/' \ - ${WRKSRC}/Makefile +post-patch: ${REINPLACE_CMD} -e 's/-pipe -O2 //' \ -e 's|/usr/local|${LOCALBASE}|' \ ${WRKSRC}/Makerules ${RM} -r ${WRKSRC}/thirdparty/* +post-install: + ${MV} ${STAGEDIR}${PREFIX}/bin/mupdf-x11 ${STAGEDIR}${PREFIX}/bin/mupdf +.for binary in mudraw mutool mujstest mupdf + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${binary} +.endfor + .include <bsd.port.mk> diff --git a/graphics/mupdf/distinfo b/graphics/mupdf/distinfo index 24bc05e68371..aa3ac3cb9451 100644 --- a/graphics/mupdf/distinfo +++ b/graphics/mupdf/distinfo @@ -1,2 +1,2 @@ -SHA256 (mupdf-1.2-source.zip) = 9bc9e31ec27c091dad37f70940bd799e46ab6da4299bc58e803bff3dbb07dc3b -SIZE (mupdf-1.2-source.zip) = 13808821 +SHA256 (mupdf-1.5-source.tar.gz) = e41fa8951de3b44a5ec95052b8897fbcca1eb721e0fd0289862e31e2f03f846a +SIZE (mupdf-1.5-source.tar.gz) = 13269193 diff --git a/graphics/mupdf/files/patch-Makefile b/graphics/mupdf/files/patch-Makefile index 36a48e56fbef..fe8db8ec9065 100644 --- a/graphics/mupdf/files/patch-Makefile +++ b/graphics/mupdf/files/patch-Makefile @@ -1,67 +1,16 @@ ---- Makefile.orig 2013-02-13 09:25:07.000000000 -0500 -+++ Makefile 2013-05-06 13:00:30.619173583 -0400 -@@ -12,19 +12,13 @@ default: all - # 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 --LIBS += $(XLIBS) -lfreetype -ljbig2dec -ljpeg -lopenjpeg -lz -lm -+CFLAGS += -Ifitz -Ipdf -Ixps -Icbz -Iscripts $(XCFLAGS) -+LIBS += -lfreetype -ljbig2dec -ljpeg -lopenjpeg -lz -lm $(XLIBS) - LIBS_V8 = $(LIBS) $(V8LIBS) - +--- ./Makefile.orig 2014-06-10 17:09:28.000000000 +0200 ++++ ./Makefile 2014-08-04 18:51:44.000000000 +0200 +@@ -18,13 +18,6 @@ include Makerules include Makethird --THIRD_LIBS := $(FREETYPE_LIB) +-THIRD_LIBS += $(FREETYPE_LIB) -THIRD_LIBS += $(JBIG2DEC_LIB) -THIRD_LIBS += $(JPEG_LIB) -THIRD_LIBS += $(OPENJPEG_LIB) +-THIRD_LIBS += $(OPENSSL_LIB) -THIRD_LIBS += $(ZLIB_LIB) - - ifeq "$(verbose)" "" - QUIET_AR = @ echo ' ' ' ' AR $@ ; - QUIET_CC = @ echo ' ' ' ' CC $@ ; -@@ -169,14 +163,15 @@ $(MUTOOL) : $(addprefix $(OUT)/, pdfclea - - ifeq "$(NOX11)" "" - MUVIEW := $(OUT)/mupdf -+ifeq "$(V8_PRESENT)" "1" -+$(MUVIEW) : $(FITZ_V8_LIB) $(THIRD_LIBS) -+$(MUVIEW) : $(addprefix $(OUT)/, x11_main.o x11_image.o pdfapp.o) -+ $(LINK_V8_CMD) $(X11_LIBS) -+else - $(MUVIEW) : $(FITZ_LIB) $(THIRD_LIBS) - $(MUVIEW) : $(addprefix $(OUT)/, x11_main.o x11_image.o pdfapp.o) - $(LINK_CMD) $(X11_LIBS) -- --MUVIEW_V8 := $(OUT)/mupdf-v8 --$(MUVIEW_V8) : $(FITZ_V8_LIB) $(THIRD_LIBS) --$(MUVIEW_V8) : $(addprefix $(OUT)/, x11_main.o x11_image.o pdfapp.o) -- $(LINK_V8_CMD) $(X11_LIBS) -+endif - endif - - MUJSTEST_V8 := $(OUT)/mujstest-v8 -@@ -184,12 +179,6 @@ $(MUJSTEST_V8) : $(FITZ_V8_LIB) $(THIRD_ - $(MUJSTEST_V8) : $(addprefix $(OUT)/, jstest_main.o pdfapp.o) - $(LINK_V8_CMD) - --ifeq "$(V8_PRESENT)" "1" --JSTARGETS := $(MUJSTEST_V8) $(FITZ_V8_LIB) $(MUVIEW_V8) --else --JSTARGETS := --endif -- - # --- Format man pages --- - - %.txt: %.1 -@@ -212,7 +201,7 @@ install: $(FITZ_LIB) $(MUVIEW) $(MUDRAW) - install -d $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(DESTDIR)$(incdir) $(DESTDIR)$(mandir)/man1 - install $(FITZ_LIB) $(DESTDIR)$(libdir) - 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) $(DESTDIR)$(bindir) - install $(wildcard apps/man/*.1) $(DESTDIR)$(mandir)/man1 - - # --- Clean and Default --- + LIBS += $(FREETYPE_LIBS) + LIBS += $(JBIG2DEC_LIBS) + LIBS += $(JPEG_LIBS) diff --git a/graphics/mupdf/files/patch-apps_x11_main.c b/graphics/mupdf/files/patch-platform__x11__x11_main.c index c1f13404e7fb..b7852e3e9c33 100644 --- a/graphics/mupdf/files/patch-apps_x11_main.c +++ b/graphics/mupdf/files/patch-platform__x11__x11_main.c @@ -1,6 +1,6 @@ ---- apps/x11_main.c.orig 2012-03-29 05:46:53.000000000 -0500 -+++ apps/x11_main.c 2012-04-07 14:37:40.754315181 -0500 -@@ -602,6 +602,24 @@ static void usage(void) +--- ./platform/x11/x11_main.c.orig 2014-06-10 17:09:28.000000000 +0200 ++++ ./platform/x11/x11_main.c 2014-08-04 18:51:44.000000000 +0200 +@@ -794,6 +794,24 @@ exit(1); } diff --git a/graphics/mupdf/files/patch-source__fitz__load-jpx.c b/graphics/mupdf/files/patch-source__fitz__load-jpx.c new file mode 100644 index 000000000000..befed22f76d4 --- /dev/null +++ b/graphics/mupdf/files/patch-source__fitz__load-jpx.c @@ -0,0 +1,20 @@ +--- ./source/fitz/load-jpx.c.orig 2014-06-10 17:09:28.000000000 +0200 ++++ ./source/fitz/load-jpx.c 2014-08-04 18:51:45.000000000 +0200 +@@ -8,7 +8,7 @@ + #define OPJ_HAVE_STDINT_H + #endif + +-#include <openjpeg.h> ++#include <openjpeg-2.1/openjpeg.h> + + static void fz_opj_error_callback(const char *msg, void *client_data) + { +@@ -116,7 +116,7 @@ + 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); + diff --git a/graphics/mupdf/files/scroll_hack-apps_pdfapp.c b/graphics/mupdf/files/scroll_hack-apps_pdfapp.c deleted file mode 100644 index 7d824ff86670..000000000000 --- a/graphics/mupdf/files/scroll_hack-apps_pdfapp.c +++ /dev/null @@ -1,47 +0,0 @@ ---- apps/pdfapp.c.orig 2013-02-26 12:07:15.000000000 -0500 -+++ apps/pdfapp.c 2013-05-06 11:13:27.210765076 -0400 -@@ -1142,11 +1142,15 @@ void pdfapp_onkey(pdfapp_t *app, int c) - break; - - case 'j': -+ if (app->pany + fz_pixmap_height(app->ctx, app->image) <= app->winh) -+ goto pagedown; - app->pany -= fz_pixmap_height(app->ctx, app->image) / 10; - pdfapp_showpage(app, 0, 0, 1, 0); - break; - - case 'k': -+ if (app->pany >= 0) -+ goto pageup; - app->pany += fz_pixmap_height(app->ctx, app->image) / 10; - pdfapp_showpage(app, 0, 0, 1, 0); - break; -@@ -1214,6 +1218,7 @@ void pdfapp_onkey(pdfapp_t *app, int c) - */ - - case ',': -+ pageup: - panto = PAN_TO_BOTTOM; - if (app->numberlen > 0) - app->pageno -= atoi(app->number); -@@ -1222,6 +1227,7 @@ void pdfapp_onkey(pdfapp_t *app, int c) - break; - - case '.': -+ pagedown: - panto = PAN_TO_TOP; - if (app->numberlen > 0) - app->pageno += atoi(app->number); -@@ -1523,6 +1529,12 @@ void pdfapp_onmouse(pdfapp_t *app, int x - int isx = (modifiers & (1<<0)); - int xstep = isx ? 20 * dir : 0; - int ystep = !isx ? 20 * dir : 0; -+ if (!isx && dir < 0 && app->pany + -+ fz_pixmap_height(app->ctx, app->image) <= app->winh) -+ pdfapp_onkey(app, 'j'); -+ else if (!isx && dir > 0 && app->pany >= 0) -+ pdfapp_onkey(app, 'k'); -+ else - pdfapp_panview(app, app->panx + xstep, app->pany + ystep); - } - } diff --git a/graphics/mupdf/files/scroll_hack-platform__x11__pdfapp.c b/graphics/mupdf/files/scroll_hack-platform__x11__pdfapp.c new file mode 100644 index 000000000000..4df7b1b9fa73 --- /dev/null +++ b/graphics/mupdf/files/scroll_hack-platform__x11__pdfapp.c @@ -0,0 +1,49 @@ +--- ./platform/x11/pdfapp.c.orig 2014-08-04 19:59:53.000000000 +0200 ++++ ./platform/x11/pdfapp.c 2014-08-04 20:03:46.000000000 +0200 +@@ -1166,6 +1166,8 @@ + case 'j': + { + int h = fz_pixmap_height(app->ctx, app->image); ++ if ( (app->pany + h) <= app->winh ) ++ goto pagedown; + if (h <= app->winh || app->pany <= app->winh - h) + { + panto = PAN_TO_TOP; +@@ -1182,6 +1184,8 @@ + case 'k': + { + int h = fz_pixmap_height(app->ctx, app->image); ++ if (app->pany >= 0) ++ goto pageup; + if (h <= app->winh || app->pany == 0) + { + panto = PAN_TO_BOTTOM; +@@ -1257,6 +1261,7 @@ + */ + + case ',': ++ pageup: + panto = PAN_TO_BOTTOM; + if (app->numberlen > 0) + app->pageno -= atoi(app->number); +@@ -1265,6 +1270,7 @@ + break; + + case '.': ++ pagedown: + panto = PAN_TO_TOP; + if (app->numberlen > 0) + app->pageno += atoi(app->number); +@@ -1585,6 +1591,12 @@ + int isx = (modifiers & (1<<0)); + int xstep = isx ? 20 * dir : 0; + int ystep = !isx ? 20 * dir : 0; ++ if (!isx && dir < 0 && app->pany + ++ fz_pixmap_height(app->ctx, app->image) <= app->winh) ++ pdfapp_onkey(app, 'j'); ++ else if (!isx && dir > 0 && app->pany >= 0) ++ pdfapp_onkey(app, 'k'); ++ else + pdfapp_panview(app, app->panx + xstep, app->pany + ystep); + } + } diff --git a/graphics/mupdf/pkg-plist b/graphics/mupdf/pkg-plist index f6103b8710e2..dead94236ef4 100644 --- a/graphics/mupdf/pkg-plist +++ b/graphics/mupdf/pkg-plist @@ -1,12 +1,86 @@ -bin/mupdf bin/mudraw +bin/mujstest +bin/mupdf bin/mutool -include/fitz.h -include/memento.h -include/mucbz.h -include/mupdf.h -include/muxps.h -lib/libfitz.a +include/mupdf/cbz.h +include/mupdf/fitz.h +include/mupdf/fitz/annotation.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/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/meta.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-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/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/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 +include/mupdf/memento.h +include/mupdf/pdf.h +include/mupdf/pdf/annot.h +include/mupdf/pdf/appearance.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/javascript.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/tiff.h +include/mupdf/xps.h +lib/libmupdf.a man/man1/mudraw.1.gz 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 +@dirrmtry include/mupdf/fitz +@dirrmtry include/mupdf/pdf +@dirrmtry include/mupdf +%%PORTDOCS%%@dirrmtry %%DOCSDIR%% |