aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2017-10-18 16:30:20 +0300
committerEfraim Flashner <efraim@flashner.co.il>2017-10-19 09:04:42 +0300
commit759807e87217ce40eb0e3ba4ff65e6f014a9cb34 (patch)
tree63a37f78f39135cf42d1a5103b145db0169f3e7a
parent79272039a9586aef8105007900b62dcb4b00ca9b (diff)
downloadguix-759807e87217ce40eb0e3ba4ff65e6f014a9cb34.tar.gz
guix-759807e87217ce40eb0e3ba4ff65e6f014a9cb34.zip
gnu: automake: Use 'modify-phases'.
* gnu/packages/autotools.scm (automake)[arguments]: Use 'modify-phases' syntax.
-rw-r--r--gnu/packages/autotools.scm76
1 files changed, 38 insertions, 38 deletions
diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
index 79ef31fc1b..e6e123a565 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