coreutils: Fix cross build

`make install` was failing presumably due to an upstream cross-compilation bug:

Makefile:3440: *** Recursive variable 'INSTALL' references itself (eventually).  Stop.

While at it, remove the old ugly cross buildPhase. It was seemingly
trying to work around the fact that the man pages are generated by
piping each command's --help output to help2man. That obviously doesn't
work while cross-compiling.

Instead, set PERL=missing in the environment to make the build system
think there's no perl available to run help2man. (This approach was
stolen from buildroot.)
This commit is contained in:
Tuomas Tynkkynen 2016-12-24 22:27:52 +02:00
parent c38b4da994
commit 30074ddfea

View File

@ -54,13 +54,13 @@ let
++ optional (stdenv.ccCross.libc ? libiconv)
stdenv.ccCross.libc.libiconv.crossDrv;
buildPhase = ''
make || (
pushd man
for a in *.x; do
touch `basename $a .x`.1
done
popd; make )
# Prevents attempts of running 'help2man' on cross-built binaries.
PERL = "missing";
# Works around a bug with 8.26:
# Makefile:3440: *** Recursive variable 'INSTALL' references itself (eventually). Stop.
preInstall = ''
sed -i Makefile -e 's|^INSTALL =.*|INSTALL = ${self}/bin/install -c|'
'';
postInstall = ''