gnu: gtk+-2: Add patch to support GUIX_GTK2_IM_MODULE_FILE.
[jackhill/guix/guix.git] / gnu / packages / gtk.scm
index 2d35ac4..e1d9cf9 100644 (file)
@@ -1,12 +1,18 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015 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>
+;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Fabian Harfert <fhmgufs@web.de>
+;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
+;;; Copyright © 2016 Patrick Hetu <patrick.hetu@auf.org>
+;;; Coypright © 2016 ng0 <ng0@we.make.ritual.n0.is>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -38,6 +44,7 @@
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages docbook)
+  #:use-module (gnu packages enchant)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages ghostscript)
@@ -46,6 +53,7 @@
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages libffi)
   #:use-module (gnu packages pdf)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
@@ -60,7 +68,7 @@
 (define-public atk
   (package
    (name "atk")
-   (version "2.18.0")
+   (version "2.20.0")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnome/sources/" name "/"
@@ -68,7 +76,7 @@
                                 name "-" version ".tar.xz"))
             (sha256
              (base32
-              "0ay9s137x49f0akx658p7kznz0rdapfrd8ym54q0hlgrggblhv6f"))))
+              "1w1q29yfxcq67j7fyqrfm0l0n1vy4zn539c0sf4ga9d0qkv50fj9"))))
    (build-system gnu-build-system)
    (outputs '("out" "doc"))
    (arguments
@@ -92,14 +100,14 @@ tools have full access to view and control running applications.")
 (define-public cairo
   (package
    (name "cairo")
-   (version "1.14.2")
+   (version "1.14.6")
    (source (origin
             (method url-fetch)
             (uri (string-append "http://cairographics.org/releases/cairo-"
                                 version ".tar.xz"))
             (sha256
              (base32
-              "1sycbq0agbwmg1bj9lhkgsf0glmblaf2jrdy9g6vxfxivncxj6f9"))))
+              "0lmjlzmghmr27y615px9hkm552x7ap6pmq9mfbzr6smp8y2b6g31"))))
    (build-system gnu-build-system)
    (propagated-inputs
     `(("fontconfig" ,fontconfig)
@@ -144,15 +152,15 @@ affine transformation (scale, rotation, shear, etc.).")
 (define-public harfbuzz
   (package
    (name "harfbuzz")
-   (version "1.0.5")
+   (version "1.2.4")
    (source (origin
              (method url-fetch)
-             (uri (string-append "http://www.freedesktop.org/software/"
+             (uri (string-append "https://www.freedesktop.org/software/"
                                  "harfbuzz/release/harfbuzz-"
                                  version ".tar.bz2"))
              (sha256
               (base32
-               "0h2l362qzkck5dnnj7zlz593hf1ni3k25dfaii9mbjwflp3d56ad"))))
+               "14g4kpph8hgplkm954daxiymxx0vicfq7b7svvdsx54g5bqvv7a4"))))
    (build-system gnu-build-system)
    (outputs '("out"
               "bin")) ; 160K, only hb-view depend on cairo
@@ -182,7 +190,7 @@ affine transformation (scale, rotation, shear, etc.).")
 (define-public pango
   (package
    (name "pango")
-   (version "1.38.1")
+   (version "1.40.1")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnome/sources/pango/"
@@ -190,7 +198,7 @@ affine transformation (scale, rotation, shear, etc.).")
                                 name "-" version ".tar.xz"))
             (sha256
              (base32
-              "1dsf45m51i4rcyvh5wlxxrjfhvn5b67d5ckjc6vdcxbddjgmc80k"))))
+              "0h0sbh0b5kh3lvrxrb82bs86rqakf33a9jakpv33lay7f90zayp2"))))
    (build-system gnu-build-system)
    (propagated-inputs
     `(("cairo" ,cairo)
@@ -253,8 +261,10 @@ functions which were removed.")
     (build-system waf-build-system)
     (arguments
      `(#:phases (alist-cons-before
-                 'configure 'set-ldflags
+                 'configure 'set-flags
                  (lambda* (#:key outputs #:allow-other-keys)
+                   ;; Compile with C++11, required by gtkmm.
+                   (setenv "CXXFLAGS" "-std=c++11")
                    ;; Allow 'bin/ganv_bench' to find libganv-1.so.
                    (setenv "LDFLAGS"
                            (string-append "-Wl,-rpath="
@@ -275,7 +285,7 @@ graph-like environments, e.g. modular synths or finite state machine
 diagrams.")
     (license license:gpl3+)))
 
-(define-public gtksourceview
+(define-public gtksourceview-2
   (package
     (name "gtksourceview")
     (version "2.10.5") ; This is the last version which builds against gtk+2
@@ -290,7 +300,6 @@ diagrams.")
     (build-system gnu-build-system)
     (inputs
      `(("gtk" ,gtk+-2)
-       ("libxml2" ,libxml2)
        ;; These two are needed only to allow the tests to run successfully.
        ("xorg-server" ,xorg-server)
        ("shared-mime-info" ,shared-mime-info)))
@@ -298,6 +307,9 @@ diagrams.")
      `(("intltool" ,intltool)
        ("glib" ,glib "bin")             ; for glib-genmarshal, etc.
        ("pkg-config" ,pkg-config)))
+    (propagated-inputs
+     ;; As per the pkg-config file.
+     `(("libxml2" ,libxml2)))
     (arguments
      `(#:phases
        ;; Unfortunately, some of the tests in "make check" are highly dependent
@@ -329,10 +341,58 @@ printing and other features typical of a source code editor.")
     (license license:lgpl2.0+)
     (home-page "https://developer.gnome.org/gtksourceview/")))
 
+(define-public gtksourceview
+ (package
+   (name "gtksourceview")
+   (version "3.20.2")
+   (source (origin
+             (method url-fetch)
+             (uri (string-append "mirror://gnome/sources/" name "/"
+                                 (version-major+minor version) "/"
+                                 name "-" version ".tar.xz"))
+             (sha256
+              (base32
+               "03vxirdbjpgjrkl5ph0p9b1saq17xxr4kvhz1ijpg40a9jf3ci4y"))))
+   (build-system gnu-build-system)
+   (arguments
+    '(#:phases
+      (modify-phases %standard-phases
+        (add-before
+         'check 'pre-check
+         (lambda* (#:key inputs #:allow-other-keys)
+           (let ((xorg-server (assoc-ref inputs "xorg-server")))
+             ;; Tests require a running X server.
+             (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
+             (setenv "DISPLAY" ":1")
+             ;; For the missing /etc/machine-id.
+             (setenv "DBUS_FATAL_WARNINGS" "0")
+             #t))))))
+   (native-inputs
+    `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
+      ("intltool" ,intltool)
+      ("itstool" ,itstool)
+      ("gobject-introspection" ,gobject-introspection)
+      ("pkg-config" ,pkg-config)
+      ("vala" ,vala)
+      ;; For testing.
+      ("xorg-server" ,xorg-server)
+      ("shared-mime-info" ,shared-mime-info)))
+   (propagated-inputs
+    ;; gtksourceview-3.0.pc refers to all these.
+    `(("glib" ,glib)
+      ("gtk+" ,gtk+)
+      ("libxml2" ,libxml2)))
+   (home-page "https://wiki.gnome.org/Projects/GtkSourceView")
+   (synopsis "GNOME source code widget")
+   (description "GtkSourceView is a text widget that extends the standard
+GTK+ text widget GtkTextView.  It improves GtkTextView by implementing syntax
+highlighting and other features typical of a source code editor.")
+   (license license:lgpl2.1+)))
+
 (define-public gdk-pixbuf
   (package
    (name "gdk-pixbuf")
-   (version "2.32.1")
+   (version "2.34.0")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnome/sources/" name "/"
@@ -340,7 +400,7 @@ printing and other features typical of a source code editor.")
                                 name "-" version ".tar.xz"))
             (sha256
              (base32
-              "1g7kjxv67jcdasi14n7jan4icrnnppd1m99wrdmpv32k4m7vfcj4"))))
+              "0yc8indbl3hf18z6x6kjg59xp9sngm1d8vmz4c7bs6g27qw5npnm"))))
    (build-system gnu-build-system)
    (arguments
     '(#:configure-flags '("--with-x11")
@@ -350,9 +410,9 @@ printing and other features typical of a source code editor.")
          'unpack 'disable-failing-tests
          (lambda _
            (substitute* "tests/Makefile.in"
-             ;; XXX FIXME: This test fails on some machines with:
-             ;; GLib-FATAL-ERROR: gmem.c:103: failed to allocate
-             ;; 6039798016 bytes
+             ;; XXX FIXME: This test fails on armhf machines with:
+             ;; SKIP Not enough memory to load bitmap image
+             ;; ERROR: cve-2015-4491 - too few tests run (expected 4, got 2)
              (("cve-2015-4491\\$\\(EXEEXT\\) ") "")
              ;; XXX FIXME: This test fails with:
              ;; ERROR:pixbuf-jpeg.c:74:test_type9_rotation_exif_tag:
@@ -360,9 +420,12 @@ printing and other features typical of a source code editor.")
              ;; (gdk-pixbuf-error-quark, 0)
              (("pixbuf-jpeg\\$\\(EXEEXT\\) ") ""))
            #t)))))
-   (propagated-inputs ; required by gdk-pixbuf-2.0.pc
-    `(("glib" ,glib)
-      ("libpng" ,libpng)))
+   (propagated-inputs
+    `(;; Required by gdk-pixbuf-2.0.pc
+      ("glib" ,glib)
+      ("libpng" ,libpng)
+      ;; Used for testing and required at runtime.
+      ("shared-mime-info" ,shared-mime-info)))
    (inputs
     `(("libjpeg" ,libjpeg)
       ("libtiff" ,libtiff)
@@ -370,7 +433,7 @@ printing and other features typical of a source code editor.")
    (native-inputs
      `(("pkg-config" ,pkg-config)
        ("glib" ,glib "bin")                               ; glib-mkenums, etc.
-       ("gobject-introspection"gobject-introspection))) ; g-ir-compiler, etc.
+       ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
    (synopsis "GNOME image loading and manipulation library")
    (description
     "GdkPixbuf is a library for image loading and manipulation developed
@@ -378,10 +441,39 @@ in the GNOME project.")
    (license license:lgpl2.0+)
    (home-page "https://developer.gnome.org/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)
+    (name "gdk-pixbuf+svg")
+    (inputs
+     `(("librsvg" ,librsvg)
+       ,@(package-inputs gdk-pixbuf)))
+    (arguments
+     '(#:configure-flags '("--with-x11")
+       #:tests? #f ; tested by the gdk-pixbuf package already
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'register-svg-loader
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out     (assoc-ref outputs "out"))
+                    (librsvg (assoc-ref inputs "librsvg"))
+                    (loaders
+                     (append
+                      (find-files out "^libpixbufloader-.*\\.so$")
+                      (find-files librsvg "^libpixbufloader-.*\\.so$")))
+                    (gdk-pixbuf-query-loaders
+                     (string-append out "/bin/gdk-pixbuf-query-loaders")))
+               (zero? (apply system* `(,gdk-pixbuf-query-loaders
+                                       "--update-cache" ,@loaders)))))))))
+    (synopsis
+     "GNOME image loading and manipulation library, with SVG support")))
+
 (define-public at-spi2-core
   (package
    (name "at-spi2-core")
-   (version "2.18.1")
+   (version "2.20.1")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnome/sources/" name "/"
@@ -389,7 +481,7 @@ in the GNOME project.")
                                 name "-" version ".tar.xz"))
             (sha256
              (base32
-              "1kq17w4fm51d49vzmglkxqdm6s0yvjvrpgw78r2hajf69jz5bmap"))))
+              "0039y6bj1zfzhmfjbj5g830dlczphbpvbgmkcab9mapmh7kmin3f"))))
    (build-system gnu-build-system)
    (outputs '("out" "doc"))
    (arguments
@@ -426,7 +518,7 @@ is part of the GNOME accessibility project.")
 (define-public at-spi2-atk
   (package
    (name "at-spi2-atk")
-   (version "2.18.1")
+   (version "2.20.1")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnome/sources/" name "/"
@@ -434,7 +526,7 @@ is part of the GNOME accessibility project.")
                                 name "-" version ".tar.xz"))
             (sha256
              (base32
-              "0bf1g5cj84rmx7p1q547vwbc0hlpcs2wrxnmv96lckfkhs9mzcf4"))))
+              "13mzfwra0izmkzn7dsdgy5zj19n8izp0wdy7w1yg9s0qx6aafn13"))))
    (build-system gnu-build-system)
    (arguments
     '(#:phases
@@ -461,7 +553,7 @@ is part of the GNOME accessibility project.")
 (define-public gtk+-2
   (package
    (name "gtk+")
-   (version "2.24.28")
+   (version "2.24.30")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnome/sources/" name "/"
@@ -469,12 +561,15 @@ is part of the GNOME accessibility project.")
                                 name "-" version ".tar.xz"))
             (sha256
              (base32
-              "0mj6xn40py9r9lvzg633fal81xfwfm89d9mvz7jk4lmwk0g49imj"))))
+              "0l6aqk86aw5w132ygy6hv6nlxvd1h6xg7c85qbm60p6mnv1ww58d"))
+            (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
+                                     "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
+                                     "gtk2-theme-paths.patch"))))
    (build-system gnu-build-system)
    (outputs '("out" "doc"))
    (propagated-inputs
     `(("atk" ,atk)
-      ("gdk-pixbuf" ,gdk-pixbuf)
+      ("gdk-pixbuf" ,gdk-pixbuf+svg)
       ("pango" ,pango)))
    (inputs
     `(("cups" ,cups)
@@ -504,7 +599,11 @@ is part of the GNOME accessibility project.")
          ;; FIXME: re-enable tests requiring an X server
          (substitute* "gtk/Makefile.in"
            (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits .")))
-      %standard-phases)))
+       %standard-phases)))
+   (native-search-paths
+    (list (search-path-specification
+           (variable "GUIX_GTK2_PATH")
+           (files '("lib/gtk-2.0")))))
    (synopsis "Cross-platform toolkit for creating graphical user interfaces")
    (description
     "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
@@ -517,7 +616,7 @@ application suites.")
 (define-public gtk+
   (package (inherit gtk+-2)
    (name "gtk+")
-   (version "3.18.2")
+   (version "3.20.3")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnome/sources/" name "/"
@@ -525,11 +624,12 @@ application suites.")
                                 name "-" version ".tar.xz"))
             (sha256
              (base32
-              "0lp1hn0qydxx03bianzzr0a4maqzsvylrkzr7c3p0050qihwbgjx"))))
+              "157nh9gg0p2avw765hrnkvr8lsh2w811397yxgjv6q5j4fzz6d1q"))
+            (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"))))
    (propagated-inputs
     `(("at-spi2-atk" ,at-spi2-atk)
       ("atk" ,atk)
-      ("gdk-pixbuf" ,gdk-pixbuf)
+      ("gdk-pixbuf" ,gdk-pixbuf+svg)
       ("libepoxy" ,libepoxy)
       ("libxcursor" ,libxcursor)
       ("libxi" ,libxi)
@@ -537,8 +637,7 @@ application suites.")
       ("libxdamage" ,libxdamage)
       ("pango" ,pango)))
    (inputs
-    `(("librsvg" ,librsvg)                        ;for gtk-encode-symbolic-svg
-      ("libxml2" ,libxml2)
+    `(("libxml2" ,libxml2)
       ;; XXX: colord depends on mozjs (through polkit), which fails on
       ;;      on non-intel systems now.
       ;;("colord" ,colord)
@@ -573,18 +672,11 @@ application suites.")
            (("SUBDIRS = gdk gtk a11y css reftests")
             "SUBDIRS = gdk"))
          #t)
-       (alist-cons-after
-        'install 'wrap-gtk-encode-symbolic-svg
-        ;; By using GdkPixbuf, gtk-encode-symbolic-svg needs to know
-        ;; librsvg's loaders.cache to handle SVG files.
-        (lambda* (#:key inputs outputs #:allow-other-keys)
-          (let* ((out (assoc-ref outputs "out"))
-                 (prog (string-append out "/bin/gtk-encode-symbolic-svg"))
-                 (librsvg (assoc-ref inputs "librsvg"))
-                 (loaders.cache (find-files librsvg "^loaders\\.cache$")))
-            (wrap-program prog
-              `("GDK_PIXBUF_MODULE_FILE" = ,loaders.cache))))
-        %standard-phases))))))
+       %standard-phases)))
+   (native-search-paths
+    (list (search-path-specification
+           (variable "GUIX_GTK3_PATH")
+           (files '("lib/gtk-3.0")))))))
 
 ;;;
 ;;; Guile bindings.
@@ -658,7 +750,7 @@ exceptions, macros, and a dynamic programming environment.")
               (sha256
                (base32
                 "136f236iw3yrrz6pkkp1ma9c5mrs5icqha6pnawinqpk892r3jh7"))
-              (patches (list (search-patch "guile-rsvg-pkgconfig.patch")))
+              (patches (search-patches "guile-rsvg-pkgconfig.patch"))
               (modules '((guix build utils)))
               (snippet
                '(substitute* (find-files "." "Makefile\\.am")
@@ -697,7 +789,7 @@ images onto Cairo surfaces.")
               (sha256
                (base32
                 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
-              (patches (list (search-patch "guile-present-coding.patch")))
+              (patches (search-patches "guile-present-coding.patch"))
               (modules '((guix build utils)))
               (snippet
                '(substitute* "Makefile.in"
@@ -734,6 +826,60 @@ includes a tools to generate PDF presentations out of Org mode and Texinfo
 documents.")
     (license license:lgpl3+)))
 
+(define-public guile-gnome
+   (package
+    (name "guile-gnome")
+    (version "2.16.4")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append "mirror://gnu/" name
+                              "/guile-gnome-platform/guile-gnome-platform-"
+                              version ".tar.gz"))
+             (sha256
+              (base32
+               "1hqnqbb2lmr3hgbcv9kds1himn3av6h0lkk0zll8agcrsn7d9axd"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("atk" ,atk)
+       ;;("corba" ,corba) ; not packaged yet
+       ("gconf" ,gconf)
+       ("gobject-introspection" ,gobject-introspection)
+       ;;("gthread" ,gthread) ; not packaged yet
+       ("gnome-vfs" ,gnome-vfs)
+       ("gdk-pixbuf" ,gdk-pixbuf)
+       ("gtk+" ,gtk+-2)
+       ("libglade" ,libglade)
+       ("libgnome" ,libgnome)
+       ("libgnomecanvas" ,libgnomecanvas)
+       ("libgnomeui" ,libgnomeui)
+       ("pango" ,pango)
+       ("libffi" ,libffi)
+       ("glib" ,glib)))
+    (inputs `(("guile" ,guile-2.0)))
+    (propagated-inputs
+     `(("guile-cairo" ,guile-cairo)
+       ("g-wrap" ,g-wrap)
+       ("guile-lib" ,guile-lib)))
+    (arguments
+      `(#:tests? #f                               ;FIXME
+        #:phases (modify-phases %standard-phases
+                   (add-before 'configure 'pre-configure
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let ((out (assoc-ref outputs "out")))
+                         (substitute* (find-files "." "^Makefile.in$")
+                           (("guilesite :=.*guile/site" all)
+                            (string-append all "/2.0")))
+                         #t))))))
+    (outputs '("out" "debug"))
+    (synopsis "Guile interface for GTK+ programming for GNOME")
+    (description
+     "Includes guile-clutter, guile-gnome-gstreamer,
+guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.")
+    (home-page "http://www.gnu.org/software/guile-gnome/")
+    (license license:gpl2+)))
+
 ;;;
 ;;; C++ bindings.
 ;;;
@@ -770,7 +916,7 @@ library.")
 (define-public pangomm
   (package
     (name "pangomm")
-    (version "2.38.1")
+    (version "2.40.0")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnome/sources/" name "/"
@@ -778,7 +924,7 @@ library.")
                                  name "-" version ".tar.xz"))
              (sha256
               (base32
-               "12xwjvqfxhqblcv7641k0l6r8n3qifnrx8w9571izn1nbd81iyzg"))))
+               "03fpqdjp7plybf4zsgszbm8yhgl28vmajzfpmaqcsmyfvjlszl3x"))))
     (build-system gnu-build-system)
     (native-inputs `(("pkg-config" ,pkg-config)))
     (propagated-inputs
@@ -796,7 +942,7 @@ library.")
 (define-public atkmm
   (package
     (name "atkmm")
-    (version "2.24.1")
+    (version "2.24.2")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnome/sources/" name "/"
@@ -804,7 +950,7 @@ library.")
                                  name "-" version ".tar.xz"))
              (sha256
               (base32
-               "08zd6s5c1q90wm8310mdrb5f2lj8v63wxihrybwyw13xlf6ivi16"))))
+               "1gaqwhviadsmy0fsr47686yglv1p4mpkamj0in127bz2b5bki5gz"))))
     (build-system gnu-build-system)
     (native-inputs `(("pkg-config" ,pkg-config)))
     (propagated-inputs
@@ -819,7 +965,7 @@ toolkit.")
 (define-public gtkmm
   (package
     (name "gtkmm")
-    (version "3.18.0")
+    (version "3.20.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnome/sources/" name "/"
@@ -827,16 +973,29 @@ toolkit.")
                                  name "-" version ".tar.xz"))
              (sha256
               (base32
-               "0sxq700invkjpksn790gbnl8px8751kvgwn39663jx7dv89s37w2"))))
+               "04n631a127pyidaz82ypdy9syq1hzj636r32y9hyr9kcfnwf2785"))))
     (build-system gnu-build-system)
     (native-inputs `(("pkg-config" ,pkg-config)
-                     ("glib" ,glib "bin")))      ;for 'glib-compile-resources'
+                     ("glib" ,glib "bin")        ;for 'glib-compile-resources'
+                     ("xorg-server" ,xorg-server)))
     (propagated-inputs
      `(("pangomm" ,pangomm)
        ("cairomm" ,cairomm)
        ("atkmm" ,atkmm)
        ("gtk+" ,gtk+)
        ("glibmm" ,glibmm)))
