From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:59223) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0MQY-0008FH-DK for guix-patches@gnu.org; Wed, 21 Aug 2019 04:57:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i0MQW-0005ub-E9 for guix-patches@gnu.org; Wed, 21 Aug 2019 04:57:10 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54177) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i0MQW-0005ti-5g for guix-patches@gnu.org; Wed, 21 Aug 2019 04:57:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i0MQW-0006hj-2y for guix-patches@gnu.org; Wed, 21 Aug 2019 04:57:08 -0400 Subject: [bug#36477] [PATCH v2 45/61] gnu: texinfo-4: Fix cross compilation Resent-Message-ID: From: Mathieu Othacehe Date: Wed, 21 Aug 2019 10:54:39 +0200 Message-Id: <20190821085455.18508-45-m.othacehe@gmail.com> In-Reply-To: <20190821085455.18508-1-m.othacehe@gmail.com> References: <20190821085455.18508-1-m.othacehe@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 36477@debbugs.gnu.org Cc: Pierre-Moana Levesque From: Pierre-Moana Levesque * 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(-) diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm index 19f87a4de9..fde1a12a91 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 -- 2.17.1