gnu: glibc/hurd: Use modify-phases syntax.

* gnu/packages/base.scm (glibc/hurd)[arguments]: Use modify-phases syntax.
This commit is contained in:
Ricardo Wurmus 2017-05-16 21:59:18 +02:00 committed by Ludovic Courtès
parent ed5e3ab8ab
commit 5d6e38a6c3
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 27 additions and 29 deletions

View File

@ -778,35 +778,33 @@ with the Linux kernel.")
((#:phases original-phases) ((#:phases original-phases)
;; Add libmachuser.so and libhurduser.so to libc.so's search path. ;; Add libmachuser.so and libhurduser.so to libc.so's search path.
;; See <http://lists.gnu.org/archive/html/bug-hurd/2015-07/msg00051.html>. ;; See <http://lists.gnu.org/archive/html/bug-hurd/2015-07/msg00051.html>.
`(alist-cons-after `(modify-phases ,original-phases
'install 'augment-libc.so (add-after 'install 'augment-libc.so
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))) (let* ((out (assoc-ref outputs "out")))
(substitute* (string-append out "/lib/libc.so") (substitute* (string-append out "/lib/libc.so")
(("/[^ ]+/lib/libc.so.0.3") (("/[^ ]+/lib/libc.so.0.3")
(string-append out "/lib/libc.so.0.3" " libmachuser.so" " libhurduser.so")))) (string-append out "/lib/libc.so.0.3" " libmachuser.so" " libhurduser.so"))))
#t) #t))
(alist-cons-after (add-after 'pre-configure 'pre-configure-set-pwd
'pre-configure 'pre-configure-set-pwd (lambda _
(lambda _ ;; Use the right 'pwd'.
;; Use the right 'pwd'. (substitute* "configure"
(substitute* "configure" (("/bin/pwd") "pwd"))
(("/bin/pwd") "pwd"))) #t))
(alist-replace (replace 'build
'build (lambda _
(lambda _ ;; Force mach/hurd/libpthread subdirs to build first in order to avoid
;; Force mach/hurd/libpthread subdirs to build first in order to avoid ;; linking errors.
;; linking errors. ;; See <https://lists.gnu.org/archive/html/bug-hurd/2016-11/msg00045.html>
;; See <https://lists.gnu.org/archive/html/bug-hurd/2016-11/msg00045.html> (let ((-j (list "-j" (number->string (parallel-job-count)))))
(let ((-j (list "-j" (number->string (parallel-job-count))))) (let-syntax ((make (syntax-rules ()
(let-syntax ((make (syntax-rules () ((_ target)
((_ target) (zero? (apply system* "make" target -j))))))
(zero? (apply system* "make" target -j)))))) (and (make "mach/subdir_lib")
(and (make "mach/subdir_lib") (make "hurd/subdir_lib")
(make "hurd/subdir_lib") (make "libpthread/subdir_lib")
(make "libpthread/subdir_lib") (zero? (apply system* "make" -j)))))))))
(zero? (apply system* "make" -j))))))
,original-phases))))
((#:configure-flags original-configure-flags) ((#:configure-flags original-configure-flags)
`(append (list "--host=i586-pc-gnu" `(append (list "--host=i586-pc-gnu"