aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 fa98bd56b8..c661dc23ae 100644
--- a/gnu/packages/texinfo.scm
+++ b/gnu/packages/texinfo.scm
@@ -42,8 +42,28 @@
(base32
"0qjzvbvnv9003xdrcpi3jp7y68j4hq2ciw9frh2hghh698zlnxvp"))))
(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.