From 5a2f58d52caea7a2a94a8ff18ef1ce9bebab7166 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Wed, 4 Sep 2019 18:25:17 +0200 Subject: 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. --- gnu/packages/texinfo.scm | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'gnu/packages/texinfo.scm') 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. -- cgit v1.2.3 From c096028a372d2f19a8efdc741d44cffbdc74ee03 Mon Sep 17 00:00:00 2001 From: Pierre-Moana Levesque Date: Tue, 2 Jul 2019 19:37:56 +0200 Subject: gnu: texinfo-5: Fix cross-compilation. * gnu/packages/texinfo.scm (texinfo-5)[native-inputs]: Keep native-inputs from inherited package texinfo. --- gnu/packages/texinfo.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/texinfo.scm') diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm index 9b96d2d0cf..a79330d20e 100644 --- a/gnu/packages/texinfo.scm +++ b/gnu/packages/texinfo.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2014, 2016 Eric Bavier ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2017 Efraim Flashner +;;; Copyright © 2019 Pierre-Moana Levesque ;;; ;;; This file is part of GNU Guix. ;;; @@ -91,8 +92,7 @@ is on expressing the content semantically, avoiding physical markup commands.") (patches (search-patches "texinfo-5-perl-compat.patch")) (sha256 (base32 - "1njfwh2z34r2c4r0iqa7v24wmjzvsfyz4vplzry8ln3479lfywal")))) - (native-inputs '()))) + "1njfwh2z34r2c4r0iqa7v24wmjzvsfyz4vplzry8ln3479lfywal")))))) (define-public texinfo-4 (package (inherit texinfo) -- cgit v1.2.3 From 6fe3e25006308ebd570996d444475a6a30d4d30e Mon Sep 17 00:00:00 2001 From: Pierre-Moana Levesque Date: Thu, 4 Jul 2019 19:21:37 +0200 Subject: gnu: texinfo-4: Fix cross compilation * gnu/packages/texinfo.scm (texinfo-4)[native-inputs]: Add automake and native-inputs from texinfo package, [arguments]: Replace outdated config.sub and config.guess by the ones taken from automake above. Also make sure native tools are built before build phase. --- gnu/packages/texinfo.scm | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) (limited to 'gnu/packages/texinfo.scm') diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm index a79330d20e..1603db0b4e 100644 --- a/gnu/packages/texinfo.scm +++ b/gnu/packages/texinfo.scm @@ -21,9 +21,11 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages texinfo) + #:use-module (gnu packages autotools) #:use-module (guix licenses) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (gnu packages) #:use-module (gnu packages compression) @@ -106,8 +108,37 @@ is on expressing the content semantically, avoiding physical markup commands.") (sha256 (base32 "1rf9ckpqwixj65bw469i634897xwlgkm5i9g2hv3avl6mv7b0a3d")))) - (native-inputs '()) - (inputs `(("ncurses" ,ncurses) ("xz" ,xz))))) + (inputs `(("ncurses" ,ncurses) + ("xz" ,xz))) + (native-inputs + `(("automake" ,automake) + ,@(package-native-inputs texinfo))) + (arguments + (substitute-keyword-arguments (package-arguments texinfo) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'fix-configure + (lambda* (#:key inputs native-inputs #:allow-other-keys) + ;; Replace outdated config.sub and config.guess. + (with-directory-excursion "build-aux" + (for-each + (lambda (file) + (install-file (string-append + (assoc-ref + (or native-inputs inputs) "automake") + "/share/automake-" + ,(version-major+minor + (package-version automake)) + "/" file) ".")) + '("config.sub" "config.guess"))) + #t)) + ;; Build native version of tools before running 'build phase. + ,@(if (%current-target-system) + `((add-before 'build 'make-native-gnu-lib + (lambda* (#:key inputs #:allow-other-keys) + (invoke "make" "-C" "tools/gnulib/lib") + #t))) + '()))))))) (define-public info-reader ;; The idea of this package is to have the standalone Info reader without -- cgit v1.2.3 From 7b90379db8adae9b23da4d5b7c7d3ec61d0e59a1 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Sat, 14 Dec 2019 17:46:27 +0100 Subject: gnu: info-reader: Fix cross-compilation. * gnu/packages/texinfo.scm (info-reader)[arguments]: Add keep-only-info-reader phase to inherited texinfo package phases, so that fix-cross-configure phase is preserved. --- gnu/packages/texinfo.scm | 49 ++++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 24 deletions(-) (limited to 'gnu/packages/texinfo.scm') diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm index ef3dfba09e..c755790448 100644 --- a/gnu/packages/texinfo.scm +++ b/gnu/packages/texinfo.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2017 Efraim Flashner ;;; Copyright © 2019 Pierre-Moana Levesque +;;; Copyright © 2019 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -159,32 +160,32 @@ is on expressing the content semantically, avoiding physical markup commands.") (inherit texinfo) (name "info-reader") (arguments - `(#:disallowed-references ,(assoc-ref (package-inputs texinfo) - "perl") + `(,@(substitute-keyword-arguments (package-arguments texinfo) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'install 'keep-only-info-reader + (lambda* (#:key outputs #:allow-other-keys) + ;; Remove everything but 'bin/info' and associated + ;; files. + (define (files) + (scandir "." (lambda (file) + (not (member file '("." "..")))))) + (let ((out (assoc-ref outputs "out"))) + (with-directory-excursion out + (for-each delete-file-recursively + (fold delete (files) '("bin" "share")))) + (with-directory-excursion (string-append out "/bin") + (for-each delete-file (delete "info" (files)))) + (with-directory-excursion (string-append out "/share") + (for-each delete-file-recursively + (fold delete (files) + '("info" "locale")))) + #t)))))) + #:disallowed-references ,(assoc-ref (package-inputs texinfo) + "perl") #:modules ((ice-9 ftw) (srfi srfi-1) - ,@%gnu-build-system-modules) - - #:phases (modify-phases %standard-phases - (add-after 'install 'keep-only-info-reader - (lambda* (#:key outputs #:allow-other-keys) - ;; Remove everything but 'bin/info' and associated - ;; files. - (define (files) - (scandir "." (lambda (file) - (not (member file '("." "..")))))) - - (let ((out (assoc-ref outputs "out"))) - (with-directory-excursion out - (for-each delete-file-recursively - (fold delete (files) '("bin" "share")))) - (with-directory-excursion (string-append out "/bin") - (for-each delete-file (delete "info" (files)))) - (with-directory-excursion (string-append out "/share") - (for-each delete-file-recursively - (fold delete (files) - '("info" "locale")))) - #t)))))) + ,@%gnu-build-system-modules))) (synopsis "Standalone Info documentation reader"))) (define-public texi2html -- cgit v1.2.3 From 64b39d6e42ab349507ed495edf26c48c426b5a1a Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 14 Jan 2020 20:17:46 +0100 Subject: gnu: Remove texinfo@6.6 * gnu/packages/texinfo.scm (texinfo): Update to 6.7. (texinfo-6.7): Remove variable. --- gnu/packages/texinfo.scm | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'gnu/packages/texinfo.scm') diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm index ae8ecc868b..04f63dafa7 100644 --- a/gnu/packages/texinfo.scm +++ b/gnu/packages/texinfo.scm @@ -42,14 +42,14 @@ (define-public texinfo (package (name "texinfo") - (version "6.6") + (version "6.7") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/texinfo/texinfo-" version ".tar.xz")) (sha256 (base32 - "0rixv4c301djr0d0cnsxs8c1wjndi6bf9vi5axz6mwjkv80cmfcv")))) + "1aicn1v3czqii08wc91jw089n1x3gfchkf808q2as59dak0h714q")))) (build-system gnu-build-system) (arguments ;; When cross-compiling, the package is configured twice: once with the @@ -91,18 +91,6 @@ their source and the command-line Info reader. The emphasis of the language is on expressing the content semantically, avoiding physical markup commands.") (license gpl3+))) -(define-public texinfo-6.7 - (package - (inherit texinfo) - (version "6.7") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/texinfo/texinfo-" - version ".tar.xz")) - (sha256 - (base32 - "1aicn1v3czqii08wc91jw089n1x3gfchkf808q2as59dak0h714q")))))) - (define-public texinfo-5 (package (inherit texinfo) (version "5.2") -- cgit v1.2.3 From 95c14929a7fbd3c55c5e8756953c2f257625e2b7 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Sun, 19 Apr 2020 12:06:46 +0200 Subject: gnu: texinfo: Cross-build fix. * gnu/packages/texinfo.scm (texinfo)[inputs]: Add perl. This makes the host texi2any (makeinfo) refer to the correct perl. To avoid triggering a rebuild, do this while cross-compiling only. --- gnu/packages/texinfo.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gnu/packages/texinfo.scm') diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm index 7457d99653..70e050371d 100644 --- a/gnu/packages/texinfo.scm +++ b/gnu/packages/texinfo.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2019 Pierre-Moana Levesque ;;; Copyright © 2019 Mathieu Othacehe ;;; Copyright © 2020 Nicolas Goaziou +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -68,7 +69,11 @@ "env ")) #t)))) '())) - (inputs `(("ncurses" ,ncurses))) + (inputs `(("ncurses" ,ncurses) + ;; TODO: remove `if' in the next rebuild cycle. + ,@(if (%current-target-system) + `(("perl" ,perl)) + '()))) ;; 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. -- cgit v1.2.3