guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: gnu: git: Resurrect cross-compilation.


From: guix-commits
Subject: 01/02: gnu: git: Resurrect cross-compilation.
Date: Fri, 17 Apr 2020 06:45:02 -0400 (EDT)

janneke pushed a commit to branch wip-hurd-vm
in repository guix.

commit f48b1b2baa850226cc70873cab7d78df6e27bf0c
Author: Jan (janneke) Nieuwenhuizen <address@hidden>
AuthorDate: Fri Apr 17 11:43:23 2020 +0200

    gnu: git: Resurrect cross-compilation.
    
    * gnu/packages/version-control.scm (git-cross-configure-flags): Add missing
    "ac_cv_iconv_omits_bom" flag.
    (git)[arguments]: Avoid modify-PATH stage when cross-compiling as it depends
    on non-present "bash-for-tests".
---
 gnu/packages/version-control.scm | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 5342f6e..dae118b 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -147,7 +147,8 @@ as well as the classic centralized workflow.")
 
 (define git-cross-configure-flags
   '("ac_cv_fread_reads_directories=yes"
-    "ac_cv_snprintf_returns_bogus=no"))
+    "ac_cv_snprintf_returns_bogus=no"
+    "ac_cv_iconv_omits_bom=no"))
 
 (define-public git
   (package
@@ -251,16 +252,19 @@ as well as the classic centralized workflow.")
                  ,@%gnu-build-system-modules)
       #:phases
       (modify-phases %standard-phases
-        (add-after 'unpack 'modify-PATH
-          (lambda* (#:key inputs #:allow-other-keys)
-            (let ((path (string-split (getenv "PATH") #\:))
-                  (bash-full (assoc-ref inputs "bash-for-tests")))
-              ;; Drop the test bash from PATH so that (which "sh") and
-              ;; similar does the right thing.
-              (setenv "PATH" (string-join
-                              (remove (cut string-prefix? bash-full <>) path)
-                              ":"))
-              #t)))
+        ;; We do not have bash-for-tests when cross-compiling.
+        ,@(if (%current-target-system)
+              '()
+              `((add-after 'unpack 'modify-PATH
+                  (lambda* (#:key inputs #:allow-other-keys)
+                    (let ((path (string-split (getenv "PATH") #\:))
+                          (bash-full (assoc-ref inputs "bash-for-tests")))
+                      ;; Drop the test bash from PATH so that (which "sh") and
+                      ;; similar does the right thing.
+                      (setenv "PATH" (string-join
+                                      (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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]