gnu: automake: Remove input labels.
* gnu/packages/autotools.scm (automake)[native-inputs, inputs]: Remove labels. [arguments]: Use G-expression. Use SEARCH-INPUT-FILE instead of labels. Remove trailing #t's while at it.
This commit is contained in:
		
							parent
							
								
									b0aa0a06be
								
							
						
					
					
						commit
						ea908c1c04
					
				
					 1 changed files with 74 additions and 75 deletions
				
			
		|  | @ -12,6 +12,7 @@ | ||||||
| ;;; Copyright © 2019 Pierre-Moana Levesque <pierre.moana.levesque@gmail.com> | ;;; Copyright © 2019 Pierre-Moana Levesque <pierre.moana.levesque@gmail.com> | ||||||
| ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> | ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> | ||||||
| ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> | ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> | ||||||
|  | ;;; Copyright © 2022 Marius Bakke <marius@gnu.org> | ||||||
| ;;; | ;;; | ||||||
| ;;; This file is part of GNU Guix. | ;;; This file is part of GNU Guix. | ||||||
| ;;; | ;;; | ||||||
|  | @ -40,6 +41,7 @@ | ||||||
|   #:use-module (guix packages) |   #:use-module (guix packages) | ||||||
|   #:use-module (guix download) |   #:use-module (guix download) | ||||||
|   #:use-module (guix git-download) |   #:use-module (guix git-download) | ||||||
|  |   #:use-module (guix gexp) | ||||||
|   #:use-module (guix build-system gnu) |   #:use-module (guix build-system gnu) | ||||||
|   #:use-module (guix build-system trivial) |   #:use-module (guix build-system trivial) | ||||||
|   #:use-module (ice-9 match) |   #:use-module (ice-9 match) | ||||||
|  | @ -326,105 +328,102 @@ output is indexed in many ways to simplify browsing.") | ||||||
|     (name "automake") |     (name "automake") | ||||||
|     (version "1.16.5") |     (version "1.16.5") | ||||||
|     (source (origin |     (source (origin | ||||||
|              (method url-fetch) |               (method url-fetch) | ||||||
|              (uri (string-append "mirror://gnu/automake/automake-" |               (uri (string-append "mirror://gnu/automake/automake-" | ||||||
|                                  version ".tar.xz")) |                                   version ".tar.xz")) | ||||||
|              (sha256 |               (sha256 | ||||||
|               (base32 |                (base32 | ||||||
|                 "0sdl32qxdy7m06iggmkkvf7j520rmmgbsjzbm7fgnxwxdp6mh7gh")) |                 "0sdl32qxdy7m06iggmkkvf7j520rmmgbsjzbm7fgnxwxdp6mh7gh")) | ||||||
|              (patches |               (patches | ||||||
|               (search-patches "automake-skip-amhello-tests.patch")))) |                (search-patches "automake-skip-amhello-tests.patch")))) | ||||||
|     (build-system gnu-build-system) |     (build-system gnu-build-system) | ||||||
|     (inputs |     (inputs | ||||||
|      `(("autoconf" ,autoconf-wrapper) |      (list autoconf-wrapper bash-minimal perl)) | ||||||
|        ("bash" ,bash-minimal) |  | ||||||
|        ("perl" ,perl))) |  | ||||||
|     (native-inputs |     (native-inputs | ||||||
|      `(("autoconf" ,autoconf-wrapper) |      (list autoconf-wrapper perl)) | ||||||
|        ("perl" ,perl))) |  | ||||||
|     (native-search-paths |     (native-search-paths | ||||||
|      (list (search-path-specification |      (list (search-path-specification | ||||||
|             (variable "ACLOCAL_PATH") |             (variable "ACLOCAL_PATH") | ||||||
|             (files '("share/aclocal"))))) |             (files '("share/aclocal"))))) | ||||||
|     (arguments |     (arguments | ||||||
|      `(#:modules ((guix build gnu-build-system) |      (list | ||||||
|  |       #:modules '((guix build gnu-build-system) | ||||||
|                   (guix build utils) |                   (guix build utils) | ||||||
|                   (srfi srfi-1) |                   (srfi srfi-1) | ||||||
|                   (srfi srfi-26) |                   (srfi srfi-26) | ||||||
|                   (rnrs io ports)) |                   (rnrs io ports)) | ||||||
|        #:phases |       #:phases | ||||||
|        (modify-phases %standard-phases |       #~(modify-phases %standard-phases | ||||||
|          (add-before 'patch-source-shebangs 'patch-tests-shebangs |           (add-before 'patch-source-shebangs 'patch-tests-shebangs | ||||||
|            (lambda _ |             (lambda* (#:key native-inputs inputs #:allow-other-keys) | ||||||
|              (let ((sh (which "sh"))) |               (let ((sh (search-input-file (or native-inputs inputs) "bin/sh"))) | ||||||
|                (substitute* (find-files "t" "\\.(sh|tap)$") |                 (substitute* (find-files "t" "\\.(sh|tap)$") | ||||||
|                  (("#![[:blank:]]?/bin/sh") |                   (("#![[:blank:]]?/bin/sh") | ||||||
|                   (string-append "#!" sh))) |                    (string-append "#!" sh))) | ||||||
| 
 | 
 | ||||||
|                ;; Set these variables for all the `configure' runs |                 ;; Set these variables for all the `configure' runs | ||||||
|                ;; that occur during the test suite. |                 ;; that occur during the test suite. | ||||||
|                (setenv "SHELL" sh) |                 (setenv "SHELL" sh) | ||||||
|                (setenv "CONFIG_SHELL" sh) |                 (setenv "CONFIG_SHELL" sh)))) | ||||||
|                #t))) |           (add-before 'check 'skip-test | ||||||
|  |             (lambda _ | ||||||
|  |               ;; This test requires 'etags' and fails if it's missing. | ||||||
|  |               ;; Skip it. | ||||||
|  |               (substitute* "t/tags-lisp-space.sh" | ||||||
|  |                 (("^required.*" all) | ||||||
|  |                  (string-append "exit 77\n" all "\n"))))) | ||||||
| 
 | 
 | ||||||
|            (add-before 'check 'skip-test |           #$@(if (%current-target-system) | ||||||
|              (lambda _ |                  '((add-after 'install 'patch-non-shebang-references | ||||||
|                ;; This test requires 'etags' and fails if it's missing. |                      (lambda* (#:key inputs #:allow-other-keys) | ||||||
|                ;; Skip it. |                        ;; `patch-shebangs' patches shebangs only, and the Perl | ||||||
|                (substitute* "t/tags-lisp-space.sh" |                        ;; scripts use a re-exec feature that references the | ||||||
|                  (("^required.*" all) |                        ;; build hosts' perl.  Also, AUTOCONF and BASH store | ||||||
|                   (string-append "exit 77\n" all "\n"))) |                        ;; references hide in the scripts. | ||||||
|                #t)) |                        (let ((autoconf | ||||||
| 
 |                               (dirname (dirname | ||||||
|            ,@(if (%current-target-system) |                                         (search-input-file inputs "bin/autoconf")))) | ||||||
|                  `((add-after 'install 'patch-non-shebang-references |                              (bash | ||||||
|                      (lambda* (#:key build inputs outputs #:allow-other-keys) |                               (dirname (dirname | ||||||
|                      ;; `patch-shebangs' patches shebangs only, and the Perl |                                         (search-input-file inputs "bin/bash")))) | ||||||
|                      ;; scripts use a re-exec feature that references the |                              (perl | ||||||
|                      ;; build hosts' perl.  Also, AUTOCONF and BASH store |                               (dirname (dirname | ||||||
|                      ;; references hide in the scripts. |                                         (search-input-file inputs "bin/perl")))) | ||||||
|                        (let ((autoconf (assoc-ref inputs "autoconf")) |  | ||||||
|                              (bash (assoc-ref inputs "bash")) |  | ||||||
|                              (perl (assoc-ref inputs "perl")) |  | ||||||
|                              (out  (assoc-ref outputs "out")) |  | ||||||
|                              (store-directory (%store-directory))) |                              (store-directory (%store-directory))) | ||||||
|                          (substitute* (find-files (string-append out "/bin")) |                          (substitute* (find-files (string-append #$output "/bin")) | ||||||
|                            (((string-append store-directory "/[^/]*-autoconf-[^/]*")) |                            (((string-append store-directory "/[^/]*-autoconf-[^/]*")) | ||||||
|                             autoconf) |                             autoconf) | ||||||
|                            (((string-append store-directory "/[^/]*-bash-[^/]*")) |                            (((string-append store-directory "/[^/]*-bash-[^/]*")) | ||||||
|                             bash) |                             bash) | ||||||
|                            (((string-append store-directory "/[^/]*-perl-[^/]*")) |                            (((string-append store-directory "/[^/]*-perl-[^/]*")) | ||||||
|                             perl)) |                             perl)))))) | ||||||
|                          #t)))) |  | ||||||
|                  '()) |                  '()) | ||||||
| 
 | 
 | ||||||
|          ;; Files like `install-sh', `mdate.sh', etc. must use |           ;; Files like `install-sh', `mdate.sh', etc. must use | ||||||
|          ;; #!/bin/sh, otherwise users could leak erroneous shebangs |           ;; #!/bin/sh, otherwise users could leak erroneous shebangs | ||||||
|          ;; in the wild.  See <http://bugs.gnu.org/14201> for an |           ;; in the wild.  See <http://bugs.gnu.org/14201> for an | ||||||
|          ;; example. |           ;; example. | ||||||
|          (add-after 'install 'unpatch-shebangs |           (add-after 'install 'unpatch-shebangs | ||||||
|            (lambda* (#:key outputs #:allow-other-keys) |             (lambda _ | ||||||
|              (let* ((out (assoc-ref outputs "out")) |               (let ((dir (string-append #$output "/share"))) | ||||||
|                     (dir (string-append out "/share"))) |                 (define (starts-with-shebang? file) | ||||||
|                (define (starts-with-shebang? file) |                   (equal? (call-with-input-file file | ||||||
|                  (equal? (call-with-input-file file |                             (lambda (p) | ||||||
|                            (lambda (p) |                               (list (get-u8 p) (get-u8 p)))) | ||||||
|                              (list (get-u8 p) (get-u8 p)))) |                           (map char->integer '(#\# #\!)))) | ||||||
|                          (map char->integer '(#\# #\!)))) |  | ||||||
| 
 | 
 | ||||||
|                (for-each (lambda (file) |                 (for-each (lambda (file) | ||||||
|                            (when (and (starts-with-shebang? file) |                             (when (and (starts-with-shebang? file) | ||||||
|                                       (executable-file? file)) |                                        (executable-file? file)) | ||||||
|                              (format #t "restoring shebang on `~a'~%" |                               (format #t "restoring shebang on `~a'~%" | ||||||
|                                      file) |                                       file) | ||||||
|                              (substitute* file |                               (substitute* file | ||||||
|                                (("^#!.*/bin/sh") |                                 (("^#!.*/bin/sh") | ||||||
|                                 "#!/bin/sh") |                                  "#!/bin/sh") | ||||||
|                                (("^#!.*/bin/env(.*)$" _ args) |                                 (("^#!.*/bin/env(.*)$" _ args) | ||||||
|                                 (string-append "#!/usr/bin/env" |                                  (string-append "#!/usr/bin/env" | ||||||
|                                                args))))) |                                                 args))))) | ||||||
|                          (find-files dir ".*")) |                           (find-files dir ".*")))))))) | ||||||
|                #t)))))) |  | ||||||
|     (home-page "https://www.gnu.org/software/automake/") |     (home-page "https://www.gnu.org/software/automake/") | ||||||
|     (synopsis "Making GNU standards-compliant Makefiles") |     (synopsis "Making GNU standards-compliant Makefiles") | ||||||
|     (description |     (description | ||||||
|  |  | ||||||
		Reference in a new issue