From 5b77ad2cf8bbac49c3ad5425b98045c9915aa6b1 Mon Sep 17 00:00:00 2001 From: LilyWangLL <494550702@qq.com> Date: Fri, 3 Jan 2025 01:24:03 -0800 Subject: [PATCH 1/2] [libmupdf] Update to 1.25.2 and fix build error C2099 --- ports/libmupdf/fix-NAN-on-Win11.patch | 22 ++++++++++++++++++++++ ports/libmupdf/portfile.cmake | 3 ++- ports/libmupdf/vcpkg.json | 2 +- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 ports/libmupdf/fix-NAN-on-Win11.patch diff --git a/ports/libmupdf/fix-NAN-on-Win11.patch b/ports/libmupdf/fix-NAN-on-Win11.patch new file mode 100644 index 00000000000000..399aee25d74e1a --- /dev/null +++ b/ports/libmupdf/fix-NAN-on-Win11.patch @@ -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) diff --git a/ports/libmupdf/portfile.cmake b/ports/libmupdf/portfile.cmake index 7f853711ee0e86..fd5d31a8a9bf04 100644 --- a/ports/libmupdf/portfile.cmake +++ b/ports/libmupdf/portfile.cmake @@ -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}") diff --git a/ports/libmupdf/vcpkg.json b/ports/libmupdf/vcpkg.json index df7b99e7980c3a..236631d9f758e4 100644 --- a/ports/libmupdf/vcpkg.json +++ b/ports/libmupdf/vcpkg.json @@ -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", From 69a9b898f093be4057d0a4e2df68301b00a14505 Mon Sep 17 00:00:00 2001 From: LilyWangLL <494550702@qq.com> Date: Fri, 3 Jan 2025 01:26:03 -0800 Subject: [PATCH 2/2] update version --- versions/baseline.json | 2 +- versions/l-/libmupdf.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index 99aa2f6c86ab25..b470d20036d80a 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4857,7 +4857,7 @@ "port-version": 0 }, "libmupdf": { - "baseline": "1.24.11", + "baseline": "1.25.2", "port-version": 0 }, "libmysofa": { diff --git a/versions/l-/libmupdf.json b/versions/l-/libmupdf.json index b4a9642ac1e8a9..0fc52213d01196 100644 --- a/versions/l-/libmupdf.json +++ b/versions/l-/libmupdf.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "defca87fb5e4293272118094c10f9825a924e84e", + "version": "1.25.2", + "port-version": 0 + }, { "git-tree": "f76ab7716730acd4fdfdc16d23a19099fed8bc2a", "version": "1.24.11",