diff options
author | scheidell <scheidell@FreeBSD.org> | 2012-06-04 00:02:49 +0000 |
---|---|---|
committer | scheidell <scheidell@FreeBSD.org> | 2012-06-04 00:02:49 +0000 |
commit | 217b8ddd6feabea5196f8c43686cbe1dba401e32 (patch) | |
tree | 7c36b73787442f422a41784a37abddf60e94acee | |
parent | 6e594af89608b4b4d1c38bcaaa9340a00de620fc (diff) | |
download | FreeBSD-ports-217b8ddd6feabea5196f8c43686cbe1dba401e32.zip FreeBSD-ports-217b8ddd6feabea5196f8c43686cbe1dba401e32.tar.gz |
- Update to 1.0
PR: ports/166745
Submitted by: Zhihao Yuan <lichray@gmail.com> (maintainer)
-rw-r--r-- | graphics/mupdf/Makefile | 34 | ||||
-rw-r--r-- | graphics/mupdf/distinfo | 4 | ||||
-rw-r--r-- | graphics/mupdf/files/patch-apps_x11_main.c | 28 | ||||
-rw-r--r-- | graphics/mupdf/files/scroll_hack-apps_pdfapp.c | 27 | ||||
-rw-r--r-- | graphics/mupdf/pkg-plist | 15 |
5 files changed, 43 insertions, 65 deletions
diff --git a/graphics/mupdf/Makefile b/graphics/mupdf/Makefile index 9a96085c..1642d0d 100644 --- a/graphics/mupdf/Makefile +++ b/graphics/mupdf/Makefile @@ -5,8 +5,7 @@ # $FreeBSD$ PORTNAME= mupdf -PORTVERSION= 0.9 -PORTREVISION= 1 +PORTVERSION= 1.0 PORTEPOCH= 1 CATEGORIES= graphics MASTER_SITES= GOOGLE_CODE \ @@ -19,49 +18,48 @@ COMMENT= Lightweight PDF viewer and toolkit LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/COPYING -LIB_DEPENDS= freetype.9:${PORTSDIR}/print/freetype2 \ - jpeg.11:${PORTSDIR}/graphics/jpeg \ - jbig2dec.0:${PORTSDIR}/graphics/jbig2dec \ - openjpeg.2:${PORTSDIR}/graphics/openjpeg +LIB_DEPENDS= freetype:${PORTSDIR}/print/freetype2 \ + jpeg:${PORTSDIR}/graphics/jpeg \ + jbig2dec:${PORTSDIR}/graphics/jbig2dec \ + openjpeg:${PORTSDIR}/graphics/openjpeg USE_GMAKE= yes MAKE_ARGS+= build=release prefix=${PREFIX} verbose=1 mandir=${PREFIX}/man USE_XORG= x11 xext USE_GNOME= pkgconfig -MAN1= mupdf.1 mu_pdfclean.1 mu_pdfdraw.1 mu_pdfshow.1 +MAN1= mupdf.1 mupdfclean.1 mudraw.1 mupdfshow.1 MAKE_JOBS_SAFE= yes +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-source -OPTIONS= SCROLL "Build with scroll hacks" on \ +OPTIONS_DEFINE= SCROLL +OPTIONS_DEFAULT=SCROLL + +SCROLL_DESC= "Build with scroll hacks" .include <bsd.port.options.mk> -.if ${ARCH} == "amd64" || ${ARCH} == "i386" +.if ${CC:T:Mclang} == "clang" +CFLAGS+= -no-integrated-as +.elif ${ARCH} == "amd64" || ${ARCH} == "i386" CFLAGS+= -mfpmath=sse .endif -.if defined(WITH_SCROLL) +.if ${PORT_OPTIONS:MSCROLL} EXTRA_PATCHES+= ${FILESDIR}/scroll_hack-apps_pdfapp.c .endif post-patch: .SILENT ${REINPLACE_CMD} \ - -e 's#\(PDF_APPS :=.*/\)#\1mu_#' \ - -e 's#\(XPS_APPS :=.*/\)#\1mu_#' \ - -e 's#\(MUPDF) :.*/\)#\1mu_#' \ - -e 's#\(OUT)/\).*: apps/#\1mu_%.o : apps/#' \ -e '/install:/,/^$$/ { /-d/d; }' \ -e '/install.*bindir)$$/s/install/$$(BSD_INSTALL_PROGRAM)/' \ -e '/install.*libdir)$$/s/install/$$(BSD_INSTALL_LIB)/' \ -e '/install.*incdir)$$/s/install/$$(BSD_INSTALL_DATA)/' \ -e '/install.*man1$$/s/install/$$(BSD_INSTALL_MAN)/' \ ${WRKSRC}/Makefile - ${REINPLACE_CMD} -e 's/-O2//' \ + ${REINPLACE_CMD} -e 's/-pipe -O2 //' \ -e 's|/usr/local|${LOCALBASE}|' \ ${WRKSRC}/Makerules -pre-install: .SILENT - ${FIND} ${WRKSRC} -name pdf\*.1 -exec ${SH} -c 'mv {} $$(dirname {})/mu_$$(basename {})' \; - .include <bsd.port.pre.mk> .include <bsd.port.post.mk> diff --git a/graphics/mupdf/distinfo b/graphics/mupdf/distinfo index c344140..c7420c7 100644 --- a/graphics/mupdf/distinfo +++ b/graphics/mupdf/distinfo @@ -1,2 +1,2 @@ -SHA256 (mupdf-0.9-source.tar.gz) = abed825cb1d73e0e28f0a7ee72b5d7a451ba41d21b0c55837ed2a212f3b16b2d -SIZE (mupdf-0.9-source.tar.gz) = 3917075 +SHA256 (mupdf-1.0-source.tar.gz) = 4f5e12625f7f827f6eb5606026c9a7a7dbdeaf935fcea3bc173ed8d469698ec2 +SIZE (mupdf-1.0-source.tar.gz) = 4208530 diff --git a/graphics/mupdf/files/patch-apps_x11_main.c b/graphics/mupdf/files/patch-apps_x11_main.c index 1b5545b..c1f1340 100644 --- a/graphics/mupdf/files/patch-apps_x11_main.c +++ b/graphics/mupdf/files/patch-apps_x11_main.c @@ -1,18 +1,7 @@ ---- apps/x11_main.c.orig 2011-04-29 14:06:09.000000000 -0500 -+++ apps/x11_main.c 2011-06-11 02:15:12.203411543 -0500 -@@ -482,9 +482,7 @@ void winreloadfile(pdfapp_t *app) - - void winopenuri(pdfapp_t *app, char *buf) - { -- char *browser = getenv("BROWSER"); -- if (!browser) -- browser = "open"; -+ char browser[] = "xdg-open"; - if (fork() == 0) - execlp(browser, browser, buf, (char*)0); - } -@@ -563,6 +561,24 @@ static void winresettmo(struct timeval * - tmo_at->tv_usec = 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: @@ -36,12 +25,3 @@ int main(int argc, char **argv) { int c; -@@ -571,7 +587,7 @@ int main(int argc, char **argv) - KeySym keysym; - int oldx = 0; - int oldy = 0; -- int resolution = 72; -+ int resolution = get_dpi(); - int pageno = 1; - int wasshowingpage; - struct timeval tmo, tmo_at; diff --git a/graphics/mupdf/files/scroll_hack-apps_pdfapp.c b/graphics/mupdf/files/scroll_hack-apps_pdfapp.c index c0cfc7d..2d0ea28 100644 --- a/graphics/mupdf/files/scroll_hack-apps_pdfapp.c +++ b/graphics/mupdf/files/scroll_hack-apps_pdfapp.c @@ -1,22 +1,22 @@ ---- apps/pdfapp.c.orig 2011-04-29 14:06:09.000000000 -0500 -+++ apps/pdfapp.c 2011-05-16 19:58:55.650380651 -0500 -@@ -777,11 +777,15 @@ void pdfapp_onkey(pdfapp_t *app, int c) +--- apps/pdfapp.c.orig 2012-03-29 05:46:53.000000000 -0500 ++++ apps/pdfapp.c 2012-04-07 16:43:55.030462608 -0500 +@@ -774,11 +774,15 @@ void pdfapp_onkey(pdfapp_t *app, int c) break; case 'j': -+ if (app->pany + app->image->h <= app->winh) -+ goto pagedown; - app->pany -= app->image->h / 10; ++ 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); break; case 'k': -+ if (app->pany >= 0) -+ goto pageup; - app->pany += app->image->h / 10; ++ if (app->pany >= 0) ++ goto pageup; + app->pany += fz_pixmap_height(app->ctx, app->image) / 10; pdfapp_showpage(app, 0, 0, 1); break; -@@ -843,6 +847,7 @@ void pdfapp_onkey(pdfapp_t *app, int c) +@@ -842,6 +846,7 @@ void pdfapp_onkey(pdfapp_t *app, int c) */ case ',': @@ -24,7 +24,7 @@ panto = PAN_TO_BOTTOM; if (app->numberlen > 0) app->pageno -= atoi(app->number); -@@ -851,6 +856,7 @@ void pdfapp_onkey(pdfapp_t *app, int c) +@@ -850,6 +855,7 @@ void pdfapp_onkey(pdfapp_t *app, int c) break; case '.': @@ -32,11 +32,12 @@ panto = PAN_TO_TOP; if (app->numberlen > 0) app->pageno += atoi(app->number); -@@ -1022,6 +1028,11 @@ void pdfapp_onmouse(pdfapp_t *app, int x +@@ -1039,6 +1045,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 + app->image->h <= app->winh) ++ 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'); diff --git a/graphics/mupdf/pkg-plist b/graphics/mupdf/pkg-plist index 9c9aa9f..02ca45e 100644 --- a/graphics/mupdf/pkg-plist +++ b/graphics/mupdf/pkg-plist @@ -1,13 +1,12 @@ bin/mupdf -bin/mu_pdfclean -bin/mu_pdfdraw -bin/mu_pdfextract -bin/mu_pdfinfo -bin/mu_pdfshow -bin/mu_xpsdraw +bin/mupdfclean +bin/mudraw +bin/mupdfextract +bin/mupdfinfo +bin/mupdfshow include/fitz.h +include/memento.h +include/mucbz.h include/mupdf.h include/muxps.h lib/libfitz.a -lib/libmupdf.a -lib/libmuxps.a |