Merge pull request #129686 from Mindavi/jxrlib/cross

jxrlib; support cross-compilation
This commit is contained in:
Sandro 2021-07-09 03:00:16 +02:00 committed by GitHub
commit 79b7bd36a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,7 +13,10 @@ stdenv.mkDerivation rec {
sha256 = "0rk3hbh00nw0wgbfbqk1szrlfg3yq7w6ar16napww3nrlm9cj65w";
};
postPatch = lib.optionalString stdenv.isDarwin ''
postPatch = ''
substituteInPlace Makefile \
--replace "cc" "$CC"
'' + lib.optionalString stdenv.isDarwin ''
substituteInPlace Makefile \
--replace '-shared' '-dynamiclib -undefined dynamic_lookup' \
--replace '.so' '.dylib'