groff: Fix cross-compilation

Fixup the patch from 4f3c8178b8e5eef920c31b030cd89591deb2417d so it
applies to the current groff.

The patch was removed, but cross-compilation not validated, in #70500.

+50
+46
pkgs/tools/text/groff/0001-Fix-cross-compilation-by-looking-for-ar.patch
··· 1 + From 1454525f70b43a6957b7c9e1870e997368787da3 Mon Sep 17 00:00:00 2001 2 + From: Samuel Dionne-Riel <samuel@dionne-riel.com> 3 + Date: Fri, 8 Nov 2019 21:59:21 -0500 4 + Subject: [PATCH] Fix cross-compilation by looking for `ar`. 5 + 6 + --- 7 + Makefile.am | 2 +- 8 + configure.ac | 2 ++ 9 + 2 files changed, 3 insertions(+), 1 deletion(-) 10 + 11 + diff --git a/Makefile.am b/Makefile.am 12 + index d18c49b8..b1b53338 100644 13 + --- a/Makefile.am 14 + +++ b/Makefile.am 15 + @@ -494,7 +494,7 @@ CCC=@CXX@ 16 + # INSTALL_INFO 17 + # LN_S 18 + 19 + -AR=ar 20 + +AR=@AR@ 21 + ETAGS=etags 22 + ETAGSFLAGS= 23 + # Flag that tells etags to assume C++. 24 + diff --git a/configure.ac b/configure.ac 25 + index 28e75f17..2449b9f5 100644 26 + --- a/configure.ac 27 + +++ b/configure.ac 28 + @@ -37,6 +37,7 @@ AC_CONFIG_AUX_DIR([build-aux]) 29 + 30 + AC_CONFIG_HEADERS([src/include/config.h:src/include/config.hin]) 31 + AC_CONFIG_SRCDIR([src/roff/groff/groff.cpp]) 32 + +AC_CONFIG_MACRO_DIR([m4]) 33 + 34 + AC_USE_SYSTEM_EXTENSIONS 35 + 36 + @@ -72,6 +73,7 @@ GROFF_DOC_CHECK 37 + GROFF_MAKEINFO 38 + GROFF_TEXI2DVI 39 + AC_PROG_RANLIB 40 + +AC_CHECK_TOOL([AR], [ar], [ar]) 41 + GROFF_INSTALL_SH 42 + GROFF_INSTALL_INFO 43 + AC_PROG_INSTALL 44 + -- 45 + 2.23.0 46 +
+4
pkgs/tools/text/groff/default.nix
··· 20 20 21 21 enableParallelBuilding = false; 22 22 23 + patches = [ 24 + ./0001-Fix-cross-compilation-by-looking-for-ar.patch 25 + ]; 26 + 23 27 postPatch = stdenv.lib.optionalString (psutils != null) '' 24 28 substituteInPlace src/preproc/html/pre-html.cpp \ 25 29 --replace "psselect" "${psutils}/bin/psselect"