gnu: sed: Use the same phases whether or not we're cross-compiling.

* gnu/packages/base.scm (sed)[arguments]: Make #:phases argument
unconditional.  In 'patch-test-suite' phase, use (which "sh") instead of
referring to the "bash" input.
This commit is contained in:
Ludovic Courtès 2017-01-21 22:37:06 +01:00
parent b848f98e04
commit 8a296947a6
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 11 additions and 14 deletions

View File

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org> ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
@ -129,19 +129,16 @@ including, for example, recursive directory searching.")
(build-system gnu-build-system) (build-system gnu-build-system)
(synopsis "Stream editor") (synopsis "Stream editor")
(arguments (arguments
(if (%current-target-system) `(#:phases
'() (modify-phases %standard-phases
`(#:phases (add-before 'patch-source-shebangs 'patch-test-suite
(modify-phases %standard-phases (lambda* (#:key inputs #:allow-other-keys)
(add-before 'patch-source-shebangs 'patch-test-suite (patch-makefile-SHELL "testsuite/Makefile.tests")
(lambda* (#:key inputs #:allow-other-keys) (substitute* '("testsuite/bsd.sh"
(let ((bash (assoc-ref inputs "bash"))) "testsuite/bug-regex9.c")
(patch-makefile-SHELL "testsuite/Makefile.tests") (("/bin/sh")
(substitute* '("testsuite/bsd.sh" (which "sh")))
"testsuite/bug-regex9.c") #t)))))
(("/bin/sh")
(string-append bash "/bin/sh")))
#t)))))))
(native-inputs (native-inputs
`(("perl" ,perl))) ; for build-aux/help2man `(("perl" ,perl))) ; for build-aux/help2man
(description (description