gnu: glib: Update to 2.58.1.
* gnu/packages/glib.scm (glib): Update to 2.58.1. [build-system]: Use meson-build-system. [outputs]: Remove "doc" as the documentation files are no longer included. [inputs]: Move libffi, util-linux, and zlib from here... [propagated-inputs]: ...to here; add libselinux. [arguments]: Remove key "disallowed-references" as it is not supported by the meson-build-system; delete "bootstrap" phase to prevent use of autotools; adjust "pre-build" phase; move "disable-failing-tests" phase after "unpack"; disable two more tests in "disable-failing-tests" phase; add phase "move-executables"; remove configure flags.master
parent
e7041c8ef8
commit
6c237a2d7b
|
@ -53,6 +53,7 @@
|
||||||
#:use-module (gnu packages perl-check)
|
#:use-module (gnu packages perl-check)
|
||||||
#:use-module (gnu packages pkg-config)
|
#:use-module (gnu packages pkg-config)
|
||||||
#:use-module (gnu packages python)
|
#:use-module (gnu packages python)
|
||||||
|
#:use-module (gnu packages selinux)
|
||||||
#:use-module (gnu packages web)
|
#:use-module (gnu packages web)
|
||||||
#:use-module (gnu packages xml)
|
#:use-module (gnu packages xml)
|
||||||
#:use-module (gnu packages xorg)
|
#:use-module (gnu packages xorg)
|
||||||
|
@ -159,7 +160,7 @@ shared NFS home directories.")
|
||||||
(define glib
|
(define glib
|
||||||
(package
|
(package
|
||||||
(name "glib")
|
(name "glib")
|
||||||
(version "2.56.3")
|
(version "2.58.1")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append "mirror://gnome/sources/"
|
(uri (string-append "mirror://gnome/sources/"
|
||||||
|
@ -167,19 +168,20 @@ shared NFS home directories.")
|
||||||
name "-" version ".tar.xz"))
|
name "-" version ".tar.xz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1cjcqz77m62zrx7224vl3f2cxwqf28r5xpqb2jy7av0vr2scb959"))
|
"1mnp4vankish8bqxymdl591p9v1ynk7pfc5dmpx3vamn4vcskmlp"))
|
||||||
(patches (search-patches "glib-tests-timer.patch"))))
|
(patches (search-patches "glib-tests-timer.patch"))))
|
||||||
(build-system gnu-build-system)
|
(build-system meson-build-system)
|
||||||
(outputs '("out" ; everything
|
(outputs '("out" ; everything
|
||||||
"bin" ; glib-mkenums, gtester, etc.; depends on Python
|
"bin")) ; glib-mkenums, gtester, etc.; depends on Python
|
||||||
"doc")) ; 20 MiB of GTK-Doc reference
|
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
`(("pcre" ,pcre))) ; in the Requires.private field of glib-2.0.pc
|
`(("pcre" ,pcre) ; in the Requires.private field of glib-2.0.pc
|
||||||
(inputs
|
("libffi" ,libffi) ; in the Requires.private field of gobject-2.0.pc
|
||||||
`(("coreutils" ,coreutils)
|
;; These are in the Requires.private field of gio-2.0.pc
|
||||||
("util-linux" ,util-linux) ; for libmount
|
("util-linux" ,util-linux) ; for libmount
|
||||||
("libffi" ,libffi)
|
("libselinux" ,libselinux)
|
||||||
("zlib" ,zlib)))
|
("zlib" ,zlib)))
|
||||||
|
(inputs
|
||||||
|
`(("coreutils" ,coreutils)))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("gettext" ,gettext-minimal)
|
`(("gettext" ,gettext-minimal)
|
||||||
("dbus" ,dbus) ; for GDBus tests
|
("dbus" ,dbus) ; for GDBus tests
|
||||||
|
@ -189,11 +191,14 @@ shared NFS home directories.")
|
||||||
("bash" ,bash)
|
("bash" ,bash)
|
||||||
("tzdata" ,tzdata-for-tests))) ; for tests/gdatetime.c
|
("tzdata" ,tzdata-for-tests))) ; for tests/gdatetime.c
|
||||||
(arguments
|
(arguments
|
||||||
`(#:disallowed-references (,tzdata-for-tests)
|
`(#:phases
|
||||||
#:phases
|
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
|
(delete 'bootstrap)
|
||||||
(add-before 'build 'pre-build
|
(add-before 'build 'pre-build
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
|
;; For building deterministic pyc files
|
||||||
|
(setenv "DETERMINISTIC_BUILD" "1")
|
||||||
|
|
||||||
;; For tests/gdatetime.c.
|
;; For tests/gdatetime.c.
|
||||||
(setenv "TZDIR"
|
(setenv "TZDIR"
|
||||||
(string-append (assoc-ref inputs "tzdata")
|
(string-append (assoc-ref inputs "tzdata")
|
||||||
|
@ -202,14 +207,8 @@ shared NFS home directories.")
|
||||||
;; Some tests want write access there.
|
;; Some tests want write access there.
|
||||||
(setenv "HOME" (getcwd))
|
(setenv "HOME" (getcwd))
|
||||||
(setenv "XDG_CACHE_HOME" (getcwd))
|
(setenv "XDG_CACHE_HOME" (getcwd))
|
||||||
|
|
||||||
(substitute* '("glib/gspawn.c"
|
|
||||||
"glib/tests/utils.c"
|
|
||||||
"tests/spawn-test.c")
|
|
||||||
(("/bin/sh")
|
|
||||||
(string-append (assoc-ref inputs "bash") "/bin/sh")))
|
|
||||||
#t))
|
#t))
|
||||||
(add-before 'check 'disable-failing-tests
|
(add-after 'unpack 'disable-failing-tests
|
||||||
(lambda _
|
(lambda _
|
||||||
(let ((disable
|
(let ((disable
|
||||||
(lambda (test-file test-paths)
|
(lambda (test-file test-paths)
|
||||||
|
@ -228,6 +227,15 @@ shared NFS home directories.")
|
||||||
;; recognize it.
|
;; recognize it.
|
||||||
"/thread/thread4"))
|
"/thread/thread4"))
|
||||||
|
|
||||||
|
;; This tries to find programs in FHS directories.
|
||||||
|
("glib/tests/utils.c"
|
||||||
|
("/utils/find-program"))
|
||||||
|
|
||||||
|
;; This fails because "glib/tests/echo-script" cannot be
|
||||||
|
;; found.
|
||||||
|
("glib/tests/spawn-singlethread.c"
|
||||||
|
("/gthread/spawn-script"))
|
||||||
|
|
||||||
("glib/tests/timer.c"
|
("glib/tests/timer.c"
|
||||||
(;; fails if compiler optimizations are enabled, which they
|
(;; fails if compiler optimizations are enabled, which they
|
||||||
;; are by default.
|
;; are by default.
|
||||||
|
@ -273,12 +281,30 @@ shared NFS home directories.")
|
||||||
(;; Requires /etc/machine-id.
|
(;; Requires /etc/machine-id.
|
||||||
"/gdbus/x11-autolaunch")))))
|
"/gdbus/x11-autolaunch")))))
|
||||||
(for-each (lambda (x) (apply disable x)) failing-tests)
|
(for-each (lambda (x) (apply disable x)) failing-tests)
|
||||||
|
#t)))
|
||||||
|
;; TODO: meson does not permit the bindir to be outside of prefix.
|
||||||
|
;; See https://github.com/mesonbuild/meson/issues/2561
|
||||||
|
;; We can remove this once meson is patched.
|
||||||
|
(add-after 'install 'move-executables
|
||||||
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
|
(let ((out (assoc-ref outputs "out"))
|
||||||
|
(bin (assoc-ref outputs "bin")))
|
||||||
|
(mkdir-p bin)
|
||||||
|
(rename-file (string-append out "/bin")
|
||||||
|
(string-append bin "/bin"))
|
||||||
|
;; Do not refer to "bindir", which points to "${prefix}/bin".
|
||||||
|
;; We don't patch "bindir" to point to "$bin/bin", because that
|
||||||
|
;; would create a reference cycle between the "out" and "bin"
|
||||||
|
;; outputs.
|
||||||
|
(substitute* (list (string-append out "/lib/pkgconfig/gio-2.0.pc")
|
||||||
|
(string-append out "/lib/pkgconfig/glib-2.0.pc"))
|
||||||
|
(("bindir=\\$\\{prefix\\}/bin") "")
|
||||||
|
(("=\\$\\{bindir\\}/") "="))
|
||||||
#t))))
|
#t))))
|
||||||
|
;; TODO: see above for explanation.
|
||||||
;; Note: `--docdir' and `--htmldir' are not honored, so work around it.
|
;; #:configure-flags (list (string-append "--bindir="
|
||||||
#:configure-flags (list (string-append "--with-html-dir="
|
;; (assoc-ref %outputs "bin")
|
||||||
(assoc-ref %outputs "doc")
|
;; "/bin"))
|
||||||
"/share/gtk-doc/html"))
|
|
||||||
|
|
||||||
;; In 'gio/tests', 'gdbus-test-codegen-generated.h' is #included in a
|
;; In 'gio/tests', 'gdbus-test-codegen-generated.h' is #included in a
|
||||||
;; file that gets compiled possibly before it has been fully generated.
|
;; file that gets compiled possibly before it has been fully generated.
|
||||||
|
|
Reference in New Issue