groff: Fix cross-compilation

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

The patch was removed, but cross-compilation not validated, in #70500.
This commit is contained in:
Samuel Dionne-Riel 2019-11-08 22:00:35 -05:00
parent afa48f16f2
commit 313cef8685
2 changed files with 50 additions and 0 deletions

View file

@ -0,0 +1,46 @@
From 1454525f70b43a6957b7c9e1870e997368787da3 Mon Sep 17 00:00:00 2001
From: Samuel Dionne-Riel <samuel@dionne-riel.com>
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

View file

@ -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"