Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libmupdf] Update to 1.25.2 and fix build error C2099 #43078

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions ports/libmupdf/fix-NAN-on-Win11.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/source/fitz/geometry.c b/source/fitz/geometry.c
index 473d1dc..b02ab39 100644
--- a/source/fitz/geometry.c
+++ b/source/fitz/geometry.c
@@ -29,6 +29,8 @@
#define MAX4(a,b,c,d) fz_max(fz_max(a,b), fz_max(c,d))
#define MIN4(a,b,c,d) fz_min(fz_min(a,b), fz_min(c,d))

+#define MY_NAN (0.0 / 0.0)
+
/* A useful macro to add with overflow detection and clamping.

We want to do "b = a + x", but to allow for overflow. Consider the
@@ -388,7 +390,7 @@ const fz_irect fz_invalid_irect = { 0, 0, -1, -1 };
const fz_irect fz_unit_bbox = { 0, 0, 1, 1 };

const fz_quad fz_infinite_quad = { { -INFINITY, INFINITY}, {INFINITY, INFINITY}, {-INFINITY, -INFINITY}, {INFINITY, -INFINITY} };
-const fz_quad fz_invalid_quad = { {NAN, NAN}, {NAN, NAN}, {NAN, NAN}, {NAN, NAN} };
+const fz_quad fz_invalid_quad = { {MY_NAN, MY_NAN}, {MY_NAN, MY_NAN}, {MY_NAN, MY_NAN}, {MY_NAN, MY_NAN} };

fz_irect
fz_irect_from_rect(fz_rect r)
3 changes: 2 additions & 1 deletion ports/libmupdf/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ArtifexSoftware/mupdf
REF "${VERSION}"
SHA512 d8b6d643b12c9cdf91bf292c8d43a0086eb614a87344d12bbac04e74fc5a333dc699cd37c7715e73f2bee00a233e9b80a1942b879a51275aa865aa12c6fa6b0d
SHA512 6d053b140a34061fcf5eb30f23f87e51dd8e80be29a3e505c42312c11198491102a79c2ca290f13971d25b9a286354ad44bd825593c076373c18f58bbc7b950e
HEAD_REF master
PATCHES
dont-generate-extract-3rd-party-things.patch
fix-NAN-on-Win11.patch # https://github.com/ArtifexSoftware/mupdf/pull/54
)

file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
Expand Down
2 changes: 1 addition & 1 deletion ports/libmupdf/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "libmupdf",
"version": "1.24.11",
"version": "1.25.2",
"description": "a lightweight PDF, XPS, and E-book library",
"homepage": "https://github.com/ArtifexSoftware/mupdf",
"license": "AGPL-3.0-only",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4857,7 +4857,7 @@
"port-version": 0
},
"libmupdf": {
"baseline": "1.24.11",
"baseline": "1.25.2",
"port-version": 0
},
"libmysofa": {
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libmupdf.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "defca87fb5e4293272118094c10f9825a924e84e",
"version": "1.25.2",
"port-version": 0
},
{
"git-tree": "f76ab7716730acd4fdfdc16d23a19099fed8bc2a",
"version": "1.24.11",
Expand Down