gnu: appstream-glib: Update to 0.7.5.
[jackhill/guix/guix.git] / gnu / packages / glib.scm
index a78b188..2c339c1 100644 (file)
@@ -2,9 +2,12 @@
 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
-;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2014, 2015, 2016, 2017 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
+;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017 Petter <petter@mykolab.ch>
+;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages glib)
-  #:use-module ((guix licenses) #:prefix license:)
-  #:use-module (guix packages)
-  #:use-module (guix download)
-  #:use-module (guix utils)
-  #:use-module (guix build-system gnu)
-  #:use-module (guix build-system python)
   #:use-module (gnu packages)
+  #:use-module (gnu packages backup)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages enlightenment)
+  #:use-module (gnu packages file)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gnome)
+  #:use-module (gnu packages gperf)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages libffi)
+  #:use-module (gnu packages linux)
+  #:use-module (gnu packages m4)
+  #:use-module (gnu packages nettle)
   #:use-module (gnu packages pcre)
+  #:use-module (gnu packages package-management)
   #:use-module (gnu packages perl)
+  #:use-module (gnu packages perl-check)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
-  #:use-module (gnu packages xml)
-  #:use-module (gnu packages bash)
-  #:use-module (gnu packages file)
+  #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
-  #:use-module (gnu packages m4)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix build-system meson)
+  #:use-module (guix build-system perl)
+  #:use-module (guix build-system python)
+  #:use-module (guix download)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix utils)
 
   ;; Export variables up-front to allow circular dependency with the 'xorg'
   ;; module.
             itstool
             libsigc++
             glibmm
-            telepathy-glib))
+            telepathy-glib
+            perl-net-dbus
+            perl-net-dbus-glib))
 
 (define dbus
   (package
     (name "dbus")
-    (version "1.10.14")
+    (version "1.10.22")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -72,7 +85,7 @@
                     version ".tar.gz"))
               (sha256
                (base32
-                "10x0wvv2ly4lyyfd42k4xw0ar5qdbi9cksw3l5fcwf1y6mq8y8r3"))
+                "15vv9gz5i4f5l7h0d045qz5iyvl89hjk2k83lb4vbizd7qg41cg2"))
               (patches (search-patches "dbus-helper-search-path.patch"))))
     (build-system gnu-build-system)
     (arguments
@@ -134,7 +147,7 @@ shared NFS home directories.")
 (define glib
   (package
    (name "glib")
-   (version "2.48.2")
+   (version "2.52.3")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnome/sources/"
@@ -142,7 +155,7 @@ shared NFS home directories.")
                                 name "-" version ".tar.xz"))
             (sha256
              (base32
-              "1x6kwrk1zyd3csv0ca3pmwc4bnkc33agn95cds15h6nbi4apappj"))
+              "0a71wkkhkvad84gm30w13micxxgqqw3sxhybj7nd9z60lwspdvi5"))
             (patches (search-patches "glib-tests-timer.patch"))))
    (build-system gnu-build-system)
    (outputs '("out"           ; everything
@@ -152,18 +165,20 @@ shared NFS home directories.")
     `(("pcre" ,pcre))) ; in the Requires.private field of glib-2.0.pc
    (inputs
     `(("coreutils" ,coreutils)
+      ("util-linux" ,util-linux)  ; for libmount
       ("libffi" ,libffi)
-      ("zlib" ,zlib)
-      ("tzdata" ,tzdata)))     ; for tests/gdatetime.c
+      ("zlib" ,zlib)))
    (native-inputs
     `(("gettext" ,gettext-minimal)
       ("dbus" ,dbus)                              ; for GDBus tests
       ("pkg-config" ,pkg-config)
       ("python" ,python-wrapper)
       ("perl" ,perl)                              ; needed by GIO tests
-      ("bash" ,bash)))
+      ("bash" ,bash)
+      ("tzdata" ,tzdata-2017a)))                  ; for tests/gdatetime.c
    (arguments
-    '(#:phases
+    `(#:disallowed-references (,tzdata-2017a)
+      #:phases
       (modify-phases %standard-phases
         (add-before 'build 'pre-build
           (lambda* (#:key inputs outputs #:allow-other-keys)
@@ -242,7 +257,12 @@ shared NFS home directories.")
 
                      ("gio/tests/gdbus-unix-addresses.c"
                       (;; Requires /etc/machine-id.
-                       "/gdbus/x11-autolaunch")))))
+                       "/gdbus/x11-autolaunch"))
+
+                     ("glib/tests/gdatetime.c"
+                      (;; Assumes that the Brasilian time zone is named 'BRT',
+                       ;; which is no longer true as of tzdata-2017a.
+                       "/GDateTime/new_full")))))
               (and-map (lambda (x) (apply disable x)) failing-tests)))))
 
       ;; Note: `--docdir' and `--htmldir' are not honored, so work around it.
