Merge pull request #178352 from lopsided98/texinfo-build-ref
texinfo: fix build references when cross-compiling
This commit is contained in:
@@ -36,8 +36,7 @@ stdenv.mkDerivation {
|
||||
strictDeps = true;
|
||||
enableParallelBuilding = true;
|
||||
|
||||
# We need a native compiler to build perl XS extensions
|
||||
# when cross-compiling.
|
||||
# A native compiler is needed to build tools needed at build time
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc perl ];
|
||||
|
||||
buildInputs = [ xz.bin bash libintl ]
|
||||
@@ -45,6 +44,9 @@ stdenv.mkDerivation {
|
||||
++ optional interactive ncurses;
|
||||
|
||||
configureFlags = [ "PERL=${buildPackages.perl}/bin/perl" ]
|
||||
# Perl XS modules are difficult to cross-compile and texinfo has pure Perl
|
||||
# fallbacks.
|
||||
++ optional crossBuildTools "--enable-perl-xs=no"
|
||||
++ lib.optional stdenv.isSunOS "AWK=${gawk}/bin/awk";
|
||||
|
||||
installFlags = [ "TEXMF=$(out)/texmf-dist" ];
|
||||
@@ -62,6 +64,13 @@ stdenv.mkDerivation {
|
||||
"XFAIL_TESTS=test_scripts/layout_formatting_fr_icons.sh"
|
||||
];
|
||||
|
||||
postFixup = optionalString crossBuildTools ''
|
||||
for f in "$out"/bin/{pod2texi,texi2any}; do
|
||||
substituteInPlace "$f" \
|
||||
--replace ${buildPackages.perl}/bin/perl ${perl}/bin/perl
|
||||
done
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://www.gnu.org/software/texinfo/";
|
||||
description = "The GNU documentation system";
|
||||
|
||||
@@ -23251,7 +23251,7 @@ with pkgs;
|
||||
|
||||
# latest 6.8 mysteriously fails to parse '@headings single':
|
||||
# https://lists.gnu.org/archive/html/bug-texinfo/2021-09/msg00011.html
|
||||
texinfo = texinfo6_7;
|
||||
texinfo = buildPackages.texinfo6_7;
|
||||
};
|
||||
|
||||
gpm-ncurses = gpm.override { inherit ncurses; };
|
||||
|
||||
Reference in New Issue
Block a user