Github messages for voidlinux
 help / color / mirror / Atom feed
From: mhmdanas <mhmdanas@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] mupdf: update to 1.23.4.
Date: Sat, 11 Nov 2023 13:02:04 +0100	[thread overview]
Message-ID: <20231111120204.LGkAj2WjNrCPrDGyw4Ncn5oO8cJlRLSt8Skl7VXnsI8@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-46857@inbox.vuxu.org>

[-- 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

  parent reply	other threads:[~2023-11-11 12:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-23 16:34 [PR PATCH] " 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
2023-10-31 23:37 ` [PR PATCH] [Updated] " mhmdanas
2023-10-31 23:38 ` [PR REVIEW] " mhmdanas
2023-11-01 15:39 ` dkwo
2023-11-02  8:18 ` mhmdanas
2023-11-02 20:47 ` [PR PATCH] [Updated] " classabbyamp
2023-11-11 12:02 ` mhmdanas [this message]
2023-11-13  5:53 ` [PR PATCH] [Merged]: " classabbyamp
2023-11-16  3:12 ` benjcal
2023-11-16 19:01 ` Zapeth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231111120204.LGkAj2WjNrCPrDGyw4Ncn5oO8cJlRLSt8Skl7VXnsI8@z \
    --to=mhmdanas@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).