Commit 823f8d8e authored by Milan P. Stanić's avatar Milan P. Stanić
Browse files

testing/zathura-pdf-mupdf: rebuild and fix API change to mupdf 1.17

picked patch for API change from upstream
remove meson-mupdfthird.patch, not needed with mupdf 1.17
cleanup APKBUILD
parent 022f8251
......@@ -10,12 +10,11 @@ license="zlib"
makedepends="meson ninja mupdf-dev zathura-dev girara-dev openssl-dev openjpeg-dev libjpeg-turbo-dev jbig2dec-dev"
depends="zathura !zathura-pdf-poppler"
source="https://git.pwmt.org/pwmt/zathura-pdf-mupdf/-/archive/$pkgver/zathura-pdf-mupdf-$pkgver.tar.gz
meson-mupdfthird.patch"
c7f341addb76d5e6fd8c24c666d8fe97c451a4cb.patch"
options="!check"
options="!check" # no test suite
build() {
export=LDFLAGS="-ljpeg -lopenjp2 -ljbig2dec"
meson \
--prefix=/usr \
--buildtype=plain \
......@@ -29,4 +28,4 @@ package() {
}
sha512sums="1f7a748fee74296a008cef42c8f2e443409c77e16caa8441f74136260aaac7dee4d3c03e8a88532c45a0f9972e1b4965d4cffd488a00123d4d8cee9bcec2cf30 zathura-pdf-mupdf-0.3.5.tar.gz
f9038cb8ad6f301097a0d8be44847c4a71823f8381889999223d7cc1487bb2431b6b161740ac048c9fcc94c34cb88b673df1e36e34a1fc17a56e9203b5ea4974 meson-mupdfthird.patch"
d27145847bcac80644a13dfc474db1a88b8cd1def822d9ba0e0ffd454b699a75aad057960558318dc9be0abbc74499801a3542ef651e86853e5fc1f3d1bd2faa c7f341addb76d5e6fd8c24c666d8fe97c451a4cb.patch"
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
--- a/meson.build 2018-10-04 19:21:03.000000000 +0200
+++ b/meson.build 2019-04-27 23:32:18.946186871 +0200
@@ -20,7 +20,7 @@
glib = dependency('glib-2.0')
cairo = dependency('cairo')
mupdf = cc.find_library('mupdf')
-mupdfthird = cc.find_library('mupdf-third')
+mupdfthird = cc.find_library('mupdfthird')
build_dependencies = [
zathura,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment