Archived
1
0
Fork 0

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:
Marius Bakke 2022-07-16 23:42:57 +02:00
parent b0aa0a06be
commit ea908c1c04
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -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)
@ -336,27 +338,25 @@ output is indexed in many ways to simplify browsing.")
(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)))
@ -364,38 +364,39 @@ output is indexed in many ways to simplify browsing.")
;; 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 (add-before 'check 'skip-test
(lambda _ (lambda _
;; This test requires 'etags' and fails if it's missing. ;; This test requires 'etags' and fails if it's missing.
;; Skip it. ;; Skip it.
(substitute* "t/tags-lisp-space.sh" (substitute* "t/tags-lisp-space.sh"
(("^required.*" all) (("^required.*" all)
(string-append "exit 77\n" all "\n"))) (string-append "exit 77\n" all "\n")))))
#t))
,@(if (%current-target-system) #$@(if (%current-target-system)
`((add-after 'install 'patch-non-shebang-references '((add-after 'install 'patch-non-shebang-references
(lambda* (#:key build inputs outputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
;; `patch-shebangs' patches shebangs only, and the Perl ;; `patch-shebangs' patches shebangs only, and the Perl
;; scripts use a re-exec feature that references the ;; scripts use a re-exec feature that references the
;; build hosts' perl. Also, AUTOCONF and BASH store ;; build hosts' perl. Also, AUTOCONF and BASH store
;; references hide in the scripts. ;; references hide in the scripts.
(let ((autoconf (assoc-ref inputs "autoconf")) (let ((autoconf
(bash (assoc-ref inputs "bash")) (dirname (dirname
(perl (assoc-ref inputs "perl")) (search-input-file inputs "bin/autoconf"))))
(out (assoc-ref outputs "out")) (bash
(dirname (dirname
(search-input-file inputs "bin/bash"))))
(perl
(dirname (dirname
(search-input-file inputs "bin/perl"))))
(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
@ -403,9 +404,8 @@ output is indexed in many ways to simplify browsing.")
;; 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)
@ -423,8 +423,7 @@ output is indexed in many ways to simplify browsing.")
(("^#!.*/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