[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
16/31: gnu: groff: Fix cross compilation.
From: |
guix-commits |
Subject: |
16/31: gnu: groff: Fix cross compilation. |
Date: |
Mon, 8 Jul 2019 05:43:40 -0400 (EDT) |
mothacehe pushed a commit to branch wip-cross-system
in repository guix.
commit 74aeebb866cafead1975e55d4c48ffe586ddb95a
Author: Mathieu Othacehe <address@hidden>
Date: Wed Mar 6 10:33:29 2019 +0100
gnu: groff: Fix cross compilation.
* gnu/packages/groff.scm (groff)[arguments]: Replace build phase to pass
GROFF_BIN_PATH and GROFFBIN variables when cross-compiling.
Also add native groff as a native-input when cross-compiling.
---
gnu/packages/groff.scm | 40 +++++++++++++++++++++++++++++++++++++---
1 file changed, 37 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/groff.scm b/gnu/packages/groff.scm
index cf392f5..27f796e 100644
--- a/gnu/packages/groff.scm
+++ b/gnu/packages/groff.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2014 Mark H Weaver <address@hidden>
;;; Copyright © 2016 Ricardo Wurmus <address@hidden>
;;; Copyright © 2017 Ludovic Courtès <address@hidden>
+;;; Copyright © 2019 Mathieu Othacehe <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -54,7 +55,13 @@
;; from 'inputs'.
(inputs `(("ghostscript" ,ghostscript)))
- (native-inputs `(("bison" ,bison)
+
+ ;; When cross-compiling, this package depends upon a native install of
+ ;; itself.
+ (native-inputs `(,@(if (%current-target-system)
+ `(("self" ,this-package))
+ '())
+ ("bison" ,bison)
("perl" ,perl)
("psutils" ,psutils)
("texinfo" ,texinfo)))
@@ -65,7 +72,33 @@
(add-after 'unpack 'setenv
(lambda _
(setenv "GS_GENERATE_UUIDS" "0")
- #t)))))
+ #t))
+ ,@(if (%current-target-system)
+ '((replace 'build
+ (lambda* (#:key
+ make-flags parallel-build?
+ native-inputs target #:allow-other-keys)
+ ;; When cross-compiling, native groff is needed, see:
+ ;;
http://www.mail-archive.com/address@hidden/msg01335.html
+ (let ((parallel
+ (if parallel-build?
+ `("-j" ,(number->string (parallel-job-count)))
+ '()))
+ (flags
+ (if target
+ (let ((groff (or
+ (assoc-ref native-inputs "groff")
+ (assoc-ref native-inputs
"self"))))
+ (append
+ make-flags
+ (list
+ (string-append "GROFF_BIN_PATH=" groff)
+ (string-append "GROFFBIN=" groff
+ "/bin/groff"))))
+ make-flags)))
+ (apply invoke `("make" ,@parallel ,@flags)))
+ #t)))
+ '()))))
(synopsis "Typesetting from plain text mixed with formatting commands")
(description
"Groff is a typesetting package that reads plain text and produces
@@ -86,7 +119,8 @@ is usually the formatter of \"man\" documentation pages.")
;; Omit the DVI, PS, PDF, and HTML backends.
(inputs '())
(native-inputs `(("bison" ,bison)
- ("perl" ,perl)))
+ ("perl" ,perl)
+ ("groff" ,groff)))
(arguments
`(#:disallowed-references (,perl)
- 10/31: gnu: openssl: Fix cross-compilation., (continued)
- 10/31: gnu: openssl: Fix cross-compilation., guix-commits, 2019/07/08
- 09/31: gnu: http-parser: Fix cross-compilation., guix-commits, 2019/07/08
- 21/31: gnu: mit-krb5: Fix cross-compilation., guix-commits, 2019/07/08
- 08/31: gnu: python: Fix cross-compilation., guix-commits, 2019/07/08
- 24/31: gnu: xmlto: Fix cross-compilation., guix-commits, 2019/07/08
- 31/31: gnu: glibc-utf8-locales: Fix cross-compilation., guix-commits, 2019/07/08
- 25/31: gnu: libarchive: Fix cross-compilation., guix-commits, 2019/07/08
- 28/31: gnu: mkfontdir: Fix aarch64 cross-compilation., guix-commits, 2019/07/08
- 03/31: gnu: tcl: Fix cross-compilation., guix-commits, 2019/07/08
- 17/31: gnu: texinfo-5: Fix cross-compilation., guix-commits, 2019/07/08
- 16/31: gnu: groff: Fix cross compilation.,
guix-commits <=
- 01/31: gnu: perl: Fix cross-compilation., guix-commits, 2019/07/08
- 23/31: gnu: help2man: Fix cross-compilation., guix-commits, 2019/07/08
- 12/31: gnu: cmake: Extend CMAKE_PREFIX_PATH to non-native inputs., guix-commits, 2019/07/08
- 06/31: gnu: xorg: Fix cross-compilation of multiple packages., guix-commits, 2019/07/08
- 07/31: gnu: libgpg-error: Fix cross compilation., guix-commits, 2019/07/08
- 02/31: gnu: python: Fix cross compilation., guix-commits, 2019/07/08
- 22/31: gnu: cyrus-sasl: Fix cross-compilation., guix-commits, 2019/07/08
- 04/31: gnu: tk: Fix cross-compilation., guix-commits, 2019/07/08
- 19/31: gnu: indent: Fix aarch64 cross-compilation., guix-commits, 2019/07/08
- 27/31: gnu: pkg-config: Fix cross-compilation., guix-commits, 2019/07/08