mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-20 00:21:35 +00:00
graphics/mupdf: Update to 1.17
Apply patch in graphics/zathura-pdf-mupdf to use transition functions to the new API (int fz_page_number_from_location(ctx, doc, location)) ChangeLog: https://www.mupdf.com/docs/api/changes.html PR: 246532 Submitted by: salil.wadnerkar@gmail.com Approved by: uzsolt@uzsolt.hu (maintainer)
This commit is contained in:
parent
63b29b0cc8
commit
23b2a98cc6
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=535838
@ -2,7 +2,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= mupdf
|
||||
DISTVERSION= 1.16.0
|
||||
DISTVERSION= 1.17.0
|
||||
DISTVERSIONSUFFIX= -source
|
||||
PORTEPOCH= 1
|
||||
CATEGORIES= graphics
|
||||
|
@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1564598649
|
||||
SHA256 (mupdf-1.16.0-source.tar.gz) = 64d537895641b711737cc58fe762481b07ea71d1506e8bd8a13434e093b0068d
|
||||
SIZE (mupdf-1.16.0-source.tar.gz) = 60805124
|
||||
TIMESTAMP = 1589721586
|
||||
SHA256 (mupdf-1.17.0-source.tar.gz) = 00e33fa89cb42f1ef9e3bb73671b1cb6d210f5159bd68168fa5c89ceb24dd48e
|
||||
SIZE (mupdf-1.17.0-source.tar.gz) = 65510829
|
||||
|
@ -1,36 +1,36 @@
|
||||
--- ./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 @@
|
||||
--- ./platform/x11/pdfapp.c.orig 2020-05-05 04:29:09.000000000 -0700
|
||||
+++ ./platform/x11/pdfapp.c 2020-05-17 08:47:00.137902000 -0700
|
||||
@@ -1462,6 +1462,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)
|
||||
+ if (app->pany + app->imgh <= app->winh)
|
||||
+ goto pagedown;
|
||||
if (app->imgh <= app->winh || app->pany <= app->winh - app->imgh)
|
||||
{
|
||||
panto = PAN_TO_TOP;
|
||||
@@ -1182,6 +1184,8 @@
|
||||
@@ -1477,6 +1479,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)
|
||||
+ if (app->pany >= 0)
|
||||
+ goto pageup;
|
||||
if (app->imgh <= app->winh || app->pany == 0)
|
||||
{
|
||||
panto = PAN_TO_BOTTOM;
|
||||
@@ -1257,6 +1261,7 @@
|
||||
@@ -1550,6 +1554,7 @@
|
||||
*/
|
||||
|
||||
case ',':
|
||||
+ pageup:
|
||||
panto = PAN_TO_BOTTOM;
|
||||
+ pageup:
|
||||
panto = DONT_PAN;
|
||||
if (app->numberlen > 0)
|
||||
app->pageno -= atoi(app->number);
|
||||
@@ -1265,6 +1270,7 @@
|
||||
@@ -1558,6 +1563,7 @@
|
||||
break;
|
||||
|
||||
case '.':
|
||||
+ pagedown:
|
||||
panto = PAN_TO_TOP;
|
||||
+ pagedown:
|
||||
panto = DONT_PAN;
|
||||
if (app->numberlen > 0)
|
||||
app->pageno += atoi(app->number);
|
||||
|
@ -26,6 +26,7 @@ include/mupdf/fitz/glyph.h
|
||||
include/mupdf/fitz/hash.h
|
||||
include/mupdf/fitz/image.h
|
||||
include/mupdf/fitz/link.h
|
||||
include/mupdf/fitz/log.h
|
||||
include/mupdf/fitz/outline.h
|
||||
include/mupdf/fitz/output-svg.h
|
||||
include/mupdf/fitz/output.h
|
||||
|
@ -0,0 +1,11 @@
|
||||
--- zathura-pdf-mupdf/index.c.orig 2020-05-18 10:56:42 UTC
|
||||
+++ zathura-pdf-mupdf/index.c
|
||||
@@ -67,7 +67,7 @@ build_index(fz_context* ctx, fz_document* document, fz
|
||||
|
||||
type = ZATHURA_LINK_GOTO_DEST;
|
||||
target.destination_type = ZATHURA_LINK_DESTINATION_XYZ;
|
||||
- target.page_number = fz_resolve_link(ctx, document, outline->uri, &x, &y);
|
||||
+ target.page_number = fz_page_number_from_location(ctx, document, fz_resolve_link(ctx, document, outline->uri, &x, &y));
|
||||
target.left = x;
|
||||
target.top = y;
|
||||
target.zoom = 0.0;
|
@ -0,0 +1,15 @@
|
||||
--- zathura-pdf-mupdf/links.c.orig 2020-05-18 11:05:39 UTC
|
||||
+++ zathura-pdf-mupdf/links.c
|
||||
@@ -56,8 +56,10 @@ pdf_page_links_get(zathura_page_t* page, void* data, z
|
||||
|
||||
type = ZATHURA_LINK_GOTO_DEST;
|
||||
target.destination_type = ZATHURA_LINK_DESTINATION_XYZ;
|
||||
- target.page_number = fz_resolve_link(mupdf_document->ctx,
|
||||
- mupdf_document->document, link->uri, &x, &y);
|
||||
+ target.page_number =
|
||||
+ fz_page_number_from_location(mupdf_document->ctx,
|
||||
+ mupdf_document->document, fz_resolve_link(mupdf_document->ctx,
|
||||
+ mupdf_document->document, link->uri, &x, &y));
|
||||
target.left = x;
|
||||
target.top = y;
|
||||
target.zoom = 0.0;
|
Loading…
Reference in New Issue
Block a user