@@ -273,20 +293,20 @@ shared NFS home directories.")
     "GLib provides data structure handling for C, portability wrappers,
 and interfaces for such runtime functionality as an event loop, threads,
 dynamic loading, and an object system.")
-   (home-page "http://developer.gnome.org/glib/")
+   (home-page "https://developer.gnome.org/glib/")
    (license license:lgpl2.0+)))                        ; some files are under lgpl2.1+
 
 (define gobject-introspection
   (package
     (name "gobject-introspection")
-    (version "1.48.0")
+    (version "1.52.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 "0xsqwxhfqzr79av89mg766kxpb2i41bd0vwspk01xjdzrnn5l9zs"))
+              (base32 "1x5gkyrglv3dn9b4fsgw6asqgjw1wj7qc37g9pyac6pyaa6w7l1f"))
              (modules '((guix build utils)))
              (snippet
               '(substitute* "tools/g-ir-tool-template.in"
@@ -337,6 +357,7 @@ bindings to call into the C library.")
              (uri (string-append "https://launchpad.net/intltool/trunk/"
                                  version "/+download/intltool-"
                                  version ".tar.gz"))
+             (patches (search-patches "intltool-perl-compatibility.patch"))
              (sha256
               (base32
                "1karx4sb7bnm2j67q0q74hspkfn6lqprpy5r99vkn5bb36a4viv7"))))
@@ -395,13 +416,12 @@ The intltool collection can be used to do these things:
     (arguments
      '(#:phases
        (modify-phases %standard-phases
-         (add-after
-          'install 'wrap-program
-          (lambda* (#:key outputs #:allow-other-keys)
-            (let ((prog (string-append (assoc-ref outputs "out")
-                                       "/bin/itstool")))
-              (wrap-program prog
-                `("PYTHONPATH" = (,(getenv "PYTHONPATH"))))))))))
+         (add-after 'install 'wrap-program
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((prog (string-append (assoc-ref outputs "out")
+                                        "/bin/itstool")))
+               (wrap-program prog
+                 `("PYTHONPATH" = (,(getenv "PYTHONPATH"))))))))))
     (home-page "http://www.itstool.org")
     (synopsis "Tool to translate XML documents with PO files")
     (description
@@ -427,7 +447,7 @@ translated.")
 (define dbus-glib
   (package
     (name "dbus-glib")
-    (version "0.106")
+    (version "0.108")
     (source (origin
              (method url-fetch)
              (uri
@@ -435,7 +455,7 @@ translated.")
                              version ".tar.gz"))
              (sha256
               (base32
-               "0in0i6v68ixcy0ip28i84hdczf10ykq9x682qgcvls6gdmq552dk"))))
+               "0b307hw9j41npzr6niw1bs6ryp87m5yafg492gqwvsaj4dz0qd4z"))))
     (build-system gnu-build-system)
     (propagated-inputs ; according to dbus-glib-1.pc
      `(("dbus" ,dbus)
@@ -482,7 +502,7 @@ has an ease of use unmatched by other C++ callback libraries.")
 (define glibmm
   (package
     (name "glibmm")
-    (version "2.48.1")
+    (version "2.50.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnome/sources/glibmm/"
@@ -490,25 +510,26 @@ has an ease of use unmatched by other C++ callback libraries.")
                                  "/glibmm-" version ".tar.xz"))
              (sha256
               (base32
-               "1pvw2mrm03p51p03179rb6fk9p42iykkwj1jcdv7jr265xymy8nw"))))
+               "1926b3adx903hzvdp8glblsgjyadzqnwgkj8hg605d4wv98m1n0z"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:phases (alist-cons-before
-                 'build 'pre-build
-                 (lambda _
-                   ;; This test uses /etc/fstab as an example file to read
-                   ;; from; choose a better example.
-                   (substitute* "tests/giomm_simple/main.cc"
-                     (("/etc/fstab")
-                      (string-append (getcwd)
-                                     "/tests/giomm_simple/main.cc")))
-
-                   ;; This test does a DNS lookup, and then expects to be able
-                   ;; to open a TLS session; just skip it.
-                   (substitute* "tests/giomm_tls_client/main.cc"
-                     (("Gio::init.*$")
-                      "return 77;\n")))
-                 %standard-phases)))
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'pre-build
+           (lambda _
+             ;; This test uses /etc/fstab as an example file to read
+             ;; from; choose a better example.
+             (substitute* "tests/giomm_simple/main.cc"
+               (("/etc/fstab")
+                (string-append (getcwd)
+                               "/tests/giomm_simple/main.cc")))
+
+             ;; This test does a DNS lookup, and then expects to be able
+             ;; to open a TLS session; just skip it.
+             (substitute* "tests/giomm_tls_client/main.cc"
+               (("Gio::init.*$")
+                "return 77;\n"))
+             #t)))))
     (native-inputs `(("pkg-config" ,pkg-config)
                      ("glib" ,glib "bin")))
     (propagated-inputs
@@ -563,7 +584,7 @@ useful for C++.")
 (define-public python-pygobject
   (package
     (name "python-pygobject")
-    (version "3.20.0")
+    (version "3.24.1")
     (source
      (origin
        (method url-fetch)
@@ -572,11 +593,13 @@ useful for C++.")
                            "/pygobject-" version ".tar.xz"))
        (sha256
         (base32
-         "0ikzh3l7g1gjh8jj8vg6mdvrb25svp63gxcam4m0i404yh0lgari"))))
+         "1zdzznrj2s1gsrv2z4r0n88fzba8zjc1n2r313xi77lhl1daja56"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("which" ,which)
-       ("glib-bin" ,glib "bin")         ;for tests: glib-compile-schemas
+       ;for tests: dbus-run-session and glib-compile-schemas
+       ("dbus" ,dbus)
+       ("glib-bin" ,glib "bin")
        ("pkg-config" ,pkg-config)))
     (inputs
      `(("python" ,python)
@@ -586,16 +609,6 @@ useful for C++.")
      ;; pygobject-3.0.pc refers to all these.
      `(("glib" ,glib)
        ("libffi" ,libffi)))
