[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
21/49: gnu: Perl: Resolve TODO.
From: |
guix-commits |
Subject: |
21/49: gnu: Perl: Resolve TODO. |
Date: |
Fri, 23 Jul 2021 11:33:06 -0400 (EDT) |
mbakke pushed a commit to branch core-updates
in repository guix.
commit 9840ec8cabc0adf5d99d45276617eeaf6f4f3635
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Sun Jul 18 13:43:16 2021 +0200
gnu: Perl: Resolve TODO.
* gnu/packages/perl.scm (perl)[inputs]: Add COREUTILS-MINIMAL.
[arguments]: Unconditionally patch /bin/pwd in Cwd.pm. While at it, remove
trailing #t's.
---
gnu/packages/perl.scm | 58 ++++++++++++++++++++++-----------------------------
1 file changed, 25 insertions(+), 33 deletions(-)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 682b583..685a319 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -123,20 +123,19 @@
#:phases
(modify-phases %standard-phases
(add-before 'configure 'setup-configure
- (lambda _
- ;; Use the right path for `pwd'.
- ;; TODO: use coreutils from INPUTS instead of 'which'
- ;; in next rebuild cycle, see fixup below.
- (substitute* "dist/PathTools/Cwd.pm"
- (("/bin/pwd")
- (which "pwd")))
-
- ;; Build in GNU89 mode to tolerate C++-style comment in libc's
- ;; <bits/string3.h>.
- (substitute* "cflags.SH"
- (("-std=c89")
- "-std=gnu89"))
- #t))
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((coreutils (or (assoc-ref inputs "coreutils-minimal")
+ (assoc-ref inputs "coreutils"))))
+ ;; Use the right path for `pwd'.
+ (substitute* "dist/PathTools/Cwd.pm"
+ (("'/bin/pwd'")
+ (string-append "'" coreutils "/bin/pwd'")))
+
+ ;; Build in GNU89 mode to tolerate C++-style comment in libc's
+ ;; <bits/string3.h>.
+ (substitute* "cflags.SH"
+ (("-std=c89")
+ "-std=gnu89")))))
,@(if (%current-target-system)
`((add-after 'unpack 'unpack-cross
(lambda* (#:key native-inputs inputs #:allow-other-keys)
@@ -155,8 +154,7 @@
(("! */bin/sh") (string-append "! " bash "/bin/bash"))
((" /bin/sh") (string-append bash "/bin/bash")))
(substitute* '("ext/Errno/Errno_pm.PL")
- (("\\$cpp < errno.c") "$Config{cc} -E errno.c")))
- #t))
+ (("\\$cpp < errno.c") "$Config{cc} -E errno.c")))))
(replace 'configure
(lambda* (#:key configure-flags outputs inputs
#:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -172,22 +170,18 @@
(lambda (x) (or (string-prefix? "-d" x)
(string-prefix? "-Dcc="
x))))
configure-flags)))
- (bash (assoc-ref inputs "bash"))
- (coreutils (assoc-ref inputs "coreutils")))
+ (bash (assoc-ref inputs "bash")))
(format (current-error-port)
- "running ./configure ~a\n" (string-join
configure-flags))
+ "running ./configure ~a\n"
+ (string-join configure-flags))
(apply invoke (cons "./configure" configure-flags))
(substitute* "config.sh"
(((string-append store-directory "/[^/]*-bash-[^/]*"))
bash))
(substitute* '("config.h")
(("^#define SH_PATH .*")
- (string-append "#define SH_PATH \"" bash
"/bin/bash\"\n")))
- ;;TODO: fix this in setup-configure next rebuild cycle
- (substitute* "dist/PathTools/Cwd.pm"
- (((string-append store-directory
"/[^/]*-coreutils-[^/]*"))
- coreutils))
- #t)))
+ (string-append "#define SH_PATH \""
+ bash "/bin/bash\"\n"))))))
(add-after 'build 'touch-non-built-files-for-install
(lambda _
;; `make install' wants to install these although they do
@@ -201,8 +195,7 @@
'("Pod-Usage/blib/script/pod2text"
"Pod-Usage/blib/script/pod2usage"
"Pod-Checker/blib/script/podchecker"
- "Pod-Parser/blib/script/podselect")))
- #t)))
+ "Pod-Parser/blib/script/podselect"))))))
`((replace 'configure
(lambda* (#:key configure-flags #:allow-other-keys)
(format #t "Perl configure flags: ~s~%" configure-flags)
@@ -233,13 +226,12 @@
(("libpth => .*$")
(string-append "libpth => '" libc
"/lib',\n"))))
- config2)
- #t))))))
+ config2)))))))
(inputs
- (if (%current-target-system)
- `(("bash" ,bash-minimal)
- ("coreutils" ,coreutils))
- '()))
+ (append (list coreutils-minimal)
+ (if (%current-target-system)
+ (list bash-minimal)
+ '())))
(native-inputs
(if (%current-target-system)
`(("perl-cross"
- 07/49: gnu: gamin: Remove unused input., (continued)
- 07/49: gnu: gamin: Remove unused input., guix-commits, 2021/07/23
- 06/49: gnu: glib: Remove unused input., guix-commits, 2021/07/23
- 08/49: gnu: gnome-backgrounds: Remove unused input., guix-commits, 2021/07/23
- 12/49: gnu: Python: Remove trailing #t's., guix-commits, 2021/07/23
- 13/49: gnu: glibc: Remove obsolete patch., guix-commits, 2021/07/23
- 14/49: gnu: commencement: Decouple python-boot0 from python., guix-commits, 2021/07/23
- 15/49: gnu: tzdata-for-tests: Update to 2021a., guix-commits, 2021/07/23
- 11/49: gnu: Python: Update to 3.9.6., guix-commits, 2021/07/23
- 17/49: gnu: RHash: Update to 1.4.2., guix-commits, 2021/07/23
- 20/49: gnu: coreutils-minimal: Do not build documentation., guix-commits, 2021/07/23
- 21/49: gnu: Perl: Resolve TODO.,
guix-commits <=
- 22/49: build-system/cmake: Define '%build-inputs' when cross-compiling., guix-commits, 2021/07/23
- 23/49: gnu: nghttp2: Update to 1.44.0., guix-commits, 2021/07/23
- 10/49: gnu: glib-networking: Remove unused input., guix-commits, 2021/07/23
- 16/49: gnu: RHash: Turn arguments into gexp., guix-commits, 2021/07/23
- 24/49: gnu: libuv: Update to 1.41.1., guix-commits, 2021/07/23
- 27/49: gnu: attr: Update to 2.5.1., guix-commits, 2021/07/23
- 29/49: gnu: fontconfig: Update to 2.13.94., guix-commits, 2021/07/23
- 25/49: gnu: ncurses: Update to 6.2.20210619., guix-commits, 2021/07/23
- 30/49: gnu: libspectre: Update to 0.2.9., guix-commits, 2021/07/23
- 33/49: gnu: util-linux: Update to 2.37., guix-commits, 2021/07/23