guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

05/07: gnu: qemu: Use 'modify-phases'.


From: Ludovic Courtès
Subject: 05/07: gnu: qemu: Use 'modify-phases'.
Date: Thu, 26 May 2016 21:59:02 +0000 (UTC)

civodul pushed a commit to branch master
in repository guix.

commit 05051e8bb1ced2b34b7c7813cad70794c9792297
Author: Ludovic Courtès <address@hidden>
Date:   Thu May 26 23:39:46 2016 +0200

    gnu: qemu: Use 'modify-phases'.
    
    * gnu/packages/qemu.scm (qemu)[arguments]: Use 'modify-phases'.
---
 gnu/packages/qemu.scm |   89 ++++++++++++++++++++++++-------------------------
 1 file changed, 43 insertions(+), 46 deletions(-)

diff --git a/gnu/packages/qemu.scm b/gnu/packages/qemu.scm
index 89741ee..dcba279 100644
--- a/gnu/packages/qemu.scm
+++ b/gnu/packages/qemu.scm
@@ -69,55 +69,52 @@
        ;; boot_sector_test: assertion failed (signature == SIGNATURE): 
(0x00000000 == 0x0000dead)
        #:parallel-tests? #f
 
-       #:phases (alist-replace
-                 'configure
-                 (lambda* (#:key inputs outputs (configure-flags '())
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs outputs (configure-flags '())
                            #:allow-other-keys)
-                   ;; The `configure' script doesn't understand some of the
-                   ;; GNU options.  Thus, add a new phase that's compatible.
-                   (let ((out (assoc-ref outputs "out")))
-                     (setenv "SHELL" (which "bash"))
+             ;; The `configure' script doesn't understand some of the
+             ;; GNU options.  Thus, add a new phase that's compatible.
+             (let ((out (assoc-ref outputs "out")))
+               (setenv "SHELL" (which "bash"))
 
-                     ;; While we're at it, patch for tests.
-                     (substitute* "tests/libqtest.c"
-                       (("/bin/sh") (which "sh")))
-
-                     ;; The binaries need to be linked against -lrt.
-                     (setenv "LDFLAGS" "-lrt")
-                     (zero?
-                      (apply system*
-                             `("./configure"
-                               ,(string-append "--cc=" (which "gcc"))
-                               "--disable-debug-info" ; save build space
-                               "--enable-virtfs"      ; just to be sure
-                               ,(string-append "--prefix=" out)
-                               ,@configure-flags)))))
-                 (alist-cons-after
-                  'install 'install-info
-                  (lambda* (#:key inputs outputs #:allow-other-keys)
-                    ;; Install the Info manual, unless Texinfo is missing.
-                    (or (not (assoc-ref inputs "texinfo"))
-                        (let ((out (assoc-ref outputs "out")))
-                          (and (zero? (system* "make" "info"))
-                               (let ((infodir (string-append out 
"/share/info")))
-                                 (mkdir-p infodir)
-                                 (for-each (lambda (info)
-                                             (copy-file
-                                              info
-                                              (string-append infodir "/" 
info)))
-                                           (find-files "." "\\.info$"))
-                                 #t)))))
-                  (alist-cons-before
-                   'check 'disable-test-qga
-                   (lambda _
-                     (substitute* "tests/Makefile"
-                       ;; Comment out the test-qga test, which needs /sys and
-                       ;; fails within the build environment.
-                       (("check-unit-.* tests/test-qga" all)
-                        (string-append "# " all)))
-                     #t)
-                   %standard-phases)))))
+               ;; While we're at it, patch for tests.
+               (substitute* "tests/libqtest.c"
+                 (("/bin/sh") (which "sh")))
 
+               ;; The binaries need to be linked against -lrt.
+               (setenv "LDFLAGS" "-lrt")
+               (zero?
+                (apply system*
+                       `("./configure"
+                         ,(string-append "--cc=" (which "gcc"))
+                         "--disable-debug-info" ; save build space
+                         "--enable-virtfs"      ; just to be sure
+                         ,(string-append "--prefix=" out)
+                         ,@configure-flags))))))
+         (add-after 'install 'install-info
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             ;; Install the Info manual, unless Texinfo is missing.
+             (or (not (assoc-ref inputs "texinfo"))
+                 (let ((out (assoc-ref outputs "out")))
+                   (and (zero? (system* "make" "info"))
+                        (let ((infodir (string-append out "/share/info")))
+                          (mkdir-p infodir)
+                          (for-each (lambda (info)
+                                      (copy-file
+                                       info
+                                       (string-append infodir "/" info)))
+                                    (find-files "." "\\.info$"))
+                          #t))))))
+         (add-before 'check 'disable-test-qga
+           (lambda _
+             (substitute* "tests/Makefile"
+               ;; Comment out the test-qga test, which needs /sys and
+               ;; fails within the build environment.
+               (("check-unit-.* tests/test-qga" all)
+                (string-append "# " all)))
+             #t)))))
     (inputs                                       ; TODO: Add optional inputs.
      `(("sdl" ,sdl)
        ("mesa" ,mesa)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]