Adjust to mupdf 1.17

fixes FTBFS
f38
Michael J Gruber 5 years ago
parent ee4d24477a
commit d190c0db62

@ -0,0 +1,50 @@
From c7f341addb76d5e6fd8c24c666d8fe97c451a4cb Mon Sep 17 00:00:00 2001
Message-Id: <c7f341addb76d5e6fd8c24c666d8fe97c451a4cb.1589654105.git.mjg@fedoraproject.org>
From: Moritz Lipp <mail@mlq.me>
Date: Thu, 7 May 2020 20:42:01 +0200
Subject: [PATCH] Update to mupdf 1.17
Signed-off-by: Michael J Gruber <mjg@fedoraproject.org>
---
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.2.764.g8d8fb31f15

@ -1,10 +1,11 @@
Name: zathura-pdf-mupdf Name: zathura-pdf-mupdf
Version: 0.3.5 Version: 0.3.5
Release: 2%{?dist} Release: 3%{?dist}
Summary: PDF support for zathura via mupdf Summary: PDF support for zathura via mupdf
License: zlib License: zlib
URL: http://pwmt.org/projects/zathura/plugins/%{name} URL: http://pwmt.org/projects/zathura/plugins/%{name}
Source0: http://pwmt.org/projects/zathura/plugins/download/%{name}-%{version}.tar.xz Source0: http://pwmt.org/projects/zathura/plugins/download/%{name}-%{version}.tar.xz
Patch1: 0001-Update-to-mupdf-1.17.patch
BuildRequires: binutils BuildRequires: binutils
BuildRequires: cairo-devel BuildRequires: cairo-devel
# Needed to validate the desktop file # Needed to validate the desktop file
@ -17,7 +18,7 @@ BuildRequires: jbig2dec-devel
BuildRequires: libappstream-glib BuildRequires: libappstream-glib
BuildRequires: libjpeg-turbo-devel BuildRequires: libjpeg-turbo-devel
BuildRequires: meson >= 0.43 BuildRequires: meson >= 0.43
BuildRequires: mupdf-static >= 1.14 BuildRequires: mupdf-static >= 1.17
BuildRequires: openjpeg2-devel BuildRequires: openjpeg2-devel
BuildRequires: zathura-devel >= 0.3.9 BuildRequires: zathura-devel >= 0.3.9
Requires: zathura >= 0.3.9 Requires: zathura >= 0.3.9
@ -29,6 +30,7 @@ This plugin adds PDF support to zathura using the mupdf rendering engine.
%prep %prep
%setup -q %setup -q
%patch1 -p1
%build %build
%meson -Dlink-external=true %meson -Dlink-external=true
@ -51,6 +53,9 @@ appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.metainf
%{_datadir}/metainfo/org.pwmt.zathura-pdf-mupdf.metainfo.xml %{_datadir}/metainfo/org.pwmt.zathura-pdf-mupdf.metainfo.xml
%changelog %changelog
* Sat May 16 2020 Michael J Gruber <mjg@fedoraproject.org> - 0.3.5-3
- Adjust to mupdf 1.17
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.5-2 * Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

Loading…
Cancel
Save