X-Git-Url: https://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/d02bb02f7d833ad371c53c346b6cb77f01377cf4..6898f5b45b0441a275254a2cd1c0c9195bc08cf8:/gnu/packages/glib.scm diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 8dff95fc70..0383aec0da 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès +;;; Copyright © 2013, 2014, 2015, 2016, 2019 Ludovic Courtès ;;; Copyright © 2013, 2015 Andreas Enge ;;; Copyright © 2013 Nikita Karetnikov ;;; Copyright © 2014, 2015, 2016, 2017, 2018 Mark H Weaver @@ -7,8 +7,9 @@ ;;; Copyright © 2016 Lukas Gradl ;;; Copyright © 2017, 2018 Ricardo Wurmus ;;; Copyright © 2017 Petter -;;; Copyright © 2018 Tobias Geerinckx-Rice +;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice ;;; Copyright © 2018 Alex Vong +;;; Copyright © 2019 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -27,16 +28,18 @@ (define-module (gnu packages glib) #:use-module (gnu packages) + #:use-module (gnu packages autotools) #:use-module (gnu packages backup) #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages bison) #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages docbook) + #:use-module (gnu packages documentation) #:use-module (gnu packages enlightenment) #:use-module (gnu packages file) #:use-module (gnu packages flex) - #:use-module (gnu packages gcc) #:use-module (gnu packages gettext) #:use-module (gnu packages gnome) #:use-module (gnu packages gperf) @@ -51,6 +54,7 @@ #:use-module (gnu packages perl-check) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages selinux) #:use-module (gnu packages web) #:use-module (gnu packages xml) #:use-module (gnu packages xorg) @@ -80,7 +84,7 @@ (define dbus (package (name "dbus") - (version "1.12.10") + (version "1.12.16") (source (origin (method url-fetch) (uri (string-append @@ -88,7 +92,7 @@ version ".tar.gz")) (sha256 (base32 - "1xywijmgfad4m3cxp0b4l6kvypwc53ckmhwwzbrc6n32jwj3ssab")) + "107ckxaff1cv4q6kmfdi2fb1nlsv03312a7kf6lb4biglhpjv8jl")) (patches (search-patches "dbus-helper-search-path.patch")))) (build-system gnu-build-system) (arguments @@ -119,14 +123,21 @@ "sysconfdir=/tmp/dummy" "install")))))) (native-inputs - `(("pkg-config" ,pkg-config))) + `(("pkg-config" ,pkg-config) + ;; Dependencies to generate the doc. + ("docbook-xml" ,docbook-xml-4.4) + ("docbook-xsl" ,docbook-xsl) + ("doxygen" ,doxygen) + ("xmlto" ,xmlto) + ("libxml2" ,libxml2) ;for XML_CATALOG_FILES + ("libxslt" ,libxslt) + ("yelp-tools" ,yelp-tools))) (inputs `(("expat" ,expat) - ;; Add a dependency on libx11 so that 'dbus-launch' has support for ;; '--autolaunch'. ("libx11" ,libx11))) - + (outputs '("out" "doc")) ;22 MiB of HTML doc (home-page "https://www.freedesktop.org/wiki/Software/dbus/") (synopsis "Message bus for inter-process communication (IPC)") (description @@ -150,7 +161,7 @@ shared NFS home directories.") (define glib (package (name "glib") - (version "2.56.2") + (version "2.60.4") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" @@ -158,21 +169,29 @@ shared NFS home directories.") name "-" version ".tar.xz")) (sha256 (base32 - "12d738n1wpvrn39zvy9xazg5h6vzyiwsw8z1qibcj09mh4bbsjnn")) - (patches (search-patches "glib-tests-timer.patch")))) - (build-system gnu-build-system) + "1p9k8z83272mkm4d4fhm5jhwhyw2basrwbz47yl5wbmrvk2ix51b")) + (patches (search-patches "glib-tests-timer.patch")) + (modules '((guix build utils))) + (snippet + '(begin + (substitute* "tests/spawn-test.c" + (("/bin/sh") "sh")) + #t)))) + (build-system meson-build-system) (outputs '("out" ; everything - "bin" ; glib-mkenums, gtester, etc.; depends on Python - "doc")) ; 20 MiB of GTK-Doc reference + "bin")) ; glib-mkenums, gtester, etc.; depends on Python (propagated-inputs - `(("pcre" ,pcre))) ; in the Requires.private field of glib-2.0.pc - (inputs - `(("coreutils" ,coreutils) + `(("pcre" ,pcre) ; in the Requires.private field of glib-2.0.pc + ("libffi" ,libffi) ; in the Requires.private field of gobject-2.0.pc + ;; These are in the Requires.private field of gio-2.0.pc ("util-linux" ,util-linux) ; for libmount - ("libffi" ,libffi) + ("libselinux" ,libselinux) ("zlib" ,zlib))) + (inputs + `(("coreutils" ,coreutils))) (native-inputs `(("gettext" ,gettext-minimal) + ("m4" ,m4) ; for installing m4 macros ("dbus" ,dbus) ; for GDBus tests ("pkg-config" ,pkg-config) ("python" ,python-wrapper) @@ -180,14 +199,11 @@ shared NFS home directories.") ("bash" ,bash) ("tzdata" ,tzdata-for-tests))) ; for tests/gdatetime.c (arguments - `(#:disallowed-references (,tzdata-for-tests) - #:phases + `(#:phases (modify-phases %standard-phases + (delete 'bootstrap) (add-before 'build 'pre-build (lambda* (#:key inputs outputs #:allow-other-keys) - ;; For building deterministic pyc files - (setenv "DETERMINISTIC_BUILD" "1") - ;; For tests/gdatetime.c. (setenv "TZDIR" (string-append (assoc-ref inputs "tzdata") @@ -196,14 +212,8 @@ shared NFS home directories.") ;; Some tests want write access there. (setenv "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)) - (add-before 'check 'disable-failing-tests + (add-after 'unpack 'disable-failing-tests (lambda _ (let ((disable (lambda (test-file test-paths) @@ -222,6 +232,15 @@ shared NFS home directories.") ;; recognize it. "/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" (;; fails if compiler optimizations are enabled, which they ;; are by default. @@ -265,18 +284,45 @@ shared NFS home directories.") ("gio/tests/gdbus-unix-addresses.c" (;; Requires /etc/machine-id. - "/gdbus/x11-autolaunch"))))) - (for-each (lambda (x) (apply disable x)) failing-tests) - #t)))) + "/gdbus/x11-autolaunch")) - ;; Note: `--docdir' and `--htmldir' are not honored, so work around it. - #:configure-flags (list (string-append "--with-html-dir=" - (assoc-ref %outputs "doc") - "/share/gtk-doc/html")) + ("gio/tests/gsocketclient-slow.c" + (;; These tests tries to resolve "localhost", and fails. + "/socket-client/happy-eyeballs/slow" + "/socket-client/happy-eyeballs/cancellation/delayed")) - ;; In 'gio/tests', 'gdbus-test-codegen-generated.h' is #included in a - ;; file that gets compiled possibly before it has been fully generated. - #:parallel-tests? #f)) + ))) + (for-each (lambda (x) (apply disable x)) failing-tests) + #t))) + (replace 'check + (lambda _ + (setenv "MESON_TESTTHREADS" + (number->string (parallel-job-count))) + ;; Do not run tests marked as "flaky". + (invoke "meson" "test" "--no-suite" "flaky"))) + ;; 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)))))) + ;; TODO: see above for explanation. + ;; #:configure-flags (list (string-append "--bindir=" + ;; (assoc-ref %outputs "bin") + ;; "/bin")) (native-search-paths ;; This variable is not really "owned" by GLib, but several related @@ -303,32 +349,44 @@ dynamic loading, and an object system.") (define gobject-introspection (package (name "gobject-introspection") - (version "1.56.1") + (version "1.58.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" "gobject-introspection/" (version-major+minor version) "/gobject-introspection-" version ".tar.xz")) (sha256 - (base32 "0jx2kryjd7l0vl5gb3qp1qjfy3cjiizvcd1snsm7pzwrzz67aa2v")) - (modules '((guix build utils))) - (snippet - '(begin - (substitute* "tools/g-ir-tool-template.in" - (("#!/usr/bin/env @PYTHON@") "#!@PYTHON@")) - #t)) + (base32 "12fzs3044047icdfs7cb2lsmnfi6w6fyhkci3m2rbvf5llgnhm29")) (patches (search-patches "gobject-introspection-cc.patch" "gobject-introspection-girepository.patch" "gobject-introspection-absolute-shlib-path.patch")))) (build-system gnu-build-system) + (arguments + `(;; The build system has at least one race condition involving Gio-2.0.gir + ;; which causes intermittent failures, as of 1.56.0. + #:parallel-build? #f + ;; The patch 'gobject-introspection-absolute-shlib-path.patch' causes + ;; some tests to fail. + #:tests? #f + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'do-not-use-/usr/bin/env + (lambda _ + (substitute* "tools/g-ir-tool-template.in" + (("#!@PYTHON_CMD@") + (string-append "#!" (which "python3")))) + #t))))) (inputs `(("bison" ,bison) ("flex" ,flex) ("glib" ,glib) - ("python-2" ,python-2))) + ("python" ,python-wrapper) + ("zlib" ,zlib))) (native-inputs - `(("glib" ,glib "bin") + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("glib" ,glib "bin") ("pkg-config" ,pkg-config))) (propagated-inputs `(;; In practice, GIR users will need libffi when using @@ -339,13 +397,6 @@ dynamic loading, and an object system.") (variable "GI_TYPELIB_PATH") (files '("lib/girepository-1.0"))))) (search-paths native-search-paths) - (arguments - `(;; The build system has at least one race condition involving Gio-2.0.gir - ;; which causes intermittent failures, as of 1.56.0. - #:parallel-build? #f - ;; The patch 'gobject-introspection-absolute-shlib-path.patch' causes - ;; some tests to fail. - #:tests? #f)) (home-page "https://wiki.gnome.org/GObjectIntrospection") (synopsis "Generate interface introspection data for GObject libraries") (description @@ -486,7 +537,7 @@ by GDBus included in Glib.") (define libsigc++ (package (name "libsigc++") - (version "2.10.0") + (version "2.10.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/libsigc++/" @@ -494,7 +545,7 @@ by GDBus included in Glib.") name "-" version ".tar.xz")) (sha256 (base32 - "10cd54l4zihss9qxfhd2iip2k7mr292k37i54r2cpgv0c8sdchzq")))) + "163s14d1rqp82gc1vsm3q0wzsbdicb9q6307kz0zk5lm6x9h5jmi")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) ("m4" ,m4))) @@ -513,7 +564,7 @@ has an ease of use unmatched by other C++ callback libraries.") (define glibmm (package (name "glibmm") - (version "2.54.1") + (version "2.58.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/glibmm/" @@ -521,7 +572,7 @@ has an ease of use unmatched by other C++ callback libraries.") "/glibmm-" version ".tar.xz")) (sha256 (base32 - "0jkapw18icz59cmlmsl00nwwz0wh291kb4hc9z9hxmq45drqrhkw")))) + "0idnaii4h3mdym2a55gkavipyxigwvbgfmzmwql85s4rgciqjhfk")))) (build-system gnu-build-system) (arguments `(;; XXX: Some tests uses C++14 features. Remove this when the default @@ -621,11 +672,7 @@ useful for C++.") (delete-file "tests/test_ossig.py") #t))))) (native-inputs - `(;; Use gcc-7 to work around an internal compiler error that happens - ;; when using gcc-5.5.0. FIXME: Try removing this when the default - ;; compiler is no longer gcc-5.5.0. - ("gcc" ,gcc-7) - ("which" ,which) + `(("which" ,which) ;for tests: dbus-run-session and glib-compile-schemas ("dbus" ,dbus) ("glib-bin" ,glib "bin") @@ -656,11 +703,7 @@ useful for C++.") ("python-pycairo" ,python2-pycairo) ("gobject-introspection" ,gobject-introspection))) (native-inputs - `(;; Use gcc-7 to work around an internal compiler error that happens - ;; when using gcc-5.5.0. FIXME: Try removing this when the default - ;; compiler is no longer gcc-5.5.0. - ("gcc" ,gcc-7) - ("which" ,which) + `(("which" ,which) ;for tests: dbus-run-session and glib-compile-schemas ("dbus" ,dbus) ("glib-bin" ,glib "bin") @@ -670,7 +713,7 @@ useful for C++.") (define-public perl-glib (package (name "perl-glib") - (version "1.327") + (version "1.329") (source (origin (method url-fetch) (uri (string-append @@ -678,7 +721,7 @@ useful for C++.") version ".tar.gz")) (sha256 (base32 - "0n7hjhbh5xhagvb0qjwzg21j22ks0csah0chgk98g4wnfllxjl0k")))) + "0d9ak0zknz81lv3cqkzr2mxdic6g5rrbb87skqc4jj48rz4f2k3v")))) (build-system perl-build-system) (native-inputs `(("perl-extutils-depends" ,perl-extutils-depends) @@ -721,7 +764,15 @@ up the Gnome environment, and are used in many unrelated projects.") "0z261fwrszxb28ccg3hsg9rizig4s84zvwmx6y31a4pyv7bvs5w3"))))))) (build-system gnu-build-system) (arguments - '(#:configure-flags '("--enable-vala-bindings"))) + '(#:configure-flags '("--enable-vala-bindings") + + ;; '../tools/glib-*.py' generate files but the target dependencies are + ;; (presumably) not fully specified in the makefile, leading to + ;; parallel build errors like: + ;; + ;; EOFError: EOF read where object expected + ;; make[2]: *** [Makefile:1906: _gen/register-dbus-glib-marshallers-body.h] Error 1 + #:parallel-build? #f)) (native-inputs `(("glib" ,glib "bin") ; uses glib-mkenums ("gobject-introspection" ,gobject-introspection) @@ -779,7 +830,7 @@ This package provides the library for GLib applications.") "#include \n#include "))))))) (synopsis "D-Bus API for C++") (description "This package provides D-Bus client API bindings for the C++ -programming langauage. It also contains the utility +programming language. It also contains the utility @command{dbuscxx-xml2cpp}.") (home-page "https://sourceforge.net/projects/dbus-cplusplus/") (license license:lgpl2.1+))) @@ -787,7 +838,7 @@ programming langauage. It also contains the utility (define-public appstream-glib (package (name "appstream-glib") - (version "0.7.12") + (version "0.7.15") (source (origin (method url-fetch) (uri (string-append "https://people.freedesktop.org/~hughsient/" @@ -795,7 +846,7 @@ programming langauage. It also contains the utility "appstream-glib-" version ".tar.xz")) (sha256 (base32 - "1jcb2bggcic3iczr2hn8zp8a3c2hl1xjij0aawr7kwqmzh9b3jms")))) + "17ram4j3cvs78si0gi1labarr91pw68zn8kam41cqbvlwdyr89vy")))) (build-system meson-build-system) (native-inputs `(("gettext" ,gettext-minimal)