mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-25 12:09:15 -05:00
gnu: glibc: Use 'modify-phases'.
* gnu/packages/base.scm (glibc)[arguments]: Use 'modify-phases' instead of 'alist-cons-before'.
This commit is contained in:
parent
5c962e93e5
commit
57f65bcc9c
1 changed files with 45 additions and 45 deletions
|
@ -512,56 +512,56 @@ (define-public glibc
|
||||||
"libc_cv_ssp=no")
|
"libc_cv_ssp=no")
|
||||||
|
|
||||||
#:tests? #f ; XXX
|
#:tests? #f ; XXX
|
||||||
#:phases (alist-cons-before
|
#:phases (modify-phases %standard-phases
|
||||||
'configure 'pre-configure
|
(add-before
|
||||||
(lambda* (#:key inputs native-inputs outputs
|
'configure 'pre-configure
|
||||||
#:allow-other-keys)
|
(lambda* (#:key inputs native-inputs outputs
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
#:allow-other-keys)
|
||||||
(bin (string-append out "/bin"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
;; FIXME: Normally we would look it up only in INPUTS
|
(bin (string-append out "/bin"))
|
||||||
;; but cross-base uses it as a native input.
|
;; FIXME: Normally we would look it up only in INPUTS
|
||||||
(bash (or (assoc-ref inputs "static-bash")
|
;; but cross-base uses it as a native input.
|
||||||
(assoc-ref native-inputs "static-bash"))))
|
(bash (or (assoc-ref inputs "static-bash")
|
||||||
;; Use `pwd', not `/bin/pwd'.
|
(assoc-ref native-inputs "static-bash"))))
|
||||||
(substitute* "configure"
|
;; Use `pwd', not `/bin/pwd'.
|
||||||
(("/bin/pwd") "pwd"))
|
(substitute* "configure"
|
||||||
|
(("/bin/pwd") "pwd"))
|
||||||
|
|
||||||
;; Install the rpc data base file under `$out/etc/rpc'.
|
;; Install the rpc data base file under `$out/etc/rpc'.
|
||||||
;; FIXME: Use installFlags = [ "sysconfdir=$(out)/etc" ];
|
;; FIXME: Use installFlags = [ "sysconfdir=$(out)/etc" ];
|
||||||
(substitute* "sunrpc/Makefile"
|
(substitute* "sunrpc/Makefile"
|
||||||
(("^\\$\\(inst_sysconfdir\\)/rpc(.*)$" _ suffix)
|
(("^\\$\\(inst_sysconfdir\\)/rpc(.*)$" _ suffix)
|
||||||
(string-append out "/etc/rpc" suffix "\n"))
|
(string-append out "/etc/rpc" suffix "\n"))
|
||||||
(("^install-others =.*$")
|
(("^install-others =.*$")
|
||||||
(string-append "install-others = " out "/etc/rpc\n")))
|
(string-append "install-others = " out "/etc/rpc\n")))
|
||||||
|
|
||||||
(substitute* "Makeconfig"
|
(substitute* "Makeconfig"
|
||||||
;; According to
|
;; According to
|
||||||
;; <http://www.linuxfromscratch.org/lfs/view/stable/chapter05/glibc.html>,
|
;; <http://www.linuxfromscratch.org/lfs/view/stable/chapter05/glibc.html>,
|
||||||
;; linking against libgcc_s is not needed with GCC
|
;; linking against libgcc_s is not needed with GCC
|
||||||
;; 4.7.1.
|
;; 4.7.1.
|
||||||
((" -lgcc_s") ""))
|
((" -lgcc_s") ""))
|
||||||
|
|
||||||
;; Have `system' use that Bash.
|
;; Have `system' use that Bash.
|
||||||
(substitute* "sysdeps/posix/system.c"
|
(substitute* "sysdeps/posix/system.c"
|
||||||
(("#define[[:blank:]]+SHELL_PATH.*$")
|
(("#define[[:blank:]]+SHELL_PATH.*$")
|
||||||
(format #f "#define SHELL_PATH \"~a/bin/bash\"\n"
|
(format #f "#define SHELL_PATH \"~a/bin/bash\"\n"
|
||||||
bash)))
|
bash)))
|
||||||
|
|
||||||
;; Same for `popen'.
|
;; Same for `popen'.
|
||||||
(substitute* "libio/iopopen.c"
|
(substitute* "libio/iopopen.c"
|
||||||
(("/bin/sh")
|
(("/bin/sh")
|
||||||
(string-append bash "/bin/bash")))
|
(string-append bash "/bin/bash")))
|
||||||
|
|
||||||
;; Make sure we don't retain a reference to the
|
;; Make sure we don't retain a reference to the
|
||||||
;; bootstrap Perl.
|
;; bootstrap Perl.
|
||||||
(substitute* "malloc/mtrace.pl"
|
(substitute* "malloc/mtrace.pl"
|
||||||
(("^#!.*")
|
(("^#!.*")
|
||||||
;; The shebang can be omitted, because there's the
|
;; The shebang can be omitted, because there's the
|
||||||
;; "bilingual" eval/exec magic at the top of the file.
|
;; "bilingual" eval/exec magic at the top of the file.
|
||||||
"")
|
"")
|
||||||
(("exec @PERL@")
|
(("exec @PERL@")
|
||||||
"exec perl"))))
|
"exec perl"))))))))
|
||||||
%standard-phases)))
|
|
||||||
|
|
||||||
(inputs `(("static-bash" ,static-bash)))
|
(inputs `(("static-bash" ,static-bash)))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue