guix-commits
[Top][All Lists]
Advanced

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

02/05: gnu: automake: Use 'modify-phases'.


From: Efraim Flashner
Subject: 02/05: gnu: automake: Use 'modify-phases'.
Date: Thu, 19 Oct 2017 02:05:07 -0400 (EDT)

efraim pushed a commit to branch core-updates
in repository guix.

commit 759807e87217ce40eb0e3ba4ff65e6f014a9cb34
Author: Efraim Flashner <address@hidden>
Date:   Wed Oct 18 16:30:20 2017 +0300

    gnu: automake: Use 'modify-phases'.
    
    * gnu/packages/autotools.scm (automake)[arguments]: Use 'modify-phases'
    syntax.
---
 gnu/packages/autotools.scm | 76 +++++++++++++++++++++++-----------------------
 1 file changed, 38 insertions(+), 38 deletions(-)

diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
index 79ef31f..e6e123a 100644
--- a/gnu/packages/autotools.scm
+++ b/gnu/packages/autotools.scm
@@ -267,47 +267,47 @@ output is indexed in many ways to simplify browsing.")
                   (srfi srfi-1)
                   (srfi srfi-26)
                   (rnrs io ports))
-       #:phases (alist-cons-before
-                 'patch-source-shebangs 'patch-tests-shebangs
-                 (lambda _
-                   (let ((sh (which "sh")))
-                     (substitute* (find-files "t" "\\.(sh|tap)$")
-                       (("#![[:blank:]]?/bin/sh")
-                        (string-append "#!" sh)))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'patch-source-shebangs 'patch-tests-shebangs
+           (lambda _
+             (let ((sh (which "sh")))
+               (substitute* (find-files "t" "\\.(sh|tap)$")
+                 (("#![[:blank:]]?/bin/sh")
+                  (string-append "#!" sh)))
 
-                     ;; Set these variables for all the `configure' runs
-                     ;; that occur during the test suite.
-                     (setenv "SHELL" sh)
-                     (setenv "CONFIG_SHELL" sh)))
+               ;; Set these variables for all the `configure' runs
+               ;; that occur during the test suite.
+               (setenv "SHELL" sh)
+               (setenv "CONFIG_SHELL" sh)
+               #t)))
 
-                 ;; Files like `install-sh', `mdate.sh', etc. must use
-                 ;; #!/bin/sh, otherwise users could leak erroneous shebangs
-                 ;; in the wild.  See <http://bugs.gnu.org/14201> for an
-                 ;; example.
-                 (alist-cons-after
-                  'install 'unpatch-shebangs
-                  (lambda* (#:key outputs #:allow-other-keys)
-                    (let* ((out (assoc-ref outputs "out"))
-                           (dir (string-append out "/share")))
-                      (define (starts-with-shebang? file)
-                        (equal? (call-with-input-file file
-                                  (lambda (p)
-                                    (list (get-u8 p) (get-u8 p))))
-                                (map char->integer '(#\# #\!))))
+           ;; Files like `install-sh', `mdate.sh', etc. must use
+           ;; #!/bin/sh, otherwise users could leak erroneous shebangs
+           ;; in the wild.  See <http://bugs.gnu.org/14201> for an
+           ;; example.
+           (add-after 'install 'unpatch-shebangs
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((out (assoc-ref outputs "out"))
+                      (dir (string-append out "/share")))
+                 (define (starts-with-shebang? file)
+                   (equal? (call-with-input-file file
+                             (lambda (p)
+                               (list (get-u8 p) (get-u8 p))))
+                           (map char->integer '(#\# #\!))))
 
-                      (for-each (lambda (file)
-                                  (when (and (starts-with-shebang? file)
-                                             (executable-file? file))
-                                    (format #t "restoring shebang on `~a'~%"
-                                            file)
-                                    (substitute* file
-                                      (("^#!.*/bin/sh")
-                                       "#!/bin/sh")
-                                      (("^#!.*/bin/env(.*)$" _ args)
-                                       (string-append "#!/usr/bin/env"
-                                                      args)))))
-                                (find-files dir ".*"))))
-                  %standard-phases))))
+                 (for-each (lambda (file)
+                             (when (and (starts-with-shebang? file)
+                                        (executable-file? file))
+                               (format #t "restoring shebang on `~a'~%"
+                                       file)
+                               (substitute* file
+                                 (("^#!.*/bin/sh")
+                                  "#!/bin/sh")
+                                 (("^#!.*/bin/env(.*)$" _ args)
+                                  (string-append "#!/usr/bin/env"
+                                                 args)))))
+                           (find-files dir ".*"))))))))
     (home-page "https://www.gnu.org/software/automake/";)
     (synopsis "Making GNU standards-compliant Makefiles")
     (description



reply via email to

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