-    (arguments
-     ;; TODO: failing tests: test_native_calls_async
-     ;; test_native_calls_async_errors test_native_calls_sync
-     ;; test_native_calls_sync_errors test_python_calls_async
-     ;; test_python_calls_async_error test_python_calls_async_error_result
-     ;; test_python_calls_sync test_python_calls_sync_errors
-     ;; test_python_calls_sync_noargs test_callback_user_data_middle_none
-     ;; test_callback_user_data_middle_single
-     ;; test_callback_user_data_middle_tuple
-     '(#:tests? #f))
     ;; For finding typelib files, since gobject-introscpetion isn't propagated.
     (native-search-paths (package-native-search-paths gobject-introspection))
     (home-page "https://live.gnome.org/PyGObject")
@@ -663,7 +676,6 @@ many applications simultaneously.
 This package provides the library for GLib applications.")
     (license license:lgpl2.1+)))
 
-
 (define-public dbus-c++
   (package
     (name "dbus-c++")
@@ -703,3 +715,105 @@ programming langauage.  It also contains the utility
 @command{dbuscxx-xml2cpp}.")
     (home-page "https://sourceforge.net/projects/dbus-cplusplus/")
     (license license:lgpl2.1+)))
+
+(define-public appstream-glib
+  (package
+    (name "appstream-glib")
+    (version "0.7.5")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://people.freedesktop.org/~hughsient/"
+                                  "appstream-glib/releases/"
+                                  "appstream-glib-" version ".tar.xz"))
+              (sha256
+               (base32
+                "0ps80cbqnf3q86rvz3ajqjssdgkjc9kmynqf0wxqfir7ayc9y9ag"))))
+    (build-system meson-build-system)
+    (native-inputs
+     `(("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")         ; for glib-compile-resources
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("gdk-pixbuf" ,gdk-pixbuf)
+       ("gcab" ,gcab)
+       ("glib" ,glib)
+       ("gperf" ,gperf)
+       ("gtk+" ,gtk+)
+       ("json-glib" ,json-glib)
+       ("libarchive" ,libarchive)
+       ("libsoup" ,libsoup)
+       ("libyaml" ,libyaml)
+       ("util-linux" ,util-linux)))     ; for libuuid
+    (arguments
+     `(#:configure-flags
+       (list "-Ddep11=false"
+             "-Dintrospection=false"    ; avoid g-ir-scanner dependency
+             "-Drpm=false"
+             "-Dstemmer=false")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-tests
+           (lambda _
+             (substitute* "libappstream-glib/as-self-test.c"
+               (("g_test_add_func.*as_test_store_local_appdata_func);") ""))
+             #t)))))
+    (home-page "https://github.com/hughsie/appstream-glib")
+    (synopsis "Library for reading and writing AppStream metadata")
+    (description "This library provides objects and helper methods to help
+reading and writing @uref{https://www.freedesktop.org/wiki/Distributions/AppStream,AppStream}
+metadata.")
+    (license license:lgpl2.1+)))
+
+(define perl-net-dbus
+  (package
+    (name "perl-net-dbus")
+    (version "1.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/D/DA/DANBERR/Net-DBus-"
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "0sg2w147b9r9ykfzjs7y9qxry73xkjnhnk4qf95kfv79p5nnk4c3"))))
+    (build-system perl-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("perl-test-pod" ,perl-test-pod)
+       ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
+    (inputs
+     `(("dbus" ,dbus)))
+    (propagated-inputs
+     `(("perl-xml-twig" ,perl-xml-twig)))
+    (home-page "http://search.cpan.org/dist/Net-DBus/")
+    (synopsis "Extension for the DBus bindings")
+    (description "@code{Net::DBus} provides a Perl XS API to the DBus
+inter-application messaging system.  The Perl API covers the core base level
+of the DBus APIs, not concerning itself yet with the GLib or QT wrappers.")
+    (license license:perl-license)))
+
+(define perl-net-dbus-glib
+  (package
+    (name "perl-net-dbus-glib")
+    (version "0.33.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/D/DA/DANBERR/"
+                           "Net-DBus-GLib-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1z4mbv8z0rad604xahijpg5szzi8qak07hbahh230z4jf96fkxvj"))))
+    (build-system perl-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("dbus-glib" ,dbus-glib)))
+    (home-page "http://search.cpan.org/~danberr/Net-DBus-GLib-0.33.0/")
+    (synopsis "Perl extension for the DBus GLib bindings")
+    (description "This package provides an extension to the @code{Net::DBus}
+module allowing integration with the GLib mainloop.  To integrate with the
+main loop, simply get a connection to the bus via the methods in
+@code{Net::DBus::GLib} rather than the usual @code{Net::DBus} module.  Every
+other API remains the same.")
+    (license license:gpl2+)))