gnu: freexl: Update to 1.0.4 [fixes CVE-2017-2923 and CVE-2017-2924].
[jackhill/guix/guix.git] / gnu / packages / gtk.scm
CommitLineData
3a08a411
AE
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
b9743865 3;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
b9acdad7 4;;; Copyright © 2014, 2015, 2017 Mark H Weaver <mhw@netris.org>
b38e45d8 5;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
a6035fc1 6;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
136770c9 7;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
dfbce50c 8;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
3bc45449 9;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
c900f843 10;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
a20608a5 11;;; Coypright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
5b003972 12;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
b7807bb2 13;;; Copyright © 2016 Fabian Harfert <fhmgufs@web.de>
3c8ba11a 14;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
9b381643 15;;; Copyright © 2016 Patrick Hetu <patrick.hetu@auf.org>
97b66a91 16;;; Coypright © 2016 ng0 <ng0@we.make.ritual.n0.is>
61af2675 17;;; Coypright © 2017 Roel Janssen <roel@gnu.org>
3a08a411
AE
18;;;
19;;; This file is part of GNU Guix.
20;;;
21;;; GNU Guix is free software; you can redistribute it and/or modify it
22;;; under the terms of the GNU General Public License as published by
23;;; the Free Software Foundation; either version 3 of the License, or (at
24;;; your option) any later version.
25;;;
26;;; GNU Guix is distributed in the hope that it will be useful, but
27;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29;;; GNU General Public License for more details.
30;;;
31;;; You should have received a copy of the GNU General Public License
32;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33
34(define-module (gnu packages gtk)
b5b73a82 35 #:use-module ((guix licenses) #:prefix license:)
b38e45d8 36 #:use-module (guix utils)
3a08a411
AE
37 #:use-module (guix packages)
38 #:use-module (guix download)
a9276c12 39 #:use-module (guix git-download)
3a08a411 40 #:use-module (guix build-system gnu)
0b96fb2a 41 #:use-module (guix build-system python)
e926ba71 42 #:use-module (guix build-system waf)
b837e658 43 #:use-module (gnu packages)
3bc45449 44 #:use-module (gnu packages algebra)
1a51fe27 45 #:use-module (gnu packages autotools)
61af2675 46 #:use-module (gnu packages base)
1a51fe27 47 #:use-module (gnu packages texinfo)
136770c9 48 #:use-module (gnu packages check)
6131c43d 49 #:use-module (gnu packages compression)
3bc45449 50 #:use-module (gnu packages docbook)
9c0c77f8 51 #:use-module (gnu packages enchant)
6131c43d 52 #:use-module (gnu packages fontutils)
982b3574 53 #:use-module (gnu packages freedesktop)
3bc45449 54 #:use-module (gnu packages gettext)
6131c43d 55 #:use-module (gnu packages ghostscript)
31b254a3 56 #:use-module (gnu packages gl)
3a08a411 57 #:use-module (gnu packages glib)
95d439b2 58 #:use-module (gnu packages gnome)
a2609b41 59 #:use-module (gnu packages icu4c)
e55354b8 60 #:use-module (gnu packages image)
9b381643 61 #:use-module (gnu packages libffi)
6131c43d 62 #:use-module (gnu packages pdf)
8b79a547 63 #:use-module (gnu packages perl)
6131c43d 64 #:use-module (gnu packages pkg-config)
3bc45449 65 #:use-module (gnu packages pretty-print)
6131c43d 66 #:use-module (gnu packages python)
8e70e6d2 67 #:use-module (gnu packages guile)
37cb3a69 68 #:use-module (gnu packages cups)
8e70e6d2 69 #:use-module (gnu packages xml)
6c0e878e
LC
70 #:use-module (gnu packages xorg)
71 #:use-module (gnu packages xdisorg))
3a08a411
AE
72
73(define-public atk
74 (package
75 (name "atk")
df54e0b3 76 (version "2.24.0")
3a08a411
AE
77 (source (origin
78 (method url-fetch)
3b8e4347 79 (uri (string-append "mirror://gnome/sources/" name "/"
b38e45d8
EB
80 (version-major+minor version) "/"
81 name "-" version ".tar.xz"))
3a08a411
AE
82 (sha256
83 (base32
df54e0b3 84 "0jbs90vacl95mwgvmqsizi1bwx5sw0rz70r9knksfwwch2dalbdv"))))
3a08a411 85 (build-system gnu-build-system)
cd0466eb
SB
86 (outputs '("out" "doc"))
87 (arguments
88 `(#:configure-flags
89 (list (string-append "--with-html-dir="
90 (assoc-ref %outputs "doc")
91 "/share/gtk-doc/html"))))
13a9e291 92 (propagated-inputs `(("glib" ,glib))) ; required by atk.pc
141aed80
LC
93 (native-inputs
94 `(("pkg-config" ,pkg-config)
426adbe8 95 ("glib" ,glib "bin") ; glib-mkenums, etc.
141aed80 96 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
c5cc5006 97 (synopsis "GNOME accessibility toolkit")
3a08a411
AE
98 (description
99 "ATK provides the set of accessibility interfaces that are implemented
35b9e423 100by other toolkits and applications. Using the ATK interfaces, accessibility
3a08a411
AE
101tools have full access to view and control running applications.")
102 (license license:lgpl2.0+)
103 (home-page "https://developer.gnome.org/atk/")))
6131c43d
AE
104
105(define-public cairo
106 (package
107 (name "cairo")
b3822954 108 (version "1.14.8")
6131c43d
AE
109 (source (origin
110 (method url-fetch)
b3822954 111 (uri (string-append "https://cairographics.org/releases/cairo-"
6131c43d
AE
112 version ".tar.xz"))
113 (sha256
114 (base32
b3822954 115 "082ypjlh03ss5616amgjp9ap3xwwccyh2knyyrj1a4d4x65dkwni"))
bc118f1a 116 (patches (search-patches "cairo-CVE-2016-9082.patch"))))
6131c43d
AE
117 (build-system gnu-build-system)
118 (propagated-inputs
119 `(("fontconfig" ,fontconfig)
120 ("freetype" ,freetype)
121 ("glib" ,glib)
122 ("libpng" ,libpng)
123 ("libx11" ,libx11)
124 ("libxext" ,libxext)
125 ("libxrender" ,libxrender)
126 ("pixman" ,pixman)))
127 (inputs
128 `(("ghostscript" ,ghostscript)
129 ("libspectre" ,libspectre)
6131c43d 130 ("poppler" ,poppler)
6131c43d
AE
131 ("xextproto" ,xextproto)
132 ("zlib" ,zlib)))
c4c4cc05
JD
133 (native-inputs
134 `(("pkg-config" ,pkg-config)
135 ("python" ,python-wrapper)))
6131c43d 136 (arguments
77888fae
MW
137 `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
138 #:configure-flags '("--enable-tee"))) ; needed for GNU Icecat
6131c43d
AE
139 (synopsis "2D graphics library")
140 (description
141 "Cairo is a 2D graphics library with support for multiple output devices.
142Currently supported output targets include the X Window System (via both
143Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
35b9e423 144output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
6131c43d
AE
145
146Cairo is designed to produce consistent output on all output media while
147taking advantage of display hardware acceleration when available
148eg. through the X Render Extension).
149
150The cairo API provides operations similar to the drawing operators of
35b9e423 151PostScript and PDF. Operations in cairo including stroking and filling cubic
6131c43d 152Bézier splines, transforming and compositing translucent images, and
35b9e423 153antialiased text rendering. All drawing operations can be transformed by any
e881752c 154affine transformation (scale, rotation, shear, etc.).")
6131c43d 155 (license license:lgpl2.1) ; or Mozilla Public License 1.1
b3822954 156 (home-page "https://cairographics.org/")))
a2609b41 157
40b3f523
DC
158(define-public cairo-xcb
159 (package
160 (inherit cairo)
161 (name "cairo-xcb")
162 (inputs
163 `(("mesa" ,mesa)
164 ,@(package-inputs cairo)))
165 (arguments
166 `(#:tests? #f
167 #:configure-flags
168 '("--enable-xlib-xcb" "--enable-gl" "--enable-egl")))
169 (synopsis "2D graphics library (with X11 support)")))
170
a2609b41
AE
171(define-public harfbuzz
172 (package
173 (name "harfbuzz")
b4a6497c 174 (version "1.4.6")
a2609b41 175 (source (origin
fd9b3b43 176 (method url-fetch)
5cc3096c 177 (uri (string-append "https://www.freedesktop.org/software/"
fd9b3b43
SB
178 "harfbuzz/release/harfbuzz-"
179 version ".tar.bz2"))
180 (sha256
181 (base32
b4a6497c 182 "14yj514yfy373np3gxk930a443j1zgnwg6mm0kdzzjr0rn0qp9r1"))))
a2609b41 183 (build-system gnu-build-system)
0a129f39
SB
184 (outputs '("out"
185 "bin")) ; 160K, only hb-view depend on cairo
a2609b41 186 (inputs
fd9b3b43
SB
187 `(("cairo" ,cairo)))
188 (propagated-inputs
189 ;; There are all in the Requires or Requires.private field of '.pc'.
190 `(("glib" ,glib)
27383915 191 ("graphite2" ,graphite2)
c4c4cc05
JD
192 ("icu4c" ,icu4c)))
193 (native-inputs
a30a0455
SB
194 `(("gobject-introspection" ,gobject-introspection)
195 ("pkg-config" ,pkg-config)
ac462e52 196 ("python" ,python-2))) ; incompatible with Python 3 (print syntax)
27383915 197 (arguments
a30a0455 198 `(#:configure-flags `("--with-graphite2"
eb6afbcd
SB
199 "--with-gobject"
200 ,(string-append
201 "--bindir=" (assoc-ref %outputs "bin") "/bin"))))
35b9e423 202 (synopsis "OpenType text shaping engine")
a2609b41
AE
203 (description
204 "HarfBuzz is an OpenType text shaping engine.")
205 (license (license:x11-style "file://COPYING"
206 "See 'COPYING' in the distribution."))
61320932 207 (home-page "https://www.freedesktop.org/wiki/Software/HarfBuzz/")))
4b9adff9
AE
208
209(define-public pango
210 (package
211 (name "pango")
9d5aadb3 212 (version "1.40.6")
4b9adff9
AE
213 (source (origin
214 (method url-fetch)
dca1b58d
FB
215 (uri (string-append "mirror://gnome/sources/pango/"
216 (version-major+minor version) "/"
217 name "-" version ".tar.xz"))
4b9adff9
AE
218 (sha256
219 (base32
9d5aadb3 220 "0wz5b5knpw4gfvz3ny8l6h2ca3bpqqyh55mffkyzgsd1hdrjn5fa"))))
4b9adff9 221 (build-system gnu-build-system)
cf2135ff 222 (propagated-inputs
4b9adff9 223 `(("cairo" ,cairo)
4169a4bc
AE
224 ("harfbuzz" ,harfbuzz)))
225 (inputs
9a5acb54
JL
226 `(("zlib" ,zlib)
227
228 ;; Some packages, such as Openbox, expect Pango to be built with the
229 ;; optional libxft support.
230 ("libxft" ,libxft)))
c4c4cc05 231 (native-inputs
141aed80 232 `(("pkg-config" ,pkg-config)
426adbe8 233 ("glib" ,glib "bin") ; glib-mkenums, etc.
141aed80 234 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
4b9adff9
AE
235 (synopsis "GNOME text and font handling library")
236 (description
237 "Pango is the core text and font handling library used in GNOME
35b9e423 238applications. It has extensive support for the different writing systems
4b9adff9
AE
239used throughout the world.")
240 (license license:lgpl2.0+)
241 (home-page "https://developer.gnome.org/pango/")))
527e7961 242
5698b8b8
JD
243(define-public pangox-compat
244 (package
245 (name "pangox-compat")
246 (version "0.0.2")
247 (source (origin
248 (method url-fetch)
b38e45d8
EB
249 (uri (string-append "mirror://gnome/sources/" name "/"
250 (version-major+minor version) "/"
251 name "-" version ".tar.xz"))
5698b8b8
JD
252 (sha256
253 (base32
254 "0ip0ziys6mrqqmz4n71ays0kf5cs1xflj1gfpvs4fgy2nsrr482m"))))
255 (build-system gnu-build-system)
256 (inputs
257 `(("glib" ,glib)
258 ("pango" ,pango)))
259 (native-inputs
260 `(("intltool" ,intltool)
261 ("pkg-config" ,pkg-config)))
262 (home-page "https://developer.gnome.org/pango")
35b9e423 263 (synopsis "Obsolete pango functions")
5698b8b8
JD
264 (description "Pangox was a X backend to pango. It is now obsolete and no
265longer provided by recent pango releases. pangox-compat provides the
266functions which were removed.")
267 (license license:lgpl2.0+)))
268
e926ba71
RW
269(define-public ganv
270 (package
271 (name "ganv")
272 (version "1.4.2")
273 (source (origin
274 (method url-fetch)
275 (uri (string-append "http://download.drobilla.net/ganv-"
ea7f3349 276 version ".tar.bz2"))
e926ba71
RW
277 (sha256
278 (base32
279 "0g7s5mp14qgbfjdql0k1s8464r21g47ssn5dws6jazsnw6njhl0l"))))
280 (build-system waf-build-system)
ea7f3349
LC
281 (arguments
282 `(#:phases (alist-cons-before
d8c317df 283 'configure 'set-flags
ea7f3349 284 (lambda* (#:key outputs #:allow-other-keys)
d8c317df
SB
285 ;; Compile with C++11, required by gtkmm.
286 (setenv "CXXFLAGS" "-std=c++11")
ea7f3349
LC
287 ;; Allow 'bin/ganv_bench' to find libganv-1.so.
288 (setenv "LDFLAGS"
289 (string-append "-Wl,-rpath="
290 (assoc-ref outputs "out") "/lib")))
291 %standard-phases)
292 #:tests? #f)) ; no check target
e926ba71
RW
293 (inputs
294 `(("gtk" ,gtk+-2)
295 ("gtkmm" ,gtkmm-2)))
296 (native-inputs
297 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
298 ("pkg-config" ,pkg-config)))
299 (home-page "http://drobilla.net/software/ganv/")
300 (synopsis "GTK+ widget for interactive graph-like environments")
301 (description
302 "Ganv is an interactive GTK+ widget for interactive “boxes and lines” or
303graph-like environments, e.g. modular synths or finite state machine
304diagrams.")
305 (license license:gpl3+)))
95d439b2 306
a9276c12
RW
307(define-public ganv-devel
308 (let ((commit "31685d283e9b811b61014f820c42807f4effa071")
309 (revision "1"))
310 (package
311 (inherit ganv)
312 (name "ganv")
313 (version (string-append "1.4.2-" revision "."
314 (string-take commit 9)))
315 (source (origin
316 (method git-fetch)
317 (uri (git-reference
318 (url "http://git.drobilla.net/ganv.git")
319 (commit commit)))
320 (sha256
321 (base32
322 "0xmbykdl42jn9cgzrqrys5lng67d26nk5xq10wkkvjqldiwdck56")))))))
323
c900f843 324(define-public gtksourceview-2
95d439b2
JD
325 (package
326 (name "gtksourceview")
327 (version "2.10.5") ; This is the last version which builds against gtk+2
328 (source (origin
329 (method url-fetch)
b38e45d8
EB
330 (uri (string-append "mirror://gnome/sources/" name "/"
331 (version-major+minor version) "/"
332 name "-" version ".tar.bz2"))
95d439b2
JD
333 (sha256
334 (base32
335 "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5"))))
336 (build-system gnu-build-system)
c4c4cc05 337 (native-inputs
44add1ce 338 `(("intltool" ,intltool)
221ed17a 339 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
bd05ea41
SB
340 ("pkg-config" ,pkg-config)
341 ;; For testing.
342 ("xorg-server" ,xorg-server)
343 ("shared-mime-info" ,shared-mime-info)))
68d85de1
TUBK
344 (propagated-inputs
345 ;; As per the pkg-config file.
bd05ea41
SB
346 `(("gtk" ,gtk+-2)
347 ("libxml2" ,libxml2)))
95d439b2
JD
348 (arguments
349 `(#:phases
350 ;; Unfortunately, some of the tests in "make check" are highly dependent
351 ;; on the environment therefore, some black magic is required.
352 (alist-cons-before
353 'check 'start-xserver
354 (lambda* (#:key inputs #:allow-other-keys)
355 (let ((xorg-server (assoc-ref inputs "xorg-server"))
356 (mime (assoc-ref inputs "shared-mime-info")))
357
358 ;; There must be a running X server and make check doesn't start one.
359 ;; Therefore we must do it.
360 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
361 (setenv "DISPLAY" ":1")
362
363 ;; The .lang files must be found in $XDG_DATA_HOME/gtksourceview-2.0
364 (system "ln -s gtksourceview gtksourceview-2.0")
365 (setenv "XDG_DATA_HOME" (getcwd))
366
367 ;; Finally, the mimetypes must be available.
368 (setenv "XDG_DATA_DIRS" (string-append mime "/share/")) ))
369 %standard-phases)))
370 (synopsis "Widget that extends the standard GTK+ 2.x 'GtkTextView' widget")
371 (description
372 "GtkSourceView is a portable C library that extends the standard GTK+
373framework for multiline text editing with support for configurable syntax
374highlighting, unlimited undo/redo, search and replace, a completion framework,
375printing and other features typical of a source code editor.")
376 (license license:lgpl2.0+)
377 (home-page "https://developer.gnome.org/gtksourceview/")))
378
c900f843
DH
379(define-public gtksourceview
380 (package
381 (name "gtksourceview")
097b80e1 382 (version "3.24.4")
c900f843
DH
383 (source (origin
384 (method url-fetch)
385 (uri (string-append "mirror://gnome/sources/" name "/"
386 (version-major+minor version) "/"
387 name "-" version ".tar.xz"))
388 (sha256
389 (base32
097b80e1 390 "14x738xrz9q8qz13xd7dys748ryxyq2srbqyaa9r7n47h2av2zr0"))))
c900f843
DH
391 (build-system gnu-build-system)
392 (arguments
393 '(#:phases
394 (modify-phases %standard-phases
395 (add-before
396 'check 'pre-check
397 (lambda* (#:key inputs #:allow-other-keys)
398 (let ((xorg-server (assoc-ref inputs "xorg-server")))
399 ;; Tests require a running X server.
400 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
401 (setenv "DISPLAY" ":1")
402 ;; For the missing /etc/machine-id.
403 (setenv "DBUS_FATAL_WARNINGS" "0")
404 #t))))))
405 (native-inputs
406 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
407 ("intltool" ,intltool)
b3546174 408 ("itstool" ,itstool)
c900f843
DH
409 ("gobject-introspection" ,gobject-introspection)
410 ("pkg-config" ,pkg-config)
411 ("vala" ,vala)
412 ;; For testing.
413 ("xorg-server" ,xorg-server)
414 ("shared-mime-info" ,shared-mime-info)))
415 (propagated-inputs
416 ;; gtksourceview-3.0.pc refers to all these.
417 `(("glib" ,glib)
418 ("gtk+" ,gtk+)
419 ("libxml2" ,libxml2)))
420 (home-page "https://wiki.gnome.org/Projects/GtkSourceView")
421 (synopsis "GNOME source code widget")
422 (description "GtkSourceView is a text widget that extends the standard
423GTK+ text widget GtkTextView. It improves GtkTextView by implementing syntax
424highlighting and other features typical of a source code editor.")
425 (license license:lgpl2.1+)))
426
527e7961
AE
427(define-public gdk-pixbuf
428 (package
429 (name "gdk-pixbuf")
2ff8deae 430 (version "2.36.6")
527e7961
AE
431 (source (origin
432 (method url-fetch)
b38e45d8
EB
433 (uri (string-append "mirror://gnome/sources/" name "/"
434 (version-major+minor version) "/"
435 name "-" version ".tar.xz"))
527e7961
AE
436 (sha256
437 (base32
2ff8deae 438 "034279k49ydawnagqd7b1rz741n20k4y3grybzwp26zd146bjpj5"))
8c6b077b 439 (patches (search-patches "gdk-pixbuf-list-dir.patch"))))
527e7961 440 (build-system gnu-build-system)
48f46dc3 441 (arguments
a63a73dc
SB
442 '(#:configure-flags '("--with-x11")
443 #:phases
444 (modify-phases %standard-phases
445 (add-after
446 'unpack 'disable-failing-tests
447 (lambda _
448 (substitute* "tests/Makefile.in"
fe08b6e1
EF
449 ;; XXX FIXME: This test fails on armhf machines with:
450 ;; SKIP Not enough memory to load bitmap image
451 ;; ERROR: cve-2015-4491 - too few tests run (expected 4, got 2)
a63a73dc
SB
452 (("cve-2015-4491\\$\\(EXEEXT\\) ") "")
453 ;; XXX FIXME: This test fails with:
454 ;; ERROR:pixbuf-jpeg.c:74:test_type9_rotation_exif_tag:
455 ;; assertion failed (error == NULL): Data differ
456 ;; (gdk-pixbuf-error-quark, 0)
457 (("pixbuf-jpeg\\$\\(EXEEXT\\) ") ""))
458 #t)))))
6983ba56
SB
459 (propagated-inputs
460 `(;; Required by gdk-pixbuf-2.0.pc
461 ("glib" ,glib)
462 ("libpng" ,libpng)
463 ;; Used for testing and required at runtime.
464 ("shared-mime-info" ,shared-mime-info)))
1b5758a6
SB
465 (inputs
466 `(("libjpeg" ,libjpeg)
48f46dc3 467 ("libtiff" ,libtiff)
224276ab 468 ("libx11" ,libx11)))
c4c4cc05 469 (native-inputs
141aed80 470 `(("pkg-config" ,pkg-config)
426adbe8 471 ("glib" ,glib "bin") ; glib-mkenums, etc.
b3546174 472 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
527e7961
AE
473 (synopsis "GNOME image loading and manipulation library")
474 (description
475 "GdkPixbuf is a library for image loading and manipulation developed
476in the GNOME project.")
477 (license license:lgpl2.0+)
478 (home-page "https://developer.gnome.org/gdk-pixbuf/")))
cf2135ff 479
34dc3907
SB
480;; To build gdk-pixbuf with SVG support, we need librsvg, and librsvg depends
481;; on gdk-pixbuf, so this new varibale. Also, librsvg adds 90MiB to the
482;; closure size.
483(define-public gdk-pixbuf+svg
e60d3a55 484 (package (inherit gdk-pixbuf)
34dc3907
SB
485 (name "gdk-pixbuf+svg")
486 (inputs
487 `(("librsvg" ,librsvg)
488 ,@(package-inputs gdk-pixbuf)))
489 (arguments
490 '(#:configure-flags '("--with-x11")
491 #:tests? #f ; tested by the gdk-pixbuf package already
492 #:phases
493 (modify-phases %standard-phases
494 (add-after 'install 'register-svg-loader
495 (lambda* (#:key inputs outputs #:allow-other-keys)
496 (let* ((out (assoc-ref outputs "out"))
497 (librsvg (assoc-ref inputs "librsvg"))
498 (loaders
499 (append
500 (find-files out "^libpixbufloader-.*\\.so$")
501 (find-files librsvg "^libpixbufloader-.*\\.so$")))
502 (gdk-pixbuf-query-loaders
503 (string-append out "/bin/gdk-pixbuf-query-loaders")))
504 (zero? (apply system* `(,gdk-pixbuf-query-loaders
505 "--update-cache" ,@loaders)))))))))
506 (synopsis
507 "GNOME image loading and manipulation library, with SVG support")))
508
f3fb92e5
AE
509(define-public at-spi2-core
510 (package
511 (name "at-spi2-core")
feaf6a14 512 (version "2.24.1")
f3fb92e5
AE
513 (source (origin
514 (method url-fetch)
515 (uri (string-append "mirror://gnome/sources/" name "/"
b38e45d8
EB
516 (version-major+minor version) "/"
517 name "-" version ".tar.xz"))
f3fb92e5
AE
518 (sha256
519 (base32
feaf6a14 520 "0nwvjmd30rgq6d1zznavx0bdfa1xwv3jl8wnkbkwzaipp5jd140y"))))
f3fb92e5 521 (build-system gnu-build-system)
068a53c3 522 (outputs '("out" "doc"))
f3fb92e5 523 (arguments
b19d6805 524 '(#:configure-flags
068a53c3
SB
525 (list (string-append "--with-html-dir="
526 (assoc-ref %outputs "doc")
527 "/share/gtk-doc/html"))
50cc7f41 528 #:phases
af108677 529 (modify-phases %standard-phases
3a4de6b2 530 (replace 'check
af108677
SB
531 ;; Run test-suite under a dbus session.
532 (lambda _
37fe56cf
SB
533 ;; Don't fail on missing '/etc/machine-id'.
534 (setenv "DBUS_FATAL_WARNINGS" "0")
af108677 535 (zero? (system* "dbus-launch" "make" "check")))))))
c6a552da
SB
536 (propagated-inputs
537 ;; atspi-2.pc refers to all these.
538 `(("dbus" ,dbus)
539 ("glib" ,glib)))
540 (inputs
541 `(("libxi" ,libxi)
542 ("libxtst" ,libxtst)))
c4c4cc05 543 (native-inputs
50cc7f41
SB
544 `(("gobject-introspection" ,gobject-introspection)
545 ("intltool" ,intltool)
546 ("pkg-config" ,pkg-config)))
f3fb92e5
AE
547 (synopsis "Assistive Technology Service Provider Interface, core components")
548 (description
549 "The Assistive Technology Service Provider Interface, core components,
550is part of the GNOME accessibility project.")
551 (license license:lgpl2.0+)
552 (home-page "https://projects.gnome.org/accessibility/")))
553
5fda4784
AE
554(define-public at-spi2-atk
555 (package
556 (name "at-spi2-atk")
04881396 557 (version "2.24.1")
5fda4784
AE
558 (source (origin
559 (method url-fetch)
560 (uri (string-append "mirror://gnome/sources/" name "/"
b38e45d8
EB
561 (version-major+minor version) "/"
562 name "-" version ".tar.xz"))
5fda4784
AE
563 (sha256
564 (base32
04881396 565 "0zcmsq7g4jg5dpmfzkyfpa0v6hx4119c4qwkdblzzf3l9yn91p30"))))
5fda4784 566 (build-system gnu-build-system)
5fda4784 567 (arguments
57fcd224
SB
568 '(#:phases
569 (modify-phases %standard-phases
3a4de6b2 570 (replace 'check
57fcd224
SB
571 ;; Run test-suite under a dbus session.
572 (lambda _
5fba12ec 573 (setenv "DBUS_FATAL_WARNINGS" "0")
57fcd224 574 (zero? (system* "dbus-launch" "make" "check")))))))
6967cc3f
SB
575 (propagated-inputs
576 `(("at-spi2-core" ,at-spi2-core))) ; required by atk-bridge-2.0.pc
577 (inputs
578 `(("atk" ,atk)))
c4c4cc05 579 (native-inputs
6967cc3f
SB
580 `(("dbus" ,dbus) ; for testing
581 ("pkg-config" ,pkg-config)))
5fda4784
AE
582 (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
583 (description
584 "The Assistive Technology Service Provider Interface
585is part of the GNOME accessibility project.")
586 (license license:lgpl2.0+)
587 (home-page "https://projects.gnome.org/accessibility/")))
588
8b79a547 589(define-public gtk+-2
cf2135ff
AE
590 (package
591 (name "gtk+")
3de764f7 592 (version "2.24.31")
cf2135ff
AE
593 (source (origin
594 (method url-fetch)
1c8362a8 595 (uri (string-append "mirror://gnome/sources/" name "/"
b38e45d8
EB
596 (version-major+minor version) "/"
597 name "-" version ".tar.xz"))
cf2135ff
AE
598 (sha256
599 (base32
3de764f7 600 "0n26jm09n03nqbd00d2ij63xrby3vik56sk5yj6w1vy768kr5hb8"))
6983ba56 601 (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
711670c0 602 "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
6983ba56 603 "gtk2-theme-paths.patch"))))
cf2135ff 604 (build-system gnu-build-system)
6b1f2388 605 (outputs '("out" "doc"))
4169a4bc 606 (propagated-inputs
cf2135ff 607 `(("atk" ,atk)
6983ba56 608 ("gdk-pixbuf" ,gdk-pixbuf+svg)
4169a4bc 609 ("pango" ,pango)))
dfbce50c
SB
610 (inputs
611 `(("cups" ,cups)
612 ("libxcomposite" ,libxcomposite)
613 ("libxcursor" ,libxcursor)
614 ("libxdamage" ,libxdamage)
615 ("libxi" ,libxi)
616 ("libxinerama" ,libxinerama)
617 ("libxrandr" ,libxrandr)))
c4c4cc05 618 (native-inputs
1c8362a8 619 `(("perl" ,perl)
b94a6ca0 620 ("gettext" ,gettext-minimal)
426adbe8 621 ("glib" ,glib "bin")
9d297fae 622 ("gobject-introspection" ,gobject-introspection)
1c8362a8
AE
623 ("pkg-config" ,pkg-config)
624 ("python-wrapper" ,python-wrapper)))
cf2135ff 625 (arguments
b19d6805 626 `(#:configure-flags
6b1f2388
SB
627 (list "--with-xinput=yes"
628 (string-append "--with-html-dir="
629 (assoc-ref %outputs "doc")
630 "/share/gtk-doc/html"))
9d297fae 631 #:phases
d4bf49b1
EB
632 (alist-cons-before
633 'configure 'disable-tests
634 (lambda _
635 ;; FIXME: re-enable tests requiring an X server
636 (substitute* "gtk/Makefile.in"
637 (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits .")))
2a6afac9
RW
638 %standard-phases)))
639 (native-search-paths
640 (list (search-path-specification
641 (variable "GUIX_GTK2_PATH")
642 (files '("lib/gtk-2.0")))))
0327ced2 643 (synopsis "Cross-platform toolkit for creating graphical user interfaces")
cf2135ff
AE
644 (description
645 "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
35b9e423 646graphical user interfaces. Offering a complete set of widgets, GTK+ is
cf2135ff
AE
647suitable for projects ranging from small one-off tools to complete
648application suites.")
649 (license license:lgpl2.0+)
650 (home-page "http://www.gtk.org/")))
8e70e6d2 651
8b79a547
AE
652(define-public gtk+
653 (package (inherit gtk+-2)
b38e45d8 654 (name "gtk+")
2d5785ad
MW
655 ;; NOTE: When updating the version of 'gtk+', the hash of 'mate-themes' in
656 ;; mate.scm will also need to be updated.
9a1100ca 657 (version "3.22.15")
8b79a547
AE
658 (source (origin
659 (method url-fetch)
b38e45d8
EB
660 (uri (string-append "mirror://gnome/sources/" name "/"
661 (version-major+minor version) "/"
662 name "-" version ".tar.xz"))
8b79a547
AE
663 (sha256
664 (base32
9a1100ca 665 "1nqgb71vx222g9fd2p017948hqybnyi69xs3n2d64clim7115868"))
234e7980
RW
666 (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
667 "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
7b808d76 668 (outputs '("out" "bin" "doc"))
0e112540 669 (propagated-inputs
8b79a547 670 `(("at-spi2-atk" ,at-spi2-atk)
0e112540 671 ("atk" ,atk)
6983ba56 672 ("gdk-pixbuf" ,gdk-pixbuf+svg)
31b254a3 673 ("libepoxy" ,libepoxy)
a572dca8 674 ("libxcursor" ,libxcursor)
8b79a547
AE
675 ("libxi" ,libxi)
676 ("libxinerama" ,libxinerama)
982b3574 677 ("libxkbcommon" ,libxkbcommon)
9e5c0927 678 ("libxdamage" ,libxdamage)
982b3574
KK
679 ("mesa" ,mesa)
680 ("pango" ,pango)
681 ("wayland" ,wayland)
682 ("wayland-protocols" ,wayland-protocols)))
0e112540 683 (inputs
6983ba56 684 `(("libxml2" ,libxml2)
1cb16f1e
SB
685 ;; XXX: colord depends on mozjs (through polkit), which fails on
686 ;; on non-intel systems now.
687 ;;("colord" ,colord)
a572dca8 688 ("cups" ,cups) ;for printing support
a2651b54
SB
689 ;; XXX: rest depends on p11-kit, which fails on mips64el now.
690 ;;("rest" ,rest)
a572dca8 691 ("json-glib" ,json-glib)))
c4c4cc05 692 (native-inputs
141aed80 693 `(("perl" ,perl)
426adbe8 694 ("glib" ,glib "bin")
b94a6ca0 695 ("gettext" ,gettext-minimal)
8b79a547 696 ("pkg-config" ,pkg-config)
141aed80 697 ("gobject-introspection" ,gobject-introspection)
8b79a547 698 ("python-wrapper" ,python-wrapper)
da79e82b
LF
699 ;; By using a special xorg-server for GTK+'s tests, we reduce the impact
700 ;; of updating xorg-server directly on the master branch.
3433413b 701 ("xorg-server" ,xorg-server-1.19.3)))
8b79a547 702 (arguments
3433413b 703 `(#:disallowed-references (,xorg-server-1.19.3)
da79e82b 704 ;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
260b07a7
LC
705 ;; to "doc".
706 #:configure-flags (list (string-append "--with-html-dir="
707 (assoc-ref %outputs "doc")
982b3574
KK
708 "/share/gtk-doc/html")
709 ;; The header file <gdk/gdkwayland.h> is required
710 ;; by gnome-control-center
711 "--enable-wayland-backend"
712 ;; This is necessary to build both backends.
713 "--enable-x11-backend")
e4360e16
JD
714 #:phases (modify-phases %standard-phases
715 (add-before 'configure 'pre-configure
716 (lambda _
717 ;; Disable most tests, failing in the chroot with the message:
718 ;; D-Bus library appears to be incorrectly set up; failed to read
719 ;; machine uuid: Failed to open "/etc/machine-id": No such file or
720 ;; directory.
721 ;; See the manual page for dbus-uuidgen to correct this issue.
722 (substitute* "testsuite/Makefile.in"
723 (("SUBDIRS = gdk gtk a11y css reftests")
724 "SUBDIRS = gdk"))
4c8c2b0f
SB
725 #t))
726 (add-after 'install 'move-desktop-files
727 ;; Move desktop files into 'bin' to avoid cycle references.
728 (lambda* (#:key outputs #:allow-other-keys)
729 (let ((out (assoc-ref outputs "out"))
730 (bin (assoc-ref outputs "bin")))
731 (mkdir-p (string-append bin "/share"))
732 (rename-file (string-append out "/share/applications")
733 (string-append bin "/share/applications"))
734 #t))))))
4828ff91
RW
735 (native-search-paths
736 (list (search-path-specification
737 (variable "GUIX_GTK3_PATH")
738 (files '("lib/gtk-3.0")))))))
5fda4784 739
8e70e6d2
LC
740;;;
741;;; Guile bindings.
742;;;
743
744(define-public guile-cairo
745 (package
746 (name "guile-cairo")
747 (version "1.4.1")
748 (source (origin
b9743865
LC
749 (method url-fetch)
750 (uri (string-append
751 "http://download.gna.org/guile-cairo/guile-cairo-"
752 version
753 ".tar.gz"))
754 (sha256
755 (base32
756 "1f5nd9n46n6cwfl1byjml02q3y2hgn7nkx98km1czgwarxl7ws3x"))))
8e70e6d2
LC
757 (build-system gnu-build-system)
758 (arguments
0f11f640
LC
759 '(#:modules ((guix build utils)
760 (guix build gnu-build-system)
761 (ice-9 popen)
762 (ice-9 rdelim))
763
764 #:phases (modify-phases %standard-phases
b9743865
LC
765 (add-before 'configure 'set-module-directory
766 (lambda* (#:key outputs #:allow-other-keys)
767 ;; Install modules under $out/share/guile/site/2.0.
0f11f640
LC
768 (let ((out (assoc-ref outputs "out"))
769 (effective
770 (read-line
771 (open-pipe* OPEN_READ "guile" "-c"
772 "(display (effective-version))"))))
b9743865
LC
773 (substitute* "Makefile.in"
774 (("scmdir = ([[:graph:]]+).*" _ value)
0f11f640 775 (string-append "scmdir = " value "/" effective "\n")))
b9743865
LC
776 (substitute* "cairo/Makefile.in"
777 (("moduledir = ([[:graph:]]+).*" _ value)
778 (string-append "moduledir = "
0f11f640
LC
779 "$(prefix)/share/guile/site/"
780 effective "/cairo\n'")))
781 #t)))
b9743865
LC
782 (add-after 'install 'install-missing-file
783 (lambda* (#:key outputs #:allow-other-keys)
784 ;; By default 'vector-types.scm' is not installed, so do
785 ;; it here.
0f11f640
LC
786 (let ((out (assoc-ref outputs "out"))
787 (effective
788 (read-line
789 (open-pipe* OPEN_READ "guile" "-c"
790 "(display (effective-version))"))))
791 (install-file "cairo/vector-types.scm"
792 (string-append out "/share/guile/site/"
793 effective "/cairo"))
794 #t))))))
8e70e6d2 795 (inputs
5ace0919 796 `(("guile-lib" ,guile-lib)
8e70e6d2 797 ("expat" ,expat)
1b0f266e 798 ("guile" ,guile-2.2)))
49710cea
LC
799 (propagated-inputs
800 ;; The .pc file refers to 'cairo'.
801 `(("cairo" ,cairo)))
c4c4cc05 802 (native-inputs
b9743865 803 `(("pkg-config" ,pkg-config)))
8e70e6d2
LC
804 (home-page "http://www.nongnu.org/guile-cairo/")
805 (synopsis "Cairo bindings for GNU Guile")
806 (description
807 "Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
808Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API
809stable, providing a firm base on which to do graphics work. Finally, and
810importantly, it is pleasant to use. You get a powerful and well-maintained
811graphics library with all of the benefits of Scheme: memory management,
812exceptions, macros, and a dynamic programming environment.")
813 (license license:lgpl3+)))
66663503 814
1a51fe27 815(define-public guile-rsvg
1b0f266e
LC
816 ;; Use a recent snapshot that supports Guile 2.2 and beyond.
817 (let ((commit "05c6a2fd67e4fea1a7c3ff776729dc931bae6678")
818 (revision "0"))
819 (package
820 (name "guile-rsvg")
821 (version (string-append "2.18.1-" revision "."
822 (string-take commit 7)))
823 (source (origin
824 (method url-fetch)
825 (uri (string-append "https://gitlab.com/wingo/guile-rsvg/"
826 "repository/archive.tar.gz?ref="
827 commit))
828 (sha256
829 (base32
830 "0vdzjx8l5nc4y2xjqs0g1rqn1zrwfsm30brh5gz00r1x41a2pvv2"))
831 (patches (search-patches "guile-rsvg-pkgconfig.patch"))
832 (modules '((guix build utils)))
833 (snippet
834 '(substitute* (find-files "." "Makefile\\.am")
835 (("/share/guile/site")
836 "/share/guile/site/@GUILE_EFFECTIVE_VERSION@")))
837 (file-name (string-append name "-" version ".tar.gz"))))
838 (build-system gnu-build-system)
839 (arguments
840 `(#:phases (modify-phases %standard-phases
d10092b8 841 (add-after 'unpack 'bootstrap
1b0f266e
LC
842 (lambda _
843 (zero? (system* "autoreconf" "-vfi")))))))
844 (native-inputs `(("pkg-config" ,pkg-config)
845 ("autoconf" ,autoconf)
846 ("automake" ,automake)
847 ("libtool" ,libtool)
848 ("texinfo" ,texinfo)))
849 (inputs `(("guile" ,guile-2.2)
850 ("librsvg" ,librsvg)
851 ("guile-lib" ,guile-lib))) ;for (unit-test)
852 (propagated-inputs `(("guile-cairo" ,guile-cairo)))
853 (synopsis "Render SVG images using Cairo from Guile")
854 (description
855 "Guile-RSVG wraps the RSVG library for Guile, allowing you to render SVG
1a51fe27 856images onto Cairo surfaces.")
1b0f266e
LC
857 (home-page "http://wingolog.org/projects/guile-rsvg/")
858 (license license:lgpl2.1+))))
7ca0dbc3 859
cdd383e9
LC
860(define-public guile-present
861 (package
862 (name "guile-present")
863 (version "0.3.0")
864 (source (origin
865 (method url-fetch)
866 (uri (string-append "http://wingolog.org/pub/guile-present/"
867 "guile-present-" version ".tar.gz"))
868 (sha256
869 (base32
870 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
fc1adab1 871 (patches (search-patches "guile-present-coding.patch"))
cdd383e9
LC
872 (modules '((guix build utils)))
873 (snippet
874 '(substitute* "Makefile.in"
875 (("godir = .*$")
876 "godir = $(moddir)\n")))))
877 (build-system gnu-build-system)
878 (arguments
879 '(#:phases (alist-cons-after
880 'install 'post-install
881 (lambda* (#:key inputs outputs #:allow-other-keys)
882 (let* ((out (assoc-ref outputs "out"))
883 (bin (string-append out "/bin"))
884 (guile (assoc-ref inputs "guile")))
885 (substitute* (find-files bin ".*")
886 (("guile")
887 (string-append guile "/bin/guile -L "
888 out "/share/guile/site/2.0 -C "
889 out "/share/guile/site/2.0 ")))))
890 %standard-phases)))
891 (native-inputs `(("pkg-config" ,pkg-config)))
1b0f266e 892 (inputs `(("guile" ,guile-2.2)))
cdd383e9
LC
893 (propagated-inputs
894 ;; These are used by the (present …) modules.
5ace0919 895 `(("guile-lib" ,guile-lib)
cdd383e9
LC
896 ("guile-cairo" ,guile-cairo)
897 ("guile-rsvg" ,guile-rsvg)))
898 (home-page "http://wingolog.org/software/guile-present/")
899 (synopsis "Create SVG or PDF presentations in Guile")
900 (description
901 "Guile-Present defines a declarative vocabulary for presentations,
902together with tools to render presentation documents as SVG or PDF.
903Guile-Present can be used to make presentations programmatically, but also
904includes a tools to generate PDF presentations out of Org mode and Texinfo
905documents.")
906 (license license:lgpl3+)))
7ca0dbc3 907
9b381643
PH
908(define-public guile-gnome
909 (package
910 (name "guile-gnome")
1b0f266e 911 (version "2.16.5")
9b381643
PH
912 (source (origin
913 (method url-fetch)
914 (uri
915 (string-append "mirror://gnu/" name
916 "/guile-gnome-platform/guile-gnome-platform-"
917 version ".tar.gz"))
918 (sha256
919 (base32
1b0f266e 920 "1gnf3j96nip5kl99a268i0dy1hj7s1cfs66sps3zwysnkd7qr399"))))
9b381643
PH
921 (build-system gnu-build-system)
922 (native-inputs
923 `(("pkg-config" ,pkg-config)
924 ("atk" ,atk)
925 ;;("corba" ,corba) ; not packaged yet
926 ("gconf" ,gconf)
927 ("gobject-introspection" ,gobject-introspection)
928 ;;("gthread" ,gthread) ; not packaged yet
929 ("gnome-vfs" ,gnome-vfs)
930 ("gdk-pixbuf" ,gdk-pixbuf)
931 ("gtk+" ,gtk+-2)
932 ("libglade" ,libglade)
933 ("libgnome" ,libgnome)
934 ("libgnomecanvas" ,libgnomecanvas)
935 ("libgnomeui" ,libgnomeui)
936 ("pango" ,pango)
937 ("libffi" ,libffi)
938 ("glib" ,glib)))
1b0f266e 939 (inputs `(("guile" ,guile-2.2)))
9b381643
PH
940 (propagated-inputs
941 `(("guile-cairo" ,guile-cairo)
942 ("g-wrap" ,g-wrap)
5ace0919 943 ("guile-lib" ,guile-lib)))
9b381643
PH
944 (arguments
945 `(#:tests? #f ;FIXME
946 #:phases (modify-phases %standard-phases
947 (add-before 'configure 'pre-configure
948 (lambda* (#:key outputs #:allow-other-keys)
949 (let ((out (assoc-ref outputs "out")))
950 (substitute* (find-files "." "^Makefile.in$")
951 (("guilesite :=.*guile/site" all)
1b0f266e 952 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
9b381643
PH
953 #t))))))
954 (outputs '("out" "debug"))
955 (synopsis "Guile interface for GTK+ programming for GNOME")
956 (description
957 "Includes guile-clutter, guile-gnome-gstreamer,
958guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.")
6fd52309 959 (home-page "https://www.gnu.org/software/guile-gnome/")
1b0f266e
LC
960 (license license:gpl2+)
961 (properties '((upstream-name . "guile-gnome-platform")
962 (ftp-directory . "/gnu/guile-gnome/guile-gnome-platform")))))
9b381643 963
66663503
LC
964;;;
965;;; C++ bindings.
966;;;
967
968(define-public cairomm
969 (package
970 (name "cairomm")
5a52e86e 971 (version "1.12.2")
66663503 972 (source (origin
2079087c 973 (method url-fetch)
5a52e86e
EF
974 (uri (string-append "https://www.cairographics.org/releases/"
975 name "-" version ".tar.gz"))
2079087c
SB
976 (sha256
977 (base32
5a52e86e 978 "16fmigxsaz85c3lgcls7biwyz8zy8c8h3jndfm54cxxas3a7zi25"))))
66663503
LC
979 (build-system gnu-build-system)
980 (arguments
981 ;; The examples lack -lcairo.
982 '(#:make-flags '("LDFLAGS=-lcairo")))
c4c4cc05 983 (native-inputs `(("pkg-config" ,pkg-config)))
66663503
LC
984 (propagated-inputs
985 `(("libsigc++" ,libsigc++)
986 ("freetype" ,freetype)
987 ("fontconfig" ,fontconfig)
988 ("cairo" ,cairo)))
5a52e86e 989 (home-page "https://cairographics.org/")
66663503
LC
990 (synopsis "C++ bindings to the Cairo 2D graphics library")
991 (description
992 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
993library.")
994 (license license:lgpl2.0+)))
c5cc5006
LC
995
996(define-public pangomm
997 (package
998 (name "pangomm")
3086d9b9 999 (version "2.40.1")
c5cc5006
LC
1000 (source (origin
1001 (method url-fetch)
b38e45d8
EB
1002 (uri (string-append "mirror://gnome/sources/" name "/"
1003 (version-major+minor version) "/"
1004 name "-" version ".tar.xz"))
c5cc5006
LC
1005 (sha256
1006 (base32
3086d9b9 1007 "1bz3gciff23bpw9bqc4v2l3lkq9w7394v3a4jxkvx0ap5lmfwqlp"))))
c5cc5006 1008 (build-system gnu-build-system)
c4c4cc05 1009 (native-inputs `(("pkg-config" ,pkg-config)))
c5cc5006
LC
1010 (propagated-inputs
1011 `(("cairo" ,cairo)
1012 ("cairomm" ,cairomm)
1013 ("glibmm" ,glibmm)
1014 ("pango" ,pango)))
1015 (home-page "http://www.pango.org/")
1016 (synopsis "C++ interface to the Pango text rendering library")
1017 (description
1018 "Pangomm provides a C++ programming interface to the Pango text rendering
1019library.")
1020 (license license:lgpl2.1+)))
1021
1022(define-public atkmm
1023 (package
1024 (name "atkmm")
5b003972 1025 (version "2.24.2")
c5cc5006
LC
1026 (source (origin
1027 (method url-fetch)
b38e45d8
EB
1028 (uri (string-append "mirror://gnome/sources/" name "/"
1029 (version-major+minor version) "/"
1030 name "-" version ".tar.xz"))
c5cc5006
LC
1031 (sha256
1032 (base32
5b003972 1033 "1gaqwhviadsmy0fsr47686yglv1p4mpkamj0in127bz2b5bki5gz"))))
c5cc5006 1034 (build-system gnu-build-system)
c4c4cc05 1035 (native-inputs `(("pkg-config" ,pkg-config)))
c5cc5006
LC
1036 (propagated-inputs
1037 `(("glibmm" ,glibmm) ("atk" ,atk)))
1038 (home-page "http://www.gtkmm.org")
1039 (synopsis "C++ interface to the ATK accessibility library")
1040 (description
1041 "ATKmm provides a C++ programming interface to the ATK accessibility
1042toolkit.")
1043 (license license:lgpl2.1+)))
1044
1045(define-public gtkmm
1046 (package
1047 (name "gtkmm")
b1d6910e 1048 (version "3.22.0")
c5cc5006
LC
1049 (source (origin
1050 (method url-fetch)
b38e45d8
EB
1051 (uri (string-append "mirror://gnome/sources/" name "/"
1052 (version-major+minor version) "/"
1053 name "-" version ".tar.xz"))
c5cc5006
LC
1054 (sha256
1055 (base32
b1d6910e 1056 "1x8l0ny6r3ym53z82q9d5fan4m9vi93xy3b3hj1hrclgc95lvnh5"))))
c5cc5006 1057 (build-system gnu-build-system)
ff5c33fe 1058 (native-inputs `(("pkg-config" ,pkg-config)
ba470833
LC
1059 ("glib" ,glib "bin") ;for 'glib-compile-resources'
1060 ("xorg-server" ,xorg-server)))
c5cc5006
LC
1061 (propagated-inputs
1062 `(("pangomm" ,pangomm)
1063 ("cairomm" ,cairomm)
1064 ("atkmm" ,atkmm)
1065 ("gtk+" ,gtk+)
1066 ("glibmm" ,glibmm)))
ba470833
LC
1067 (arguments
1068 '(#:phases (modify-phases %standard-phases
1069 (add-before 'check 'run-xvfb
1070 (lambda* (#:key inputs #:allow-other-keys)
1071 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1072 ;; Tests such as 'object_move/test' require a running
1073 ;; X server.
1074 (system (string-append xorg-server "/bin/Xvfb :1 &"))
1075 (setenv "DISPLAY" ":1")
1076 ;; Don't fail because of the missing /etc/machine-id.
1077 (setenv "DBUS_FATAL_WARNINGS" "0")
1078 #t))))))
c5cc5006
LC
1079 (home-page "http://gtkmm.org/")
1080 (synopsis
1081 "C++ interface to the GTK+ graphical user interface library")
1082 (description
1083 "gtkmm is the official C++ interface for the popular GUI library GTK+.
1084Highlights include typesafe callbacks, and a comprehensive set of widgets that
1085are easily extensible via inheritance. You can create user interfaces either
1086in code or with the Glade User Interface designer, using libglademm. There's
1087extensive documentation, including API reference and a tutorial.")
1088 (license license:lgpl2.1+)))
9c086443
JD
1089
1090
1091(define-public gtkmm-2
1092 (package (inherit gtkmm)
b38e45d8 1093 (name "gtkmm")
124596f2 1094 (version "2.24.5")
9c086443
JD
1095 (source (origin
1096 (method url-fetch)
b38e45d8
EB
1097 (uri (string-append "mirror://gnome/sources/" name "/"
1098 (version-major+minor version) "/"
1099 name "-" version ".tar.xz"))
9c086443
JD
1100 (sha256
1101 (base32
124596f2 1102 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
3ad29c9e
SB
1103 (arguments
1104 '(#:configure-flags '("CPPFLAGS=-std=c++11"))) ; required by libsigc++
ff5c33fe 1105 (native-inputs `(("pkg-config" ,pkg-config)))
9c086443
JD
1106 (propagated-inputs
1107 `(("pangomm" ,pangomm)
1108 ("cairomm" ,cairomm)
1109 ("atkmm" ,atkmm)
1110 ("gtk+" ,gtk+-2)
1111 ("glibmm" ,glibmm)))))
fbcfa730
EB
1112
1113(define-public python-pycairo
1114 (package
1115 (name "python-pycairo")
1116 (version "1.10.0")
1117 (source
1118 (origin
1119 (method url-fetch)
1120 (uri (string-append "http://cairographics.org/releases/pycairo-"
1121 version ".tar.bz2"))
1122 (sha256
1123 (base32
b837e658 1124 "1gjkf8x6hyx1skq3hhwcbvwifxvrf9qxis5vx8x5igmmgs70g94s"))
fc1adab1 1125 (patches (search-patches "pycairo-wscript.patch"))))
b837e658 1126 (build-system waf-build-system)
fbcfa730 1127 (native-inputs
b837e658
SB
1128 `(("pkg-config" ,pkg-config)
1129 ("python-waf" ,python-waf)))
fbcfa730
EB
1130 (propagated-inputs ;pycairo.pc references cairo
1131 `(("cairo" ,cairo)))
1132 (arguments
1133 `(#:tests? #f
b837e658
SB
1134 #:phases
1135 (modify-phases %standard-phases
1136 (add-before
1137 'configure 'patch-waf
1138 (lambda* (#:key inputs #:allow-other-keys)
1139 ;; The bundled `waf' doesn't work with python-3.4.x.
1140 (copy-file (assoc-ref %build-inputs "python-waf") "./waf"))))))
fbcfa730
EB
1141 (home-page "http://cairographics.org/pycairo/")
1142 (synopsis "Python bindings for cairo")
1143 (description
1144 "Pycairo is a set of Python bindings for the Cairo graphics library.")
7ec42f1d
LC
1145 (license license:lgpl3+)
1146 (properties `((python2-variant . ,(delay python2-pycairo))))))
fbcfa730 1147
7ca0dbc3 1148(define-public python2-pycairo
7ec42f1d 1149 (package (inherit (strip-python2-variant python-pycairo))
7ca0dbc3 1150 (name "python2-pycairo")
fbcfa730
EB
1151 (version "1.10.0")
1152 (source
1153 (origin
1154 (method url-fetch)
1155 (uri (string-append "http://cairographics.org/releases/py2cairo-"
1156 version ".tar.bz2"))
1157 (sha256
1158 (base32
1159 "0cblk919wh6w0pgb45zf48xwxykfif16qk264yga7h9fdkq3j16k"))))
1160 (arguments
1161 `(#:python ,python-2
b837e658
SB
1162 ,@(substitute-keyword-arguments (package-arguments python-pycairo)
1163 ((#:phases phases)
1164 `(alist-delete 'patch-waf ,phases))
1165 ((#:native-inputs native-inputs)
1166 `(alist-delete "python-waf" ,native-inputs)))))
fbcfa730 1167 ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
0d6a8339 1168 (license (list license:lgpl2.1 license:mpl1.1))))
fbcfa730
EB
1169
1170(define-public python2-pygtk
1171 (package
1172 (name "python2-pygtk")
1173 (version "2.24.0")
1174 (source
1175 (origin
1176 (method url-fetch)
966a543b 1177 (uri (string-append "mirror://gnome/sources"
fbcfa730
EB
1178 "/pygtk/" (version-major+minor version)
1179 "/pygtk-" version ".tar.bz2"))
1180 (sha256
1181 (base32
1182 "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
1183 (build-system gnu-build-system)
594e7b47
LC
1184 (outputs '("out"
1185 "doc")) ;13 MiB of gtk-doc HTML
fbcfa730
EB
1186 (native-inputs
1187 `(("pkg-config" ,pkg-config)))
1188 (inputs
1189 `(("python" ,python-2)
6ab4712d 1190 ("libglade" ,libglade)
fbcfa730
EB
1191 ("glib" ,glib)))
1192 (propagated-inputs
7ca0dbc3 1193 `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
fbcfa730
EB
1194 ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
1195 ("gtk+" ,gtk+-2)))
1196 (arguments
1197 `(#:tests? #f
ae115bc7 1198 #:phases (modify-phases %standard-phases
594e7b47
LC
1199 (add-before 'configure 'set-gtk-doc-directory
1200 (lambda* (#:key outputs #:allow-other-keys)
1201 ;; Install documentation to "doc".
1202 (let ((doc (assoc-ref outputs "doc")))
1203 (substitute* "docs/Makefile.in"
1204 (("TARGET_DIR = \\$\\(datadir\\)")
1205 (string-append "TARGET_DIR = " doc))))))
ae115bc7
LC
1206 (add-after 'configure 'fix-codegen
1207 (lambda* (#:key inputs #:allow-other-keys)
1208 (substitute* "pygtk-codegen-2.0"
1209 (("^prefix=.*$")
1210 (string-append
1211 "prefix="
1212 (assoc-ref inputs "python-pygobject") "\n")))))
1213 (add-after 'install 'install-pth
1214 (lambda* (#:key inputs outputs #:allow-other-keys)
1215 ;; pygtk's modules are stored in a subdirectory of
1216 ;; python's site-packages directory. Add a .pth file so
1217 ;; that python will add that subdirectory to its module
1218 ;; search path.
1219 (let* ((out (assoc-ref outputs "out"))
1220 (site (string-append out "/lib/python"
1221 ,(version-major+minor
1222 (package-version python-2))
1223 "/site-packages")))
1224 (call-with-output-file (string-append site "/pygtk.pth")
1225 (lambda (port)
1226 (format port "gtk-2.0~%")))))))))
fbcfa730
EB
1227 (home-page "http://www.pygtk.org/")
1228 (synopsis "Python bindings for GTK+")
1229 (description
1230 "PyGTK allows you to write full featured GTK programs in Python. It is
d1e4ad1b 1231targeted at GTK 2.x, and can be used in conjunction with gnome-python to
fbcfa730
EB
1232write GNOME applications.")
1233 (license license:lgpl2.1+)))
136770c9
PW
1234
1235(define-public girara
1236 (package
1237 (name "girara")
24bbd9e1 1238 (version "0.2.7")
136770c9
PW
1239 (source (origin
1240 (method url-fetch)
1241 (uri
1242 (string-append "https://pwmt.org/projects/girara/download/girara-"
1243 version ".tar.gz"))
1244 (sha256
1245 (base32
24bbd9e1 1246 "1r9jbhf9n40zj4ddqv1q5spijpjm683nxg4hr5lnir4a551s7rlq"))))
136770c9 1247 (native-inputs `(("pkg-config" ,pkg-config)
b94a6ca0 1248 ("gettext" ,gettext-minimal)))
136770c9
PW
1249 (inputs `(("gtk+" ,gtk+)
1250 ("check" ,check)))
1251 (arguments
1252 `(#:make-flags
1253 `(,(string-append "PREFIX=" (assoc-ref %outputs "out"))
1254 "COLOR=0" "CC=gcc")
1255 #:test-target "test"
1256 #:tests? #f ; Tests fail with "Gtk cannot open display:"
1257 #:phases
1258 (alist-delete 'configure %standard-phases)))
1259 (build-system gnu-build-system)
1260 (home-page "https://pwmt.org/projects/girara/")
1261 (synopsis "Library for minimalistic gtk+3 user interfaces")
1262 (description "Girara is a library that implements a user interface that
1263focuses on simplicity and minimalism. Currently based on GTK+, a
1264cross-platform widget toolkit, it provides an interface that focuses on three
1265main components: a so-called view widget that represents the actual
1266application, an input bar that is used to execute commands of the
1267application and the status bar which provides the user with current
1268information.")
1269 (license license:zlib)))
3bc45449
AW
1270
1271(define-public gtk-doc
1272 (package
1273 (name "gtk-doc")
9d19e18d 1274 (version "1.25")
3bc45449
AW
1275 (source (origin
1276 (method url-fetch)
1277 (uri (string-append "mirror://gnome/sources/" name "/"
1278 (version-major+minor version) "/"
1279 name "-" version ".tar.xz"))
1280 (sha256
1281 (base32
9d19e18d 1282 "0hpxcij9xx9ny3gs9p0iz4r8zslw8wqymbyababiyl7603a6x90y"))))
3bc45449
AW
1283 (build-system gnu-build-system)
1284 (arguments
6ad08117
AE
1285 `(#:parallel-tests? #f
1286 #:phases
b4787e71 1287 (modify-phases %standard-phases
a20608a5
RW
1288 (add-before 'build 'set-HOME
1289 (lambda _
1290 ;; FIXME: dblatex with texlive-union does not find the built
1291 ;; metafonts, so it tries to generate them in HOME.
1292 (setenv "HOME" "/tmp")
1293 #t))
1294 (add-before 'configure 'fix-docbook
b4787e71
AW
1295 (lambda* (#:key inputs #:allow-other-keys)
1296 (substitute* "configure"
1297 ;; The configure check is overzealous about making sure that
1298 ;; things are in place -- it uses the xmlcatalog tool to make
1299 ;; sure that docbook-xsl is available, but this tool can only
1300 ;; look in one catalog file, unlike the $XML_CATALOG_FILES
1301 ;; variable that Guix defines. Fool the test by using the
1302 ;; docbook-xsl catalog explicitly and get on with life.
1303 (("\"\\$XML_CATALOG_FILE\" \
1304\"http://docbook.sourceforge.net/release/xsl/")
4ed737b2
MW
1305 (string-append (car (find-files (assoc-ref inputs "docbook-xsl")
1306 "^catalog.xml$"))
1307 " \"http://docbook.sourceforge.net/release/xsl/")))
1308 #t)))
b4787e71 1309 #:configure-flags
3bc45449
AW
1310 (list (string-append "--with-xml-catalog="
1311 (assoc-ref %build-inputs "docbook-xml")
1312 "/xml/dtd/docbook/catalog.xml"))))
1313 (native-inputs
1314 `(("pkg-config" ,pkg-config)
1315 ("itstool" ,itstool)
1316 ("libxml" ,libxml2)
b94a6ca0 1317 ("gettext" ,gettext-minimal)
3bc45449
AW
1318 ("bc" ,bc)))
1319 (inputs
1320 `(("perl" ,perl)
1321 ("python" ,python)
1322 ("xsltproc" ,libxslt)
1323 ("dblatex" ,dblatex)
1324 ("docbook-xml" ,docbook-xml-4.3)
1325 ("docbook-xsl" ,docbook-xsl)
1326 ("source-highlight" ,source-highlight)
1327 ("glib" ,glib)))
1328 (home-page "http://www.gtk.org/gtk-doc/")
1329 (synopsis "Documentation generator from C source code")
1330 (description
a124bbd2 1331 "GTK-Doc generates API documentation from comments added to C code. It is
3bc45449
AW
1332typically used to document the public API of GTK+ and GNOME libraries, but it
1333can also be used to document application code.")
1334 (license license:gpl2+)))
9ba5198c
FH
1335
1336(define-public gtk-engines
1337 (package
1338 (name "gtk-engines")
1339 (version "2.20.2")
1340 (source (origin
1341 (method url-fetch)
1342 (uri (string-append "mirror://gnome/sources/" name "/"
1343 (version-major+minor version) "/"
1344 name "-" version ".tar.bz2"))
1345 (sha256
1346 (base32
1347 "1db65pb0j0mijmswrvpgkdabilqd23x22d95hp5kwxvcramq1dhm"))))
1348 (build-system gnu-build-system)
1349 (arguments
1350 `(#:configure-flags
1351 `("--enable-animation")))
1352 (native-inputs
1353 `(("pkg-config" ,pkg-config)
1354 ("intltool" ,intltool)))
9fff9e64
SB
1355 (inputs
1356 ;; Don't propagate GTK+ to reduce "profile pollution".
9ba5198c 1357 `(("gtk+" ,gtk+-2))) ; required by gtk-engines-2.pc
f032d0be 1358 (home-page "https://live.gnome.org/GnomeArt")
9ba5198c
FH
1359 (synopsis "Theming engines for GTK+ 2.x")
1360 (description
1361 "This package contains the standard GTK+ 2.x theming engines including
1362Clearlooks, Crux, High Contrast, Industrial, LighthouseBlue, Metal, Mist,
1363Redmond95 and ThinIce.")
1364 (license (list license:gpl2+ license:lgpl2.1+))))
b7807bb2
FH
1365
1366(define-public murrine
1367 (package
1368 (name "murrine")
1369 (version "0.98.2")
1370 (source (origin
1371 (method url-fetch)
1372 (uri (string-append "mirror://gnome/sources/" name "/"
1373 (version-major+minor version) "/"
1374 name "-" version ".tar.xz"))
1375 (sha256
1376 (base32
1377 "129cs5bqw23i76h3nmc29c9mqkm9460iwc8vkl7hs4xr07h8mip9"))))
1378 (build-system gnu-build-system)
1379 (arguments
1380 `(#:configure-flags
1381 `("--enable-animation"
1382 "--enable-animationrtl")))
1383 (native-inputs
1384 `(("pkg-config" ,pkg-config)
1385 ("intltool" ,intltool)))
1386 (propagated-inputs
1387 `(("gtk+" ,gtk+-2)))
f032d0be 1388 (home-page "https://live.gnome.org/GnomeArt")
b7807bb2
FH
1389 (synopsis "Cairo-based theming engine for GTK+ 2.x")
1390 (description
1391 "Murrine is a cairo-based GTK+ theming engine. It is named after the
1392glass artworks done by Venicians glass blowers.")
1393 (license license:gpl2+)))
9c0c77f8
KY
1394
1395(define-public gtkspell3
1396 (package
1397 (name "gtkspell3")
1398 (version "3.0.8")
1399 (source (origin
1400 (method url-fetch)
1401 (uri (string-append "mirror://sourceforge/gtkspell/"
1402 version "/" name "-" version ".tar.gz"))
1403 (sha256
1404 (base32
1405 "1zrz5pz4ryvcssk898liynmy2wyxgj95ak7mp2jv7x62yzihq6h1"))))
1406 (build-system gnu-build-system)
1407 (native-inputs
1408 `(("intltool" ,intltool)
1409 ("pkg-config" ,pkg-config)))
1410 (inputs
1411 `(("enchant" ,enchant)
1412 ("gobject-introspection" ,gobject-introspection)
1413 ("gtk+" ,gtk+)
1414 ("pango" ,pango)))
1415 (home-page "http://gtkspell.sourceforge.net")
1416 (synopsis "Spell-checking addon for GTK's TextView widget")
1417 (description
1418 "GtkSpell provides word-processor-style highlighting and replacement of
1419misspelled words in a GtkTextView widget.")
1420 (license license:gpl2+)))
37355498 1421
1422(define-public clipit
1423 (package
1424 (name "clipit")
1425 (version "1.4.2")
1426 (source (origin
1427 (method url-fetch)
1428 (uri (string-append
1429 "https://github.com/downloads/ClipIt/clipit-"
1430 version ".tar.gz"))
1431 (sha256
1432 (base32
1433 "0jrwn8qfgb15rwspdp1p8hb1nc0ngmpvgr87d4k3lhlvqg2cfqva"))))
1434 (build-system gnu-build-system)
1435 (native-inputs
1436 `(("intltool" ,intltool)
1437 ("pkg-config" ,pkg-config)))
1438 (inputs
1439 `(("gtk+" ,gtk+-2)))
1440 (home-page "https://github.com/CristianHenzel/ClipIt")
1441 (synopsis "Lightweight GTK+ clipboard manager")
1442 (description
1443 "ClipIt is a clipboard manager with features such as a history, search
1444thereof, global hotkeys and clipboard item actions. It was forked from
1445Parcellite and adds bugfixes and features.")
1446 (license license:gpl2+)))
61af2675
RJ
1447
1448(define-public graphene
1449 (package
1450 (name "graphene")
1451 (version "1.6.0")
1452 (source (origin
1453 (method url-fetch)
1454 (uri (string-append
1455 "https://github.com/ebassi/graphene/archive/"
1456 version ".tar.gz"))
1457 (file-name (string-append name "-" version ".tar.gz"))
1458 (sha256
1459 (base32 "1zd2daj7y590wnzn4jw0niyc4fnzgxrcl9i7nwhy8b25ks2hz5wq"))))
1460 (build-system gnu-build-system)
1461 (arguments
1462 `(#:configure-flags '("--enable-introspection=yes")
1463 #:phases
1464 (modify-phases %standard-phases
1465 (add-before 'configure 'autogen
1466 (lambda _
1467 (zero? (system* "./autogen.sh")))))))
1468 (native-inputs
1469 `(("autoconf" ,autoconf)
1470 ("which" ,which)
1471 ("pkg-config" ,pkg-config)
1472 ("automake" ,automake)
1473 ("libtool" ,libtool)))
1474 (inputs
1475 `(("python" ,python)
1476 ("python-2" ,python-2)
1477 ("glib" ,glib)
1478 ("gobject-introspection" ,gobject-introspection)))
1479 (home-page "http://ebassi.github.io/graphene")
1480 (synopsis "Thin layer of graphic data types")
1481 (description "This library provides graphic types and their relative API;
1482it does not deal with windowing system surfaces, drawing, scene graphs, or
1483input.")
1484 (license license:expat)))