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

This commit is contained in:
Lily Wang 2025-01-07 08:58:50 -08:00 committed by GitHub
parent 0a9c22e4bd
commit 8944dd3987
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 31 additions and 3 deletions

View File

@ -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)

View File

@ -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}")

View File

@ -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",

View File

@ -4861,7 +4861,7 @@
"port-version": 0
},
"libmupdf": {
"baseline": "1.24.11",
"baseline": "1.25.2",
"port-version": 0
},
"libmysofa": {

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "defca87fb5e4293272118094c10f9825a924e84e",
"version": "1.25.2",
"port-version": 0
},
{
"git-tree": "f76ab7716730acd4fdfdc16d23a19099fed8bc2a",
"version": "1.24.11",