mupdf: fix build with enableCxx against Clang >= 20 (#449180)

This commit is contained in:
Franz Pletz
2025-10-07 04:40:07 +00:00
committed by GitHub
2 changed files with 15 additions and 0 deletions
+14
View File
@@ -3,6 +3,7 @@
lib,
fetchurl,
fetchFromGitHub,
fetchpatch,
copyDesktopItems,
makeDesktopItem,
desktopToDarwinBundle,
@@ -85,6 +86,19 @@ stdenv.mkDerivation rec {
# Upstream C++ wrap script only defines fixed-sized integers on macOS but
# this is required on aarch64-linux too.
./fix-cpp-build.patch
]
# fix compatibility with Clang >= 20
++ lib.optionals enableCxx [
(fetchpatch {
name = "scripts-wrap-parse.py-get_args-improve-caching-of-re.patch";
url = "https://github.com/ArtifexSoftware/mupdf/commit/559e45ac8c134712cd8eaee01536ea3841e3a449.patch";
hash = "sha256-gI3hzrNo6jj9eqQ9E/BJ3jxXi/sl1C5WRyYlkG3Gkfg=";
})
(fetchpatch {
name = "scripts-wrap-parse.py-get_args-fix-for-libclang-20.patch";
url = "https://github.com/ArtifexSoftware/mupdf/commit/4bbf411898341d3ba30f521a6c137a788793cd45.patch";
hash = "sha256-cxKNziAGjpDwEw/9ZQHslMeJbiqYo80899BDkUOIX8g=";
})
];
postPatch = ''
@@ -122,6 +122,7 @@ buildPythonPackage rec {
# Requires downloads
"test_4457"
"test_4445"
"test_4533"
# Not a git repository, so git ls-files fails
"test_open2"
];