From 313cef8685ab5e78635b0aaedc3271584cfed418 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Fri, 8 Nov 2019 22:00:35 -0500 Subject: 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. --- ...1-Fix-cross-compilation-by-looking-for-ar.patch | 46 ++++++++++++++++++++++ pkgs/tools/text/groff/default.nix | 4 ++ 2 files changed, 50 insertions(+) create mode 100644 pkgs/tools/text/groff/0001-Fix-cross-compilation-by-looking-for-ar.patch diff --git a/pkgs/tools/text/groff/0001-Fix-cross-compilation-by-looking-for-ar.patch b/pkgs/tools/text/groff/0001-Fix-cross-compilation-by-looking-for-ar.patch new file mode 100644 index 000000000000..671293cda5b1 --- /dev/null +++ b/pkgs/tools/text/groff/0001-Fix-cross-compilation-by-looking-for-ar.patch @@ -0,0 +1,46 @@ +From 1454525f70b43a6957b7c9e1870e997368787da3 Mon Sep 17 00:00:00 2001 +From: Samuel Dionne-Riel +Date: Fri, 8 Nov 2019 21:59:21 -0500 +Subject: [PATCH] Fix cross-compilation by looking for `ar`. + +--- + Makefile.am | 2 +- + configure.ac | 2 ++ + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index d18c49b8..b1b53338 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -494,7 +494,7 @@ CCC=@CXX@ + # INSTALL_INFO + # LN_S + +-AR=ar ++AR=@AR@ + ETAGS=etags + ETAGSFLAGS= + # Flag that tells etags to assume C++. +diff --git a/configure.ac b/configure.ac +index 28e75f17..2449b9f5 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -37,6 +37,7 @@ AC_CONFIG_AUX_DIR([build-aux]) + + AC_CONFIG_HEADERS([src/include/config.h:src/include/config.hin]) + AC_CONFIG_SRCDIR([src/roff/groff/groff.cpp]) ++AC_CONFIG_MACRO_DIR([m4]) + + AC_USE_SYSTEM_EXTENSIONS + +@@ -72,6 +73,7 @@ GROFF_DOC_CHECK + GROFF_MAKEINFO + GROFF_TEXI2DVI + AC_PROG_RANLIB ++AC_CHECK_TOOL([AR], [ar], [ar]) + GROFF_INSTALL_SH + GROFF_INSTALL_INFO + AC_PROG_INSTALL +-- +2.23.0 + diff --git a/pkgs/tools/text/groff/default.nix b/pkgs/tools/text/groff/default.nix index 4055c5c083d6..ec7e724d1fc3 100644 --- a/pkgs/tools/text/groff/default.nix +++ b/pkgs/tools/text/groff/default.nix @@ -20,6 +20,10 @@ stdenv.mkDerivation rec { enableParallelBuilding = false; + patches = [ + ./0001-Fix-cross-compilation-by-looking-for-ar.patch + ]; + postPatch = stdenv.lib.optionalString (psutils != null) '' substituteInPlace src/preproc/html/pre-html.cpp \ --replace "psselect" "${psutils}/bin/psselect" -- cgit 1.4.1