gnu: zile: Fix cross-compilation.
* gnu/packages/zile.scm (zile)[native-inputs]: Add THIS-PACKAGE when cross-compiling. [arguments]: Add phase when cross-compiling.
This commit is contained in:
parent
1ed3b845f7
commit
805ac43c94
1 changed files with 19 additions and 2 deletions
|
@ -3,6 +3,7 @@
|
||||||
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
|
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
|
||||||
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
|
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
|
||||||
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
|
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -51,7 +52,7 @@
|
||||||
"0x3byaddms8l3g7igx6njycqsq98wgapysdb5c7lhcnajlkp8y3s"))))
|
"0x3byaddms8l3g7igx6njycqsq98wgapysdb5c7lhcnajlkp8y3s"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
'(#:phases
|
`(#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-before 'configure 'patch-/bin/sh
|
(add-before 'configure 'patch-/bin/sh
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
@ -60,7 +61,18 @@
|
||||||
(substitute* '("lib/spawni.c" "src/funcs.c")
|
(substitute* '("lib/spawni.c" "src/funcs.c")
|
||||||
(("/bin/sh")
|
(("/bin/sh")
|
||||||
(string-append bash "/bin/sh")))
|
(string-append bash "/bin/sh")))
|
||||||
#t))))))
|
#t)))
|
||||||
|
;; Zile generates its manual pages by calling the built Zile
|
||||||
|
;; with the --help argument. That does not work when cross-
|
||||||
|
;; compiling; use the native Zile added below in that case.
|
||||||
|
,@(if (%current-target-system)
|
||||||
|
'((add-before 'build 'use-native-zile-for-documentation
|
||||||
|
(lambda _
|
||||||
|
(substitute* "build-aux/zile-help2man-wrapper"
|
||||||
|
(("src/zile")
|
||||||
|
(which "zile")))
|
||||||
|
#t)))
|
||||||
|
'()))))
|
||||||
(inputs
|
(inputs
|
||||||
`(("boehm-gc" ,libgc)
|
`(("boehm-gc" ,libgc)
|
||||||
("ncurses" ,ncurses)
|
("ncurses" ,ncurses)
|
||||||
|
@ -68,6 +80,11 @@
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("perl" ,perl)
|
`(("perl" ,perl)
|
||||||
("help2man" ,help2man)
|
("help2man" ,help2man)
|
||||||
|
;; When cross-compiling, Zile needs a native version of itself to
|
||||||
|
;; generate the manual pages (see the related phase above).
|
||||||
|
,@(if (%current-target-system)
|
||||||
|
`(("self" ,this-package))
|
||||||
|
'())
|
||||||
("pkg-config" ,pkg-config)))
|
("pkg-config" ,pkg-config)))
|
||||||
(home-page "https://www.gnu.org/software/zile/")
|
(home-page "https://www.gnu.org/software/zile/")
|
||||||
(synopsis "Lightweight Emacs clone")
|
(synopsis "Lightweight Emacs clone")
|
||||||
|
|
Reference in a new issue