gnu: glib: Use modify-phases syntax.

* gnu/packages/glib.scm (glib)[arguments]: Use 'modify-phases'.
This commit is contained in:
宋文武 2016-04-02 15:18:30 +08:00 committed by Ludovic Courtès
parent 944504b32d
commit 0f795a0a53
1 changed files with 19 additions and 19 deletions

View File

@ -160,29 +160,29 @@ shared NFS home directories.")
("perl" ,perl) ; needed by GIO tests ("perl" ,perl) ; needed by GIO tests
("bash" ,bash))) ("bash" ,bash)))
(arguments (arguments
'(#:phases (alist-cons-before '(#:phases
'build 'pre-build (modify-phases %standard-phases
(lambda* (#:key inputs outputs #:allow-other-keys) (add-before 'build 'pre-build
;; For tests/gdatetime.c. (lambda* (#:key inputs outputs #:allow-other-keys)
(setenv "TZDIR" ;; For tests/gdatetime.c.
(string-append (assoc-ref inputs "tzdata") (setenv "TZDIR"
"/share/zoneinfo")) (string-append (assoc-ref inputs "tzdata")
"/share/zoneinfo"))
;; Some tests want write access there. ;; Some tests want write access there.
(setenv "XDG_CACHE_HOME" (getcwd)) (setenv "XDG_CACHE_HOME" (getcwd))
(substitute* '("glib/gspawn.c" (substitute* '("glib/gspawn.c"
"glib/tests/utils.c" "glib/tests/utils.c"
"tests/spawn-test.c") "tests/spawn-test.c")
(("/bin/sh") (("/bin/sh")
(string-append (assoc-ref inputs "bash") "/bin/sh"))) (string-append (assoc-ref inputs "bash") "/bin/sh")))
;; Disable a test that requires dbus. ;; Disable a test that requires dbus.
(substitute* "gio/tests/gdbus-serialization.c" (substitute* "gio/tests/gdbus-serialization.c"
(("g_test_add_func \ (("g_test_add_func \
\\(\"/gdbus/message-serialize/double-array\", test_double_array\\);" all) \\(\"/gdbus/message-serialize/double-array\", test_double_array\\);" all)
(string-append "/* " all " */")))) (string-append "/* " all " */"))))))
%standard-phases)
;; Note: `--docdir' and `--htmldir' are not honored, so work around it. ;; Note: `--docdir' and `--htmldir' are not honored, so work around it.
#:configure-flags (list (string-append "--with-html-dir=" #:configure-flags (list (string-append "--with-html-dir="