From c8c6bba5a7001adef4f79a83c00cc24b697e8ed4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org>
Date: Sat, 25 May 2013 16:26:16 +0200
Subject: [PATCH] gnu: sed: Allow cross-compilation.

* gnu/packages/base.scm (sed): Keep the default phases
  when (%current-target-system) is true.
---
 gnu/packages/base.scm | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index b1bc5ca2d1b..4452108abf3 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -101,16 +101,18 @@ (define-public sed
    (build-system gnu-build-system)
    (synopsis "Stream editor")
    (arguments
-    `(#:phases (alist-cons-before
-                'patch-source-shebangs 'patch-test-suite
-                (lambda* (#:key inputs #:allow-other-keys)
-                  (let ((bash (assoc-ref inputs "bash")))
-                    (patch-makefile-SHELL "testsuite/Makefile.tests")
-                    (substitute* '("testsuite/bsd.sh"
-                                   "testsuite/bug-regex9.c")
-                      (("/bin/sh")
-                       (string-append bash "/bin/bash")))))
-                %standard-phases)))
+    (if (%current-target-system)
+        '()
+        `(#:phases (alist-cons-before
+                    'patch-source-shebangs 'patch-test-suite
+                    (lambda* (#:key inputs #:allow-other-keys)
+                      (let ((bash (assoc-ref inputs "bash")))
+                        (patch-makefile-SHELL "testsuite/Makefile.tests")
+                        (substitute* '("testsuite/bsd.sh"
+                                       "testsuite/bug-regex9.c")
+                          (("/bin/sh")
+                           (string-append bash "/bin/bash")))))
+                    %standard-phases))))
    (description
     "Sed (stream editor) isn't really a true text editor or text processor.
 Instead, it is used to filter text, i.e., it takes text input and performs
-- 
GitLab