FreeBSD Bugzilla – Attachment 145371 Details for
Bug 184335
graphics/mupdf 1.3 available
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Re-correct patch (include pkg-plist modification)
mupdf-1.5.patch (text/plain), 14.29 KB, created by
Zsolt Udvari
on 2014-08-04 18:42:17 UTC
(
hide
)
Description:
Re-correct patch (include pkg-plist modification)
Filename:
MIME Type:
Creator:
Zsolt Udvari
Created:
2014-08-04 18:42:17 UTC
Size:
14.29 KB
patch
obsolete
>diff -urN mupdf.orig/Makefile mupdf/Makefile >--- mupdf.orig/Makefile 2014-08-04 12:52:17.000000000 +0200 >+++ mupdf/Makefile 2014-08-04 20:05:29.000000000 +0200 >@@ -2,13 +2,12 @@ > # $FreeBSD: head/graphics/mupdf/Makefile 355743 2014-05-29 20:18:17Z marino $ > > 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 > COMMENT= Lightweight PDF viewer and toolkit >@@ -18,11 +17,13 @@ > 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 @@ > .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 @@ > 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 -urN mupdf.orig/distinfo mupdf/distinfo >--- mupdf.orig/distinfo 2014-08-04 12:52:17.000000000 +0200 >+++ mupdf/distinfo 2014-08-04 12:53:44.000000000 +0200 >@@ -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 -urN mupdf.orig/files/patch-Makefile mupdf/files/patch-Makefile >--- mupdf.orig/files/patch-Makefile 2014-08-04 12:52:17.000000000 +0200 >+++ mupdf/files/patch-Makefile 2014-08-04 20:04:08.000000000 +0200 >@@ -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 -urN mupdf.orig/files/patch-apps_x11_main.c mupdf/files/patch-apps_x11_main.c >--- mupdf.orig/files/patch-apps_x11_main.c 2014-08-04 12:52:17.000000000 +0200 >+++ mupdf/files/patch-apps_x11_main.c 1970-01-01 01:00:00.000000000 +0100 >@@ -1,27 +0,0 @@ >---- 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) >- exit(1); >- } >- >-+/* reference: >-+ * http://stackoverflow.com/questions/2621439/how-to-get-screen-dpi-linux-mac-programatically >-+ */ >-+int get_dpi(void) >-+{ >-+ Display *xdpy; >-+ int xscr; >-+ int x = 0; >-+ >-+ if ((xdpy = XOpenDisplay(NULL))) { >-+ xscr = DefaultScreen(xdpy); >-+ x = (int) (DisplayWidth(xdpy, xscr) * 25.4 / >-+ DisplayWidthMM(xdpy, xscr) + 0.5); >-+ XCloseDisplay(xdpy); >-+ } >-+ return x; >-+} >-+ >- int main(int argc, char **argv) >- { >- int c; >diff -urN mupdf.orig/files/patch-platform__x11__x11_main.c mupdf/files/patch-platform__x11__x11_main.c >--- mupdf.orig/files/patch-platform__x11__x11_main.c 1970-01-01 01:00:00.000000000 +0100 >+++ mupdf/files/patch-platform__x11__x11_main.c 2014-08-04 20:04:08.000000000 +0200 >@@ -0,0 +1,27 @@ >+--- ./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); >+ } >+ >++/* reference: >++ * http://stackoverflow.com/questions/2621439/how-to-get-screen-dpi-linux-mac-programatically >++ */ >++int get_dpi(void) >++{ >++ Display *xdpy; >++ int xscr; >++ int x = 0; >++ >++ if ((xdpy = XOpenDisplay(NULL))) { >++ xscr = DefaultScreen(xdpy); >++ x = (int) (DisplayWidth(xdpy, xscr) * 25.4 / >++ DisplayWidthMM(xdpy, xscr) + 0.5); >++ XCloseDisplay(xdpy); >++ } >++ return x; >++} >++ >+ int main(int argc, char **argv) >+ { >+ int c; >diff -urN mupdf.orig/files/patch-source__fitz__load-jpx.c mupdf/files/patch-source__fitz__load-jpx.c >--- mupdf.orig/files/patch-source__fitz__load-jpx.c 1970-01-01 01:00:00.000000000 +0100 >+++ mupdf/files/patch-source__fitz__load-jpx.c 2014-08-04 20:04:08.000000000 +0200 >@@ -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 -urN mupdf.orig/files/scroll_hack-apps_pdfapp.c mupdf/files/scroll_hack-apps_pdfapp.c >--- mupdf.orig/files/scroll_hack-apps_pdfapp.c 2014-08-04 12:52:17.000000000 +0200 >+++ mupdf/files/scroll_hack-apps_pdfapp.c 1970-01-01 01:00:00.000000000 +0100 >@@ -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 -urN mupdf.orig/files/scroll_hack-platform__x11__pdfapp.c mupdf/files/scroll_hack-platform__x11__pdfapp.c >--- mupdf.orig/files/scroll_hack-platform__x11__pdfapp.c 1970-01-01 01:00:00.000000000 +0100 >+++ mupdf/files/scroll_hack-platform__x11__pdfapp.c 2014-08-04 20:04:08.000000000 +0200 >@@ -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 -urN mupdf.orig/pkg-plist mupdf/pkg-plist >--- mupdf.orig/pkg-plist 2014-08-04 12:52:17.000000000 +0200 >+++ mupdf/pkg-plist 2014-08-04 20:35:24.000000000 +0200 >@@ -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%%
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 184335
:
145367
|
145370
| 145371