Merge branch 'master' into staging
[jackhill/guix/guix.git] / gnu / packages / gtk.scm
index 5eb03a0..b8377ff 100644 (file)
@@ -19,6 +19,7 @@
 ;;; 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>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages guile)
+  #:use-module (gnu packages guile-xyz)
   #:use-module (gnu packages cups)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
-  #:use-module (gnu packages xdisorg))
+  #:use-module (gnu packages xdisorg)
+  #:use-module (srfi srfi-1)
+  #:use-module (srfi srfi-26))
 
 (define-public atk
   (package
@@ -112,16 +117,14 @@ tools have full access to view and control running applications.")
 (define-public cairo
   (package
    (name "cairo")
-   (version "1.14.12")
+   (version "1.16.0")
    (source (origin
             (method url-fetch)
             (uri (string-append "https://cairographics.org/releases/cairo-"
                                 version ".tar.xz"))
             (sha256
              (base32
-              "05mzyxkvsfc1annjw2dja8vka01ampp9pp93lg09j8hba06g144c"))
-            (patches (search-patches "cairo-CVE-2016-9082.patch"
-                                     "cairo-setjmp-wrapper.patch"))))
+              "0c930mk5xr2bshbdljv005j3j8zr47gqmkry3q6qgvqky6rjjysy"))))
    (build-system gnu-build-system)
    (propagated-inputs
     `(("fontconfig" ,fontconfig)
@@ -179,7 +182,7 @@ affine transformation (scale, rotation, shear, etc.).")
 (define-public harfbuzz
   (package
    (name "harfbuzz")
-   (version "1.8.8")
+   (version "2.2.0")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://www.freedesktop.org/software/"
@@ -187,7 +190,7 @@ affine transformation (scale, rotation, shear, etc.).")
                                  version ".tar.bz2"))
              (sha256
               (base32
-               "1ag3scnm1fcviqgx2p4858y433mr0ndqw6zccnccrqcr9mpcird8"))))
+               "047q63jr513azf3g1y7f5xn60b4jdjs9zsmrx04sfw5rasyzrk5p"))))
    (build-system gnu-build-system)
    (outputs '("out"
               "bin")) ; 160K, only hb-view depend on cairo
@@ -304,6 +307,7 @@ functions which were removed.")
                      (string-append "-Wl,-rpath="
                                     (assoc-ref outputs "out") "/lib"))
              #t)))
+       #:python ,python-2 ;XXX: The bundled waf fails with Python 3.7.0.
        #:tests? #f)) ; no check target
     (inputs
      `(("gtk" ,gtk+-2)
@@ -454,7 +458,7 @@ highlighting and other features typical of a source code editor.")
               "0ixfmnxjylx06mjaw116apymwi1a8rnkmkbbvqaxxg2pfwy9fl6x"))))
    (build-system meson-build-system)
    (arguments
-    '(#:configure-flags '("-Dinstalled-tests=false")
+    `(#:configure-flags '("-Dinstalled_tests=false")
       #:phases
       (modify-phases %standard-phases
         (add-after
@@ -471,6 +475,13 @@ highlighting and other features typical of a source code editor.")
              ;; (gdk-pixbuf-error-quark, 0)
              ((".*'pixbuf-jpeg'.*") ""))
            #t))
+        ;; The slow tests take longer than the specified timeout.
+        ,@(if (any (cute string=? <> (%current-system))
+                   '("armhf-linux" "aarch64-linux"))
+            '((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`
@@ -682,7 +693,7 @@ application suites.")
    (name "gtk+")
    ;; NOTE: When updating the version of 'gtk+', the hash of 'mate-themes' in
    ;;       mate.scm will also need to be updated.
-   (version "3.24.0")
+   (version "3.24.2")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnome/sources/" name "/"
@@ -690,9 +701,18 @@ application suites.")
                                 name "-" version ".tar.xz"))
             (sha256
              (base32
-              "1a1jbsh9fg5ykmwrcl3svy7xfvx0b87d314qsx9n483pj8w93s82"))
+              "14l8mimdm44r3h5pn5hzigl1z25jna8jxvb16l88v4nc4zj0afsv"))
             (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
-                                     "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
+                                     "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))
+            (modules '((guix build utils)))
+            (snippet
+             '(begin
+                ;; Version 3.24.2 was released with a typo that broke the build.
+                ;; See upstream commit 2905fc861acda3d134a198e56ef2f6c962ad3061
+                ;; at <https://gitlab.gnome.org/GNOME/gtk/tree/gtk-3-24>
+                (substitute* "docs/tools/shooter.c"
+                  (("gdk_screen_get_dfeault") "gdk_screen_get_default"))
+                #t))))
    (outputs '("out" "bin" "doc"))
    (propagated-inputs
     `(("at-spi2-atk" ,at-spi2-atk)
@@ -774,54 +794,26 @@ application suites.")
 (define-public guile-cairo
   (package
     (name "guile-cairo")
-    (version "1.4.1")
+    (version "1.10.0")
     (source (origin
               (method url-fetch)
-              (uri (string-append
-                    "http://download.gna.org/guile-cairo/guile-cairo-"
-                    version
-                    ".tar.gz"))
+              (uri (string-append "mirror://savannah/guile-cairo/guile-cairo-"
+                                  version ".tar.gz"))
               (sha256
                (base32
-                "1f5nd9n46n6cwfl1byjml02q3y2hgn7nkx98km1czgwarxl7ws3x"))))
+                "0p6xrhf2k6n5dybn88050za7h90gnd7534n62l53vsca187pwgdf"))
+              (modules '((guix build utils)))
+              (snippet
+               (begin
+                 '(begin
+                    ;; Install Scheme files in …/guile/site/X.Y.
+                    (substitute* (find-files "." "^Makefile\\.in$")
+                      (("^(.*)dir = (.*)/guile/site(.*)" _ name prefix suffix)
+                       (string-append name "dir = " prefix
+                                      "/guile/site/@GUILE_EFFECTIVE_VERSION@"
+                                      suffix)))
+                    #t)))))
     (build-system gnu-build-system)
-    (arguments
-     '(#:modules ((guix build utils)
-                  (guix build gnu-build-system)
-                  (ice-9 popen)
-                  (ice-9 rdelim))
-
-       #:phases (modify-phases %standard-phases
-                  (add-before 'configure 'set-module-directory
-                    (lambda* (#:key outputs #:allow-other-keys)
-                      ;; Install modules under $out/share/guile/site/2.0.
-                      (let ((out (assoc-ref outputs "out"))
-                            (effective
-                             (read-line
-                              (open-pipe* OPEN_READ "guile" "-c"
-                                          "(display (effective-version))"))))
-                        (substitute* "Makefile.in"
-                          (("scmdir = ([[:graph:]]+).*" _ value)
-                           (string-append "scmdir = " value "/" effective "\n")))
-                        (substitute* "cairo/Makefile.in"
-                          (("moduledir = ([[:graph:]]+).*" _ value)
-                           (string-append "moduledir = "
-                                          "$(prefix)/share/guile/site/"
-                                          effective "/cairo\n'")))
-                        #t)))
-                  (add-after 'install 'install-missing-file
-                    (lambda* (#:key outputs #:allow-other-keys)
-                      ;; By default 'vector-types.scm' is not installed, so do
-                      ;; it here.
-                      (let ((out (assoc-ref outputs "out"))
-                            (effective
-                             (read-line
-                              (open-pipe* OPEN_READ "guile" "-c"
-                                          "(display (effective-version))"))))
-                        (install-file "cairo/vector-types.scm"
-                                      (string-append out "/share/guile/site/"
-                                                     effective "/cairo"))
-                        #t))))))
     (inputs
      `(("guile-lib" ,guile-lib)
        ("expat" ,expat)
@@ -1367,7 +1359,7 @@ and routines to assist in editing internationalized text.")
 (define-public girara
   (package
     (name "girara")
-    (version "0.2.9")
+    (version "0.3.2")
     (source (origin
               (method url-fetch)
               (uri
@@ -1375,7 +1367,7 @@ and routines to assist in editing internationalized text.")
                               version ".tar.xz"))
               (sha256
                (base32
-                "0lkxrfna818wkkr2f6mdzf15y5z8xl1b9592ylmzjbqsqya3w7x8"))))
+                "1kc6n1mxjxa7wvwnqy94qfg8l9jvx9qrvrr2kc7m4g0z20x3a00p"))))
     (native-inputs `(("pkg-config" ,pkg-config)
                      ("check" ,check)
                      ("gettext" ,gettext-minimal)
@@ -1436,7 +1428,12 @@ information.")
                (string-append (assoc-ref inputs "docbook-xsl")
                               "/xml/xsl/docbook-xsl-"
                               ,(package-version docbook-xsl)
-                              "/html/chunk.xsl")))
+                              "/html/chunk.xsl"))
+              (("http://docbook.sourceforge.net/release/xsl/current/common/en.xml")
+               (string-append (assoc-ref inputs "docbook-xsl")
+                              "/xml/xsl/docbook-xsl-"
+                              ,(package-version docbook-xsl)
+                              "/common/en.xml")))
              #t))
          (add-after 'patch-gtk-doc-scan 'patch-test-out
            (lambda _
@@ -1579,12 +1576,11 @@ glass artworks done by Venicians glass blowers.")
      `(("intltool" ,intltool)
        ("pkg-config" ,pkg-config)))
     (inputs
-     `(("enchant" ,enchant)
-       ("gobject-introspection" ,gobject-introspection)
+     `(("gobject-introspection" ,gobject-introspection)
        ("gtk+" ,gtk+)
        ("pango" ,pango)))
     (propagated-inputs
-     `(("enchant" ,enchant))) ; gtkspell3-3.0.pc refers to it.
+     `(("enchant" ,enchant-1.6)))          ;gtkspell3-3.0.pc refers to it
     (home-page "http://gtkspell.sourceforge.net")
     (synopsis "Spell-checking addon for GTK's TextView widget")
     (description
@@ -1632,12 +1628,7 @@ Parcellite and adds bugfixes and features.")
                (base32 "1zd2daj7y590wnzn4jw0niyc4fnzgxrcl9i7nwhy8b25ks2hz5wq"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:configure-flags '("--enable-introspection=yes")
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'configure 'autogen
-           (lambda _
-             (zero? (system* "./autogen.sh")))))))
+     `(#:configure-flags '("--enable-introspection=yes")))
     (native-inputs
      `(("autoconf" ,autoconf)
        ("which" ,which)
@@ -1656,6 +1647,33 @@ it does not deal with windowing system surfaces, drawing, scene graphs, or
 input.")
     (license license:expat)))
 
+(define-public spread-sheet-widget
+  (package
+    (name "spread-sheet-widget")
+    (version "0.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://alpha.gnu.org/gnu/ssw/"
+                           name "-" version ".tar.gz"))
+       (sha256
+        (base32 "1h93yyh2by6yrmkwqg38nd5knids05k5nqzcihc1hdwgzg3c4b8y"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
+       ("pkg-config" ,pkg-config)))
+    ;; In 'Requires' of spread-sheet-widget.pc.
+    (propagated-inputs
+     `(("glib" ,glib)
+       ("gtk+" ,gtk+)))
+    (home-page "https://www.gnu.org/software/ssw/")
+    (synopsis "Gtk+ widget for dealing with 2-D tabular data")
+    (description
+     "GNU Spread Sheet Widget is a library for Gtk+ which provides a widget for
+viewing and manipulating 2 dimensional tabular data in a manner similar to many
+popular spread sheet programs.")
+    (license license:gpl3+)))
+
 (define-public yad
   (package
     (name "yad")