gnu: Add external-program.
[jackhill/guix/guix.git] / gnu / packages / gtk.scm
index b80a0f7..777601e 100644 (file)
@@ -21,6 +21,7 @@
 ;;; 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>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -43,6 +44,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)
@@ -358,7 +360,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.
@@ -429,7 +431,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.
@@ -459,7 +461,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 "/"
@@ -467,7 +469,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")
@@ -493,16 +495,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)
@@ -729,7 +722,7 @@ application suites.")
 (define-public gtk+
   (package (inherit gtk+-2)
    (name "gtk+")
-   (version "3.24.10")
+   (version "3.24.12")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnome/sources/" name "/"
@@ -737,7 +730,7 @@ application suites.")
                                 name "-" version ".tar.xz"))
             (sha256
              (base32
-              "00qvq1r96ikdalv7xzgng1kad9i0rcahqk01gwhxl3xrw83z3a1m"))
+              "10xyyhlfb0yk4hglngxh2zsv9xrxkqv343df8h01dvagc6jyp10k"))
             (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
                                      "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
    (outputs '("out" "bin" "doc"))
@@ -751,6 +744,7 @@ application suites.")
       ("libxinerama" ,libxinerama)
       ("libxkbcommon" ,libxkbcommon)
       ("libxdamage" ,libxdamage)
+      ("libxrandr" ,libxrandr)
       ("mesa" ,mesa)
       ("pango" ,pango)
       ("wayland" ,wayland)
@@ -1092,7 +1086,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 "/"
@@ -1100,7 +1094,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'
@@ -1293,7 +1287,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
@@ -1301,7 +1295,7 @@ write GNOME applications.")
                     version ".tar.gz"))
               (sha256
                (base32
-                "1i25kks408c54k2zxskvg54l5k3qadzm8n72ffga9jy7ic0h6j76"))))
+                "0sg1gf1f2pjq7pji0zsv4rbi3bzpsx82z98k7yqxafzrvlkf27ay"))))
     (build-system perl-build-system)
     (native-inputs
      `(("perl-extutils-depends" ,perl-extutils-depends)
@@ -1318,14 +1312,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)
@@ -1382,15 +1376,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.3")
+    (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 "0q0yfv2777s72p473lw0ll435n7vz4v204cmp9naq8am7a6i6avn"))))
     (native-inputs `(("pkg-config" ,pkg-config)
                      ("check" ,check)
                      ("gettext" ,gettext-minimal)
@@ -1597,7 +1592,8 @@ glass artworks done by Venicians glass blowers.")
     (build-system gnu-build-system)
     (native-inputs
      `(("intltool" ,intltool)
-       ("pkg-config" ,pkg-config)))
+       ("pkg-config" ,pkg-config)
+       ("vala" ,vala)))
     (inputs
      `(("gobject-introspection" ,gobject-introspection)
        ("gtk+" ,gtk+)
@@ -1735,7 +1731,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)
@@ -1744,24 +1740,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)