From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:51112) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFbQb-0003n4-UD for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFbQa-00009C-M2 for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:13 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54921) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iFbQa-000093-IB for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:12 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iFbQa-0000a8-Fj for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:12 -0400 Subject: [bug#36477] [PATCH v4 11/23] gnu: git: Fix cross-compilation. Resent-Message-ID: From: Mathieu Othacehe Date: Wed, 2 Oct 2019 11:58:52 +0200 Message-Id: <20191002095904.6325-12-m.othacehe@gmail.com> In-Reply-To: <20191002095904.6325-1-m.othacehe@gmail.com> References: <20191002095904.6325-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: Mathieu Othacehe * gnu/packages/version-control.scm (git-cross-configure-flags): New variable, (git)[arguments]: add it to configure-flags. Also add cross curl-config script to PATH. (git-minimal): Add previous variable to configure-flags. --- gnu/packages/version-control.scm | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 192fa666d9..947873e6d5 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -141,6 +141,10 @@ changes to project files over time. It supports both a distributed workflow as well as the classic centralized workflow.") (license license:gpl2+))) +(define git-cross-configure-flags + '("ac_cv_fread_reads_directories=yes" + "ac_cv_snprintf_returns_bogus=no")) + (define-public git (package (name "git") @@ -233,7 +237,10 @@ as well as the classic centralized workflow.") ;; absolute file name to 'wish'. #:configure-flags (list (string-append "--with-tcltk=" (assoc-ref %build-inputs "tk") - "/bin/wish8.6")) ; XXX + "/bin/wish8.6") ; XXX + ,@(if (%current-target-system) + git-cross-configure-flags + '())) #:modules ((srfi srfi-1) (srfi srfi-26) @@ -250,6 +257,15 @@ as well as the classic centralized workflow.") (remove (cut string-prefix? bash-full <>) path) ":")) #t))) + ;; Add cross curl-config script to PATH when cross-compiling. + ,@(if (%current-target-system) + '((add-before 'configure 'add-cross-curl-config + (lambda* (#:key inputs #:allow-other-keys) + (setenv "PATH" + (string-append (assoc-ref inputs "curl") "/bin:" + (getenv "PATH"))) + #t))) + '()) (add-after 'configure 'patch-makefiles (lambda _ (substitute* "Makefile" @@ -506,7 +522,10 @@ everything from small to very large projects with speed and efficiency.") (string-append out "/share/gitweb")) #t))))) ((#:configure-flags flags) - ''()) + `(list + ,@(if (%current-target-system) + git-cross-configure-flags + '()))) ((#:disallowed-references lst '()) `(,perl ,@lst)))) (outputs '("out")) -- 2.23.0