]> git.pld-linux.org Git - packages/zathura-pdf-mupdf.git/commitdiff
upstream patch for mupdf 1.17
authorJan Palus <atler@pld-linux.org>
Sat, 9 May 2020 21:16:36 +0000 (23:16 +0200)
committerJan Palus <atler@pld-linux.org>
Sat, 9 May 2020 21:16:36 +0000 (23:16 +0200)
mupdf-1.17.patch [new file with mode: 0644]
zathura-pdf-mupdf.spec

diff --git a/mupdf-1.17.patch b/mupdf-1.17.patch
new file mode 100644 (file)
index 0000000..eae81bc
--- /dev/null
@@ -0,0 +1,48 @@
+From c7f341addb76d5e6fd8c24c666d8fe97c451a4cb Mon Sep 17 00:00:00 2001
+From: Moritz Lipp <mail@mlq.me>
+Date: Thu, 7 May 2020 20:42:01 +0200
+Subject: [PATCH] Update to mupdf 1.17
+
+---
+ zathura-pdf-mupdf/index.c | 4 +++-
+ zathura-pdf-mupdf/links.c | 5 +++--
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/zathura-pdf-mupdf/index.c b/zathura-pdf-mupdf/index.c
+index c421f5c..cbbe978 100644
+--- a/zathura-pdf-mupdf/index.c
++++ b/zathura-pdf-mupdf/index.c
+@@ -65,9 +65,11 @@ build_index(fz_context* ctx, fz_document* document, fz_outline* outline, girara_
+       float x = 0;
+       float y = 0;
++      fz_location location = fz_resolve_link(ctx, document, outline->uri, &x, &y);
++
+       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      = location.page;
+       target.left  = x;
+       target.top   = y;
+       target.zoom  = 0.0;
+diff --git a/zathura-pdf-mupdf/links.c b/zathura-pdf-mupdf/links.c
+index 99c5715..157f039 100644
+--- a/zathura-pdf-mupdf/links.c
++++ b/zathura-pdf-mupdf/links.c
+@@ -54,10 +54,11 @@ pdf_page_links_get(zathura_page_t* page, void* data, zathura_error_t* error)
+       float x = 0;
+       float y = 0;
++      fz_location location = fz_resolve_link(mupdf_document->ctx, mupdf_document->document, link->uri, &x, &y);
++
+       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      = location.page;
+       target.left  = x;
+       target.top   = y;
+       target.zoom  = 0.0;
+-- 
+2.26.0
+
index a5f598288d9b25c44cee8a143dedafdae1c35c7c..09be6ebaa76de4e80d1d072d458dc2fbab02ed0b 100644 (file)
@@ -7,6 +7,7 @@ License:        BSD-like
 Group:         Applications/Publishing
 Source0:       https://pwmt.org/projects/zathura-pdf-mupdf/download/%{name}-%{version}.tar.xz
 # Source0-md5: 4b48f04c5275210f566900a70abc79aa
+Patch0:                mupdf-1.17.patch
 URL:           https://pwmt.org/projects/zathura-pdf-mupdf/
 BuildRequires: cairo-devel
 # C11
@@ -15,7 +16,7 @@ BuildRequires:        girara-devel >= 0.2.3
 BuildRequires: glib2-devel >= 2.0
 BuildRequires: gtk+3-devel >= 3.2
 BuildRequires: meson >= 0.43
-BuildRequires: mupdf-devel >= 1.16
+BuildRequires: mupdf-devel >= 1.17
 BuildRequires: ninja
 BuildRequires: pkgconfig
 BuildRequires: tar >= 1:1.22
@@ -37,6 +38,7 @@ wykorzystaniem silnika renderujÄ…cego mupdf.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %meson build
This page took 0.16957 seconds and 4 git commands to generate.