gnu: git-annex: Update to 8.20200330.
[jackhill/guix/guix.git] / gnu / packages / gtk.scm
index 34f9ca3..df9fc05 100644 (file)
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015, 2017, 2018, 2019 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
 ;;; Copyright © 2016 Patrick Hetu <patrick.hetu@auf.org>
 ;;; Copyright © 2016 ng0 <ng0@n0.is>
 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
-;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
 ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright © 2019 Meiyo Peng <meiyo@riseup.net>
 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2020 Brendan Tildesley <mail@brendan.scot>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -44,6 +45,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system meson)
   #:use-module (guix build-system perl)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages xdisorg)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-26))
+  #:use-module (srfi srfi-26)
+  #:use-module (ice-9 match))
 
 (define-public atk
   (package
    (name "atk")
-   (version "2.32.0")
+   (version "2.34.1")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnome/sources/" name "/"
@@ -96,7 +99,7 @@
                                 name "-" version ".tar.xz"))
             (sha256
              (base32
-              "1k4i817bd2w5b9z394f2yyx95591l2746wa40am0vvz4gzdgwhfb"))))
+              "1jwp16r6p5z66k4b2v8zlzhyshhwlmyi27ippkrgqr8jsary7w6l"))))
    (build-system meson-build-system)
    (propagated-inputs `(("glib" ,glib))) ; required by atk.pc
    (native-inputs
@@ -359,7 +362,7 @@ diagrams.")
        ("glib" ,glib "bin")             ; for glib-genmarshal, etc.
        ("pkg-config" ,pkg-config)
        ;; For testing.
-       ("xorg-server" ,xorg-server)
+       ("xorg-server" ,xorg-server-for-tests)
        ("shared-mime-info" ,shared-mime-info)))
     (propagated-inputs
      ;; As per the pkg-config file.
@@ -430,7 +433,7 @@ printing and other features typical of a source code editor.")
       ("pkg-config" ,pkg-config)
       ("vala" ,vala)
       ;; For testing.
-      ("xorg-server" ,xorg-server)
+      ("xorg-server" ,xorg-server-for-tests)
       ("shared-mime-info" ,shared-mime-info)))
    (propagated-inputs
     ;; gtksourceview-3.0.pc refers to all these.
@@ -460,7 +463,7 @@ highlighting and other features typical of a source code editor.")
 (define-public gdk-pixbuf
   (package
    (name "gdk-pixbuf")
-   (version "2.38.1")
+   (version "2.40.0")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnome/sources/" name "/"
@@ -468,7 +471,7 @@ highlighting and other features typical of a source code editor.")
                                 name "-" version ".tar.xz"))
             (sha256
              (base32
-              "0fmbjgjcyym3qg46f64qgl7icdm4ii77flyc1mhk244rp8vgi7zi"))))
+              "1rnlx9yfw970maxi2x6niaxmih5la11q1ilr7gzshz2kk585k0hm"))))
    (build-system meson-build-system)
    (arguments
     `(#:configure-flags '("-Dinstalled_tests=false")
@@ -494,16 +497,7 @@ highlighting and other features typical of a source code editor.")
             '((replace 'check
               (lambda _
                 (invoke "meson" "test" "--timeout-multiplier" "5"))))
