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