gnu: emacs-svg-icon: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / freedesktop.scm
index a5455a0..40d4135 100644 (file)
@@ -5,7 +5,7 @@
 ;;; Copyright © 2015, 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
-;;; Copyright © 2016, 2017, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
 ;;; Copyright © 2017 Nikita <nikita@n0.is>
 ;;; Copyright © 2017, 2018 Mark H Weaver <mhw@netris.org>
@@ -22,6 +22,7 @@
 ;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
 ;;; Copyright © 2020 Anders Thuné <asse.97@gmail.com>
 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
+;;; Copyright © 2021 Brendan Tildesley <mail@brendan.scot>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module (gnu packages bash)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cryptsetup)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages disk)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
@@ -75,6 +78,7 @@
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages language)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages xorg)
   #:use-module (srfi srfi-1))
 
+(define-public appstream
+  (package
+    (name "appstream")
+    (version "0.13.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://www.freedesktop.org/software/"
+                       "appstream/releases/"
+                       "AppStream-" version ".tar.xz"))
+       (sha256
+        (base32 "09l6ixz1w29pi0nb0flz14m4r3f2hpqpp1fq8y66v9xa4c9fczds"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:glib-or-gtk? #t
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-libstemmer
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "meson.build"
+               (("/usr/include")
+                (string-append (assoc-ref inputs "libstemmer")
+                               "/include")))
+             #t))
+         (add-after 'patch-libstemmer 'patch-docbook-xml
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "docs/api"
+               (substitute* "appstream-docs.xml"
+                 (("http://www.oasis-open.org/docbook/xml/4.3/")
+                  (string-append (assoc-ref inputs "docbook-xml-4.3")
+                                 "/xml/dtd/docbook/"))))
+             (for-each (lambda (file)
+                         (substitute* file
+                           (("http://www.oasis-open.org/docbook/xml/4.5/")
+                            (string-append (assoc-ref inputs "docbook-xml")
+                                           "/xml/dtd/docbook/"))))
+                       (find-files "scripts/desc" "\\.xml$"))
+             #t))
+         (add-after 'patch-docbook-xml 'disable-failing-tests
+           (lambda _
+             (substitute* "tests/test-pool.c"
+               (("[ \t]*g_test_add_func \\(\"/AppStream/PoolRead?.*;")
+                "")
+               (("[ \t]*g_test_add_func \\(\"/AppStream/PoolReadAsync?.*;")
+                "")
+               (("[ \t]*g_test_add_func \\(\"/AppStream/PoolEmpty?.*;")
+                "")
+               (("[ \t]*g_test_add_func \\(\"/AppStream/Cache?.*;")
+                "")
+               (("[ \t]*g_test_add_func \\(\"/AppStream/Merges?.*;")
+                ""))
+             #t))
+         (add-after 'disable-failing-tests 'patch-install-dir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "data/meson.build"
+               (("/etc")
+                (string-append (assoc-ref outputs "out")
+                               "/etc")))
+             #t)))))
+    (native-inputs
+     `(("cmake" ,cmake)
+       ("docbook-xml-4.3" ,docbook-xml-4.3)
+       ("docbook-xml" ,docbook-xml)
+       ("docbook-xsl" ,docbook-xsl)
+       ("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("gperf" ,gperf)
+       ("gtk-doc" ,gtk-doc/stable)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("xsltproc" ,libxslt)))
+    (inputs
+     `(("libsoup" ,libsoup)
+       ("libstemmer" ,libstemmer)
+       ("libxml2" ,libxml2)
+       ("libyaml" ,libyaml)
+       ("lmdb" ,lmdb)))
+    (propagated-inputs
+     `(("glib" ,glib)))
+    (synopsis "Tools and libraries to work with AppStream metadata")
+    (description "AppStream is a cross-distribution effort for enhancing the way
+we interact with the software repositories provided by distributions by
+standardizing software component metadata.  It provides the foundation to build
+software-center applications, by providing metadata necessary for an
+application-centric view on package repositories.  It additionally provides
+specifications for things like an unified software metadata database, screenshot
+services and various other things needed to create user-friendly
+application-centers for distributions.")
+    (home-page "https://www.freedesktop.org/wiki/Distributions/AppStream/")
+    ;; XXX: meson.build claims both, headers just indicate lgpl2.1+
+    ;;      there are also some (irrelevant) wtfpl2 examples
+    (license (list license:gpl2+ license:lgpl2.1+))))
+
 (define-public farstream
   (package
     (name "farstream")
        ("docbook-xml" ,docbook-xml-4.1.2)
        ("docbook-xsl" ,docbook-xsl)
        ("gobject-introspection" ,gobject-introspection)
-       ("gtk-doc" ,gtk-doc)
+       ("gtk-doc" ,gtk-doc/stable)
        ("libtool" ,libtool)
        ("perl" ,perl)
        ("pkg-config" ,pkg-config)
@@ -215,7 +314,7 @@ for videoconferencing.")
      `(("glib:bin" ,glib "bin")
        ("gobject-introspection" ,gobject-introspection)
        ("pkg-config" ,pkg-config)
-       ("gtk-doc" ,gtk-doc)))
+       ("gtk-doc" ,gtk-doc/stable)))
     (inputs
      `(("dbus" ,dbus)
        ("glib" ,glib)))
@@ -410,7 +509,7 @@ other applications that need to directly deal with input devices.")
     (license license:x11)))
 
 (define-public libinput-minimal
-  (package (inherit libinput)
+  (package/inherit libinput
     (name "libinput-minimal")
     (inputs
      (fold alist-delete (package-inputs libinput)
@@ -769,14 +868,14 @@ manager for the current system.")
 (define-public python-pyxdg
   (package
     (name "python-pyxdg")
-    (version "0.25")
+    (version "0.27")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pyxdg" version))
        (sha256
         (base32
-         "179767h8m634ydlm4v8lnz01ba42gckfp684id764zaip7h87s41"))))
+         "19f5j5mxp7ff0vp33s32qbpdi65iiwha0bj641gl70pdwnm97gc0"))))
     (build-system python-build-system)
     (arguments
      '(#:phases
@@ -789,15 +888,16 @@ manager for the current system.")
              (substitute* "test/test-icon.py"
                (("/usr/share/icons/hicolor/index.theme")
                 (string-append (assoc-ref inputs "hicolor-icon-theme")
-                               "/share/icons/hicolor/index.theme"))
-               ;; FIXME: This test fails because the theme contains the unknown
-               ;; key "Scale".
-               (("theme.validate\\(\\)") "#"))
+                               "/share/icons/hicolor/index.theme")))
 
-             ;; One test fails with:
-             ;; AssertionError: 'x-apple-ios-png' != 'png'
+             ;; These two tests are known to fail in strange ways.
              (substitute* "test/test-mime.py"
-               (("self.check_mimetype\\(imgpng, 'image', 'png'\\)") "#"))
+               (("def test_get_type\\(self") "def _test_get_type(self")
+               (("def test_get_type2\\(self") "def _test_get_type2(self"))
+
+             ;; There are test files not shipped in the release tarball
+             (substitute* "test/test-icon.py"
+               (("def test_validate_icon_theme") "def _test_validate_icon_theme"))
              (invoke "nosetests" "-v"))))))
     (native-inputs
      ;; For tests.
@@ -1103,7 +1203,7 @@ Analysis and Reporting Technology) functionality.")
        ("glib:bin" ,glib "bin")         ; for glib-mkenums
        ("gnome-common" ,gnome-common)   ; TODO: Why is this needed?
        ("gobject-introspection" ,gobject-introspection)
-       ("gtk-doc" ,gtk-doc)
+       ("gtk-doc" ,gtk-doc/stable)
        ("intltool" ,intltool)
        ("pkg-config" ,pkg-config)
        ("xsltproc" ,libxslt)))
@@ -1480,7 +1580,7 @@ wish to perform colour calibration.")
 (define-public libfprint
   (package
     (name "libfprint")
-    (version "1.90.6")
+    (version "1.90.7")
     (source
      (origin
        (method git-fetch)
@@ -1489,7 +1589,7 @@ wish to perform colour calibration.")
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0hagm1i78mrd772y3cinr7bda4myx0v4bixwqnqbxknds8m9h8sg"))))
+        (base32 "00pmdpxxjj4sh8qjq9ch3pylgg9w019rg1bbaw53a4wr637rrz43"))))
     (build-system meson-build-system)
     (arguments
      '(#:configure-flags
@@ -1499,7 +1599,7 @@ wish to perform colour calibration.")
      `(("eudev" ,eudev)
        ("glib:bin" ,glib "bin")         ; for {glib-,}mkenums
        ("gobject-introspection" ,gobject-introspection)
-       ("gtk-doc" ,gtk-doc)             ; for 88 KiB of API documentation
+       ("gtk-doc" ,gtk-doc/stable)             ; for 88 KiB of API documentation
        ("pkg-config" ,pkg-config)))
     (inputs
      `(("glib" ,glib)
@@ -1821,6 +1921,26 @@ encoding names are iconv-compatible.")
     ;; combination is GPL 2.0+.
     (license license:gpl2+)))
 
+(define-public python-cchardet
+  (package
+  (name "python-cchardet")
+  (version "2.1.7")
+  (source
+    (origin
+      (method url-fetch)
+      (uri (pypi-uri "cchardet" version))
+      (sha256
+        (base32
+          "1bqfz85cd51sw0bvhvdq9ikccxi2ld7g5jpni4jkq1a5clrvca64"))))
+  (build-system python-build-system)
+  (inputs
+   `(("uchardet" ,uchardet)))
+  (home-page "https://github.com/PyYoshi/cChardet")
+  (synopsis "High-performance character encoding detection for Python")
+  (description "cChardet is a character encoding detector, written in
+Python, that binds to the C library @code{uchardet} to increase performance.")
+  (license license:gpl2+)))
+
 (define-public udiskie
   (package
     (name "udiskie")
@@ -2021,14 +2141,15 @@ useful with system integration.")
        ("xvfb" ,xorg-server-for-tests)))
     (inputs
      `(("dbus-glib" ,dbus-glib)
-       ("gtk+" ,gtk+)
-       ("libdbusmenu" ,libdbusmenu)
        ("libindicator" ,libindicator)
        ("python@2" ,python-2)
        ("python2-pygtk" ,python2-pygtk)
        ("python2-pygobject-2" ,python2-pygobject-2)
        ;; ("mono" ,mono) ; requires non-packaged gapi
        ("vala" ,vala)))
+    (propagated-inputs
+     `(("gtk+" ,gtk+)
+       ("libdbusmenu" ,libdbusmenu)))
     (arguments
      ;; FIXME: do not hardcode gtk version
      `(#:configure-flags '("--with-gtk=3")
@@ -2097,7 +2218,7 @@ fallback to generic Systray support if none of those are available.")
                  #t))))))
       (native-inputs
        `(("pkg-config" ,pkg-config)
-         ("gtk-doc" ,gtk-doc)
+         ("gtk-doc" ,gtk-doc/stable)
          ("docbook-xsl" ,docbook-xsl)
          ("docbook-xml" ,docbook-xml)
          ("libxml2" ,libxml2)