[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/03: gnu: autoconf: Unpatch shebangs on files that "autoconf -i" insta
From: |
guix-commits |
Subject: |
02/03: gnu: autoconf: Unpatch shebangs on files that "autoconf -i" installs. |
Date: |
Thu, 9 Sep 2021 05:34:35 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 902de26c1a2462b3374633f724852507d957019a
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Sep 9 10:09:25 2021 +0200
gnu: autoconf: Unpatch shebangs on files that "autoconf -i" installs.
Fixes <https://issues.guix.gnu.org/50288>.
Reported by Maxim Cournoyer.
* gnu/packages/autotools.scm (autoconf-2.71)[arguments]: Add
'unpatch-shebangs' phase.
---
gnu/packages/autotools.scm | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
index 33e1905..6987a8f 100644
--- a/gnu/packages/autotools.scm
+++ b/gnu/packages/autotools.scm
@@ -135,7 +135,18 @@ know anything about Autoconf or M4.")
(find-files "bin"
(lambda (file stat)
(executable-file? file)))))
- #t))))))))
+ #t))
+ (add-after 'install 'unpatch-shebangs
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Scripts that "autoconf -i" installs (config.guess,
+ ;; config.sub, and install-sh) must use a regular shebang
+ ;; rather than a reference to the store. Restore it.
+ ;; TODO: Move this phase to 'autoconf-2.69'.
+ (let* ((out (assoc-ref outputs "out"))
+ (build-aux (string-append
+ out "/share/autoconf/build-aux")))
+ (substitute* (find-files build-aux)
+ (("^#!.*/bin/sh") "#!/bin/sh")))))))))))
(define-public autoconf autoconf-2.69)