[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#62181: [PATCH v2 1/2] gnu: gnulib: Reset the shebangs.
From: |
Vivien Kraus |
Subject: |
bug#62181: [PATCH v2 1/2] gnu: gnulib: Reset the shebangs. |
Date: |
Tue, 14 Mar 2023 09:58:34 +0100 |
User-agent: |
Evolution 3.46.0 |
* gnu/packages/build-tools.scm (gnulib) [phase reset-shebangs]: After
installation, rewrite the /gnu/store shebangs in the distributed build-aux
files.
[inputs, native-inputs]: Add bash-minimal.
[phase let-autogen-execute-gnulib-tool]: Specify a shell to execute
gnulib-tool from autogen.sh.
---
gnu/packages/build-tools.scm | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index 28ab77bbb4..caf0f3fc1c 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -973,12 +973,25 @@ (define (find-ucd-files . names)
("NormalizationTest.txt" . "uninorm")
("auxiliary/GraphemeBreakTest.txt" . "unigbrk")
("auxiliary/WordBreakTest.txt" . "uniwbrk")))
- (delete-file "gen-uni-tables")))))))
- (inputs ;; Shebangs for some auxiliary build files.
- (list python perl clisp))
+ (delete-file "gen-uni-tables"))))
+ (add-after 'install 'restore-shebangs
+ (lambda _
+ (substitute* (find-files
+ (string-append #$output "/src/gnulib")
+ (lambda (fname stat)
+ (and (not (string-suffix?
"/lib/javaversion.class" fname))
+ (not (string-suffix? ".mo" fname)))))
+ (("^#! ?(.*)/bin/sh" _ prefix)
+ "#!/bin/sh")
+ (("^#! ?(.*)/bin/python3" _ prefix)
+ "#!/usr/bin/env python3")
+ (("^#! ?(.*)/bin/([a-zA-Z0-9-]+)" _ prefix program)
+ (string-append "#!/usr/bin/" program))))))))
+ (inputs ;; Shebang for gnulib-tool
+ (list bash-minimal))
(native-inputs
(list
- python perl clisp
+ bash-minimal python perl clisp
;; Unicode data:
ucd-next
;; Programs for the tests:
--
2.39.2
- bug#62181: [PATCH 0/2] Re: bug#62181: Gnulib package keeps references to clisp, Python, Perl, and Bash, (continued)
- bug#62181: [PATCH 0/2] Re: bug#62181: Gnulib package keeps references to clisp, Python, Perl, and Bash, Vivien Kraus, 2023/03/14
- bug#62181: [PATCH 0/2] Re: bug#62181: Gnulib package keeps references to clisp, Python, Perl, and Bash, Ludovic Courtès, 2023/03/16
- bug#62181: [PATCH v2 0/2] Drop references to other store items in /src, with better style, Vivien Kraus, 2023/03/16