summaryrefslogtreecommitdiff
path: root/gnu/packages/texinfo.scm
diff options
context:
space:
mode:
authorMathieu Othacehe <m.othacehe@gmail.com>2019-09-04 18:25:17 +0200
committerMathieu Othacehe <m.othacehe@gmail.com>2019-09-24 08:12:58 +0200
commit5a2f58d52caea7a2a94a8ff18ef1ce9bebab7166 (patch)
treee7f82f4b520b6e9f310fdf30723207b411a1ad4e /gnu/packages/texinfo.scm
parent9b70f2c38647c32459cfecfb2755800fbb31ea29 (diff)
gnu: texinfo: Fix cross-compilation.
* gnu/packages/texinfo.scm (texinfo)[arguments]: Do not reset environment before running configure with the native compiler, in a cross-compilation context, [inputs]: move perl from here ... [native-inputs]: ... to here. Also add ncurses that is needed in a cross-compilation context to build texinfo native tools.
Diffstat (limited to 'gnu/packages/texinfo.scm')
-rw-r--r--gnu/packages/texinfo.scm24
1 files changed, 22 insertions, 2 deletions
diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm
index befdd78551..9b96d2d0cf 100644
--- a/gnu/packages/texinfo.scm
+++ b/gnu/packages/texinfo.scm
@@ -41,8 +41,28 @@
(base32
"0rixv4c301djr0d0cnsxs8c1wjndi6bf9vi5axz6mwjkv80cmfcv"))))
(build-system gnu-build-system)
- (inputs `(("ncurses" ,ncurses)
- ("perl" ,perl)))
+ (arguments
+ ;; When cross-compiling, the package is configured twice: once with the
+ ;; native compiler and once with the cross-compiler. During the configure
+ ;; with the native compiler, the environment is reset. This leads to
+ ;; multiple environment variables missing. Do not reset the environment
+ ;; to prevent that.
+ (if (%current-target-system)
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'fix-cross-configure
+ (lambda _
+ (substitute* "configure"
+ (("env -i")
+ "env "))
+ #t))))
+ '()))
+ (inputs `(("ncurses" ,ncurses)))
+ ;; When cross-compiling, texinfo will build some of its own binaries with
+ ;; the native compiler. This means ncurses is needed both in both inputs
+ ;; and native-inputs.
+ (native-inputs `(("perl" ,perl)
+ ("ncurses" ,ncurses)))
(native-search-paths
;; This is the variable used by the standalone Info reader.