[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#36477] [PATCH v4 03/23] gnu: groff: Fix cross compilation.
From: |
Mathieu Othacehe |
Subject: |
[bug#36477] [PATCH v4 03/23] gnu: groff: Fix cross compilation. |
Date: |
Wed, 2 Oct 2019 11:58:44 +0200 |
* gnu/packages/groff.scm (groff)[native-inputs]: Add self,
[arguments]: set GROFF_BIN_PATH and GROFFBIN variables when
cross-compiling.
(groff-minimal)[native-inputs]: Add groff.
---
gnu/packages/groff.scm | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/groff.scm b/gnu/packages/groff.scm
index 98f17914bf..5fe353a901 100644
--- a/gnu/packages/groff.scm
+++ b/gnu/packages/groff.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2017 Ludovic Courtès <address@hidden>
;;; Copyright © 2019 Efraim Flashner <address@hidden>
;;; Copyright © 2019 Eric Bavier <address@hidden>
+;;; Copyright © 2019 Mathieu Othacehe <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -55,12 +56,28 @@
;; 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)))
(arguments
`(#:parallel-build? #f ; parallel build fails
+ ,@(if (%current-target-system)
+ `(#:make-flags
+ ;; In groff-minimal package, that inherits from this package,
+ ;; we'll need to locate "groff" instead of "self".
+ (let ((groff (or (assoc-ref %build-host-inputs "groff")
+ (assoc-ref %build-host-inputs "self"))))
+ (list
+ (string-append "GROFF_BIN_PATH=" groff)
+ (string-append "GROFFBIN=" groff "/bin/groff"))))
+ '())
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'disable-relocatability
@@ -115,7 +132,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)
--
2.23.0
- [bug#36477] [PATCH v4 00/23] System cross-compilation, Mathieu Othacehe, 2019/10/02
- [bug#36477] [PATCH v4 01/23] gnu: openssl: Fix cross-compilation., Mathieu Othacehe, 2019/10/02
- [bug#36477] [PATCH v4 02/23] gnu: cmake: Fix cross-compilation., Mathieu Othacehe, 2019/10/02
- [bug#36477] [PATCH v4 03/23] gnu: groff: Fix cross compilation.,
Mathieu Othacehe <=
- [bug#36477] [PATCH v4 04/23] gnu: cyrus-sasl: Fix cross-compilation., Mathieu Othacehe, 2019/10/02
- [bug#36477] [PATCH v4 07/23] gnu: eudev: Fix cross-compilation., Mathieu Othacehe, 2019/10/02
- [bug#36477] [PATCH v4 05/23] gnu: icu4c: Fix cross-compilation., Mathieu Othacehe, 2019/10/02
- [bug#36477] [PATCH v4 08/23] gnu: bdb: Fix cross-compilation., Mathieu Othacehe, 2019/10/02
- [bug#36477] [PATCH v4 06/23] gnu: boost: Fix cross-compilation., Mathieu Othacehe, 2019/10/02
- [bug#36477] [PATCH v4 11/23] gnu: git: Fix cross-compilation., Mathieu Othacehe, 2019/10/02
- [bug#36477] [PATCH v4 10/23] gnu: swig: Fix cross-compilation., Mathieu Othacehe, 2019/10/02
- [bug#36477] [PATCH v4 09/23] gnu: openldap: Fix cross-compilation., Mathieu Othacehe, 2019/10/02
- [bug#36477] [PATCH v4 16/23] gnu: crda: Fix cross-compilation, Mathieu Othacehe, 2019/10/02
- [bug#36477] [PATCH v4 13/23] gnu: guile-gcrypt: Fix cross-compilation., Mathieu Othacehe, 2019/10/02