From 93368ac469925dba433c8e6a3b1772c5547f744f Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Sun, 8 Dec 2024 15:32:09 +0100 Subject: [PATCH] ghostscript: fix cross for armv7l ... and possibly others. --- pkgs/by-name/gh/ghostscript/package.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/by-name/gh/ghostscript/package.nix b/pkgs/by-name/gh/ghostscript/package.nix index c9557858a161..8fcf1e041dc7 100644 --- a/pkgs/by-name/gh/ghostscript/package.nix +++ b/pkgs/by-name/gh/ghostscript/package.nix @@ -105,6 +105,14 @@ stdenv.mkDerivation rec { sed "s@if ( test -f \$(INCLUDE)[^ ]* )@if ( true )@; s@INCLUDE=/usr/include@INCLUDE=/no-such-path@" -i base/unix-aux.mak sed "s@^ZLIBDIR=.*@ZLIBDIR=${zlib.dev}/include@" -i configure.ac + # Sidestep a bug in autoconf-2.69 that sets the compiler for all checks to + # $CXX after the part for the vendored copy of tesseract. + # `--without-tesseract` is already passed to the outer ./configure, here we + # make sure it is also passed to its recursive invocation for buildPlatform + # checks when cross-compiling. + substituteInPlace configure.ac \ + --replace-fail "--without-x" "--without-x --without-tesseract" + autoconf '';