freeimage: support cross-compilation
Co-authored-by: Doron Behar <doron.behar@gmail.com>
This commit is contained in:
parent
c8cd39a4ca
commit
4f4ab52f4f
1 changed files with 8 additions and 0 deletions
|
@ -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 [
|
||||
|
|
Loading…
Reference in a new issue