-            '())
-        (add-before 'configure 'aid-install-script
-          (lambda* (#:key outputs #:allow-other-keys)
-            ;; "build-aux/post-install.sh" invokes `gdk-pixbuf-query-loaders`
-            ;; for updating loader.cache, but it's not on PATH.  Make it use
-            ;; the one we're installing.  XXX: Won't work when cross-compiling.
-            (substitute* "build-aux/post-install.sh"
-              (("gdk-pixbuf-query-loaders" match)
-               (string-append (assoc-ref outputs "out") "/bin/" match)))
-            #t)))))
+            '()))))
    (propagated-inputs
     `(;; Required by gdk-pixbuf-2.0.pc
       ("glib" ,glib)
@@ -560,7 +554,7 @@ in the GNOME project.")
 (define-public at-spi2-core
   (package
    (name "at-spi2-core")
-   (version "2.32.1")
+   (version "2.34.0")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnome/sources/" name "/"
@@ -568,7 +562,7 @@ in the GNOME project.")
                                 name "-" version ".tar.xz"))
             (sha256
              (base32
-              "0lqd7gsl471v6538iighkvb21gjglcb9pklvas32rjpsxcvsjaiw"))))
+              "1ihixwhh3c16q6253qj9gf69741rb2pi51822a4rylsfcyywsafn"))))
    (build-system meson-build-system)
    (outputs '("out" "doc"))
    (arguments
@@ -629,7 +623,7 @@ is part of the GNOME accessibility project.")
 (define-public at-spi2-atk
   (package
    (name "at-spi2-atk")
-   (version "2.32.0")
+   (version "2.34.1")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnome/sources/" name "/"
@@ -637,7 +631,7 @@ is part of the GNOME accessibility project.")
                                 name "-" version ".tar.xz"))
             (sha256
              (base32
-              "0p54wx6f6q7s8w0b1j0sgw87pikllp79q5g3lfiwqazs779ycl8b"))))
+              "05ncp7s5nddjinffs26mcvpbd63vk1m3cv5y530p3plgfhqgjvbp"))))
    (build-system meson-build-system)
    (arguments
     '(#:phases
@@ -730,7 +724,7 @@ application suites.")
 (define-public gtk+
   (package (inherit gtk+-2)
    (name "gtk+")
-   (version "3.24.10")
+   (version "3.24.14")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnome/sources/" name "/"
@@ -738,7 +732,7 @@ application suites.")
                                 name "-" version ".tar.xz"))
             (sha256
              (base32
-              "00qvq1r96ikdalv7xzgng1kad9i0rcahqk01gwhxl3xrw83z3a1m"))
+              "120yz5gxqbv7sgdbcy4i0b6ixm8jpjzialdrqs0gv15q7bwnjk8w"))
             (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
                                      "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
    (outputs '("out" "bin" "doc"))
@@ -752,6 +746,7 @@ application suites.")
       ("libxinerama" ,libxinerama)
       ("libxkbcommon" ,libxkbcommon)
       ("libxdamage" ,libxdamage)
+      ("libxrandr" ,libxrandr)
       ("mesa" ,mesa)
       ("pango" ,pango)
       ("wayland" ,wayland)
@@ -840,6 +835,12 @@ application suites.")
                        (string-append name "dir = " prefix
                                       "/guile/site/@GUILE_EFFECTIVE_VERSION@"
                                       suffix)))
+
+                    ;; Guile 2.x <libguile.h> used to pull in <string.h> and
+                    ;; other headers but this is no longer the case in 3.0.
+                    (substitute* (find-files "." "\\.[ch]$")
+                      (("^ *# *include.*libguile\\.h.*$")
+                       "#include <libguile.h>\n#include <string.h>\n"))
                     #t)))))
     (build-system gnu-build-system)
     (inputs
@@ -862,6 +863,22 @@ graphics library with all of the benefits of Scheme: memory management,
 exceptions, macros, and a dynamic programming environment.")
     (license license:lgpl3+)))
 
+(define-public guile3.0-cairo
+  (package
+    (inherit guile-cairo)
+    (name "guile3.0-cairo")
+    (arguments
+     (substitute-keyword-arguments (package-arguments guile-cairo)
+       ((#:configure-flags flags ''())
+        ;; Uses of 'scm_t_uint8' & co. are deprecated; don't stop the build
+        ;; because of them.
+        `(cons "--disable-Werror" ,flags))))
+    (inputs
+     `(("guile" ,guile-3.0)
+       ("guile-lib" ,guile3.0-lib)
+       ,@(fold alist-delete (package-inputs guile-cairo)
+               '("guile" "guile-lib"))))))
+
 (define-public guile-rsvg
   ;; Use a recent snapshot that supports Guile 2.2 and beyond.
   (let ((commit "05c6a2fd67e4fea1a7c3ff776729dc931bae6678")
@@ -906,9 +923,20 @@ exceptions, macros, and a dynamic programming environment.")
       (description
        "Guile-RSVG wraps the RSVG library for Guile, allowing you to render SVG
 images onto Cairo surfaces.")
-      (home-page "http://wingolog.org/projects/guile-rsvg/")
+      (home-page "https://wingolog.org/projects/guile-rsvg/")
       (license license:lgpl2.1+))))
 
+(define-public guile3.0-rsvg
+  (package
+    (inherit guile-rsvg)
+    (name "guile3.0-rsvg")
+    (inputs
+     `(("guile" ,guile-3.0)
+       ("guile-lib" ,guile3.0-lib)
+       ,@(fold alist-delete (package-inputs guile-rsvg)
+               '("guile" "guile-lib"))))
+    (propagated-inputs `(("guile-cairo" ,guile3.0-cairo)))))
+
 (define-public guile-present
   (package
     (name "guile-present")
@@ -920,21 +948,37 @@ images onto Cairo surfaces.")
               (sha256
                (base32
                 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
-              (patches (search-patches "guile-present-coding.patch"))))
+              (patches (search-patches "guile-present-coding.patch"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  ;; Allow builds with Guile 3.0.
+                  (substitute* "configure"
+                    (("2\\.2 2\\.0")
+                     "3.0 2.2 2.0"))
+
+                  ;; Install .go files in the right place.
+                  (substitute* "Makefile.in"
+                    (("/ccache") "/site-ccache"))
+                  #t))))
     (build-system gnu-build-system)
     (arguments
-     '(#:phases
+     `(#:phases
        (modify-phases %standard-phases
          (add-after 'install 'post-install
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out   (assoc-ref outputs "out"))
                     (bin   (string-append out "/bin"))
-                    (guile (assoc-ref inputs "guile")))
+                    (guile (assoc-ref inputs "guile"))
+                    (version
+                     ,(match (assoc "guile" (package-inputs this-package))
+                        (("guile" guile)
+                         (version-major+minor (package-version guile))))))
                (substitute* (find-files bin ".*")
                  (("guile")
                   (string-append guile "/bin/guile -L "
-                                 out "/share/guile/site/2.0 -C "
-                                 out "/share/guile/site/2.0 "))))
+                                 out "/share/guile/site/" version " -C "
+                                 out "/lib/guile/" version "/site-ccache "))))
              #t)))))
     (native-inputs `(("pkg-config" ,pkg-config)))
     (inputs `(("guile" ,guile-2.2)))
