Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] zathura-pdf-mupdf: update to 0.3.9.
@ 2022-10-23 19:33 icp1994
  2022-10-24  6:01 ` [PR PATCH] [Updated] " icp1994
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: icp1994 @ 2022-10-23 19:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 712 bytes --]

There is a new pull request by icp1994 against master on the void-packages repository

https://github.com/icp1994/void-packages zathura-pdf-mupdf
https://github.com/void-linux/void-packages/pull/40131

zathura-pdf-mupdf: update to 0.3.9.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64

This PR contains quite a few changes to get around issues discussed in https://github.com/void-linux/void-packages/issues/35634. It works in my system but if someone could test it in musl (cc @dkwo) that would be useful.

A patch file from https://github.com/void-linux/void-packages/pull/40131.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-zathura-pdf-mupdf-40131.patch --]
[-- Type: text/x-diff, Size: 6286 bytes --]

From 34322e7a7721eee8d07b81c6865f016d54ae3aeb Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Sun, 23 Oct 2022 14:56:40 +0530
Subject: [PATCH 1/3] zathura: update to 0.5.1.

Add update file.
---
 srcpkgs/zathura/template | 6 +++---
 srcpkgs/zathura/update   | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/zathura/update

diff --git a/srcpkgs/zathura/template b/srcpkgs/zathura/template
index 69193d8ded4e..84ce0ca8afb9 100644
--- a/srcpkgs/zathura/template
+++ b/srcpkgs/zathura/template
@@ -1,7 +1,7 @@
 # Template file for 'zathura'
 pkgname=zathura
-version=0.4.9
-revision=2
+version=0.5.1
+revision=1
 build_style=meson
 configure_args="-Dsynctex=enabled"
 hostmakedepends="pkg-config intltool python3-Sphinx desktop-file-utils
@@ -15,7 +15,7 @@ license="Zlib"
 homepage="https://git.pwmt.org/pwmt/zathura/"
 changelog="https://pwmt.org/projects/zathura/changelog/${version}/index.html"
 distfiles="https://git.pwmt.org/pwmt/${pkgname}/-/archive/${version}/${pkgname}-${version}.tar.gz"
-checksum=82235cbc89899421fca98477265626f2149df7d072740f0360550cc8d4e449d6
+checksum=f59d9c7ec8d10db68055bda1e0f00e55efa0dad9b781ae201e9d6755ca984317
 
 if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args+=" -Dtests=enabled"
diff --git a/srcpkgs/zathura/update b/srcpkgs/zathura/update
new file mode 100644
index 000000000000..a91a874bbbaa
--- /dev/null
+++ b/srcpkgs/zathura/update
@@ -0,0 +1 @@
+site="https://pwmt.org/projects/zathura/download/"

From c756865d12d717051807153991b95d86dac2add4 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Sun, 23 Oct 2022 15:22:33 +0530
Subject: [PATCH 2/3] mupdf: update to 1.20.3.

Add pkg-config file for -devel.
---
 srcpkgs/mupdf/files/mupdf.pc.in | 11 +++++++++++
 srcpkgs/mupdf/template          |  8 ++++++--
 2 files changed, 17 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/mupdf/files/mupdf.pc.in

diff --git a/srcpkgs/mupdf/files/mupdf.pc.in b/srcpkgs/mupdf/files/mupdf.pc.in
new file mode 100644
index 000000000000..ea2b226d291d
--- /dev/null
+++ b/srcpkgs/mupdf/files/mupdf.pc.in
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: mupdf
+Description: Lightweight PDF and XPS viewer
+URL: https://mupdf.com
+Version: @VERSION@
+Libs: -L${libdir} -lmupdf
+Cflags: -I${includedir}/mupdf
diff --git a/srcpkgs/mupdf/template b/srcpkgs/mupdf/template
index c7814cf7f53c..4ac4fc7b40a3 100644
--- a/srcpkgs/mupdf/template
+++ b/srcpkgs/mupdf/template
@@ -1,6 +1,6 @@
 # Template file for 'mupdf'
 pkgname=mupdf
-version=1.20.0
+version=1.20.3
 revision=1
 wrksrc="${pkgname}-${version}-source"
 hostmakedepends="pkg-config zlib-devel libcurl-devel freetype-devel
@@ -15,7 +15,7 @@ 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=68dbb1cf5e31603380ce3f1c7f6c431ad442fa735d048700f50ab4de4c3b0f82
+checksum=6f73f63ef8aa81991dfd023d4426a548827d1d74e0bfcf2a013acad63b651868
 
 pre_build() {
 	# libmupdf-{threads,pkcs7}.a are required by fbpdf
@@ -50,6 +50,9 @@ do_install() {
 
 	vinstall ${FILESDIR}/mupdf.xpm 644 usr/share/pixmaps
 	vinstall ${FILESDIR}/mupdf.desktop 644 usr/share/applications
+
+	vmkdir usr/lib/pkgconfig
+	sed "s/@VERSION@/${version}/" ${FILESDIR}/mupdf.pc.in > ${DESTDIR}/usr/lib/pkgconfig/mupdf.pc
 }
 
 post_install() {
@@ -60,6 +63,7 @@ mupdf-devel_package() {
 	short_desc+=" - development files"
 	depends="libjpeg-turbo-devel jbig2dec-devel libopenjpeg2-devel"
 	pkg_install() {
+		vmove usr/lib/pkgconfig
 		vmove usr/include
 		vmove "usr/lib/*.a"
 	}

From fb8286502555996d87cecbefc897c22ee55748d9 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Mon, 24 Oct 2022 00:49:09 +0530
Subject: [PATCH 3/3] zathura-pdf-mupdf: update to 0.3.9.

---
 srcpkgs/zathura-pdf-mupdf/patches/mupdf-1.20.0.patch | 12 ------------
 srcpkgs/zathura-pdf-mupdf/template                   | 12 +++++-------
 2 files changed, 5 insertions(+), 19 deletions(-)
 delete mode 100644 srcpkgs/zathura-pdf-mupdf/patches/mupdf-1.20.0.patch

diff --git a/srcpkgs/zathura-pdf-mupdf/patches/mupdf-1.20.0.patch b/srcpkgs/zathura-pdf-mupdf/patches/mupdf-1.20.0.patch
deleted file mode 100644
index 53b76fe358cb..000000000000
--- a/srcpkgs/zathura-pdf-mupdf/patches/mupdf-1.20.0.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-from https://gitlab.alpinelinux.org/alpine/aports/-/commit/5c2d1886fdead7c00a00ddcd5d04aaa8d1f53377
---- a/zathura-pdf-mupdf/search.c
-+++ b/zathura-pdf-mupdf/search.c
-@@ -41,7 +41,7 @@
- 
-   fz_quad* hit_bbox = fz_malloc_array(mupdf_page->ctx, N_SEARCH_RESULTS, fz_quad);
-   int num_results = fz_search_stext_page(mupdf_page->ctx, mupdf_page->text,
--      text, hit_bbox, N_SEARCH_RESULTS);
-+      text, NULL, hit_bbox, N_SEARCH_RESULTS);
- 
-   fz_rect r;
-   for (int i = 0; i < num_results; i++) {
diff --git a/srcpkgs/zathura-pdf-mupdf/template b/srcpkgs/zathura-pdf-mupdf/template
index 66f354d29863..88c68a5f6d4d 100644
--- a/srcpkgs/zathura-pdf-mupdf/template
+++ b/srcpkgs/zathura-pdf-mupdf/template
@@ -1,13 +1,11 @@
 # Template file for 'zathura-pdf-mupdf'
 pkgname=zathura-pdf-mupdf
-reverts=0.3.8_1
-version=0.3.7
-revision=6
+version=0.3.9
+revision=1
 build_style=meson
-configure_args="-Dlink-external=true"
 hostmakedepends="pkg-config"
-makedepends="mupdf-devel zathura-devel libopenjpeg2-devel
- libjpeg-turbo-devel libjbig2dec gumbo-parser-devel"
+makedepends="mupdf-devel zathura-devel libopenjpeg2-devel tesseract-ocr-devel
+ libjpeg-turbo-devel libjbig2dec gumbo-parser-devel leptonica-devel mujs-devel"
 depends="zathura"
 short_desc="PDF support for zathura (using mupdf)"
 maintainer="lemmi <lemmi@nerd2nerd.org>"
@@ -15,7 +13,7 @@ license="Zlib"
 homepage="https://git.pwmt.org/pwmt/zathura-pdf-mupdf/"
 changelog="https://pwmt.org/projects/zathura-pdf-mupdf/changelog/${version}/index.html"
 distfiles="https://git.pwmt.org/pwmt/${pkgname}/-/archive/${version}/${pkgname}-${version}.tar.gz"
-checksum=3f2d341dfe3bdbfb7a51a33aee81f3763a684d0ea503dd20c726311125d7c08a
+checksum=05a6f22244c054a90f89ea2f746ea45ebaceb6c0559bfa4dcfd120c4d485346c
 conflicts="zathura-pdf-poppler>=0"
 
 post_install() {

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] zathura-pdf-mupdf: update to 0.3.9.
  2022-10-23 19:33 [PR PATCH] zathura-pdf-mupdf: update to 0.3.9 icp1994
@ 2022-10-24  6:01 ` icp1994
  2022-10-24 19:04 ` dkwo
                   ` (17 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: icp1994 @ 2022-10-24  6:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 717 bytes --]

There is an updated pull request by icp1994 against master on the void-packages repository

https://github.com/icp1994/void-packages zathura-pdf-mupdf
https://github.com/void-linux/void-packages/pull/40131

zathura-pdf-mupdf: update to 0.3.9.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64

