Gentoo Archives: gentoo-commits

From: Mikle Kolyada <zlogene@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/zathura-pdf-mupdf/files/, app-text/zathura-pdf-mupdf/
Date: Mon, 24 Aug 2020 09:13:02
Message-Id: 1598260347.69db8d383698f52b4ab97df9c2df73b9fc135841.zlogene@gentoo
1 commit: 69db8d383698f52b4ab97df9c2df73b9fc135841
2 Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 24 09:12:27 2020 +0000
4 Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 24 09:12:27 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69db8d38
7
8 app-text/zathura-pdf-mupdf: fix mupdf-1.17.0 compat
9
10 Closes: https://bugs.gentoo.org/737462
11 Package-Manager: Portage-2.3.103, Repoman-2.3.23
12 Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
13
14 .../files/0.3.5-fz_location.patch | 44 ++++++++++++++++++++++
15 .../zathura-pdf-mupdf-0.3.5.ebuild | 6 ++-
16 2 files changed, 49 insertions(+), 1 deletion(-)
17
18 diff --git a/app-text/zathura-pdf-mupdf/files/0.3.5-fz_location.patch b/app-text/zathura-pdf-mupdf/files/0.3.5-fz_location.patch
19 new file mode 100644
20 index 00000000000..03c0bf24aab
21 --- /dev/null
22 +++ b/app-text/zathura-pdf-mupdf/files/0.3.5-fz_location.patch
23 @@ -0,0 +1,44 @@
24 +From c2dd7835b63ff68c0edc8a3182b3f994dc6ab4dd Mon Sep 17 00:00:00 2001
25 +From: a <a@×.com>
26 +Date: Sun, 16 Aug 2020 19:46:11 +0300
27 +Subject: [PATCH] fix conversion from 'fz_location' to 'unsigned int'
28 +
29 +---
30 + zathura-pdf-mupdf/index.c | 2 +-
31 + 1 file changed, 1 insertion(+), 1 deletion(-)
32 +
33 +diff --git a/zathura-pdf-mupdf/index.c b/zathura-pdf-mupdf/index.c
34 +index c421f5c..996d012 100644
35 +--- a/zathura-pdf-mupdf/index.c
36 ++++ b/zathura-pdf-mupdf/index.c
37 +@@ -67,7 +67,7 @@ build_index(fz_context* ctx, fz_document* document, fz_outline* outline, girara_
38 +
39 + type = ZATHURA_LINK_GOTO_DEST;
40 + target.destination_type = ZATHURA_LINK_DESTINATION_XYZ;
41 +- target.page_number = fz_resolve_link(ctx, document, outline->uri, &x, &y);
42 ++ target.page_number = fz_resolve_link(ctx, document, outline->uri, &x, &y).page;
43 + target.left = x;
44 + target.top = y;
45 + target.zoom = 0.0;
46 +--
47 +
48 +---
49 + zathura-pdf-mupdf/links.c | 2 +-
50 + 1 file changed, 1 insertion(+), 1 deletion(-)
51 +
52 +diff --git a/zathura-pdf-mupdf/links.c b/zathura-pdf-mupdf/links.c
53 +index 99c5715..2e8e90a 100644
54 +--- a/zathura-pdf-mupdf/links.c
55 ++++ b/zathura-pdf-mupdf/links.c
56 +@@ -57,7 +57,7 @@ pdf_page_links_get(zathura_page_t* page, void* data, zathura_error_t* error)
57 + type = ZATHURA_LINK_GOTO_DEST;
58 + target.destination_type = ZATHURA_LINK_DESTINATION_XYZ;
59 + target.page_number = fz_resolve_link(mupdf_document->ctx,
60 +- mupdf_document->document, link->uri, &x, &y);
61 ++ mupdf_document->document, link->uri, &x, &y).page;
62 + target.left = x;
63 + target.top = y;
64 + target.zoom = 0.0;
65 +--
66 +2.28.0
67 +
68
69 diff --git a/app-text/zathura-pdf-mupdf/zathura-pdf-mupdf-0.3.5.ebuild b/app-text/zathura-pdf-mupdf/zathura-pdf-mupdf-0.3.5.ebuild
70 index b1b7975e961..965f6f84b38 100644
71 --- a/app-text/zathura-pdf-mupdf/zathura-pdf-mupdf-0.3.5.ebuild
72 +++ b/app-text/zathura-pdf-mupdf/zathura-pdf-mupdf-0.3.5.ebuild
73 @@ -1,4 +1,4 @@
74 -# Copyright 1999-2019 Gentoo Authors
75 +# Copyright 1999-2020 Gentoo Authors
76 # Distributed under the terms of the GNU General Public License v2
77
78 EAPI=7
79 @@ -40,6 +40,10 @@ src_prepare() {
80 eapply "${FILESDIR}"/${PV}-compile-fix.patch
81 fi
82
83 + if has_version '=app-text/mupdf-1.17*'; then
84 + eapply "${FILESDIR}"/${PV}-fz_location.patch
85 + fi
86 +
87 default
88 }