summary refs log tree commit diff
path: root/pkgs/tools/text
diff options
context:
space:
mode:
authorSamuel Dionne-Riel <samuel@dionne-riel.com>2019-11-08 22:00:35 -0500
committerSamuel Dionne-Riel <samuel@dionne-riel.com>2019-11-08 22:05:49 -0500
commit313cef8685ab5e78635b0aaedc3271584cfed418 (patch)
tree9b9dab8ecaf3d6a2b3db1d5c6a85a778cce22fee /pkgs/tools/text
parentafa48f16f265fd3e88073bca7929e1e103bd3dc3 (diff)
downloadnixpkgs-313cef8685ab5e78635b0aaedc3271584cfed418.tar
nixpkgs-313cef8685ab5e78635b0aaedc3271584cfed418.tar.gz
nixpkgs-313cef8685ab5e78635b0aaedc3271584cfed418.tar.bz2
nixpkgs-313cef8685ab5e78635b0aaedc3271584cfed418.tar.lz
nixpkgs-313cef8685ab5e78635b0aaedc3271584cfed418.tar.xz
nixpkgs-313cef8685ab5e78635b0aaedc3271584cfed418.tar.zst
nixpkgs-313cef8685ab5e78635b0aaedc3271584cfed418.zip
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.
Diffstat (limited to 'pkgs/tools/text')
-rw-r--r--pkgs/tools/text/groff/0001-Fix-cross-compilation-by-looking-for-ar.patch46
-rw-r--r--pkgs/tools/text/groff/default.nix4
2 files changed, 50 insertions, 0 deletions
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 00000000000..671293cda5b
--- /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 <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
+
diff --git a/pkgs/tools/text/groff/default.nix b/pkgs/tools/text/groff/default.nix
index 4055c5c083d..ec7e724d1fc 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"