coreutils: fixing cross-build

coreutils can't generate the man pages cross-building. I do a trick
to get them from a non-cross-built coreutils.
This commit is contained in:
Lluís Batlle i Rossell 2013-04-10 15:54:12 +02:00
parent d8f98d1a85
commit 91a94932d9

View File

@ -6,7 +6,8 @@
assert aclSupport -> acl != null; assert aclSupport -> acl != null;
assert selinuxSupport -> libselinux != null && libsepol != null; assert selinuxSupport -> libselinux != null && libsepol != null;
stdenv.mkDerivation rec { let
self = stdenv.mkDerivation rec {
name = "coreutils-8.21"; name = "coreutils-8.21";
src = fetchurl { src = fetchurl {
@ -28,6 +29,20 @@ stdenv.mkDerivation rec {
++ stdenv.lib.optional (stdenv.gccCross.libc ? libiconv) ++ stdenv.lib.optional (stdenv.gccCross.libc ? libiconv)
stdenv.gccCross.libc.libiconv.crossDrv; stdenv.gccCross.libc.libiconv.crossDrv;
buildPhase = ''
make || (
pushd man
for a in *.x; do
touch `basename $a .x`.1
done
popd; make )
'';
postInstall = ''
rm $out/share/man/man1/*
cp ${self}/share/man/man1/* $out/share/man/man1
'';
# Needed for fstatfs() # Needed for fstatfs()
# I don't know why it is not properly detected cross building with glibc. # I don't know why it is not properly detected cross building with glibc.
configureFlags = [ "fu_cv_sys_stat_statfs2_bsize=yes" ]; configureFlags = [ "fu_cv_sys_stat_statfs2_bsize=yes" ];
@ -59,4 +74,6 @@ stdenv.mkDerivation rec {
maintainers = [ stdenv.lib.maintainers.ludo ]; maintainers = [ stdenv.lib.maintainers.ludo ];
}; };
} };
in
self