lua5.2/cross: Fix build for Darwin.

The ld from cctools doesn't like the -soname argument, so let's strip it
off for now until we have a binutils <-> cctools bridge.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
aszlig 2014-03-10 22:17:04 +01:00
parent 3940b21988
commit 745c477930
No known key found for this signature in database
GPG key ID: D0EBD0EC8C2DC961

View file

@ -49,6 +49,30 @@ stdenv.mkDerivation rec {
EOF
'';
crossAttrs = let
isDarwin = stdenv.cross.libc == "libSystem";
in {
configurePhase = ''
makeFlagsArray=(
INSTALL_TOP=$out
INSTALL_MAN=$out/share/man/man1
CC=${stdenv.cross.config}-gcc
STRIP=:
RANLIB=${stdenv.cross.config}-ranlib
V=${majorVersion}
R=${version}
${stdenv.lib.optionalString isDarwin ''
AR="${stdenv.cross.config}-ar rcu"
macosx
''}
)
'';
} // stdenv.lib.optionalAttrs isDarwin {
postPatch = ''
sed -i -e 's/-Wl,-soname[^ ]* *//' src/Makefile
'';
};
meta = {
homepage = "http://www.lua.org";
description = "Powerful, fast, lightweight, embeddable scripting language";