summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikle Kolyada <zlogene@gentoo.org>2020-08-24 12:12:27 +0300
committerMikle Kolyada <zlogene@gentoo.org>2020-08-24 12:12:27 +0300
commit69db8d383698f52b4ab97df9c2df73b9fc135841 (patch)
tree64df559d4c9188ecde22812e1f75f257d3fd8f86 /app-text/zathura-pdf-mupdf
parentapp-text/zathura-ps: call xdg_desktop_database_update (diff)
downloadgentoo-69db8d383698f52b4ab97df9c2df73b9fc135841.tar.gz
gentoo-69db8d383698f52b4ab97df9c2df73b9fc135841.tar.bz2
gentoo-69db8d383698f52b4ab97df9c2df73b9fc135841.zip
app-text/zathura-pdf-mupdf: fix mupdf-1.17.0 compat
Closes: https://bugs.gentoo.org/737462 Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>
Diffstat (limited to 'app-text/zathura-pdf-mupdf')
-rw-r--r--app-text/zathura-pdf-mupdf/files/0.3.5-fz_location.patch44
-rw-r--r--app-text/zathura-pdf-mupdf/zathura-pdf-mupdf-0.3.5.ebuild6
2 files changed, 49 insertions, 1 deletions
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
new file mode 100644
index 000000000000..03c0bf24aab5
--- /dev/null
+++ b/app-text/zathura-pdf-mupdf/files/0.3.5-fz_location.patch
@@ -0,0 +1,44 @@
+From c2dd7835b63ff68c0edc8a3182b3f994dc6ab4dd Mon Sep 17 00:00:00 2001
+From: a <a@a.com>
+Date: Sun, 16 Aug 2020 19:46:11 +0300
+Subject: [PATCH] fix conversion from 'fz_location' to 'unsigned int'
+
+---
+ zathura-pdf-mupdf/index.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/zathura-pdf-mupdf/index.c b/zathura-pdf-mupdf/index.c
+index c421f5c..996d012 100644
+--- a/zathura-pdf-mupdf/index.c
++++ b/zathura-pdf-mupdf/index.c
+@@ -67,7 +67,7 @@ build_index(fz_context* ctx, fz_document* document, fz_outline* outline, girara_
+
+ 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_resolve_link(ctx, document, outline->uri, &x, &y).page;
+ target.left = x;
+ target.top = y;
+ target.zoom = 0.0;
+--
+
+---
+ zathura-pdf-mupdf/links.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/zathura-pdf-mupdf/links.c b/zathura-pdf-mupdf/links.c
+index 99c5715..2e8e90a 100644
+--- a/zathura-pdf-mupdf/links.c
++++ b/zathura-pdf-mupdf/links.c
+@@ -57,7 +57,7 @@ pdf_page_links_get(zathura_page_t* page, void* data, zathura_error_t* error)
+ 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);
++ mupdf_document->document, link->uri, &x, &y).page;
+ target.left = x;
+ target.top = y;
+ target.zoom = 0.0;
+--
+2.28.0
+
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
index b1b7975e9616..965f6f84b38a 100644
--- 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
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -40,6 +40,10 @@ src_prepare() {
eapply "${FILESDIR}"/${PV}-compile-fix.patch
fi
+ if has_version '=app-text/mupdf-1.17*'; then
+ eapply "${FILESDIR}"/${PV}-fz_location.patch
+ fi
+
default
}