* Re: mupdf: update to 1.23.4.
2023-10-23 16:34 [PR PATCH] mupdf: update to 1.23.4 mhmdanas
@ 2023-10-23 17:38 ` dkwo
2023-10-23 18:06 ` mhmdanas
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: dkwo @ 2023-10-23 17:38 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 180 bytes --]
New comment by dkwo on void-packages repository
https://github.com/void-linux/void-packages/pull/46857#issuecomment-1775693909
Comment:
do fbpdf, sioyek, zathura work with this?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: mupdf: update to 1.23.4.
2023-10-23 16:34 [PR PATCH] mupdf: update to 1.23.4 mhmdanas
2023-10-23 17:38 ` dkwo
@ 2023-10-23 18:06 ` mhmdanas
2023-10-23 18:16 ` mhmdanas
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: mhmdanas @ 2023-10-23 18:06 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 191 bytes --]
New comment by mhmdanas on void-packages repository
https://github.com/void-linux/void-packages/pull/46857#issuecomment-1775740939
Comment:
Both sioyek and zathura work, didn't test fbpdf.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: mupdf: update to 1.23.4.
2023-10-23 16:34 [PR PATCH] mupdf: update to 1.23.4 mhmdanas
2023-10-23 17:38 ` dkwo
2023-10-23 18:06 ` mhmdanas
@ 2023-10-23 18:16 ` mhmdanas
2023-10-26 15:14 ` Zapeth
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: mhmdanas @ 2023-10-23 18:16 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 245 bytes --]
New comment by mhmdanas on void-packages repository
https://github.com/void-linux/void-packages/pull/46857#issuecomment-1775740939
Comment:
Both sioyek and zathura work, didn't test fbpdf.
Edit: actually, sioyek seems to fail to compile...
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: mupdf: update to 1.23.4.
2023-10-23 16:34 [PR PATCH] mupdf: update to 1.23.4 mhmdanas
` (2 preceding siblings ...)
2023-10-23 18:16 ` mhmdanas
@ 2023-10-26 15:14 ` Zapeth
2023-10-31 23:37 ` [PR PATCH] [Updated] " mhmdanas
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Zapeth @ 2023-10-26 15:14 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 276 bytes --]
New comment by Zapeth on void-packages repository
https://github.com/void-linux/void-packages/pull/46857#issuecomment-1781329089
Comment:
It looks like sioyek needs to be patched for mupdf 1.23 -> https://github.com/ahrm/sioyek/pull/831 (just saw the PR, haven't tested it)
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PR PATCH] [Updated] mupdf: update to 1.23.4.
2023-10-23 16:34 [PR PATCH] mupdf: update to 1.23.4 mhmdanas
` (3 preceding siblings ...)
2023-10-26 15:14 ` Zapeth
@ 2023-10-31 23:37 ` mhmdanas
2023-10-31 23:38 ` [PR REVIEW] " mhmdanas
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: mhmdanas @ 2023-10-31 23:37 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1225 bytes --]
There is an updated pull request by mhmdanas against master on the void-packages repository
https://github.com/mhmdanas/void-packages mupdf-1.23.4
https://github.com/void-linux/void-packages/pull/46857
mupdf: update to 1.23.4.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/46857.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mupdf-1.23.4-46857.patch --]
[-- Type: text/x-diff, Size: 7579 bytes --]
From f2599c03498076839b17e13fe12f270016c93cab Mon Sep 17 00:00:00 2001
From: Mohammed Anas <triallax@tutanota.com>
Date: Mon, 23 Oct 2023 17:33:42 +0100
Subject: [PATCH 1/4] mupdf: update to 1.23.4.
---
srcpkgs/mupdf/template | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/srcpkgs/mupdf/template b/srcpkgs/mupdf/template
index 0c05d36e41385..b94b8cb7c1a5e 100644
--- a/srcpkgs/mupdf/template
+++ b/srcpkgs/mupdf/template
@@ -1,7 +1,8 @@
# Template file for 'mupdf'
+# Static library, revbump all dependants on mupdf updates
pkgname=mupdf
-version=1.20.3
-revision=3
+version=1.23.4
+revision=1
hostmakedepends="pkg-config zlib-devel libcurl-devel freetype-devel
libjpeg-turbo-devel jbig2dec-devel libXext-devel libXcursor-devel
libXrandr-devel libXinerama-devel harfbuzz-devel readline-devel
@@ -14,12 +15,9 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
license="AGPL-3.0-only"
homepage="https://mupdf.com"
distfiles="https://mupdf.com/downloads/archive/${pkgname}-${version}-source.tar.lz"
-checksum=6f73f63ef8aa81991dfd023d4426a548827d1d74e0bfcf2a013acad63b651868
+checksum=ecf6da72393eb32b16037f9376cf90a576c87426b6b7f1e63d38619a1bd7c800
pre_build() {
- # libmupdf-{threads,pkcs7}.a are required by fbpdf
- sed 's/INSTALL_LIBS :=/& $(THREAD_LIB) $(PKCS7_LIB)/' -i Makefile
-
if [ "$CROSS_BUILD" ]; then
make ${makejobs} CC=cc LD=ld AR=ar CFLAGS="-fPIC" LDFLAGS='' build=release generate
fi
From 9f1f1e6568e23e548704206fb90095ea6661c158 Mon Sep 17 00:00:00 2001
From: Mohammed Anas <triallax@tutanota.com>
Date: Tue, 31 Oct 2023 23:21:31 +0000
Subject: [PATCH 2/4] fbpdf: revbump for mupdf-1.23.4.
---
srcpkgs/fbpdf/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/fbpdf/template b/srcpkgs/fbpdf/template
index 4ff36a2e486b3..ad000c81f989b 100644
--- a/srcpkgs/fbpdf/template
+++ b/srcpkgs/fbpdf/template
@@ -1,7 +1,7 @@
# Template file for 'fbpdf'
pkgname=fbpdf
version=0.0.20220624
-revision=2
+revision=3
_githash=6276360f47edd71de736e153f5dcc82b6d60b3db
_gitshort="${_githash:0:7}"
build_style=gnu-makefile
From 27c2a039aa99191ea8c6eb22374938cbbe213682 Mon Sep 17 00:00:00 2001
From: Mohammed Anas <triallax@tutanota.com>
Date: Tue, 31 Oct 2023 23:21:31 +0000
Subject: [PATCH 3/4] sioyek: revbump for mupdf-1.23.4.
---
srcpkgs/sioyek/patches/mupdf-1.23.patch | 75 +++++++++++++++++++++++++
srcpkgs/sioyek/template | 2 +-
2 files changed, 76 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/sioyek/patches/mupdf-1.23.patch
diff --git a/srcpkgs/sioyek/patches/mupdf-1.23.patch b/srcpkgs/sioyek/patches/mupdf-1.23.patch
new file mode 100644
index 0000000000000..fc6b5df21beec
--- /dev/null
+++ b/srcpkgs/sioyek/patches/mupdf-1.23.patch
@@ -0,0 +1,75 @@
+Patch taken from Alpine: https://git.alpinelinux.org/aports/tree/community/sioyek/mupdf-0.23.0.patch
+
+diff --git a/pdf_viewer/document_view.cpp b/pdf_viewer/document_view.cpp
+index f48d05e..0bc3855 100644
+--- a/pdf_viewer/document_view.cpp
++++ b/pdf_viewer/document_view.cpp
+@@ -1121,7 +1121,7 @@ std::vector<DocumentPos> DocumentView::find_line_definitions() {
+
+ std::optional<PdfLink> pdf_link = current_document->get_link_in_page_rect(get_center_page_number(), line_rects[line_index]);
+ if (pdf_link.has_value()) {
+- auto parsed_uri = parse_uri(mupdf_context, pdf_link.value().uri);
++ auto parsed_uri = parse_uri(mupdf_context, current_document->doc, pdf_link.value().uri);
+ result.push_back({ parsed_uri.page - 1, parsed_uri.x, parsed_uri.y });
+ return result;
+ }
+diff --git a/pdf_viewer/main_widget.cpp b/pdf_viewer/main_widget.cpp
+index 19b568b..335a93f 100644
+--- a/pdf_viewer/main_widget.cpp
++++ b/pdf_viewer/main_widget.cpp
+@@ -170,7 +170,7 @@ void MainWidget::set_overview_position(int page, float offset) {
+
+ void MainWidget::set_overview_link(PdfLink link) {
+
+- auto [page, offset_x, offset_y] = parse_uri(mupdf_context, link.uri);
++ auto [page, offset_x, offset_y] = parse_uri(mupdf_context, doc()->doc, link.uri);
+ if (page >= 1) {
+ set_overview_position(page - 1, offset_y);
+ }
+@@ -3178,7 +3178,7 @@ void MainWidget::handle_pending_text_command(std::wstring text) {
+ open_web_url(utf8_decode(selected_link->uri));
+ }
+ else{
+- auto [page, offset_x, offset_y] = parse_uri(mupdf_context, selected_link->uri);
++ auto [page, offset_x, offset_y] = parse_uri(mupdf_context, doc()->doc, selected_link->uri);
+ long_jump_to_destination(page-1, offset_y);
+ }
+ }
+@@ -3863,7 +3863,7 @@ void MainWidget::handle_link_click(const PdfLink& link) {
+ return;
+ }
+
+- auto [page, offset_x, offset_y] = parse_uri(mupdf_context, link.uri);
++ auto [page, offset_x, offset_y] = parse_uri(mupdf_context, doc()->doc, link.uri);
+
+ // convert one indexed page to zero indexed page
+ page--;
+diff --git a/pdf_viewer/utils.cpp b/pdf_viewer/utils.cpp
+index 22d4265..3150e66 100644
+--- a/pdf_viewer/utils.cpp
++++ b/pdf_viewer/utils.cpp
+@@ -116,8 +116,9 @@ bool rects_intersect(fz_rect rect1, fz_rect rect2) {
+ return range_intersects(rect1.x0, rect1.x1, rect2.x0, rect2.x1) && range_intersects(rect1.y0, rect1.y1, rect2.y0, rect2.y1);
+ }
+
+-ParsedUri parse_uri(fz_context* mupdf_context, std::string uri) {
+- fz_link_dest dest = pdf_parse_link_uri(mupdf_context, uri.c_str());
++ParsedUri parse_uri(fz_context* mupdf_context, fz_document* fz_doc, std::string uri) {
++ pdf_document* doc = pdf_document_from_fz_document(mupdf_context, fz_doc);
++ fz_link_dest dest = pdf_resolve_link_dest(mupdf_context, doc, uri.c_str());
+ return { dest.loc.page + 1, dest.x, dest.y };
+ }
+
+diff --git a/pdf_viewer/utils.h b/pdf_viewer/utils.h
+index 2a12211..643b030 100644
+--- a/pdf_viewer/utils.h
++++ b/pdf_viewer/utils.h
+@@ -55,7 +55,7 @@ void get_flat_toc(const std::vector<TocNode*>& roots, std::vector<std::wstring>&
+ int mod(int a, int b);
+ bool range_intersects(float range1_start, float range1_end, float range2_start, float range2_end);
+ bool rects_intersect(fz_rect rect1, fz_rect rect2);
+-ParsedUri parse_uri(fz_context* mupdf_context, std::string uri);
++ParsedUri parse_uri(fz_context* mupdf_context, fz_document* fz_doc, std::string uri);
+ char get_symbol(int key, bool is_shift_pressed, const std::vector<char>&special_symbols);
+
+ template<typename T>
diff --git a/srcpkgs/sioyek/template b/srcpkgs/sioyek/template
index 66e4fd41acd4a..4e1a43c2971db 100644
--- a/srcpkgs/sioyek/template
+++ b/srcpkgs/sioyek/template
@@ -1,7 +1,7 @@
# Template file for 'sioyek'
pkgname=sioyek
version=2.0.0
-revision=4
+revision=5
build_style=qmake
configure_args="pdf_viewer_build_config.pro"
hostmakedepends="qt5-qmake qt5-host-tools
From 382828f5f6779e7e1c8c8197eb27ce7d1a39def0 Mon Sep 17 00:00:00 2001
From: Mohammed Anas <triallax@tutanota.com>
Date: Tue, 31 Oct 2023 23:21:31 +0000
Subject: [PATCH 4/4] zathura-pdf-mupdf: revbump for mupdf-1.23.4.
---
srcpkgs/zathura-pdf-mupdf/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/zathura-pdf-mupdf/template b/srcpkgs/zathura-pdf-mupdf/template
index e88aca6cfc3d2..c32a8bac96c65 100644
--- a/srcpkgs/zathura-pdf-mupdf/template
+++ b/srcpkgs/zathura-pdf-mupdf/template
@@ -1,7 +1,7 @@
# Template file for 'zathura-pdf-mupdf'
pkgname=zathura-pdf-mupdf
version=0.4.1
-revision=2
+revision=3
build_style=meson
hostmakedepends="pkg-config"
makedepends="mupdf-devel zathura-devel libopenjpeg2-devel tesseract-ocr-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PR REVIEW] mupdf: update to 1.23.4.
2023-10-23 16:34 [PR PATCH] mupdf: update to 1.23.4 mhmdanas
` (4 preceding siblings ...)
2023-10-31 23:37 ` [PR PATCH] [Updated] " mhmdanas
@ 2023-10-31 23:38 ` mhmdanas
2023-11-01 15:39 ` dkwo
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: mhmdanas @ 2023-10-31 23:38 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 288 bytes --]
New review comment by mhmdanas on void-packages repository
https://github.com/void-linux/void-packages/pull/46857#discussion_r1378260231
Comment:
We could do what Alpine does maybe: https://git.alpinelinux.org/aports/tree/community/mupdf/APKBUILD#n109
But not sure if it's worth it.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: mupdf: update to 1.23.4.
2023-10-23 16:34 [PR PATCH] mupdf: update to 1.23.4 mhmdanas
` (5 preceding siblings ...)
2023-10-31 23:38 ` [PR REVIEW] " mhmdanas
@ 2023-11-01 15:39 ` dkwo
2023-11-02 8:18 ` mhmdanas
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: dkwo @ 2023-11-01 15:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 290 bytes --]
New comment by dkwo on void-packages repository
https://github.com/void-linux/void-packages/pull/46857#issuecomment-1789181388
Comment:
the commit msg for sioyek needs changed. also, the patch is not merged upstream. have you tested it?
how urgent is the mupdf update? what does it fix?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: mupdf: update to 1.23.4.
2023-10-23 16:34 [PR PATCH] mupdf: update to 1.23.4 mhmdanas
` (6 preceding siblings ...)
2023-11-01 15:39 ` dkwo
@ 2023-11-02 8:18 ` mhmdanas
2023-11-02 20:47 ` [PR PATCH] [Updated] " classabbyamp
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: mhmdanas @ 2023-11-02 8:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 660 bytes --]
New comment by mhmdanas on void-packages repository
https://github.com/void-linux/void-packages/pull/46857#issuecomment-1790264122
Comment:
> the commit msg for sioyek needs changed.
I don't think so, just because it adds a patch doesn't mean it has to have a different commit message. But I'll change it anyway, if you insist. :)
> also, the patch is not merged upstream. have you tested it?
I have, it seems to be working fine.
> how urgent is the mupdf update? what does it fix?
It's not urgent as far as I know. You can see [the changelog](https://github.com/ArtifexSoftware/mupdf/blob/master/CHANGES) for the list of changes and fixes.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PR PATCH] [Updated] mupdf: update to 1.23.4.
2023-10-23 16:34 [PR PATCH] mupdf: update to 1.23.4 mhmdanas
` (7 preceding siblings ...)
2023-11-02 8:18 ` mhmdanas
@ 2023-11-02 20:47 ` classabbyamp
2023-11-11 12:02 ` mhmdanas
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: classabbyamp @ 2023-11-02 20:47 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1229 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/mhmdanas/void-packages mupdf-1.23.4
https://github.com/void-linux/void-packages/pull/46857
mupdf: update to 1.23.4.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/46857.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mupdf-1.23.4-46857.patch --]
[-- Type: text/x-diff, Size: 7582 bytes --]
From d5520e319e11d831c66cfacf0404cfb6dc950c2f Mon Sep 17 00:00:00 2001
From: Mohammed Anas <triallax@tutanota.com>
Date: Mon, 23 Oct 2023 17:33:42 +0100
Subject: [PATCH 1/4] mupdf: update to 1.23.4.
---
srcpkgs/mupdf/template | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/srcpkgs/mupdf/template b/srcpkgs/mupdf/template
index 0c05d36e41385..b94b8cb7c1a5e 100644
--- a/srcpkgs/mupdf/template
+++ b/srcpkgs/mupdf/template
@@ -1,7 +1,8 @@
# Template file for 'mupdf'
+# Static library, revbump all dependants on mupdf updates
pkgname=mupdf
-version=1.20.3
-revision=3
+version=1.23.4
+revision=1
hostmakedepends="pkg-config zlib-devel libcurl-devel freetype-devel
libjpeg-turbo-devel jbig2dec-devel libXext-devel libXcursor-devel
libXrandr-devel libXinerama-devel harfbuzz-devel readline-devel
@@ -14,12 +15,9 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
license="AGPL-3.0-only"
homepage="https://mupdf.com"
distfiles="https://mupdf.com/downloads/archive/${pkgname}-${version}-source.tar.lz"
-checksum=6f73f63ef8aa81991dfd023d4426a548827d1d74e0bfcf2a013acad63b651868
+checksum=ecf6da72393eb32b16037f9376cf90a576c87426b6b7f1e63d38619a1bd7c800
pre_build() {
- # libmupdf-{threads,pkcs7}.a are required by fbpdf
- sed 's/INSTALL_LIBS :=/& $(THREAD_LIB) $(PKCS7_LIB)/' -i Makefile
-
if [ "$CROSS_BUILD" ]; then
make ${makejobs} CC=cc LD=ld AR=ar CFLAGS="-fPIC" LDFLAGS='' build=release generate
fi
From a59e729d2256da712cc1c1973c33ff2d6f9060ff Mon Sep 17 00:00:00 2001
From: Mohammed Anas <triallax@tutanota.com>
Date: Tue, 31 Oct 2023 23:21:31 +0000
Subject: [PATCH 2/4] fbpdf: revbump for mupdf-1.23.4.
---
srcpkgs/fbpdf/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/fbpdf/template b/srcpkgs/fbpdf/template
index 4ff36a2e486b3..ad000c81f989b 100644
--- a/srcpkgs/fbpdf/template
+++ b/srcpkgs/fbpdf/template
@@ -1,7 +1,7 @@
# Template file for 'fbpdf'
pkgname=fbpdf
version=0.0.20220624
-revision=2
+revision=3
_githash=6276360f47edd71de736e153f5dcc82b6d60b3db
_gitshort="${_githash:0:7}"
build_style=gnu-makefile
From 3c4d5ee9f636aec71253aedb42264c4fb804c8a2 Mon Sep 17 00:00:00 2001
From: Mohammed Anas <triallax@tutanota.com>
Date: Tue, 31 Oct 2023 23:21:31 +0000
Subject: [PATCH 3/4] sioyek: fix build with mupdf-1.23.4.
---
srcpkgs/sioyek/patches/mupdf-1.23.patch | 75 +++++++++++++++++++++++++
srcpkgs/sioyek/template | 2 +-
2 files changed, 76 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/sioyek/patches/mupdf-1.23.patch
diff --git a/srcpkgs/sioyek/patches/mupdf-1.23.patch b/srcpkgs/sioyek/patches/mupdf-1.23.patch
new file mode 100644
index 0000000000000..fc6b5df21beec
--- /dev/null
+++ b/srcpkgs/sioyek/patches/mupdf-1.23.patch
@@ -0,0 +1,75 @@
+Patch taken from Alpine: https://git.alpinelinux.org/aports/tree/community/sioyek/mupdf-0.23.0.patch
+
+diff --git a/pdf_viewer/document_view.cpp b/pdf_viewer/document_view.cpp
+index f48d05e..0bc3855 100644
+--- a/pdf_viewer/document_view.cpp
++++ b/pdf_viewer/document_view.cpp
+@@ -1121,7 +1121,7 @@ std::vector<DocumentPos> DocumentView::find_line_definitions() {
+
+ std::optional<PdfLink> pdf_link = current_document->get_link_in_page_rect(get_center_page_number(), line_rects[line_index]);
+ if (pdf_link.has_value()) {
+- auto parsed_uri = parse_uri(mupdf_context, pdf_link.value().uri);
++ auto parsed_uri = parse_uri(mupdf_context, current_document->doc, pdf_link.value().uri);
+ result.push_back({ parsed_uri.page - 1, parsed_uri.x, parsed_uri.y });
+ return result;
+ }
+diff --git a/pdf_viewer/main_widget.cpp b/pdf_viewer/main_widget.cpp
+index 19b568b..335a93f 100644
+--- a/pdf_viewer/main_widget.cpp
++++ b/pdf_viewer/main_widget.cpp
+@@ -170,7 +170,7 @@ void MainWidget::set_overview_position(int page, float offset) {
+
+ void MainWidget::set_overview_link(PdfLink link) {
+
+- auto [page, offset_x, offset_y] = parse_uri(mupdf_context, link.uri);
++ auto [page, offset_x, offset_y] = parse_uri(mupdf_context, doc()->doc, link.uri);
+ if (page >= 1) {
+ set_overview_position(page - 1, offset_y);
+ }
+@@ -3178,7 +3178,7 @@ void MainWidget::handle_pending_text_command(std::wstring text) {
+ open_web_url(utf8_decode(selected_link->uri));
+ }
+ else{
+- auto [page, offset_x, offset_y] = parse_uri(mupdf_context, selected_link->uri);
++ auto [page, offset_x, offset_y] = parse_uri(mupdf_context, doc()->doc, selected_link->uri);
+ long_jump_to_destination(page-1, offset_y);
+ }
+ }
+@@ -3863,7 +3863,7 @@ void MainWidget::handle_link_click(const PdfLink& link) {
+ return;
+ }
+
+- auto [page, offset_x, offset_y] = parse_uri(mupdf_context, link.uri);
++ auto [page, offset_x, offset_y] = parse_uri(mupdf_context, doc()->doc, link.uri);
+
+ // convert one indexed page to zero indexed page
+ page--;
+diff --git a/pdf_viewer/utils.cpp b/pdf_viewer/utils.cpp
+index 22d4265..3150e66 100644
+--- a/pdf_viewer/utils.cpp
++++ b/pdf_viewer/utils.cpp
+@@ -116,8 +116,9 @@ bool rects_intersect(fz_rect rect1, fz_rect rect2) {
+ return range_intersects(rect1.x0, rect1.x1, rect2.x0, rect2.x1) && range_intersects(rect1.y0, rect1.y1, rect2.y0, rect2.y1);
+ }
+
+-ParsedUri parse_uri(fz_context* mupdf_context, std::string uri) {
+- fz_link_dest dest = pdf_parse_link_uri(mupdf_context, uri.c_str());
++ParsedUri parse_uri(fz_context* mupdf_context, fz_document* fz_doc, std::string uri) {
++ pdf_document* doc = pdf_document_from_fz_document(mupdf_context, fz_doc);
++ fz_link_dest dest = pdf_resolve_link_dest(mupdf_context, doc, uri.c_str());
+ return { dest.loc.page + 1, dest.x, dest.y };
+ }
+
+diff --git a/pdf_viewer/utils.h b/pdf_viewer/utils.h
+index 2a12211..643b030 100644
+--- a/pdf_viewer/utils.h
++++ b/pdf_viewer/utils.h
+@@ -55,7 +55,7 @@ void get_flat_toc(const std::vector<TocNode*>& roots, std::vector<std::wstring>&
+ int mod(int a, int b);
+ bool range_intersects(float range1_start, float range1_end, float range2_start, float range2_end);
+ bool rects_intersect(fz_rect rect1, fz_rect rect2);
+-ParsedUri parse_uri(fz_context* mupdf_context, std::string uri);
++ParsedUri parse_uri(fz_context* mupdf_context, fz_document* fz_doc, std::string uri);
+ char get_symbol(int key, bool is_shift_pressed, const std::vector<char>&special_symbols);
+
+ template<typename T>
diff --git a/srcpkgs/sioyek/template b/srcpkgs/sioyek/template
index 66e4fd41acd4a..4e1a43c2971db 100644
--- a/srcpkgs/sioyek/template
+++ b/srcpkgs/sioyek/template
@@ -1,7 +1,7 @@
# Template file for 'sioyek'
pkgname=sioyek
version=2.0.0
-revision=4
+revision=5
build_style=qmake
configure_args="pdf_viewer_build_config.pro"
hostmakedepends="qt5-qmake qt5-host-tools
From 6f199969d481d4fe909c773b09e6bd93bb0c8a38 Mon Sep 17 00:00:00 2001
From: Mohammed Anas <triallax@tutanota.com>
Date: Tue, 31 Oct 2023 23:21:31 +0000
Subject: [PATCH 4/4] zathura-pdf-mupdf: revbump for mupdf-1.23.4.
---
srcpkgs/zathura-pdf-mupdf/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/zathura-pdf-mupdf/template b/srcpkgs/zathura-pdf-mupdf/template
index e88aca6cfc3d2..c32a8bac96c65 100644
--- a/srcpkgs/zathura-pdf-mupdf/template
+++ b/srcpkgs/zathura-pdf-mupdf/template
@@ -1,7 +1,7 @@
# Template file for 'zathura-pdf-mupdf'
pkgname=zathura-pdf-mupdf
version=0.4.1
-revision=2
+revision=3
build_style=meson
hostmakedepends="pkg-config"
makedepends="mupdf-devel zathura-devel libopenjpeg2-devel tesseract-ocr-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PR PATCH] [Updated] mupdf: update to 1.23.4.
2023-10-23 16:34 [PR PATCH] mupdf: update to 1.23.4 mhmdanas
` (8 preceding siblings ...)
2023-11-02 20:47 ` [PR PATCH] [Updated] " classabbyamp
@ 2023-11-11 12:02 ` mhmdanas
2023-11-13 5:53 ` [PR PATCH] [Merged]: " classabbyamp
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: mhmdanas @ 2023-11-11 12:02 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1225 bytes --]
There is an updated pull request by mhmdanas against master on the void-packages repository
https://github.com/mhmdanas/void-packages mupdf-1.23.4
https://github.com/void-linux/void-packages/pull/46857
mupdf: update to 1.23.4.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/46857.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-mupdf-1.23.4-46857.patch --]
[-- Type: text/x-diff, Size: 7582 bytes --]
From 7658af34bfdbe3ada6291c2326da8c0e1ec44345 Mon Sep 17 00:00:00 2001
From: Mohammed Anas <triallax@tutanota.com>
Date: Mon, 23 Oct 2023 17:33:42 +0100
Subject: [PATCH 1/4] mupdf: update to 1.23.4.
---
srcpkgs/mupdf/template | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/srcpkgs/mupdf/template b/srcpkgs/mupdf/template
index 0c05d36e41385..b94b8cb7c1a5e 100644
--- a/srcpkgs/mupdf/template
+++ b/srcpkgs/mupdf/template
@@ -1,7 +1,8 @@
# Template file for 'mupdf'
+# Static library, revbump all dependants on mupdf updates
pkgname=mupdf
-version=1.20.3
-revision=3
+version=1.23.4
+revision=1
hostmakedepends="pkg-config zlib-devel libcurl-devel freetype-devel
libjpeg-turbo-devel jbig2dec-devel libXext-devel libXcursor-devel
libXrandr-devel libXinerama-devel harfbuzz-devel readline-devel
@@ -14,12 +15,9 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
license="AGPL-3.0-only"
homepage="https://mupdf.com"
distfiles="https://mupdf.com/downloads/archive/${pkgname}-${version}-source.tar.lz"
-checksum=6f73f63ef8aa81991dfd023d4426a548827d1d74e0bfcf2a013acad63b651868
+checksum=ecf6da72393eb32b16037f9376cf90a576c87426b6b7f1e63d38619a1bd7c800
pre_build() {
- # libmupdf-{threads,pkcs7}.a are required by fbpdf
- sed 's/INSTALL_LIBS :=/& $(THREAD_LIB) $(PKCS7_LIB)/' -i Makefile
-
if [ "$CROSS_BUILD" ]; then
make ${makejobs} CC=cc LD=ld AR=ar CFLAGS="-fPIC" LDFLAGS='' build=release generate
fi
From 19bf788bf9dbf45af26c50e48dac69d0df3fb322 Mon Sep 17 00:00:00 2001
From: Mohammed Anas <triallax@tutanota.com>
Date: Tue, 31 Oct 2023 23:21:31 +0000
Subject: [PATCH 2/4] fbpdf: revbump for mupdf-1.23.4.
---
srcpkgs/fbpdf/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/fbpdf/template b/srcpkgs/fbpdf/template
index 4ff36a2e486b3..ad000c81f989b 100644
--- a/srcpkgs/fbpdf/template
+++ b/srcpkgs/fbpdf/template
@@ -1,7 +1,7 @@
# Template file for 'fbpdf'
pkgname=fbpdf
version=0.0.20220624
-revision=2
+revision=3
_githash=6276360f47edd71de736e153f5dcc82b6d60b3db
_gitshort="${_githash:0:7}"
build_style=gnu-makefile
From 98f865226ac8ae5323d9bf595075c51b0bb02cd0 Mon Sep 17 00:00:00 2001
From: Mohammed Anas <triallax@tutanota.com>
Date: Tue, 31 Oct 2023 23:21:31 +0000
Subject: [PATCH 3/4] sioyek: fix build with mupdf-1.23.4.
---
srcpkgs/sioyek/patches/mupdf-1.23.patch | 75 +++++++++++++++++++++++++
srcpkgs/sioyek/template | 2 +-
2 files changed, 76 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/sioyek/patches/mupdf-1.23.patch
diff --git a/srcpkgs/sioyek/patches/mupdf-1.23.patch b/srcpkgs/sioyek/patches/mupdf-1.23.patch
new file mode 100644
index 0000000000000..fc6b5df21beec
--- /dev/null
+++ b/srcpkgs/sioyek/patches/mupdf-1.23.patch
@@ -0,0 +1,75 @@
+Patch taken from Alpine: https://git.alpinelinux.org/aports/tree/community/sioyek/mupdf-0.23.0.patch
+
+diff --git a/pdf_viewer/document_view.cpp b/pdf_viewer/document_view.cpp
+index f48d05e..0bc3855 100644
+--- a/pdf_viewer/document_view.cpp
++++ b/pdf_viewer/document_view.cpp
+@@ -1121,7 +1121,7 @@ std::vector<DocumentPos> DocumentView::find_line_definitions() {
+
+ std::optional<PdfLink> pdf_link = current_document->get_link_in_page_rect(get_center_page_number(), line_rects[line_index]);
+ if (pdf_link.has_value()) {
+- auto parsed_uri = parse_uri(mupdf_context, pdf_link.value().uri);
++ auto parsed_uri = parse_uri(mupdf_context, current_document->doc, pdf_link.value().uri);
+ result.push_back({ parsed_uri.page - 1, parsed_uri.x, parsed_uri.y });
+ return result;
+ }
+diff --git a/pdf_viewer/main_widget.cpp b/pdf_viewer/main_widget.cpp
+index 19b568b..335a93f 100644
+--- a/pdf_viewer/main_widget.cpp
++++ b/pdf_viewer/main_widget.cpp
+@@ -170,7 +170,7 @@ void MainWidget::set_overview_position(int page, float offset) {
+
+ void MainWidget::set_overview_link(PdfLink link) {
+
+- auto [page, offset_x, offset_y] = parse_uri(mupdf_context, link.uri);
++ auto [page, offset_x, offset_y] = parse_uri(mupdf_context, doc()->doc, link.uri);
+ if (page >= 1) {
+ set_overview_position(page - 1, offset_y);
+ }
+@@ -3178,7 +3178,7 @@ void MainWidget::handle_pending_text_command(std::wstring text) {
+ open_web_url(utf8_decode(selected_link->uri));
+ }
+ else{
+- auto [page, offset_x, offset_y] = parse_uri(mupdf_context, selected_link->uri);
++ auto [page, offset_x, offset_y] = parse_uri(mupdf_context, doc()->doc, selected_link->uri);
+ long_jump_to_destination(page-1, offset_y);
+ }
+ }
+@@ -3863,7 +3863,7 @@ void MainWidget::handle_link_click(const PdfLink& link) {
+ return;
+ }
+
+- auto [page, offset_x, offset_y] = parse_uri(mupdf_context, link.uri);
++ auto [page, offset_x, offset_y] = parse_uri(mupdf_context, doc()->doc, link.uri);
+
+ // convert one indexed page to zero indexed page
+ page--;
+diff --git a/pdf_viewer/utils.cpp b/pdf_viewer/utils.cpp
+index 22d4265..3150e66 100644
+--- a/pdf_viewer/utils.cpp
++++ b/pdf_viewer/utils.cpp
+@@ -116,8 +116,9 @@ bool rects_intersect(fz_rect rect1, fz_rect rect2) {
+ return range_intersects(rect1.x0, rect1.x1, rect2.x0, rect2.x1) && range_intersects(rect1.y0, rect1.y1, rect2.y0, rect2.y1);
+ }
+
+-ParsedUri parse_uri(fz_context* mupdf_context, std::string uri) {
+- fz_link_dest dest = pdf_parse_link_uri(mupdf_context, uri.c_str());
++ParsedUri parse_uri(fz_context* mupdf_context, fz_document* fz_doc, std::string uri) {
++ pdf_document* doc = pdf_document_from_fz_document(mupdf_context, fz_doc);
++ fz_link_dest dest = pdf_resolve_link_dest(mupdf_context, doc, uri.c_str());
+ return { dest.loc.page + 1, dest.x, dest.y };
+ }
+
+diff --git a/pdf_viewer/utils.h b/pdf_viewer/utils.h
+index 2a12211..643b030 100644
+--- a/pdf_viewer/utils.h
++++ b/pdf_viewer/utils.h
+@@ -55,7 +55,7 @@ void get_flat_toc(const std::vector<TocNode*>& roots, std::vector<std::wstring>&
+ int mod(int a, int b);
+ bool range_intersects(float range1_start, float range1_end, float range2_start, float range2_end);
+ bool rects_intersect(fz_rect rect1, fz_rect rect2);
+-ParsedUri parse_uri(fz_context* mupdf_context, std::string uri);
++ParsedUri parse_uri(fz_context* mupdf_context, fz_document* fz_doc, std::string uri);
+ char get_symbol(int key, bool is_shift_pressed, const std::vector<char>&special_symbols);
+
+ template<typename T>
diff --git a/srcpkgs/sioyek/template b/srcpkgs/sioyek/template
index 66e4fd41acd4a..4e1a43c2971db 100644
--- a/srcpkgs/sioyek/template
+++ b/srcpkgs/sioyek/template
@@ -1,7 +1,7 @@
# Template file for 'sioyek'
pkgname=sioyek
version=2.0.0
-revision=4
+revision=5
build_style=qmake
configure_args="pdf_viewer_build_config.pro"
hostmakedepends="qt5-qmake qt5-host-tools
From 609c4a929f68712755b26feaa5944788971476df Mon Sep 17 00:00:00 2001
From: Mohammed Anas <triallax@tutanota.com>
Date: Tue, 31 Oct 2023 23:21:31 +0000
Subject: [PATCH 4/4] zathura-pdf-mupdf: revbump for mupdf-1.23.4.
---
srcpkgs/zathura-pdf-mupdf/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/zathura-pdf-mupdf/template b/srcpkgs/zathura-pdf-mupdf/template
index e88aca6cfc3d2..c32a8bac96c65 100644
--- a/srcpkgs/zathura-pdf-mupdf/template
+++ b/srcpkgs/zathura-pdf-mupdf/template
@@ -1,7 +1,7 @@
# Template file for 'zathura-pdf-mupdf'
pkgname=zathura-pdf-mupdf
version=0.4.1
-revision=2
+revision=3
build_style=meson
hostmakedepends="pkg-config"
makedepends="mupdf-devel zathura-devel libopenjpeg2-devel tesseract-ocr-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PR PATCH] [Merged]: mupdf: update to 1.23.4.
2023-10-23 16:34 [PR PATCH] mupdf: update to 1.23.4 mhmdanas
` (9 preceding siblings ...)
2023-11-11 12:02 ` mhmdanas
@ 2023-11-13 5:53 ` classabbyamp
2023-11-16 3:12 ` benjcal
2023-11-16 19:01 ` Zapeth
12 siblings, 0 replies; 14+ messages in thread
From: classabbyamp @ 2023-11-13 5:53 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1062 bytes --]
There's a merged pull request on the void-packages repository
mupdf: update to 1.23.4.
https://github.com/void-linux/void-packages/pull/46857
Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: mupdf: update to 1.23.4.
2023-10-23 16:34 [PR PATCH] mupdf: update to 1.23.4 mhmdanas
` (10 preceding siblings ...)
2023-11-13 5:53 ` [PR PATCH] [Merged]: " classabbyamp
@ 2023-11-16 3:12 ` benjcal
2023-11-16 19:01 ` Zapeth
12 siblings, 0 replies; 14+ messages in thread
From: benjcal @ 2023-11-16 3:12 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 592 bytes --]
New comment by benjcal on void-packages repository
https://github.com/void-linux/void-packages/pull/46857#issuecomment-1813723209
Comment:
just a quick comment that this broke sioyek for me, but so far for only one PDF
https://ww1.microchip.com/downloads/aemDocuments/documents/MCU08/ProductDocuments/DataSheets/AVR64DD-14-20-Prelim-DataSheet-DS40002444.pdf
I'm able to open it and scroll up and down, but the moment that I open the table of contents and go anywhere sioyek just shows a blank screen.
Reverting to `sioyek-2.0.0_4` solved the issue with the PDF in question.
:-)
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: mupdf: update to 1.23.4.
2023-10-23 16:34 [PR PATCH] mupdf: update to 1.23.4 mhmdanas
` (11 preceding siblings ...)
2023-11-16 3:12 ` benjcal
@ 2023-11-16 19:01 ` Zapeth
12 siblings, 0 replies; 14+ messages in thread
From: Zapeth @ 2023-11-16 19:01 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 385 bytes --]
New comment by Zapeth on void-packages repository
https://github.com/void-linux/void-packages/pull/46857#issuecomment-1815107300
Comment:
It sounds like this issue in sioyek https://github.com/ahrm/sioyek/issues/539#issuecomment-1758664514 which seems like its resolved upstream
You could try to compile it with the fix and PR the patch if it works (or wait for the next release)
^ permalink raw reply [flat|nested] 14+ messages in thread