@@ -943,7 +987,7 @@ images onto Cairo surfaces.")
      `(("guile-lib" ,guile-lib)
        ("guile-cairo" ,guile-cairo)
        ("guile-rsvg" ,guile-rsvg)))
-    (home-page "http://wingolog.org/software/guile-present/")
+    (home-page "https://wingolog.org/software/guile-present/")
     (synopsis "Create SVG or PDF presentations in Guile")
     (description
      "Guile-Present defines a declarative vocabulary for presentations,
@@ -953,6 +997,16 @@ includes a tools to generate PDF presentations out of Org mode and Texinfo
 documents.")
     (license license:lgpl3+)))
 
+(define-public guile3.0-present
+  (package
+    (inherit guile-present)
+    (name "guile3.0-present")
+    (inputs `(("guile" ,guile-3.0)))
+    (propagated-inputs
+     `(("guile-lib" ,guile3.0-lib)
+       ("guile-cairo" ,guile3.0-cairo)
+       ("guile-rsvg" ,guile3.0-rsvg)))))
+
 (define-public guile-gnome
    (package
     (name "guile-gnome")
@@ -1060,7 +1114,7 @@ library.")
        ("cairomm" ,cairomm)
        ("glibmm" ,glibmm)
        ("pango" ,pango)))
-    (home-page "http://www.pango.org/")
+    (home-page "https://pango.gnome.org//")
     (synopsis "C++ interface to the Pango text rendering library")
     (description
      "Pangomm provides a C++ programming interface to the Pango text rendering
@@ -1093,7 +1147,7 @@ toolkit.")
 (define-public gtkmm
   (package
     (name "gtkmm")
-    (version "3.24.0")
+    (version "3.24.2")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnome/sources/" name "/"
@@ -1101,7 +1155,7 @@ toolkit.")
                                  name "-" version ".tar.xz"))
              (sha256
               (base32
-               "0hxaq4x9jqj8vvnv3sb6nwapz83v8lclbm887qqci0g50llcjpyg"))))
+               "1hxdnhavjyvbcpxhd5z17l9fj4182028s66lc0s16qqqrldhjwbd"))))
     (build-system gnu-build-system)
     (native-inputs `(("pkg-config" ,pkg-config)
                      ("glib" ,glib "bin")        ;for 'glib-compile-resources'
@@ -1294,7 +1348,7 @@ write GNOME applications.")
 (define-public perl-cairo
   (package
     (name "perl-cairo")
-    (version "1.106")
+    (version "1.107")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1302,7 +1356,7 @@ write GNOME applications.")
                     version ".tar.gz"))
               (sha256
                (base32
-                "1i25kks408c54k2zxskvg54l5k3qadzm8n72ffga9jy7ic0h6j76"))))
+                "0sg1gf1f2pjq7pji0zsv4rbi3bzpsx82z98k7yqxafzrvlkf27ay"))))
     (build-system perl-build-system)
     (native-inputs
      `(("perl-extutils-depends" ,perl-extutils-depends)
@@ -1319,14 +1373,14 @@ produces identical output on all those targets.")
 (define-public perl-gtk2
   (package
     (name "perl-gtk2")
-    (version "1.24992")
+    (version "1.24993")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://cpan/authors/id/X/XA/XAOC/Gtk2-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1044rj3wbfmgaif2jb0k28m2aczli6ai2n5yvn6pr7zjyw16kvd2"))))
+                "0ry9jfvfgdwzalxcvwsgr7plhk3agx7p40l0fqdf3vrf7ds47i29"))))
     (build-system perl-build-system)
     (native-inputs
      `(("perl-extutils-depends" ,perl-extutils-depends)
@@ -1335,6 +1389,16 @@ produces identical output on all those targets.")
      `(("gtk+" ,gtk+-2)))
     (propagated-inputs
      `(("perl-pango" ,perl-pango)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'remove-broken-test
+           ;; See https://gitlab.gnome.org/GNOME/perl-gtk2/issues/3.
+           (lambda _
+             (substitute* "t/GdkPixbuf.t"
+               (("tests => 112") "tests => 111")
+               (("ok \\(defined \\$pixbuf, \"Don't crash on partial pixmap data\"\\);")
+                "# ok (defined $pixbuf, \"Don't crash on partial pixmap data\");")))))))
     (home-page "https://metacpan.org/release/Gtk2")
     (synopsis "Perl interface to the 2.x series of the Gimp Toolkit library")
     (description "Perl bindings to the 2.x series of the Gtk+ widget set.
@@ -1383,15 +1447,16 @@ and routines to assist in editing internationalized text.")
 (define-public girara
   (package
     (name "girara")
-    (version "0.3.2")
-    (source (origin
-              (method url-fetch)
-              (uri
-               (string-append "https://pwmt.org/projects/girara/download/girara-"
-                              version ".tar.xz"))
-              (sha256
-               (base32
-                "1kc6n1mxjxa7wvwnqy94qfg8l9jvx9qrvrr2kc7m4g0z20x3a00p"))))
+    (version "0.3.4")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://git.pwmt.org/pwmt/girara")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "08rpw9hkaprm4r853xy1d35i2af1pji8c3mzzl01mmwmyr9p0x8k"))))
     (native-inputs `(("pkg-config" ,pkg-config)
                      ("check" ,check)
                      ("gettext" ,gettext-minimal)
@@ -1668,7 +1733,7 @@ Parcellite and adds bugfixes and features.")
        ("python-2" ,python-2)
        ("glib" ,glib)
        ("gobject-introspection" ,gobject-introspection)))
-    (home-page "http://ebassi.github.io/graphene")
+    (home-page "https://ebassi.github.io/graphene/")
     (synopsis "Thin layer of graphic data types")
     (description "This library provides graphic types and their relative API;
 it does not deal with windowing system surfaces, drawing, scene graphs, or
@@ -1737,7 +1802,7 @@ independent of your desktop environment, and supports global key bindings.")
 (define-public yad
   (package
     (name "yad")
-    (version "0.41.0")
+    (version "5.0")
     (source
      (origin
        (method git-fetch)
@@ -1746,24 +1811,24 @@ independent of your desktop environment, and supports global key bindings.")
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "1hkxiich898sbacpg3jflf6i8l4hkfnc0zh10rr376v0mnzbn6jn"))))
-    (build-system gnu-build-system)
+        (base32 "07rd61hvilsxxrj7lf8c9k0a8glj07s48m7ya8d45030r90g3lvc"))))
+    (build-system glib-or-gtk-build-system)
     (arguments
      `(#:configure-flags
-       '("--with-gtk=gtk3"
-         "--enable-html"
-         "--enable-gio"
-         "--enable-spell"
-         "--enable-icon-browser")
+       ;; Passing --enable-foo will silently disable foo if prerequisite
+       ;; inputs are missing, not abort the build as one might expect.
+       ;; ‘--enable-html’ adds a huge webkitgtk dependency.  It was never
+       ;; present in the past and nobody complained.
+       '("--enable-icon-browser"
+         "--enable-spell")              ; gspell checking support
        #:phases
        (modify-phases %standard-phases
-         (replace 'bootstrap
+         (add-after 'bootstrap 'intltoolize
            (lambda _
-             (invoke "autoreconf" "-vif")
-             (invoke "intltoolize" "--force" "--automake")
-             #t)))))
+             (invoke "intltoolize" "--force" "--automake"))))))
     (inputs
-     `(("gtk+" ,gtk+)))
+     `(("gspell" ,gspell)
+       ("gtk+" ,gtk+)))
     (native-inputs
      `(("autoconf" ,autoconf)
        ("automake" ,automake)
@@ -1828,3 +1893,30 @@ displayed on the other side of the bus.")
 
     ;; Dual-licensed under either LGPLv2.1 or LGPLv3.
     (license (list license:lgpl2.1 license:lgpl3))))
+
+(define-public gtk-layer-shell
+  (package
+    (name "gtk-layer-shell")
+    (version "0.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://github.com/wmww/gtk-layer-shell/releases/download/v"
+             version "/gtk-layer-shell-" version ".tar.xz"))
+       (sha256
+        (base32 "0ncklk3z0fzlz6p76jdcrr1ykyp1f4ykjjch4x2hfp9bwsnl4a3m"))))
+    (build-system meson-build-system)
+    (native-inputs `(("pkg-config" ,pkg-config)
+                     ("gobject-introspection" ,gobject-introspection)))
+    (inputs `(("wayland" ,wayland)
+              ("gtk+" ,gtk+)))
+    (home-page "https://github.com/wmww/gtk-layer-shell")
+    (synopsis "Library to create Wayland desktop components using the Layer
+Shell protocol")
+    (description "Layer Shell is a Wayland protocol for desktop shell
+components, such as panels, notifications and wallpapers.  It can be used to
+anchor windows to a corner or edge of the output, or stretch them across the
+entire output.  It supports all Layer Shell features including popups and
+popovers.")
+    (license license:expat)))