+    (arguments
+     '(#:phases (modify-phases %standard-phases
+                  (add-before 'check 'run-xvfb
+                    (lambda* (#:key inputs #:allow-other-keys)
+                      (let ((xorg-server (assoc-ref inputs "xorg-server")))
+                        ;; Tests such as 'object_move/test' require a running
+                        ;; X server.
+                        (system (string-append xorg-server "/bin/Xvfb :1 &"))
+                        (setenv "DISPLAY" ":1")
+                        ;; Don't fail because of the missing /etc/machine-id.
+                        (setenv "DBUS_FATAL_WARNINGS" "0")
+                        #t))))))
     (home-page "http://gtkmm.org/")
     (synopsis
      "C++ interface to the GTK+ graphical user interface library")
@@ -883,7 +1042,7 @@ extensive documentation, including API reference and a tutorial.")
       (sha256
        (base32
         "1gjkf8x6hyx1skq3hhwcbvwifxvrf9qxis5vx8x5igmmgs70g94s"))
-      (patches (list (search-patch "pycairo-wscript.patch")))))
+      (patches (search-patches "pycairo-wscript.patch"))))
     (build-system waf-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
@@ -903,10 +1062,11 @@ extensive documentation, including API reference and a tutorial.")
     (synopsis "Python bindings for cairo")
     (description
      "Pycairo is a set of Python bindings for the Cairo graphics library.")
-    (license license:lgpl3+)))
+    (license license:lgpl3+)
+    (properties `((python2-variant . ,(delay python2-pycairo))))))
 
 (define-public python2-pycairo
-  (package (inherit python-pycairo)
+  (package (inherit (strip-python2-variant python-pycairo))
     (name "python2-pycairo")
     (version "1.10.0")
     (source
@@ -941,10 +1101,13 @@ extensive documentation, including API reference and a tutorial.")
        (base32
         "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
     (build-system gnu-build-system)
+    (outputs '("out"
+               "doc"))                            ;13 MiB of gtk-doc HTML
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (inputs
      `(("python" ,python-2)
+       ("libglade" ,libglade)
        ("glib"   ,glib)))
     (propagated-inputs
      `(("python-pycairo"   ,python2-pycairo)     ;loaded at runtime
@@ -952,29 +1115,35 @@ extensive documentation, including API reference and a tutorial.")
        ("gtk+"             ,gtk+-2)))
     (arguments
      `(#:tests? #f
-       #:phases (alist-cons-after
-                 'configure 'fix-codegen
-                 (lambda* (#:key inputs #:allow-other-keys)
-                   (substitute* "pygtk-codegen-2.0"
-                     (("^prefix=.*$")
-                      (string-append
-                       "prefix="
-                       (assoc-ref inputs "python-pygobject") "\n"))))
-                 (alist-cons-after
-                  'install 'install-pth
-                  (lambda* (#:key inputs outputs #:allow-other-keys)
-                    ;; pygtk's modules are stored in a subdirectory of python's
-                    ;; site-packages directory.  Add a .pth file so that python
-                    ;; will add that subdirectory to its module search path.
-                    (let* ((out    (assoc-ref outputs "out"))
-                           (site   (string-append out "/lib/python"
-                                                  ,(version-major+minor
-                                                    (package-version python-2))
-                                                  "/site-packages")))
-                      (call-with-output-file (string-append site "/pygtk.pth")
-                        (lambda (port)
-                          (format port "gtk-2.0~%")))))
-                  %standard-phases))))
+       #:phases (modify-phases %standard-phases
+                  (add-before 'configure 'set-gtk-doc-directory
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      ;; Install documentation to "doc".
+                      (let ((doc (assoc-ref outputs "doc")))
+                        (substitute* "docs/Makefile.in"
+                          (("TARGET_DIR = \\$\\(datadir\\)")
+                           (string-append "TARGET_DIR = " doc))))))
+                  (add-after 'configure 'fix-codegen
+                    (lambda* (#:key inputs #:allow-other-keys)
+                      (substitute* "pygtk-codegen-2.0"
+                        (("^prefix=.*$")
+                         (string-append
+                          "prefix="
+                          (assoc-ref inputs "python-pygobject") "\n")))))
+                  (add-after 'install 'install-pth
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
+                      ;; pygtk's modules are stored in a subdirectory of
+                      ;; python's site-packages directory.  Add a .pth file so
+                      ;; that python will add that subdirectory to its module
+                      ;; search path.
+                      (let* ((out    (assoc-ref outputs "out"))
+                             (site   (string-append out "/lib/python"
+                                                    ,(version-major+minor
+                                                      (package-version python-2))
+                                                    "/site-packages")))
+                        (call-with-output-file (string-append site "/pygtk.pth")
+                          (lambda (port)
+                            (format port "gtk-2.0~%")))))))))
     (home-page "http://www.pygtk.org/")
     (synopsis "Python bindings for GTK+")
     (description
@@ -986,7 +1155,7 @@ write GNOME applications.")
 (define-public girara
   (package
     (name "girara")
-    (version "0.2.4")
+    (version "0.2.6")
     (source (origin
               (method url-fetch)
               (uri
@@ -994,7 +1163,7 @@ write GNOME applications.")
                               version ".tar.gz"))
               (sha256
                (base32
-                "0pnfdsg435b5vc4x8l9pgm77aj7ram1q0bzrp9g4a3bh1r64xq1f"))))
+                "03wsxj27hvcbs3x96nah7j3paclifwlfag8kdph4kldl48srp9pb"))))
     (native-inputs `(("pkg-config" ,pkg-config)
                      ("gettext" ,gnu-gettext)))
     (inputs `(("gtk+" ,gtk+)
@@ -1022,7 +1191,7 @@ information.")
 (define-public gtk-doc
   (package
     (name "gtk-doc")
-    (version "1.24")
+    (version "1.25")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnome/sources/" name "/"
@@ -1030,10 +1199,29 @@ information.")
                                   name "-" version ".tar.xz"))
               (sha256
                (base32
-                "12xmmcnq4138dlbhmqa45wqza8dky4lf856sp80h6xjwl2g7a85l"))))
+                "0hpxcij9xx9ny3gs9p0iz4r8zslw8wqymbyababiyl7603a6x90y"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:configure-flags
+     `(#:parallel-tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-before
+             'configure 'fix-docbook
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "configure"
+               ;; The configure check is overzealous about making sure that
+               ;; things are in place -- it uses the xmlcatalog tool to make
+               ;; sure that docbook-xsl is available, but this tool can only
+               ;; look in one catalog file, unlike the $XML_CATALOG_FILES
+               ;; variable that Guix defines.  Fool the test by using the
+               ;; docbook-xsl catalog explicitly and get on with life.
+               (("\"\\$XML_CATALOG_FILE\" \
+\"http://docbook.sourceforge.net/release/xsl/")
+                (string-append (car (find-files (assoc-ref inputs "docbook-xsl")
+                                                "^catalog.xml$"))
+                               " \"http://docbook.sourceforge.net/release/xsl/")))
+             #t)))
+       #:configure-flags
        (list (string-append "--with-xml-catalog="
                             (assoc-ref %build-inputs "docbook-xml")
                             "/xml/dtd/docbook/catalog.xml"))))
@@ -1055,7 +1243,92 @@ information.")
     (home-page "http://www.gtk.org/gtk-doc/")
     (synopsis "Documentation generator from C source code")
     (description
-     "GTK-Doc generates API documentation from comments added to C code. It is
+     "GTK-Doc generates API documentation from comments added to C code.  It is
 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+)))
+
+(define-public gtk-engines
+  (package
+    (name "gtk-engines")
+    (version "2.20.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnome/sources/" name "/"
+                                  (version-major+minor version) "/"
+                                  name "-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "1db65pb0j0mijmswrvpgkdabilqd23x22d95hp5kwxvcramq1dhm"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       `("--enable-animation")))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("intltool" ,intltool)))
+    (propagated-inputs
+     `(("gtk+" ,gtk+-2))) ; required by gtk-engines-2.pc
+    (home-page "http://live.gnome.org/GnomeArt")
+    (synopsis "Theming engines for GTK+ 2.x")
+    (description
+     "This package contains the standard GTK+ 2.x theming engines including
+Clearlooks, Crux, High Contrast, Industrial, LighthouseBlue, Metal, Mist,
+Redmond95 and ThinIce.")
+    (license (list license:gpl2+ license:lgpl2.1+))))
+
+(define-public murrine
+  (package
+    (name "murrine")
+    (version "0.98.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnome/sources/" name "/"
+                                  (version-major+minor version) "/"
+                                  name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "129cs5bqw23i76h3nmc29c9mqkm9460iwc8vkl7hs4xr07h8mip9"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       `("--enable-animation"
+         "--enable-animationrtl")))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("intltool" ,intltool)))
+    (propagated-inputs
+     `(("gtk+" ,gtk+-2)))
+    (home-page "http://live.gnome.org/GnomeArt")
+    (synopsis "Cairo-based theming engine for GTK+ 2.x")
+    (description
+     "Murrine is a cairo-based GTK+ theming engine.  It is named after the
+glass artworks done by Venicians glass blowers.")
+    (license license:gpl2+)))
+
+(define-public gtkspell3
+  (package
+    (name "gtkspell3")
+    (version "3.0.8")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/gtkspell/"
+                                  version "/" name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1zrz5pz4ryvcssk898liynmy2wyxgj95ak7mp2jv7x62yzihq6h1"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("intltool" ,intltool)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("enchant" ,enchant)
+       ("gobject-introspection" ,gobject-introspection)
+       ("gtk+" ,gtk+)
+       ("pango" ,pango)))
+    (home-page "http://gtkspell.sourceforge.net")
+    (synopsis "Spell-checking addon for GTK's TextView widget")
+    (description
+     "GtkSpell provides word-processor-style highlighting and replacement of
+misspelled words in a GtkTextView widget.")
+    (license license:gpl2+)))