gnu: emacs-svg-icon: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / gtk.scm
index cd6f9bd..542e274 100644 (file)
@@ -1,21 +1,21 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
-;;; 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 © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2015, 2017, 2018, 2019, 2021 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
 ;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
-;;; Coypright © 2015, 2016, 2017, 2018, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2016, 2017, 2018, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016, 2017, 2020 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Fabian Harfert <fhmgufs@web.de>
 ;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
 ;;; Copyright © 2016 Patrick Hetu <patrick.hetu@auf.org>
 ;;; Copyright © 2016 Nikita <nikita@n0.is>
 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
-;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
 ;;; Copyright © 2018, 2020 Arun Isaac <arunisaac@systemreboot.net>
@@ -25,6 +25,7 @@
 ;;; Copyright © 2020 Brendan Tildesley <mail@brendan.scot>
 ;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -47,6 +48,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module ((guix build utils) #:select (alist-replace))
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system meson)
@@ -123,6 +125,7 @@ tools have full access to view and control running applications.")
   (package
    (name "cairo")
    (version "1.16.0")
+   (replacement cairo/fixed)
    (source (origin
             (method url-fetch)
             (uri (string-append "https://cairographics.org/releases/cairo-"
@@ -173,6 +176,15 @@ affine transformation (scale, rotation, shear, etc.).")
    (license license:lgpl2.1) ; or Mozilla Public License 1.1
    (home-page "https://cairographics.org/")))
 
+(define cairo/fixed
+  (package
+    (inherit cairo)
+    (source (origin
+              (inherit (package-source cairo))
+              (patches (append (search-patches "cairo-CVE-2018-19876.patch"
+                                               "cairo-CVE-2020-35492.patch")
+                               (origin-patches (package-source cairo))))))))
+
 (define-public cairo-sans-poppler
   ;; Variant used to break the dependency cycle between Poppler and Cairo.
   (package/inherit cairo
@@ -180,8 +192,7 @@ affine transformation (scale, rotation, shear, etc.).")
     (properties `((hidden? . #t)))))
 
 (define-public cairo-xcb
-  (package
-    (inherit cairo)
+  (package/inherit cairo
     (name "cairo-xcb")
     (inputs
      `(("mesa" ,mesa)
@@ -235,7 +246,7 @@ affine transformation (scale, rotation, shear, etc.).")
 (define-public libdatrie
   (package
     (name "libdatrie")
-    (version "0.2.12")
+    (version "0.2.13")
     (source
      (origin
        (method url-fetch)
@@ -243,7 +254,7 @@ affine transformation (scale, rotation, shear, etc.).")
         (string-append "https://linux.thai.net/pub/ThaiLinux/software/"
                        "libthai/libdatrie-" version ".tar.xz"))
        (sha256
-        (base32 "0jdi01pcxv0b24zbjy7zahawsqqqw4mv94f2yy01zh4n796wqba5"))))
+        (base32 "1gplcx9ddglpxmqm10qn38kjmvdh4hnhj14rzgqag095psr1n8qj"))))
     (build-system gnu-build-system)
     (outputs '("out" "doc"))
     (arguments
@@ -556,6 +567,7 @@ highlighting and other features typical of a source code editor.")
   (package
    (name "gdk-pixbuf")
    (version "2.40.0")
+   (replacement gdk-pixbuf/fixed)
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnome/sources/" name "/"
@@ -612,11 +624,20 @@ in the GNOME project.")
    (license license:lgpl2.0+)
    (home-page "https://developer.gnome.org/gdk-pixbuf/")))
 
+(define gdk-pixbuf/fixed
+  (package
+    (inherit gdk-pixbuf)
+    (source (origin
+              (inherit (package-source gdk-pixbuf))
+              (patches
+               (append (search-patches "gdk-pixbuf-CVE-2020-29385.patch")
+                       (origin-patches (package-source gdk-pixbuf))))))))
+
 ;; To build gdk-pixbuf with SVG support, we need librsvg, and librsvg depends
 ;; on gdk-pixbuf, so this new varibale.  Also, librsvg adds 90MiB to the
 ;; closure size.
 (define-public gdk-pixbuf+svg
-  (package (inherit gdk-pixbuf)
+  (package/inherit gdk-pixbuf
     (name "gdk-pixbuf+svg")
     (inputs
      `(("librsvg" ,librsvg)
@@ -702,7 +723,7 @@ in the GNOME project.")
    (native-inputs
     `(("gettext" ,gettext-minimal)
       ("gobject-introspection" ,gobject-introspection)
-      ("gtk-doc" ,gtk-doc)
+      ("gtk-doc" ,gtk-doc/stable)
       ("glib" ,glib "bin")
       ("pkg-config" ,pkg-config)))
    (synopsis "Assistive Technology Service Provider Interface, core components")
@@ -933,14 +954,14 @@ application suites.")
 (define-public guile-cairo
   (package
     (name "guile-cairo")
-    (version "1.11.1")
+    (version "1.11.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://savannah/guile-cairo/guile-cairo-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1gc642r9ndsjhhmh9bl5cbd3dwvy4dpxwhr0zpsw43y9nmz37xpl"))
+                "0yx0844p61ljd4d3d63qrawiygiw6ks02fwv2cqx7nav5kfd8ck2"))
               (modules '((guix build utils)))
               (snippet
                (begin
@@ -951,12 +972,6 @@ 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)
     (arguments
@@ -1815,6 +1830,17 @@ typically used to document the public API of GTK+ and GNOME libraries, but it
 can also be used to document application code.")
     (license license:gpl2+)))
 
+;; This is a variant of the 'gtk-doc' package that is not updated often.  It
+;; is intended to be used as a native-input at build-time only.  This allows
+;; the main 'gtk-doc', 'dblatex' and 'imagemagick' packages to be freely
+;; updated on the 'master' branch without triggering an excessive number of
+;; rebuilds.
+(define-public gtk-doc/stable
+  (hidden-package
+   (package/inherit gtk-doc
+     (inputs (alist-replace "dblatex" `(,dblatex/stable)
+                            (package-inputs gtk-doc))))))
+
 (define-public gtk-engines
   (package
     (name "gtk-engines")
@@ -2068,6 +2094,53 @@ shell scripts.  Example of how to use @code{yad} can be consulted at
 @url{https://sourceforge.net/p/yad-dialog/wiki/browse_pages/}.")
     (license license:gpl3+)))
 
+(define-public dragon-drop
+  (package
+   (name "dragon-drop")
+   (version "1.1.1")
+   (source (origin
+             (method git-fetch)
+             (uri
+              (git-reference
+               (url "https://github.com/mwh/dragon")
+               (commit (string-append "v" version))))
+             (file-name (git-file-name name version))
+             (sha256
+              (base32
+               "0fgzz39007fdjwq72scp0qygp2v3zc5f1xkm0sxaa8zxm25g1bra"))))
+   (build-system gnu-build-system)
+   (inputs `(("gtk+" ,gtk+)))
+   (native-inputs `(("pkg-config" ,pkg-config)))
+   (arguments
+    `(#:tests? #f                       ; no check
+      #:make-flags
+      (list (string-append "CC=" ,(cc-for-target))
+            ;; makefile uses PREFIX for the binary location
+            (string-append "PREFIX=" (assoc-ref %outputs "out")
+                           "/bin"))
+      #:phases
+      (modify-phases %standard-phases
+        (delete 'configure))))                    ; no configure script
+   (synopsis "Drag and drop source/target for X")
+   (description
+    "Dragon is a lightweight drag-and-drop source for X where you can run:
+
+@example
+dragon file.tar.gz
+@end example
+
+to get a window with just that file in it, ready to be dragged where you need it.
+What if you need to drag into something? Using:
+
+@example
+dragon --target
+@end example
+
+you get a window you can drag files and text into.  Dropped items are
+printed to standard output.")
+   (home-page "https://github.com/mwh/dragon")
+   (license license:gpl3+)))
+
 (define-public libdbusmenu
   (package
     (name "libdbusmenu")
@@ -2131,16 +2204,18 @@ displayed on the other side of the bus.")
 (define-public gtk-layer-shell
   (package
     (name "gtk-layer-shell")
-    (version "0.1.0")
+    (version "0.6.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"))
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/wmww/gtk-layer-shell")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
        (sha256
-        (base32 "0ncklk3z0fzlz6p76jdcrr1ykyp1f4ykjjch4x2hfp9bwsnl4a3m"))))
+        (base32 "1kcp4p3s7sdh9lwniybjdarfy8z69j2j23hfrw98amhwhq39gdcc"))))
     (build-system meson-build-system)
+    (arguments `(#:configure-flags (list "-Dtests=true")))
     (native-inputs `(("pkg-config" ,pkg-config)
                      ("gobject-introspection" ,gobject-introspection)))
     (inputs `(("wayland" ,wayland)
@@ -2172,7 +2247,7 @@ popovers.")
      `(("gettext" ,gettext-minimal)
        ("glib-bin" ,glib "bin")
        ("gobject-introspection" ,gobject-introspection)
-       ("gtk-doc" ,gtk-doc)
+       ("gtk-doc" ,gtk-doc/stable)
        ("pkg-config" ,pkg-config)
        ("python" ,python)))
     (inputs
@@ -2272,3 +2347,27 @@ foreground and background colors, text justification and more.")
        (variable "GLADE_MODULE_SEARCH_PATH")
        (files '("lib/glade/modules")))))
     (license license:lgpl2.0+)))
+
+(define-public gtkdatabox
+  (package
+    (name "gtkdatabox")
+    (version "1.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://sourceforge/gtkdatabox/gtkdatabox3/"
+                           "gtkdatabox-" version ".tar.gz"))
+       (sha256
+        (base32 "1qykm551bx8j8pfgxs60l2vhpi8lv4r8va69zvn2594lchh71vlb"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("gtk+" ,gtk+)))
+    (synopsis "Display widget for dynamic data")
+    (description "GtkDatabox is a widget for live display of large amounts of
+fluctuating numerical data.  It enables data presentation (for example, on
+linear or logarithmic scales, as dots or lines, with markers/labels) as well as
+user interaction (e.g.  measuring distances).")
+    (home-page "https://sourceforge.net/projects/gtkdatabox/")
+    (license license:lgpl2.1+)))