Merge pull request #136870 from Mindavi/freeimage/cross

freeimage: support cross-compilation
This commit is contained in:
Domen Kožar 2021-09-06 12:43:24 +02:00 committed by GitHub
commit a93bc8e009
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,6 +18,14 @@ stdenv.mkDerivation {
prePatch = "rm -rf Source/Lib* Source/OpenEXR Source/ZLib";
patches = [ ./unbundle.diff ];
postPatch = ''
# To support cross compilation, use the correct `pkg-config`.
substituteInPlace Makefile.fip \
--replace "pkg-config" "$PKG_CONFIG"
substituteInPlace Makefile.gnu \
--replace "pkg-config" "$PKG_CONFIG"
'';
nativeBuildInputs = [
pkg-config
] ++ lib.optionals stdenv.isDarwin [