This PR contains quite a few changes to get around issues discussed in https://github.com/void-linux/void-packages/issues/35634. It works in my system but if someone could test it in musl (cc @dkwo) that would be useful.

A patch file from https://github.com/void-linux/void-packages/pull/40131.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-zathura-pdf-mupdf-40131.patch --]
[-- Type: text/x-diff, Size: 6392 bytes --]

From 210ebcf5cb00b3ed58ae8904e421264d13d0954b Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Sun, 23 Oct 2022 14:56:40 +0530
Subject: [PATCH 1/3] zathura: update to 0.5.1.

---
 srcpkgs/zathura/template | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/zathura/template b/srcpkgs/zathura/template
index 69193d8ded4e..cffc5b952db0 100644
--- a/srcpkgs/zathura/template
+++ b/srcpkgs/zathura/template
@@ -1,7 +1,7 @@
 # Template file for 'zathura'
 pkgname=zathura
-version=0.4.9
-revision=2
+version=0.5.1
+revision=1
 build_style=meson
 configure_args="-Dsynctex=enabled"
 hostmakedepends="pkg-config intltool python3-Sphinx desktop-file-utils
@@ -12,10 +12,10 @@ checkdepends="gettext-devel check-devel"
 short_desc="Highly customizable and functional document viewer"
 maintainer="lemmi <lemmi@nerd2nerd.org>"
 license="Zlib"
-homepage="https://git.pwmt.org/pwmt/zathura/"
+homepage="https://pwmt.org/projects/zathura/"
 changelog="https://pwmt.org/projects/zathura/changelog/${version}/index.html"
-distfiles="https://git.pwmt.org/pwmt/${pkgname}/-/archive/${version}/${pkgname}-${version}.tar.gz"
-checksum=82235cbc89899421fca98477265626f2149df7d072740f0360550cc8d4e449d6
+distfiles="https://pwmt.org/projects/zathura/download/zathura-${version}.tar.xz"
+checksum=98a661ce271a9d108a7eb8f73e471fd5e727eeff4b246cdb2c9862f8aeab1bb1
 
 if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args+=" -Dtests=enabled"

From 9597f1bb2d47fa820a46037bd612b351e6439e1f Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Sun, 23 Oct 2022 15:22:33 +0530
Subject: [PATCH 2/3] mupdf: update to 1.20.3.

Add pkg-config file for -devel.
---
 srcpkgs/mupdf/files/mupdf.pc.in | 11 +++++++++++
 srcpkgs/mupdf/template          |  8 ++++++--
 2 files changed, 17 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/mupdf/files/mupdf.pc.in

diff --git a/srcpkgs/mupdf/files/mupdf.pc.in b/srcpkgs/mupdf/files/mupdf.pc.in
new file mode 100644
index 000000000000..ea2b226d291d
--- /dev/null
+++ b/srcpkgs/mupdf/files/mupdf.pc.in
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: mupdf
+Description: Lightweight PDF and XPS viewer
+URL: https://mupdf.com
+Version: @VERSION@
+Libs: -L${libdir} -lmupdf
+Cflags: -I${includedir}/mupdf
diff --git a/srcpkgs/mupdf/template b/srcpkgs/mupdf/template
index c7814cf7f53c..4ac4fc7b40a3 100644
--- a/srcpkgs/mupdf/template
+++ b/srcpkgs/mupdf/template
@@ -1,6 +1,6 @@
 # Template file for 'mupdf'
 pkgname=mupdf
-version=1.20.0
+version=1.20.3
 revision=1
 wrksrc="${pkgname}-${version}-source"
 hostmakedepends="pkg-config zlib-devel libcurl-devel freetype-devel
