mupdf: Unbreak build on Darwin

Recent changes (ea5dd0974d) dropped a
patch Darwin needed. I've added a new unconditional patch, because it
doesn't affect Linux and this way it's more obvious when the patch needs
updating.

I decided to add the `xcbuild` dependency because the upstream
build uses `xcrun` and I don't know of a good reason not to.
This commit is contained in:
toonn 2022-03-09 13:24:16 +01:00
parent 9eb2001217
commit a149e9b220
No known key found for this signature in database
GPG Key ID: 44FF902A66DF4576

View File

@ -21,6 +21,7 @@
, enableGL ? true
, freeglut
, libGLU
, xcbuild
}:
let
@ -39,7 +40,9 @@ stdenv.mkDerivation rec {
sha256 = "1vfyhlqq1a0k0drcggly4bgsjasmf6lmpfbdi5xcrwdbzkagrbr1";
};
patches = ./0001-Use-command-v-in-favor-of-which.patch;
patches = [ ./0001-Use-command-v-in-favor-of-which.patch
./0002-Add-Darwin-deps.patch
];
postPatch = ''
sed -i "s/__OPENJPEG__VERSION__/${openJpegVersion}/" source/fitz/load-jpx.c
@ -54,6 +57,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkg-config ];
buildInputs = [ freetype harfbuzz openjpeg jbig2dec libjpeg gumbo ]
++ lib.optional stdenv.isDarwin xcbuild
++ lib.optionals enableX11 [ libX11 libXext libXi libXrandr ]
++ lib.optionals enableCurl [ curl openssl ]
++ lib.optionals enableGL (