~ruther/guix-local

380d5decfcd3a25c11dfa7e78e2197af98a35307 — Ludovic Courtès 13 years ago c089511
distro: attr: Fix references to /bin/sh.

* distro/packages/attr.scm (attr): Add `patch-makefile-SHELL'.  Patch
  `test/run' in `check' phase.
1 files changed, 27 insertions(+), 16 deletions(-)

M distro/packages/attr.scm
M distro/packages/attr.scm => distro/packages/attr.scm +27 -16
@@ 41,23 41,34 @@
    (build-system gnu-build-system)
    (arguments
     `(#:phases
       (alist-replace 'install
                      (lambda _
                        (zero? (system* "make"
                                        "install"
                                        "install-lib"
                                        "install-dev")))
                      (alist-replace 'check
                                     (lambda _
                                       (for-each patch-shebang
                                                 (find-files "test" ".*"))
                                       (system* "make" "tests" "-C" "test")
       (alist-cons-after
        'configure 'patch-makefile-SHELL
        (lambda _
          (patch-makefile-SHELL "include/buildmacros"))
        (alist-replace
         'install
         (lambda _
           (zero? (system* "make"
                           "install"
                           "install-lib"
                           "install-dev")))
         (alist-replace
          'check
          (lambda _
            ;; Use the right shell.
            (let ((bash (search-path (search-path-as-string->list
                                      (getenv "PATH"))
                                     "bash")))
              (substitute* "test/run"
                (("/bin/sh")
                 (string-append bash "/bin/bash"))))

                                       ;; XXX: Ignore the test result since
                                       ;; this is dependent on the underlying
                                       ;; file system.
                                       #t)
                                     %standard-phases))))
            (system* "make" "tests" "-C" "test")

            ;; XXX: Ignore the test result since this is dependent on the
            ;; underlying file system.
            #t)
          %standard-phases)))))
    (inputs `(("perl" ,perl)
              ("gettext" ,guix:gettext)))
    (home-page