@@ -15,7 +15,7 @@ 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=68dbb1cf5e31603380ce3f1c7f6c431ad442fa735d048700f50ab4de4c3b0f82
+checksum=6f73f63ef8aa81991dfd023d4426a548827d1d74e0bfcf2a013acad63b651868
 
 pre_build() {
 	# libmupdf-{threads,pkcs7}.a are required by fbpdf
@@ -50,6 +50,9 @@ do_install() {
 
 	vinstall ${FILESDIR}/mupdf.xpm 644 usr/share/pixmaps
 	vinstall ${FILESDIR}/mupdf.desktop 644 usr/share/applications
+
+	vmkdir usr/lib/pkgconfig
+	sed "s/@VERSION@/${version}/" ${FILESDIR}/mupdf.pc.in > ${DESTDIR}/usr/lib/pkgconfig/mupdf.pc
 }
 
 post_install() {
@@ -60,6 +63,7 @@ mupdf-devel_package() {
 	short_desc+=" - development files"
 	depends="libjpeg-turbo-devel jbig2dec-devel libopenjpeg2-devel"
 	pkg_install() {
+		vmove usr/lib/pkgconfig
 		vmove usr/include
 		vmove "usr/lib/*.a"
 	}

From 1ecbb640d7d608fdd1583e86f1bfbaf549b4e526 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Mon, 24 Oct 2022 00:49:09 +0530
Subject: [PATCH 3/3] zathura-pdf-mupdf: update to 0.3.9.

---
 .../zathura-pdf-mupdf/patches/mupdf-1.20.0.patch | 12 ------------
 srcpkgs/zathura-pdf-mupdf/template               | 16 +++++++---------
 2 files changed, 7 insertions(+), 21 deletions(-)
 delete mode 100644 srcpkgs/zathura-pdf-mupdf/patches/mupdf-1.20.0.patch

diff --git a/srcpkgs/zathura-pdf-mupdf/patches/mupdf-1.20.0.patch b/srcpkgs/zathura-pdf-mupdf/patches/mupdf-1.20.0.patch
deleted file mode 100644
index 53b76fe358cb..000000000000
--- a/srcpkgs/zathura-pdf-mupdf/patches/mupdf-1.20.0.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-from https://gitlab.alpinelinux.org/alpine/aports/-/commit/5c2d1886fdead7c00a00ddcd5d04aaa8d1f53377
---- a/zathura-pdf-mupdf/search.c
-+++ b/zathura-pdf-mupdf/search.c
-@@ -41,7 +41,7 @@
- 
-   fz_quad* hit_bbox = fz_malloc_array(mupdf_page->ctx, N_SEARCH_RESULTS, fz_quad);
-   int num_results = fz_search_stext_page(mupdf_page->ctx, mupdf_page->text,
--      text, hit_bbox, N_SEARCH_RESULTS);
-+      text, NULL, hit_bbox, N_SEARCH_RESULTS);
- 
-   fz_rect r;
-   for (int i = 0; i < num_results; i++) {
diff --git a/srcpkgs/zathura-pdf-mupdf/template b/srcpkgs/zathura-pdf-mupdf/template
index 66f354d29863..1b6891784f02 100644
--- a/srcpkgs/zathura-pdf-mupdf/template
+++ b/srcpkgs/zathura-pdf-mupdf/template
@@ -1,21 +1,19 @@
 # Template file for 'zathura-pdf-mupdf'
 pkgname=zathura-pdf-mupdf
-reverts=0.3.8_1
-version=0.3.7
-revision=6
+version=0.3.9
+revision=1
 build_style=meson
-configure_args="-Dlink-external=true"
 hostmakedepends="pkg-config"
-makedepends="mupdf-devel zathura-devel libopenjpeg2-devel
- libjpeg-turbo-devel libjbig2dec gumbo-parser-devel"
+makedepends="mupdf-devel zathura-devel libopenjpeg2-devel tesseract-ocr-devel
+ libjpeg-turbo-devel libjbig2dec gumbo-parser-devel leptonica-devel mujs-devel"
 depends="zathura"
 short_desc="PDF support for zathura (using mupdf)"
 maintainer="lemmi <lemmi@nerd2nerd.org>"
 license="Zlib"
-homepage="https://git.pwmt.org/pwmt/zathura-pdf-mupdf/"
+homepage="https://pwmt.org/projects/zathura-pdf-mupdf/"
 changelog="https://pwmt.org/projects/zathura-pdf-mupdf/changelog/${version}/index.html"
-distfiles="https://git.pwmt.org/pwmt/${pkgname}/-/archive/${version}/${pkgname}-${version}.tar.gz"
-checksum=3f2d341dfe3bdbfb7a51a33aee81f3763a684d0ea503dd20c726311125d7c08a
+distfiles="https://pwmt.org/projects/zathura-pdf-mupdf/download/zathura-pdf-mupdf-${version}.tar.xz"
+checksum=77f795ea1745b695a50b6864e73569d4ed8ac0eaa4ee2e6069e725c932057c07
 conflicts="zathura-pdf-poppler>=0"
 
 post_install() {

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: zathura-pdf-mupdf: update to 0.3.9.
  2022-10-23 19:33 [PR PATCH] zathura-pdf-mupdf: update to 0.3.9 icp1994
  2022-10-24  6:01 ` [PR PATCH] [Updated] " icp1994
@ 2022-10-24 19:04 ` dkwo
  2022-10-24 19:04 ` dkwo
                   ` (16 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: dkwo @ 2022-10-24 19:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 211 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/40131#issuecomment-1289469113

Comment:
Thanks, I've installed zathura-pdf-mupdf: it seems to work fine on musl.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: zathura-pdf-mupdf: update to 0.3.9.
  2022-10-23 19:33 [PR PATCH] zathura-pdf-mupdf: update to 0.3.9 icp1994
  2022-10-24  6:01 ` [PR PATCH] [Updated] " icp1994
  2022-10-24 19:04 ` dkwo
@ 2022-10-24 19:04 ` dkwo
  2022-10-31 18:37 ` dkwo
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: dkwo @ 2022-10-24 19:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 146 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/40131#issuecomment-1289469346

Comment:
@lemmi 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: zathura-pdf-mupdf: update to 0.3.9.
  2022-10-23 19:33 [PR PATCH] zathura-pdf-mupdf: update to 0.3.9 icp1994
                   ` (2 preceding siblings ...)
  2022-10-24 19:04 ` dkwo
@ 2022-10-31 18:37 ` dkwo
  2022-11-03  6:59 ` kruceter
                   ` (14 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: dkwo @ 2022-10-31 18:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 170 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/40131#issuecomment-1297509329

Comment:
Does `fbpdf` also need rebuild?

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: zathura-pdf-mupdf: update to 0.3.9.
  2022-10-23 19:33 [PR PATCH] zathura-pdf-mupdf: update to 0.3.9 icp1994
                   ` (3 preceding siblings ...)
  2022-10-31 18:37 ` dkwo
@ 2022-11-03  6:59 ` kruceter
  2022-11-03 14:16 ` leahneukirchen
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: kruceter @ 2022-11-03  6:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 701 bytes --]

New comment by kruceter on void-packages repository

https://github.com/void-linux/void-packages/pull/40131#issuecomment-1301711783

Comment:
mupdf, zathura, and zathura-pdf-mupdf work for me on *x86_64-musl*.

@dkwo, I could not find problems with either fbpdf from the repository nor the rebuilt one.

The only difference I could spot is the binary size:

```
   text    data     bss     dec     hex filename
3896799 33226348          29000 37152147        236e593 /usr/bin/fbpdf
```

```
   text    data     bss     dec     hex filename
3984043 33226768          30016 37240827        2383ffb /usr/bin/fbpdf
```

@leahneukirchen, does your package need to be rebuilt against mupdf?

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: zathura-pdf-mupdf: update to 0.3.9.
  2022-10-23 19:33 [PR PATCH] zathura-pdf-mupdf: update to 0.3.9 icp1994
                   ` (4 preceding siblings ...)
  2022-11-03  6:59 ` kruceter
@ 2022-11-03 14:16 ` leahneukirchen
  2022-11-03 15:47 ` dkwo
                   ` (12 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: leahneukirchen @ 2022-11-03 14:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 230 bytes --]

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/40131#issuecomment-1302181580

Comment:
As mupdf is statically linked, `fbpdf` and `sioyek` need to be rebuilt on update.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: zathura-pdf-mupdf: update to 0.3.9.
  2022-10-23 19:33 [PR PATCH] zathura-pdf-mupdf: update to 0.3.9 icp1994
                   ` (5 preceding siblings ...)
  2022-11-03 14:16 ` leahneukirchen
@ 2022-11-03 15:47 ` dkwo
  2022-11-03 17:28 ` [PR PATCH] [Updated] " icp1994
                   ` (11 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: dkwo @ 2022-11-03 15:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 318 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/40131#issuecomment-1302311006

Comment:
@icp1994 While you're at it, could you update `sioyek`, and replace the patch with the one that alpine is using https://git.alpinelinux.org/aports/tree/community/sioyek?h=master ?

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] zathura-pdf-mupdf: update to 0.3.9.
  2022-10-23 19:33 [PR PATCH] zathura-pdf-mupdf: update to 0.3.9 icp1994
                   ` (6 preceding siblings ...)
  2022-11-03 15:47 ` dkwo
@ 2022-11-03 17:28 ` icp1994
  2022-11-03 17:40 ` icp1994
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: icp1994 @ 2022-11-03 17:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 717 bytes --]

There is an updated pull request by icp1994 against master on the void-packages repository

https://github.com/icp1994/void-packages zathura-pdf-mupdf
https://github.com/void-linux/void-packages/pull/40131

zathura-pdf-mupdf: update to 0.3.9.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64

This PR contains quite a few changes to get around issues discussed in https://github.com/void-linux/void-packages/issues/35634. It works in my system but if someone could test it in musl (cc @dkwo) that would be useful.

A patch file from https://github.com/void-linux/void-packages/pull/40131.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-zathura-pdf-mupdf-40131.patch --]
[-- Type: text/x-diff, Size: 17681 bytes --]

From 3b7bfed1101761fa5ff25a36e66964c25b47d242 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Sun, 23 Oct 2022 14:56:40 +0530
Subject: [PATCH 1/5] zathura: update to 0.5.1.

---
 srcpkgs/zathura/template | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/zathura/template b/srcpkgs/zathura/template
index 69193d8ded4e..cffc5b952db0 100644
--- a/srcpkgs/zathura/template
+++ b/srcpkgs/zathura/template
@@ -1,7 +1,7 @@
 # Template file for 'zathura'
 pkgname=zathura
-version=0.4.9
-revision=2
+version=0.5.1
+revision=1
 build_style=meson
 configure_args="-Dsynctex=enabled"
 hostmakedepends="pkg-config intltool python3-Sphinx desktop-file-utils
@@ -12,10 +12,10 @@ checkdepends="gettext-devel check-devel"
 short_desc="Highly customizable and functional document viewer"
 maintainer="lemmi <lemmi@nerd2nerd.org>"
 license="Zlib"
-homepage="https://git.pwmt.org/pwmt/zathura/"
+homepage="https://pwmt.org/projects/zathura/"
 changelog="https://pwmt.org/projects/zathura/changelog/${version}/index.html"
-distfiles="https://git.pwmt.org/pwmt/${pkgname}/-/archive/${version}/${pkgname}-${version}.tar.gz"
-checksum=82235cbc89899421fca98477265626f2149df7d072740f0360550cc8d4e449d6
+distfiles="https://pwmt.org/projects/zathura/download/zathura-${version}.tar.xz"
+checksum=98a661ce271a9d108a7eb8f73e471fd5e727eeff4b246cdb2c9862f8aeab1bb1
 
 if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args+=" -Dtests=enabled"

From 74ef9765296cd75beb8aafd6196efa0275270c3a Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Sun, 23 Oct 2022 15:22:33 +0530
Subject: [PATCH 2/5] mupdf: update to 1.20.3.

Add pkg-config file for -devel.
---
 srcpkgs/mupdf/files/mupdf.pc.in | 11 +++++++++++
 srcpkgs/mupdf/template          |  8 ++++++--
 2 files changed, 17 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/mupdf/files/mupdf.pc.in

diff --git a/srcpkgs/mupdf/files/mupdf.pc.in b/srcpkgs/mupdf/files/mupdf.pc.in
new file mode 100644
index 000000000000..ea2b226d291d
--- /dev/null
+++ b/srcpkgs/mupdf/files/mupdf.pc.in
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: mupdf
+Description: Lightweight PDF and XPS viewer
+URL: https://mupdf.com
+Version: @VERSION@
+Libs: -L${libdir} -lmupdf
+Cflags: -I${includedir}/mupdf
diff --git a/srcpkgs/mupdf/template b/srcpkgs/mupdf/template
index c7814cf7f53c..4ac4fc7b40a3 100644
--- a/srcpkgs/mupdf/template
+++ b/srcpkgs/mupdf/template
@@ -1,6 +1,6 @@
 # Template file for 'mupdf'
 pkgname=mupdf
-version=1.20.0
+version=1.20.3
 revision=1
 wrksrc="${pkgname}-${version}-source"
 hostmakedepends="pkg-config zlib-devel libcurl-devel freetype-devel
@@ -15,7 +15,7 @@ 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=68dbb1cf5e31603380ce3f1c7f6c431ad442fa735d048700f50ab4de4c3b0f82
+checksum=6f73f63ef8aa81991dfd023d4426a548827d1d74e0bfcf2a013acad63b651868
 
 pre_build() {
 	# libmupdf-{threads,pkcs7}.a are required by fbpdf
@@ -50,6 +50,9 @@ do_install() {
 
 	vinstall ${FILESDIR}/mupdf.xpm 644 usr/share/pixmaps
 	vinstall ${FILESDIR}/mupdf.desktop 644 usr/share/applications
+
+	vmkdir usr/lib/pkgconfig
+	sed "s/@VERSION@/${version}/" ${FILESDIR}/mupdf.pc.in > ${DESTDIR}/usr/lib/pkgconfig/mupdf.pc
 }
 
 post_install() {
@@ -60,6 +63,7 @@ mupdf-devel_package() {
 	short_desc+=" - development files"
 	depends="libjpeg-turbo-devel jbig2dec-devel libopenjpeg2-devel"
 	pkg_install() {
+		vmove usr/lib/pkgconfig
 		vmove usr/include
 		vmove "usr/lib/*.a"
 	}

From 9f8ee419ace78cd964f485c059f5913c518a1995 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Mon, 24 Oct 2022 00:49:09 +0530
Subject: [PATCH 3/5] zathura-pdf-mupdf: update to 0.3.9.

---
 .../zathura-pdf-mupdf/patches/mupdf-1.20.0.patch | 12 ------------
 srcpkgs/zathura-pdf-mupdf/template               | 16 +++++++---------
 2 files changed, 7 insertions(+), 21 deletions(-)
 delete mode 100644 srcpkgs/zathura-pdf-mupdf/patches/mupdf-1.20.0.patch

diff --git a/srcpkgs/zathura-pdf-mupdf/patches/mupdf-1.20.0.patch b/srcpkgs/zathura-pdf-mupdf/patches/mupdf-1.20.0.patch
deleted file mode 100644
index 53b76fe358cb..000000000000
--- a/srcpkgs/zathura-pdf-mupdf/patches/mupdf-1.20.0.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-from https://gitlab.alpinelinux.org/alpine/aports/-/commit/5c2d1886fdead7c00a00ddcd5d04aaa8d1f53377
---- a/zathura-pdf-mupdf/search.c
-+++ b/zathura-pdf-mupdf/search.c
-@@ -41,7 +41,7 @@
- 
-   fz_quad* hit_bbox = fz_malloc_array(mupdf_page->ctx, N_SEARCH_RESULTS, fz_quad);
-   int num_results = fz_search_stext_page(mupdf_page->ctx, mupdf_page->text,
--      text, hit_bbox, N_SEARCH_RESULTS);
-+      text, NULL, hit_bbox, N_SEARCH_RESULTS);
- 
-   fz_rect r;
-   for (int i = 0; i < num_results; i++) {
diff --git a/srcpkgs/zathura-pdf-mupdf/template b/srcpkgs/zathura-pdf-mupdf/template
index 66f354d29863..1b6891784f02 100644
--- a/srcpkgs/zathura-pdf-mupdf/template
+++ b/srcpkgs/zathura-pdf-mupdf/template
@@ -1,21 +1,19 @@
 # Template file for 'zathura-pdf-mupdf'
 pkgname=zathura-pdf-mupdf
-reverts=0.3.8_1
-version=0.3.7
-revision=6
+version=0.3.9
+revision=1
 build_style=meson
-configure_args="-Dlink-external=true"
 hostmakedepends="pkg-config"
-makedepends="mupdf-devel zathura-devel libopenjpeg2-devel
- libjpeg-turbo-devel libjbig2dec gumbo-parser-devel"
+makedepends="mupdf-devel zathura-devel libopenjpeg2-devel tesseract-ocr-devel
+ libjpeg-turbo-devel libjbig2dec gumbo-parser-devel leptonica-devel mujs-devel"
 depends="zathura"
 short_desc="PDF support for zathura (using mupdf)"
 maintainer="lemmi <lemmi@nerd2nerd.org>"
 license="Zlib"
-homepage="https://git.pwmt.org/pwmt/zathura-pdf-mupdf/"
+homepage="https://pwmt.org/projects/zathura-pdf-mupdf/"
 changelog="https://pwmt.org/projects/zathura-pdf-mupdf/changelog/${version}/index.html"
-distfiles="https://git.pwmt.org/pwmt/${pkgname}/-/archive/${version}/${pkgname}-${version}.tar.gz"
-checksum=3f2d341dfe3bdbfb7a51a33aee81f3763a684d0ea503dd20c726311125d7c08a
+distfiles="https://pwmt.org/projects/zathura-pdf-mupdf/download/zathura-pdf-mupdf-${version}.tar.xz"
+checksum=77f795ea1745b695a50b6864e73569d4ed8ac0eaa4ee2e6069e725c932057c07
 conflicts="zathura-pdf-poppler>=0"
 
 post_install() {

From 13e3be2a022d5d5a3a617e62c10919f715a06da4 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Thu, 3 Nov 2022 21:57:08 +0530
Subject: [PATCH 4/5] fbpdf: rebuild for mupdf-1.20.3_1.

---
 srcpkgs/fbpdf/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/fbpdf/template b/srcpkgs/fbpdf/template
index 4d0904c2692b..da27476da510 100644
--- a/srcpkgs/fbpdf/template
+++ b/srcpkgs/fbpdf/template
@@ -1,7 +1,7 @@
 # Template file for 'fbpdf'
 pkgname=fbpdf
 version=0.0.20200616
-revision=3
+revision=4
 _githash=f59002487edba502aaa93e9aec3bb6ebbbe41b0e
 _gitshort="${_githash:0:7}"
 wrksrc="fbpdf-${_gitshort}"

From 59064651409bebbf30b2a3609cdd7bfa880a76bf Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Thu, 3 Nov 2022 22:35:22 +0530
Subject: [PATCH 5/5] sioyek: update to 1.5.0.

---
 ...c65cf85d1eee4515ef67b9a89c939ae9492.patch} | 93 +++++--------------
 ...876fb2dcd3c82d619316e1cf8959521d4071.patch | 44 +++++++++
 srcpkgs/sioyek/template                       |  7 +-
 3 files changed, 72 insertions(+), 72 deletions(-)
 rename srcpkgs/sioyek/patches/{294.patch => 310c7c65cf85d1eee4515ef67b9a89c939ae9492.patch} (50%)
 create mode 100644 srcpkgs/sioyek/patches/7a9e876fb2dcd3c82d619316e1cf8959521d4071.patch

diff --git a/srcpkgs/sioyek/patches/294.patch b/srcpkgs/sioyek/patches/310c7c65cf85d1eee4515ef67b9a89c939ae9492.patch
similarity index 50%
rename from srcpkgs/sioyek/patches/294.patch
rename to srcpkgs/sioyek/patches/310c7c65cf85d1eee4515ef67b9a89c939ae9492.patch
index cc35d1e55879..a2a35645f52e 100644
--- a/srcpkgs/sioyek/patches/294.patch
+++ b/srcpkgs/sioyek/patches/310c7c65cf85d1eee4515ef67b9a89c939ae9492.patch
@@ -1,7 +1,7 @@
-From 35fa37f9485bf933e754b995902f69d53dac1670 Mon Sep 17 00:00:00 2001
-From: lennonhill <31923882+lennonhill@users.noreply.github.com>
-Date: Tue, 28 Jun 2022 18:01:36 +0200
-Subject: [PATCH 1/2] Parse mupdf 1.20 links
+From 310c7c65cf85d1eee4515ef67b9a89c939ae9492 Mon Sep 17 00:00:00 2001
+From: hrdl <31923882+lennonhill@users.noreply.github.com>
+Date: Mon, 29 Aug 2022 12:43:31 +0200
+Subject: [PATCH] Parse mupdf 1.20 links
 
 ---
  pdf_viewer/document_view.cpp |  2 +-
@@ -11,23 +11,23 @@ Subject: [PATCH 1/2] Parse mupdf 1.20 links
  4 files changed, 10 insertions(+), 20 deletions(-)
 
 diff --git a/pdf_viewer/document_view.cpp b/pdf_viewer/document_view.cpp
-index 9a7d8ea2..d8305620 100644
+index ace3f161d..1362ee4b5 100644
 --- a/pdf_viewer/document_view.cpp
 +++ b/pdf_viewer/document_view.cpp
-@@ -1013,7 +1013,7 @@ std::optional<DocumentPos> DocumentView::find_line_definition() {
+@@ -1077,7 +1077,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(pdf_link.value().uri);
 +				auto parsed_uri = parse_uri(mupdf_context, pdf_link.value().uri);
- 				DocumentPos res;
- 				res.page = parsed_uri.page-1;
- 				res.x = parsed_uri.x;
+ 				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 9e02e2c6..5bd7ed1f 100644
+index 5265398d2..707d11b30 100644
 --- a/pdf_viewer/main_widget.cpp
 +++ b/pdf_viewer/main_widget.cpp
-@@ -135,7 +135,7 @@ void MainWidget::set_overview_position(int page, float offset) {
+@@ -153,7 +153,7 @@ void MainWidget::set_overview_position(int page, float offset) {
  
  void MainWidget::set_overview_link(PdfLink link) {
  
@@ -36,16 +36,16 @@ index 9e02e2c6..5bd7ed1f 100644
      if (page >= 1) {
          set_overview_position(page - 1, offset_y);
      }
-@@ -2647,7 +2647,7 @@ void MainWidget::handle_pending_text_command(std::wstring text) {
+@@ -2861,7 +2861,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(selected_link->uri);
++					auto [page, offset_x, offset_y] = parse_uri(mupdf_context, selected_link->uri);
+ 					long_jump_to_destination(page-1, offset_y);
+                 }
              }
-             if ((link_index >= 0) && (link_index < static_cast<int>(visible_page_links.size()))) {
-                 auto [selected_page, selected_link] = visible_page_links[link_index];
--                auto [page, offset_x, offset_y] = parse_uri(selected_link->uri);
-+                auto [page, offset_x, offset_y] = parse_uri(mupdf_context, selected_link->uri);
-                 long_jump_to_destination(page-1, offset_y);
-             }
-         }
-@@ -3223,7 +3223,7 @@ void MainWidget::handle_link_click(const PdfLink& link) {
+@@ -3472,7 +3472,7 @@ void MainWidget::handle_link_click(const PdfLink& link) {
  		return;
  	}
  
@@ -55,7 +55,7 @@ index 9e02e2c6..5bd7ed1f 100644
  	// convert one indexed page to zero indexed page
  	page--;
 diff --git a/pdf_viewer/utils.cpp b/pdf_viewer/utils.cpp
-index be9d2e76..505b7d12 100644
+index a25d18f10..e416737ba 100644
 --- a/pdf_viewer/utils.cpp
 +++ b/pdf_viewer/utils.cpp
 @@ -24,6 +24,8 @@
@@ -87,13 +87,13 @@ index be9d2e76..505b7d12 100644
 -
 -	return { page, offset_x, offset_y };
 +ParsedUri parse_uri(fz_context* mupdf_context, std::string uri) {
-+        fz_link_dest dest = pdf_parse_link_uri(mupdf_context, uri.c_str());
-+        return { dest.loc.page + 1, dest.x, dest.y };
++	fz_link_dest dest = pdf_parse_link_uri(mupdf_context, uri.c_str());
++	return { dest.loc.page + 1, dest.x, dest.y };
  }
  
  char get_symbol(int key, bool is_shift_pressed, const std::vector<char>& special_symbols) {
 diff --git a/pdf_viewer/utils.h b/pdf_viewer/utils.h
-index 919ff6eb..f7934b7f 100644
+index 4d551c35a..aa0d0d61b 100644
 --- a/pdf_viewer/utils.h
 +++ b/pdf_viewer/utils.h
 @@ -33,7 +33,7 @@ void get_flat_toc(const std::vector<TocNode*>& roots, std::vector<std::wstring>&
@@ -105,48 +105,3 @@ index 919ff6eb..f7934b7f 100644
  char get_symbol(int key, bool is_shift_pressed, const std::vector<char>&special_symbols);
  
  template<typename T>
-
-From 5b2488e7cd9a454faf0ff488ba97c11f22805e25 Mon Sep 17 00:00:00 2001
-From: lennonhill <31923882+lennonhill@users.noreply.github.com>
-Date: Tue, 28 Jun 2022 19:18:53 +0200
-Subject: [PATCH 2/2] Upgrade mupdf to 1.20
-
----
- pdf_viewer/document.cpp     | 4 ++--
- pdf_viewer/pdf_renderer.cpp | 2 +-
- 3 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/pdf_viewer/document.cpp b/pdf_viewer/document.cpp
-index f1585ad3..e906594a 100644
---- a/pdf_viewer/document.cpp
-+++ b/pdf_viewer/document.cpp
-@@ -542,14 +542,14 @@ void Document::convert_toc_tree(fz_outline* root, std::vector<TocNode*>& output)
- 		current_node->title = utf8_decode(root->title);
- 		current_node->x = root->x;
- 		current_node->y = root->y;
--		if (root->page == -1) {
-+		if (root->page.page == -1) {
- 			float xp, yp;
- 			fz_location loc = fz_resolve_link(context, doc, root->uri, &xp, &yp);
- 			int chapter_page = accum_chapter_pages[loc.chapter];
- 			current_node->page = chapter_page + loc.page;
- 		}
- 		else {
--			current_node->page = root->page;
-+			current_node->page = root->page.page;
- 		}
- 		convert_toc_tree(root->down, current_node->children);
- 
-diff --git a/pdf_viewer/pdf_renderer.cpp b/pdf_viewer/pdf_renderer.cpp
-index de4c43fc..9adbc998 100644
---- a/pdf_viewer/pdf_renderer.cpp
-+++ b/pdf_viewer/pdf_renderer.cpp
-@@ -315,7 +315,7 @@ void PdfRenderer::run_search(int thread_index)
- 
- 				const int max_hits_per_page = 20;
- 				fz_quad hitboxes[max_hits_per_page];
--				int num_results = fz_search_page(mupdf_context, page, utf8_encode(req.search_term).c_str(), hitboxes, max_hits_per_page);
-+				int num_results = fz_search_page(mupdf_context, page, utf8_encode(req.search_term).c_str(), nullptr, hitboxes, max_hits_per_page);
- 
- 				if (num_results > 0) {
- 					req.search_results_mutex->lock();
diff --git a/srcpkgs/sioyek/patches/7a9e876fb2dcd3c82d619316e1cf8959521d4071.patch b/srcpkgs/sioyek/patches/7a9e876fb2dcd3c82d619316e1cf8959521d4071.patch
new file mode 100644
index 000000000000..653cb132684f
--- /dev/null
+++ b/srcpkgs/sioyek/patches/7a9e876fb2dcd3c82d619316e1cf8959521d4071.patch
@@ -0,0 +1,44 @@
+From 7a9e876fb2dcd3c82d619316e1cf8959521d4071 Mon Sep 17 00:00:00 2001
+From: ahrm <a.hr.mostafavi@gmail.com>
+Date: Mon, 29 Aug 2022 14:57:02 +0430
+Subject: [PATCH] Fix some compatibility issues with mupdf 1.20.0
+
+---
+ pdf_viewer/document.cpp     | 4 ++--
+ pdf_viewer/pdf_renderer.cpp | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/pdf_viewer/document.cpp b/pdf_viewer/document.cpp
+index 083e40244..61375d598 100644
+--- a/pdf_viewer/document.cpp
++++ b/pdf_viewer/document.cpp
+@@ -559,14 +559,14 @@ void Document::convert_toc_tree(fz_outline* root, std::vector<TocNode*>& output)
+ 		current_node->title = utf8_decode(root->title);
+ 		current_node->x = root->x;
+ 		current_node->y = root->y;
+-		if (root->page == -1) {
++		if (root->page.page == -1) {
+ 			float xp, yp;
+ 			fz_location loc = fz_resolve_link(context, doc, root->uri, &xp, &yp);
+ 			int chapter_page = accum_chapter_pages[loc.chapter];
+ 			current_node->page = chapter_page + loc.page;
+ 		}
+ 		else {
+-			current_node->page = root->page;
++			current_node->page = root->page.page;
+ 		}
+ 		convert_toc_tree(root->down, current_node->children);
+ 
+diff --git a/pdf_viewer/pdf_renderer.cpp b/pdf_viewer/pdf_renderer.cpp
+index cc8a89d16..fd17a52c4 100644
+--- a/pdf_viewer/pdf_renderer.cpp
++++ b/pdf_viewer/pdf_renderer.cpp
+@@ -315,7 +315,7 @@ void PdfRenderer::run_search(int thread_index)
+ 
+ 				const int max_hits_per_page = 20;
+ 				fz_quad hitboxes[max_hits_per_page];
+-				int num_results = fz_search_page(mupdf_context, page, utf8_encode(req.search_term).c_str(), hitboxes, max_hits_per_page);
++				int num_results = fz_search_page(mupdf_context, page, utf8_encode(req.search_term).c_str(), nullptr, hitboxes, max_hits_per_page);
+ 
+ 				if (num_results > 0) {
+ 					req.search_results_mutex->lock();
diff --git a/srcpkgs/sioyek/template b/srcpkgs/sioyek/template
index 53349e65d09a..1db2ced0c806 100644
--- a/srcpkgs/sioyek/template
+++ b/srcpkgs/sioyek/template
@@ -1,19 +1,20 @@
 # Template file for 'sioyek'
 pkgname=sioyek
-version=1.4.0
+version=1.5.0
 revision=1
 build_style=qmake
 hostmakedepends="qt5-qmake qt5-host-tools
  qt5-opengl qt5-gui qt5-widgets qt5-network"
 makedepends="zlib-devel qt5-3d-devel qt5-gamepad-devel mupdf-devel
- gumbo-parser-devel harfbuzz-devel qt5-opengl mujs-devel"
+ gumbo-parser-devel harfbuzz-devel qt5-opengl mujs-devel freetype-devel
+ libjbig2dec libjpeg-turbo-devel libopenjpeg2-devel"
 depends="mupdf"
 short_desc="PDF viewer designed for reading research papers and technical books"
 maintainer="dkwo <npiazza@disroot.org>"
 license="GPL-3.0-or-later"
 homepage="https://sioyek.info/"
 distfiles="https://github.com/ahrm/sioyek/archive/refs/tags/v${version}.tar.gz"
-checksum=44d49aec28e49bb79c2d0fb7cefd26aecc53b60136bf02dfec9863ac586aacd0
+checksum=2d01c757953c3f2d98428376e642d13b8a9edeba8fee506477e8aa178756f16b
 nocross="fails to configure"
 
 do_build() {

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: zathura-pdf-mupdf: update to 0.3.9.
  2022-10-23 19:33 [PR PATCH] zathura-pdf-mupdf: update to 0.3.9 icp1994
                   ` (7 preceding siblings ...)
  2022-11-03 17:28 ` [PR PATCH] [Updated] " icp1994
@ 2022-11-03 17:40 ` icp1994
  2022-11-03 18:02 ` [PR REVIEW] " dkwo
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: icp1994 @ 2022-11-03 17:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 450 bytes --]

New comment by icp1994 on void-packages repository

https://github.com/void-linux/void-packages/pull/40131#issuecomment-1302458409

Comment:
`fbpdf` builds fine but some issues for `sioyek` with the `fix-mupdf-libs.patch`. I don't know why alpine is removing those libs from cli. Since the template had most of the respective -devel packages anyway, I added the rest and it seems to work. But both these packages probably needs to be runtime tested.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR REVIEW] zathura-pdf-mupdf: update to 0.3.9.
  2022-10-23 19:33 [PR PATCH] zathura-pdf-mupdf: update to 0.3.9 icp1994
                   ` (8 preceding siblings ...)
  2022-11-03 17:40 ` icp1994
@ 2022-11-03 18:02 ` dkwo
  2022-11-03 18:03 ` dkwo
                   ` (8 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: dkwo @ 2022-11-03 18:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 245 bytes --]

New review comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/40131#discussion_r1013244398

Comment:
Could you restrict the arch to i686* and x86_64* instead, even natively it does not build for others

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: zathura-pdf-mupdf: update to 0.3.9.
  2022-10-23 19:33 [PR PATCH] zathura-pdf-mupdf: update to 0.3.9 icp1994
                   ` (9 preceding siblings ...)
  2022-11-03 18:02 ` [PR REVIEW] " dkwo
@ 2022-11-03 18:03 ` dkwo
  2022-11-03 18:03 ` [PR REVIEW] " dkwo
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: dkwo @ 2022-11-03 18:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 172 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/40131#issuecomment-1302484812

Comment:
Thanks, I'm testing `sioyek` now.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR REVIEW] zathura-pdf-mupdf: update to 0.3.9.
  2022-10-23 19:33 [PR PATCH] zathura-pdf-mupdf: update to 0.3.9 icp1994
                   ` (10 preceding siblings ...)
  2022-11-03 18:03 ` dkwo
@ 2022-11-03 18:03 ` dkwo
  2022-11-03 18:45 ` [PR PATCH] [Updated] " icp1994
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: dkwo @ 2022-11-03 18:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 172 bytes --]

New review comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/40131#discussion_r1013245870

Comment:
(I mean instead of nocross)

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Updated] zathura-pdf-mupdf: update to 0.3.9.
  2022-10-23 19:33 [PR PATCH] zathura-pdf-mupdf: update to 0.3.9 icp1994
                   ` (11 preceding siblings ...)
  2022-11-03 18:03 ` [PR REVIEW] " dkwo
@ 2022-11-03 18:45 ` icp1994
  2022-11-03 22:01 ` dkwo
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: icp1994 @ 2022-11-03 18:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 717 bytes --]

There is an updated pull request by icp1994 against master on the void-packages repository

https://github.com/icp1994/void-packages zathura-pdf-mupdf
https://github.com/void-linux/void-packages/pull/40131

zathura-pdf-mupdf: update to 0.3.9.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64

This PR contains quite a few changes to get around issues discussed in https://github.com/void-linux/void-packages/issues/35634. It works in my system but if someone could test it in musl (cc @dkwo) that would be useful.

A patch file from https://github.com/void-linux/void-packages/pull/40131.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-zathura-pdf-mupdf-40131.patch --]
[-- Type: text/x-diff, Size: 17740 bytes --]

From 3b7bfed1101761fa5ff25a36e66964c25b47d242 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Sun, 23 Oct 2022 14:56:40 +0530
Subject: [PATCH 1/5] zathura: update to 0.5.1.

---
 srcpkgs/zathura/template | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/zathura/template b/srcpkgs/zathura/template
index 69193d8ded4e..cffc5b952db0 100644
--- a/srcpkgs/zathura/template
+++ b/srcpkgs/zathura/template
@@ -1,7 +1,7 @@
 # Template file for 'zathura'
 pkgname=zathura
-version=0.4.9
-revision=2
+version=0.5.1
+revision=1
 build_style=meson
 configure_args="-Dsynctex=enabled"
 hostmakedepends="pkg-config intltool python3-Sphinx desktop-file-utils
@@ -12,10 +12,10 @@ checkdepends="gettext-devel check-devel"
 short_desc="Highly customizable and functional document viewer"
 maintainer="lemmi <lemmi@nerd2nerd.org>"
 license="Zlib"
-homepage="https://git.pwmt.org/pwmt/zathura/"
+homepage="https://pwmt.org/projects/zathura/"
 changelog="https://pwmt.org/projects/zathura/changelog/${version}/index.html"
-distfiles="https://git.pwmt.org/pwmt/${pkgname}/-/archive/${version}/${pkgname}-${version}.tar.gz"
-checksum=82235cbc89899421fca98477265626f2149df7d072740f0360550cc8d4e449d6
+distfiles="https://pwmt.org/projects/zathura/download/zathura-${version}.tar.xz"
+checksum=98a661ce271a9d108a7eb8f73e471fd5e727eeff4b246cdb2c9862f8aeab1bb1
 
 if [ "$XBPS_CHECK_PKGS" ]; then
 	configure_args+=" -Dtests=enabled"

From 74ef9765296cd75beb8aafd6196efa0275270c3a Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Sun, 23 Oct 2022 15:22:33 +0530
Subject: [PATCH 2/5] mupdf: update to 1.20.3.

Add pkg-config file for -devel.
---
 srcpkgs/mupdf/files/mupdf.pc.in | 11 +++++++++++
 srcpkgs/mupdf/template          |  8 ++++++--
 2 files changed, 17 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/mupdf/files/mupdf.pc.in

diff --git a/srcpkgs/mupdf/files/mupdf.pc.in b/srcpkgs/mupdf/files/mupdf.pc.in
new file mode 100644
index 000000000000..ea2b226d291d
--- /dev/null
+++ b/srcpkgs/mupdf/files/mupdf.pc.in
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: mupdf
+Description: Lightweight PDF and XPS viewer
+URL: https://mupdf.com
+Version: @VERSION@
+Libs: -L${libdir} -lmupdf
+Cflags: -I${includedir}/mupdf
diff --git a/srcpkgs/mupdf/template b/srcpkgs/mupdf/template
index c7814cf7f53c..4ac4fc7b40a3 100644
--- a/srcpkgs/mupdf/template
+++ b/srcpkgs/mupdf/template
@@ -1,6 +1,6 @@
 # Template file for 'mupdf'
 pkgname=mupdf
-version=1.20.0
+version=1.20.3
 revision=1
 wrksrc="${pkgname}-${version}-source"
 hostmakedepends="pkg-config zlib-devel libcurl-devel freetype-devel
@@ -15,7 +15,7 @@ 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=68dbb1cf5e31603380ce3f1c7f6c431ad442fa735d048700f50ab4de4c3b0f82
+checksum=6f73f63ef8aa81991dfd023d4426a548827d1d74e0bfcf2a013acad63b651868
 
 pre_build() {
 	# libmupdf-{threads,pkcs7}.a are required by fbpdf
@@ -50,6 +50,9 @@ do_install() {
 
 	vinstall ${FILESDIR}/mupdf.xpm 644 usr/share/pixmaps
 	vinstall ${FILESDIR}/mupdf.desktop 644 usr/share/applications
+
+	vmkdir usr/lib/pkgconfig
+	sed "s/@VERSION@/${version}/" ${FILESDIR}/mupdf.pc.in > ${DESTDIR}/usr/lib/pkgconfig/mupdf.pc
 }
 
 post_install() {
@@ -60,6 +63,7 @@ mupdf-devel_package() {
 	short_desc+=" - development files"
 	depends="libjpeg-turbo-devel jbig2dec-devel libopenjpeg2-devel"
 	pkg_install() {
+		vmove usr/lib/pkgconfig
 		vmove usr/include
 		vmove "usr/lib/*.a"
 	}

From 9f8ee419ace78cd964f485c059f5913c518a1995 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Mon, 24 Oct 2022 00:49:09 +0530
Subject: [PATCH 3/5] zathura-pdf-mupdf: update to 0.3.9.

---
 .../zathura-pdf-mupdf/patches/mupdf-1.20.0.patch | 12 ------------
 srcpkgs/zathura-pdf-mupdf/template               | 16 +++++++---------
 2 files changed, 7 insertions(+), 21 deletions(-)
 delete mode 100644 srcpkgs/zathura-pdf-mupdf/patches/mupdf-1.20.0.patch

diff --git a/srcpkgs/zathura-pdf-mupdf/patches/mupdf-1.20.0.patch b/srcpkgs/zathura-pdf-mupdf/patches/mupdf-1.20.0.patch
deleted file mode 100644
index 53b76fe358cb..000000000000
--- a/srcpkgs/zathura-pdf-mupdf/patches/mupdf-1.20.0.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-from https://gitlab.alpinelinux.org/alpine/aports/-/commit/5c2d1886fdead7c00a00ddcd5d04aaa8d1f53377
---- a/zathura-pdf-mupdf/search.c
-+++ b/zathura-pdf-mupdf/search.c
-@@ -41,7 +41,7 @@
- 
-   fz_quad* hit_bbox = fz_malloc_array(mupdf_page->ctx, N_SEARCH_RESULTS, fz_quad);
-   int num_results = fz_search_stext_page(mupdf_page->ctx, mupdf_page->text,
--      text, hit_bbox, N_SEARCH_RESULTS);
-+      text, NULL, hit_bbox, N_SEARCH_RESULTS);
- 
-   fz_rect r;
-   for (int i = 0; i < num_results; i++) {
diff --git a/srcpkgs/zathura-pdf-mupdf/template b/srcpkgs/zathura-pdf-mupdf/template
index 66f354d29863..1b6891784f02 100644
--- a/srcpkgs/zathura-pdf-mupdf/template
+++ b/srcpkgs/zathura-pdf-mupdf/template
@@ -1,21 +1,19 @@
 # Template file for 'zathura-pdf-mupdf'
 pkgname=zathura-pdf-mupdf
-reverts=0.3.8_1
-version=0.3.7
-revision=6
+version=0.3.9
+revision=1
 build_style=meson
-configure_args="-Dlink-external=true"
 hostmakedepends="pkg-config"
-makedepends="mupdf-devel zathura-devel libopenjpeg2-devel
- libjpeg-turbo-devel libjbig2dec gumbo-parser-devel"
+makedepends="mupdf-devel zathura-devel libopenjpeg2-devel tesseract-ocr-devel
+ libjpeg-turbo-devel libjbig2dec gumbo-parser-devel leptonica-devel mujs-devel"
 depends="zathura"
 short_desc="PDF support for zathura (using mupdf)"
 maintainer="lemmi <lemmi@nerd2nerd.org>"
 license="Zlib"
-homepage="https://git.pwmt.org/pwmt/zathura-pdf-mupdf/"
+homepage="https://pwmt.org/projects/zathura-pdf-mupdf/"
 changelog="https://pwmt.org/projects/zathura-pdf-mupdf/changelog/${version}/index.html"
-distfiles="https://git.pwmt.org/pwmt/${pkgname}/-/archive/${version}/${pkgname}-${version}.tar.gz"
-checksum=3f2d341dfe3bdbfb7a51a33aee81f3763a684d0ea503dd20c726311125d7c08a
+distfiles="https://pwmt.org/projects/zathura-pdf-mupdf/download/zathura-pdf-mupdf-${version}.tar.xz"
+checksum=77f795ea1745b695a50b6864e73569d4ed8ac0eaa4ee2e6069e725c932057c07
 conflicts="zathura-pdf-poppler>=0"
 
 post_install() {

From 13e3be2a022d5d5a3a617e62c10919f715a06da4 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Thu, 3 Nov 2022 21:57:08 +0530
Subject: [PATCH 4/5] fbpdf: rebuild for mupdf-1.20.3_1.

---
 srcpkgs/fbpdf/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/fbpdf/template b/srcpkgs/fbpdf/template
index 4d0904c2692b..da27476da510 100644
--- a/srcpkgs/fbpdf/template
+++ b/srcpkgs/fbpdf/template
@@ -1,7 +1,7 @@
 # Template file for 'fbpdf'
 pkgname=fbpdf
 version=0.0.20200616
-revision=3
+revision=4
 _githash=f59002487edba502aaa93e9aec3bb6ebbbe41b0e
 _gitshort="${_githash:0:7}"
 wrksrc="fbpdf-${_gitshort}"

From 904f2cf5f3c581e71c02288cbf6496e4b7f429b0 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Thu, 3 Nov 2022 22:35:22 +0530
Subject: [PATCH 5/5] sioyek: update to 1.5.0.

---
 ...c65cf85d1eee4515ef67b9a89c939ae9492.patch} | 93 +++++--------------
 ...876fb2dcd3c82d619316e1cf8959521d4071.patch | 44 +++++++++
 srcpkgs/sioyek/template                       |  9 +-
 3 files changed, 73 insertions(+), 73 deletions(-)
 rename srcpkgs/sioyek/patches/{294.patch => 310c7c65cf85d1eee4515ef67b9a89c939ae9492.patch} (50%)
 create mode 100644 srcpkgs/sioyek/patches/7a9e876fb2dcd3c82d619316e1cf8959521d4071.patch

diff --git a/srcpkgs/sioyek/patches/294.patch b/srcpkgs/sioyek/patches/310c7c65cf85d1eee4515ef67b9a89c939ae9492.patch
similarity index 50%
rename from srcpkgs/sioyek/patches/294.patch
rename to srcpkgs/sioyek/patches/310c7c65cf85d1eee4515ef67b9a89c939ae9492.patch
index cc35d1e55879..a2a35645f52e 100644
--- a/srcpkgs/sioyek/patches/294.patch
+++ b/srcpkgs/sioyek/patches/310c7c65cf85d1eee4515ef67b9a89c939ae9492.patch
@@ -1,7 +1,7 @@
-From 35fa37f9485bf933e754b995902f69d53dac1670 Mon Sep 17 00:00:00 2001
-From: lennonhill <31923882+lennonhill@users.noreply.github.com>
-Date: Tue, 28 Jun 2022 18:01:36 +0200
-Subject: [PATCH 1/2] Parse mupdf 1.20 links
+From 310c7c65cf85d1eee4515ef67b9a89c939ae9492 Mon Sep 17 00:00:00 2001
+From: hrdl <31923882+lennonhill@users.noreply.github.com>
+Date: Mon, 29 Aug 2022 12:43:31 +0200
+Subject: [PATCH] Parse mupdf 1.20 links
 
 ---
  pdf_viewer/document_view.cpp |  2 +-
@@ -11,23 +11,23 @@ Subject: [PATCH 1/2] Parse mupdf 1.20 links
  4 files changed, 10 insertions(+), 20 deletions(-)
 
 diff --git a/pdf_viewer/document_view.cpp b/pdf_viewer/document_view.cpp
-index 9a7d8ea2..d8305620 100644
+index ace3f161d..1362ee4b5 100644
 --- a/pdf_viewer/document_view.cpp
 +++ b/pdf_viewer/document_view.cpp
-@@ -1013,7 +1013,7 @@ std::optional<DocumentPos> DocumentView::find_line_definition() {
+@@ -1077,7 +1077,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(pdf_link.value().uri);
 +				auto parsed_uri = parse_uri(mupdf_context, pdf_link.value().uri);
- 				DocumentPos res;
- 				res.page = parsed_uri.page-1;
- 				res.x = parsed_uri.x;
+ 				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 9e02e2c6..5bd7ed1f 100644
+index 5265398d2..707d11b30 100644
 --- a/pdf_viewer/main_widget.cpp
 +++ b/pdf_viewer/main_widget.cpp
-@@ -135,7 +135,7 @@ void MainWidget::set_overview_position(int page, float offset) {
+@@ -153,7 +153,7 @@ void MainWidget::set_overview_position(int page, float offset) {
  
  void MainWidget::set_overview_link(PdfLink link) {
  
@@ -36,16 +36,16 @@ index 9e02e2c6..5bd7ed1f 100644
      if (page >= 1) {
          set_overview_position(page - 1, offset_y);
      }
-@@ -2647,7 +2647,7 @@ void MainWidget::handle_pending_text_command(std::wstring text) {
+@@ -2861,7 +2861,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(selected_link->uri);
++					auto [page, offset_x, offset_y] = parse_uri(mupdf_context, selected_link->uri);
+ 					long_jump_to_destination(page-1, offset_y);
+                 }
              }
-             if ((link_index >= 0) && (link_index < static_cast<int>(visible_page_links.size()))) {
-                 auto [selected_page, selected_link] = visible_page_links[link_index];
--                auto [page, offset_x, offset_y] = parse_uri(selected_link->uri);
-+                auto [page, offset_x, offset_y] = parse_uri(mupdf_context, selected_link->uri);
-                 long_jump_to_destination(page-1, offset_y);
-             }
-         }
-@@ -3223,7 +3223,7 @@ void MainWidget::handle_link_click(const PdfLink& link) {
+@@ -3472,7 +3472,7 @@ void MainWidget::handle_link_click(const PdfLink& link) {
  		return;
  	}
  
@@ -55,7 +55,7 @@ index 9e02e2c6..5bd7ed1f 100644
  	// convert one indexed page to zero indexed page
  	page--;
 diff --git a/pdf_viewer/utils.cpp b/pdf_viewer/utils.cpp
-index be9d2e76..505b7d12 100644
+index a25d18f10..e416737ba 100644
 --- a/pdf_viewer/utils.cpp
 +++ b/pdf_viewer/utils.cpp
 @@ -24,6 +24,8 @@
@@ -87,13 +87,13 @@ index be9d2e76..505b7d12 100644
 -
 -	return { page, offset_x, offset_y };
 +ParsedUri parse_uri(fz_context* mupdf_context, std::string uri) {
-+        fz_link_dest dest = pdf_parse_link_uri(mupdf_context, uri.c_str());
-+        return { dest.loc.page + 1, dest.x, dest.y };
++	fz_link_dest dest = pdf_parse_link_uri(mupdf_context, uri.c_str());
++	return { dest.loc.page + 1, dest.x, dest.y };
  }
  
  char get_symbol(int key, bool is_shift_pressed, const std::vector<char>& special_symbols) {
 diff --git a/pdf_viewer/utils.h b/pdf_viewer/utils.h
-index 919ff6eb..f7934b7f 100644
+index 4d551c35a..aa0d0d61b 100644
 --- a/pdf_viewer/utils.h
 +++ b/pdf_viewer/utils.h
 @@ -33,7 +33,7 @@ void get_flat_toc(const std::vector<TocNode*>& roots, std::vector<std::wstring>&
@@ -105,48 +105,3 @@ index 919ff6eb..f7934b7f 100644
  char get_symbol(int key, bool is_shift_pressed, const std::vector<char>&special_symbols);
  
  template<typename T>
-
-From 5b2488e7cd9a454faf0ff488ba97c11f22805e25 Mon Sep 17 00:00:00 2001
-From: lennonhill <31923882+lennonhill@users.noreply.github.com>
-Date: Tue, 28 Jun 2022 19:18:53 +0200
-Subject: [PATCH 2/2] Upgrade mupdf to 1.20
-
----
- pdf_viewer/document.cpp     | 4 ++--
- pdf_viewer/pdf_renderer.cpp | 2 +-
- 3 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/pdf_viewer/document.cpp b/pdf_viewer/document.cpp
-index f1585ad3..e906594a 100644
---- a/pdf_viewer/document.cpp
-+++ b/pdf_viewer/document.cpp
-@@ -542,14 +542,14 @@ void Document::convert_toc_tree(fz_outline* root, std::vector<TocNode*>& output)
- 		current_node->title = utf8_decode(root->title);
- 		current_node->x = root->x;
- 		current_node->y = root->y;
--		if (root->page == -1) {
-+		if (root->page.page == -1) {
- 			float xp, yp;
- 			fz_location loc = fz_resolve_link(context, doc, root->uri, &xp, &yp);
- 			int chapter_page = accum_chapter_pages[loc.chapter];
- 			current_node->page = chapter_page + loc.page;
- 		}
- 		else {
--			current_node->page = root->page;
-+			current_node->page = root->page.page;
- 		}
- 		convert_toc_tree(root->down, current_node->children);
- 
-diff --git a/pdf_viewer/pdf_renderer.cpp b/pdf_viewer/pdf_renderer.cpp
-index de4c43fc..9adbc998 100644
---- a/pdf_viewer/pdf_renderer.cpp
-+++ b/pdf_viewer/pdf_renderer.cpp
-@@ -315,7 +315,7 @@ void PdfRenderer::run_search(int thread_index)
- 
- 				const int max_hits_per_page = 20;
- 				fz_quad hitboxes[max_hits_per_page];
--				int num_results = fz_search_page(mupdf_context, page, utf8_encode(req.search_term).c_str(), hitboxes, max_hits_per_page);
-+				int num_results = fz_search_page(mupdf_context, page, utf8_encode(req.search_term).c_str(), nullptr, hitboxes, max_hits_per_page);
- 
- 				if (num_results > 0) {
- 					req.search_results_mutex->lock();
diff --git a/srcpkgs/sioyek/patches/7a9e876fb2dcd3c82d619316e1cf8959521d4071.patch b/srcpkgs/sioyek/patches/7a9e876fb2dcd3c82d619316e1cf8959521d4071.patch
new file mode 100644
index 000000000000..653cb132684f
--- /dev/null
+++ b/srcpkgs/sioyek/patches/7a9e876fb2dcd3c82d619316e1cf8959521d4071.patch
@@ -0,0 +1,44 @@
+From 7a9e876fb2dcd3c82d619316e1cf8959521d4071 Mon Sep 17 00:00:00 2001
+From: ahrm <a.hr.mostafavi@gmail.com>
+Date: Mon, 29 Aug 2022 14:57:02 +0430
+Subject: [PATCH] Fix some compatibility issues with mupdf 1.20.0
+
+---
+ pdf_viewer/document.cpp     | 4 ++--
+ pdf_viewer/pdf_renderer.cpp | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/pdf_viewer/document.cpp b/pdf_viewer/document.cpp
+index 083e40244..61375d598 100644
+--- a/pdf_viewer/document.cpp
++++ b/pdf_viewer/document.cpp
+@@ -559,14 +559,14 @@ void Document::convert_toc_tree(fz_outline* root, std::vector<TocNode*>& output)
+ 		current_node->title = utf8_decode(root->title);
+ 		current_node->x = root->x;
+ 		current_node->y = root->y;
+-		if (root->page == -1) {
++		if (root->page.page == -1) {
+ 			float xp, yp;
+ 			fz_location loc = fz_resolve_link(context, doc, root->uri, &xp, &yp);
+ 			int chapter_page = accum_chapter_pages[loc.chapter];
+ 			current_node->page = chapter_page + loc.page;
+ 		}
+ 		else {
+-			current_node->page = root->page;
++			current_node->page = root->page.page;
+ 		}
+ 		convert_toc_tree(root->down, current_node->children);
+ 
+diff --git a/pdf_viewer/pdf_renderer.cpp b/pdf_viewer/pdf_renderer.cpp
+index cc8a89d16..fd17a52c4 100644
+--- a/pdf_viewer/pdf_renderer.cpp
++++ b/pdf_viewer/pdf_renderer.cpp
+@@ -315,7 +315,7 @@ void PdfRenderer::run_search(int thread_index)
+ 
+ 				const int max_hits_per_page = 20;
+ 				fz_quad hitboxes[max_hits_per_page];
+-				int num_results = fz_search_page(mupdf_context, page, utf8_encode(req.search_term).c_str(), hitboxes, max_hits_per_page);
++				int num_results = fz_search_page(mupdf_context, page, utf8_encode(req.search_term).c_str(), nullptr, hitboxes, max_hits_per_page);
+ 
+ 				if (num_results > 0) {
+ 					req.search_results_mutex->lock();
diff --git a/srcpkgs/sioyek/template b/srcpkgs/sioyek/template
index 53349e65d09a..4a0c74c829f2 100644
--- a/srcpkgs/sioyek/template
+++ b/srcpkgs/sioyek/template
@@ -1,20 +1,21 @@
 # Template file for 'sioyek'
 pkgname=sioyek
-version=1.4.0
+version=1.5.0
 revision=1
+archs="i686* x86_64*"
 build_style=qmake
 hostmakedepends="qt5-qmake qt5-host-tools
  qt5-opengl qt5-gui qt5-widgets qt5-network"
 makedepends="zlib-devel qt5-3d-devel qt5-gamepad-devel mupdf-devel
- gumbo-parser-devel harfbuzz-devel qt5-opengl mujs-devel"
+ gumbo-parser-devel harfbuzz-devel qt5-opengl mujs-devel freetype-devel
+ libjbig2dec libjpeg-turbo-devel libopenjpeg2-devel"
 depends="mupdf"
 short_desc="PDF viewer designed for reading research papers and technical books"
 maintainer="dkwo <npiazza@disroot.org>"
 license="GPL-3.0-or-later"
 homepage="https://sioyek.info/"
 distfiles="https://github.com/ahrm/sioyek/archive/refs/tags/v${version}.tar.gz"
-checksum=44d49aec28e49bb79c2d0fb7cefd26aecc53b60136bf02dfec9863ac586aacd0
-nocross="fails to configure"
+checksum=2d01c757953c3f2d98428376e642d13b8a9edeba8fee506477e8aa178756f16b
 
 do_build() {
 	qmake pdf_viewer_build_config.pro

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: zathura-pdf-mupdf: update to 0.3.9.
  2022-10-23 19:33 [PR PATCH] zathura-pdf-mupdf: update to 0.3.9 icp1994
                   ` (12 preceding siblings ...)
  2022-11-03 18:45 ` [PR PATCH] [Updated] " icp1994
@ 2022-11-03 22:01 ` dkwo
  2022-11-08 20:41 ` [PR PATCH] [Merged]: " leahneukirchen
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: dkwo @ 2022-11-03 22:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 173 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/40131#issuecomment-1302723899

Comment:
sioyek works for me on x86_64-musl

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR PATCH] [Merged]: zathura-pdf-mupdf: update to 0.3.9.
  2022-10-23 19:33 [PR PATCH] zathura-pdf-mupdf: update to 0.3.9 icp1994
                   ` (13 preceding siblings ...)
  2022-11-03 22:01 ` dkwo
@ 2022-11-08 20:41 ` leahneukirchen
  2022-11-11  3:41 ` [PR REVIEW] " q66
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: leahneukirchen @ 2022-11-08 20:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 551 bytes --]

There's a merged pull request on the void-packages repository

zathura-pdf-mupdf: update to 0.3.9.
https://github.com/void-linux/void-packages/pull/40131

Description:
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64

This PR contains quite a few changes to get around issues discussed in https://github.com/void-linux/void-packages/issues/35634. It works in my system but if someone could test it in musl (cc @dkwo) that would be useful.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR REVIEW] zathura-pdf-mupdf: update to 0.3.9.
  2022-10-23 19:33 [PR PATCH] zathura-pdf-mupdf: update to 0.3.9 icp1994
                   ` (14 preceding siblings ...)
  2022-11-08 20:41 ` [PR PATCH] [Merged]: " leahneukirchen
@ 2022-11-11  3:41 ` q66
  2022-11-11  3:46 ` q66
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: q66 @ 2022-11-11  3:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 206 bytes --]

New review comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/40131#discussion_r1019803251

Comment:
what? yes it does, the switch from nocross is absolutely wrong

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: zathura-pdf-mupdf: update to 0.3.9.
  2022-10-23 19:33 [PR PATCH] zathura-pdf-mupdf: update to 0.3.9 icp1994
                   ` (15 preceding siblings ...)
  2022-11-11  3:41 ` [PR REVIEW] " q66
@ 2022-11-11  3:46 ` q66
  2022-11-11 15:34 ` [PR REVIEW] " dkwo
  2022-11-11 15:38 ` dkwo
  18 siblings, 0 replies; 20+ messages in thread
From: q66 @ 2022-11-11  3:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 398 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/40131#issuecomment-1311194983

Comment:
```
index: added `sioyek-1.5.0_1' (ppc64le).
index: added `sioyek-1.5.0_1' (ppc64le-musl).
index: added `sioyek-1.5.0_1' (ppc64).
index: added `sioyek-1.5.0_1' (ppc).
```

so what's up with the `archs=` and why did that just get merged like it's nothing

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PR REVIEW] zathura-pdf-mupdf: update to 0.3.9.
  2022-10-23 19:33 [PR PATCH] zathura-pdf-mupdf: update to 0.3.9 icp1994
                   ` (16 preceding siblings ...)
  2022-11-11  3:46 ` q66
@ 2022-11-11 15:34 ` dkwo
  2022-11-11 15:38 ` dkwo
  18 siblings, 0 replies; 20+ messages in thread
From: dkwo @ 2022-11-11 15:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 287 bytes --]

New review comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/40131#discussion_r1020326621

Comment:
I tried to build natively on aarch64 and it failed.
I think this is true at least also for arm*.
I assumed it would also fail for all others

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: zathura-pdf-mupdf: update to 0.3.9.
  2022-10-23 19:33 [PR PATCH] zathura-pdf-mupdf: update to 0.3.9 icp1994
                   ` (17 preceding siblings ...)
  2022-11-11 15:34 ` [PR REVIEW] " dkwo
@ 2022-11-11 15:38 ` dkwo
  18 siblings, 0 replies; 20+ messages in thread
From: dkwo @ 2022-11-11 15:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 243 bytes --]

New comment by dkwo on void-packages repository

https://github.com/void-linux/void-packages/pull/40131#issuecomment-1311845086

Comment:
I have a pr for sioyek, can we discuss it there https://github.com/void-linux/void-packages/pull/40460 ?

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2022-11-11 15:38 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-23 19:33 [PR PATCH] zathura-pdf-mupdf: update to 0.3.9 icp1994
2022-10-24  6:01 ` [PR PATCH] [Updated] " icp1994
2022-10-24 19:04 ` dkwo
2022-10-24 19:04 ` dkwo
2022-10-31 18:37 ` dkwo
2022-11-03  6:59 ` kruceter
2022-11-03 14:16 ` leahneukirchen
2022-11-03 15:47 ` dkwo
2022-11-03 17:28 ` [PR PATCH] [Updated] " icp1994
2022-11-03 17:40 ` icp1994
2022-11-03 18:02 ` [PR REVIEW] " dkwo
2022-11-03 18:03 ` dkwo
2022-11-03 18:03 ` [PR REVIEW] " dkwo
2022-11-03 18:45 ` [PR PATCH] [Updated] " icp1994
2022-11-03 22:01 ` dkwo
2022-11-08 20:41 ` [PR PATCH] [Merged]: " leahneukirchen
2022-11-11  3:41 ` [PR REVIEW] " q66
2022-11-11  3:46 ` q66
2022-11-11 15:34 ` [PR REVIEW] " dkwo
2022-11-11 15:38 ` dkwo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).