gnu: gtk+: Update to 3.18.2.
[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>
37cb3a69 3;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
97f94f5e 4;;; Copyright © 2014, 2015 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>
3a08a411
AE
10;;;
11;;; This file is part of GNU Guix.
12;;;
13;;; GNU Guix is free software; you can redistribute it and/or modify it
14;;; under the terms of the GNU General Public License as published by
15;;; the Free Software Foundation; either version 3 of the License, or (at
16;;; your option) any later version.
17;;;
18;;; GNU Guix is distributed in the hope that it will be useful, but
19;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21;;; GNU General Public License for more details.
22;;;
23;;; You should have received a copy of the GNU General Public License
24;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26(define-module (gnu packages gtk)
b5b73a82 27 #:use-module ((guix licenses) #:prefix license:)
b38e45d8 28 #:use-module (guix utils)
3a08a411
AE
29 #:use-module (guix packages)
30 #:use-module (guix download)
31 #:use-module (guix build-system gnu)
0b96fb2a 32 #:use-module (guix build-system python)
e926ba71 33 #:use-module (guix build-system waf)
b837e658 34 #:use-module (gnu packages)
3bc45449 35 #:use-module (gnu packages algebra)
1a51fe27
LC
36 #:use-module (gnu packages autotools)
37 #:use-module (gnu packages texinfo)
136770c9 38 #:use-module (gnu packages check)
6131c43d 39 #:use-module (gnu packages compression)
3bc45449 40 #:use-module (gnu packages docbook)
6131c43d 41 #:use-module (gnu packages fontutils)
3bc45449 42 #:use-module (gnu packages gettext)
6131c43d 43 #:use-module (gnu packages ghostscript)
31b254a3 44 #:use-module (gnu packages gl)
3a08a411 45 #:use-module (gnu packages glib)
95d439b2 46 #:use-module (gnu packages gnome)
a2609b41 47 #:use-module (gnu packages icu4c)
e55354b8 48 #:use-module (gnu packages image)
6131c43d 49 #:use-module (gnu packages pdf)
8b79a547 50 #:use-module (gnu packages perl)
6131c43d 51 #:use-module (gnu packages pkg-config)
3bc45449 52 #:use-module (gnu packages pretty-print)
6131c43d 53 #:use-module (gnu packages python)
8e70e6d2 54 #:use-module (gnu packages guile)
37cb3a69 55 #:use-module (gnu packages cups)
8e70e6d2 56 #:use-module (gnu packages xml)
6c0e878e
LC
57 #:use-module (gnu packages xorg)
58 #:use-module (gnu packages xdisorg))
3a08a411
AE
59
60(define-public atk
61 (package
62 (name "atk")
492b0e38 63 (version "2.18.0")
3a08a411
AE
64 (source (origin
65 (method url-fetch)
3b8e4347 66 (uri (string-append "mirror://gnome/sources/" name "/"
b38e45d8
EB
67 (version-major+minor version) "/"
68 name "-" version ".tar.xz"))
3a08a411
AE
69 (sha256
70 (base32
492b0e38 71 "0ay9s137x49f0akx658p7kznz0rdapfrd8ym54q0hlgrggblhv6f"))))
3a08a411 72 (build-system gnu-build-system)
cd0466eb
SB
73 (outputs '("out" "doc"))
74 (arguments
75 `(#:configure-flags
76 (list (string-append "--with-html-dir="
77 (assoc-ref %outputs "doc")
78 "/share/gtk-doc/html"))))
13a9e291 79 (propagated-inputs `(("glib" ,glib))) ; required by atk.pc
141aed80
LC
80 (native-inputs
81 `(("pkg-config" ,pkg-config)
426adbe8 82 ("glib" ,glib "bin") ; glib-mkenums, etc.
141aed80 83 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
c5cc5006 84 (synopsis "GNOME accessibility toolkit")
3a08a411
AE
85 (description
86 "ATK provides the set of accessibility interfaces that are implemented
35b9e423 87by other toolkits and applications. Using the ATK interfaces, accessibility
3a08a411
AE
88tools have full access to view and control running applications.")
89 (license license:lgpl2.0+)
90 (home-page "https://developer.gnome.org/atk/")))
6131c43d
AE
91
92(define-public cairo
93 (package
94 (name "cairo")
d8720c50 95 (version "1.14.2")
6131c43d
AE
96 (source (origin
97 (method url-fetch)
98 (uri (string-append "http://cairographics.org/releases/cairo-"
99 version ".tar.xz"))
100 (sha256
101 (base32
d8720c50 102 "1sycbq0agbwmg1bj9lhkgsf0glmblaf2jrdy9g6vxfxivncxj6f9"))))
6131c43d
AE
103 (build-system gnu-build-system)
104 (propagated-inputs
105 `(("fontconfig" ,fontconfig)
106 ("freetype" ,freetype)
107 ("glib" ,glib)
108 ("libpng" ,libpng)
109 ("libx11" ,libx11)
110 ("libxext" ,libxext)
111 ("libxrender" ,libxrender)
112 ("pixman" ,pixman)))
113 (inputs
114 `(("ghostscript" ,ghostscript)
115 ("libspectre" ,libspectre)
6131c43d 116 ("poppler" ,poppler)
6131c43d
AE
117 ("xextproto" ,xextproto)
118 ("zlib" ,zlib)))
c4c4cc05
JD
119 (native-inputs
120 `(("pkg-config" ,pkg-config)
121 ("python" ,python-wrapper)))
6131c43d 122 (arguments
77888fae
MW
123 `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
124 #:configure-flags '("--enable-tee"))) ; needed for GNU Icecat
6131c43d
AE
125 (synopsis "2D graphics library")
126 (description
127 "Cairo is a 2D graphics library with support for multiple output devices.
128Currently supported output targets include the X Window System (via both
129Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
35b9e423 130output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
6131c43d
AE
131
132Cairo is designed to produce consistent output on all output media while
133taking advantage of display hardware acceleration when available
134eg. through the X Render Extension).
135
136The cairo API provides operations similar to the drawing operators of
35b9e423 137PostScript and PDF. Operations in cairo including stroking and filling cubic
6131c43d 138Bézier splines, transforming and compositing translucent images, and
35b9e423 139antialiased text rendering. All drawing operations can be transformed by any
e881752c 140affine transformation (scale, rotation, shear, etc.).")
6131c43d
AE
141 (license license:lgpl2.1) ; or Mozilla Public License 1.1
142 (home-page "http://cairographics.org/")))
a2609b41
AE
143
144(define-public harfbuzz
145 (package
146 (name "harfbuzz")
7a2c7808 147 (version "1.0.5")
a2609b41 148 (source (origin
fd9b3b43
SB
149 (method url-fetch)
150 (uri (string-append "http://www.freedesktop.org/software/"
151 "harfbuzz/release/harfbuzz-"
152 version ".tar.bz2"))
153 (sha256
154 (base32
7a2c7808 155 "0h2l362qzkck5dnnj7zlz593hf1ni3k25dfaii9mbjwflp3d56ad"))))
a2609b41 156 (build-system gnu-build-system)
0a129f39
SB
157 (outputs '("out"
158 "bin")) ; 160K, only hb-view depend on cairo
a2609b41 159 (inputs
fd9b3b43
SB
160 `(("cairo" ,cairo)))
161 (propagated-inputs
162 ;; There are all in the Requires or Requires.private field of '.pc'.
163 `(("glib" ,glib)
27383915 164 ("graphite2" ,graphite2)
c4c4cc05
JD
165 ("icu4c" ,icu4c)))
166 (native-inputs
a30a0455
SB
167 `(("gobject-introspection" ,gobject-introspection)
168 ("pkg-config" ,pkg-config)
ac462e52 169 ("python" ,python-2))) ; incompatible with Python 3 (print syntax)
27383915 170 (arguments
a30a0455 171 `(#:configure-flags `("--with-graphite2"
eb6afbcd
SB
172 "--with-gobject"
173 ,(string-append
174 "--bindir=" (assoc-ref %outputs "bin") "/bin"))))
35b9e423 175 (synopsis "OpenType text shaping engine")
a2609b41
AE
176 (description
177 "HarfBuzz is an OpenType text shaping engine.")
178 (license (license:x11-style "file://COPYING"
179 "See 'COPYING' in the distribution."))
180 (home-page "http://www.freedesktop.org/wiki/Software/HarfBuzz/")))
4b9adff9
AE
181
182(define-public pango
183 (package
184 (name "pango")
e9457878 185 (version "1.38.1")
4b9adff9
AE
186 (source (origin
187 (method url-fetch)
dca1b58d
FB
188 (uri (string-append "mirror://gnome/sources/pango/"
189 (version-major+minor version) "/"
190 name "-" version ".tar.xz"))
4b9adff9
AE
191 (sha256
192 (base32
e9457878 193 "1dsf45m51i4rcyvh5wlxxrjfhvn5b67d5ckjc6vdcxbddjgmc80k"))))
4b9adff9 194 (build-system gnu-build-system)
cf2135ff 195 (propagated-inputs
4b9adff9 196 `(("cairo" ,cairo)
4169a4bc
AE
197 ("harfbuzz" ,harfbuzz)))
198 (inputs
9a5acb54
JL
199 `(("zlib" ,zlib)
200
201 ;; Some packages, such as Openbox, expect Pango to be built with the
202 ;; optional libxft support.
203 ("libxft" ,libxft)))
c4c4cc05 204 (native-inputs
141aed80 205 `(("pkg-config" ,pkg-config)
426adbe8 206 ("glib" ,glib "bin") ; glib-mkenums, etc.
141aed80 207 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
4b9adff9
AE
208 (synopsis "GNOME text and font handling library")
209 (description
210 "Pango is the core text and font handling library used in GNOME
35b9e423 211applications. It has extensive support for the different writing systems
4b9adff9
AE
212used throughout the world.")
213 (license license:lgpl2.0+)
214 (home-page "https://developer.gnome.org/pango/")))
527e7961 215
5698b8b8
JD
216(define-public pangox-compat
217 (package
218 (name "pangox-compat")
219 (version "0.0.2")
220 (source (origin
221 (method url-fetch)
b38e45d8
EB
222 (uri (string-append "mirror://gnome/sources/" name "/"
223 (version-major+minor version) "/"
224 name "-" version ".tar.xz"))
5698b8b8
JD
225 (sha256
226 (base32
227 "0ip0ziys6mrqqmz4n71ays0kf5cs1xflj1gfpvs4fgy2nsrr482m"))))
228 (build-system gnu-build-system)
229 (inputs
230 `(("glib" ,glib)
231 ("pango" ,pango)))
232 (native-inputs
233 `(("intltool" ,intltool)
234 ("pkg-config" ,pkg-config)))
235 (home-page "https://developer.gnome.org/pango")
35b9e423 236 (synopsis "Obsolete pango functions")
5698b8b8
JD
237 (description "Pangox was a X backend to pango. It is now obsolete and no
238longer provided by recent pango releases. pangox-compat provides the
239functions which were removed.")
240 (license license:lgpl2.0+)))
241
e926ba71
RW
242(define-public ganv
243 (package
244 (name "ganv")
245 (version "1.4.2")
246 (source (origin
247 (method url-fetch)
248 (uri (string-append "http://download.drobilla.net/ganv-"
ea7f3349 249 version ".tar.bz2"))
e926ba71
RW
250 (sha256
251 (base32
252 "0g7s5mp14qgbfjdql0k1s8464r21g47ssn5dws6jazsnw6njhl0l"))))
253 (build-system waf-build-system)
ea7f3349
LC
254 (arguments
255 `(#:phases (alist-cons-before
256 'configure 'set-ldflags
257 (lambda* (#:key outputs #:allow-other-keys)
258 ;; Allow 'bin/ganv_bench' to find libganv-1.so.
259 (setenv "LDFLAGS"
260 (string-append "-Wl,-rpath="
261 (assoc-ref outputs "out") "/lib")))
262 %standard-phases)
263 #:tests? #f)) ; no check target
e926ba71
RW
264 (inputs
265 `(("gtk" ,gtk+-2)
266 ("gtkmm" ,gtkmm-2)))
267 (native-inputs
268 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
269 ("pkg-config" ,pkg-config)))
270 (home-page "http://drobilla.net/software/ganv/")
271 (synopsis "GTK+ widget for interactive graph-like environments")
272 (description
273 "Ganv is an interactive GTK+ widget for interactive “boxes and lines” or
274graph-like environments, e.g. modular synths or finite state machine
275diagrams.")
276 (license license:gpl3+)))
95d439b2
JD
277
278(define-public gtksourceview
279 (package
280 (name "gtksourceview")
281 (version "2.10.5") ; This is the last version which builds against gtk+2
282 (source (origin
283 (method url-fetch)
b38e45d8
EB
284 (uri (string-append "mirror://gnome/sources/" name "/"
285 (version-major+minor version) "/"
286 name "-" version ".tar.bz2"))
95d439b2
JD
287 (sha256
288 (base32
289 "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5"))))
290 (build-system gnu-build-system)
291 (inputs
c4c4cc05 292 `(("gtk" ,gtk+-2)
95d439b2 293 ("libxml2" ,libxml2)
95d439b2
JD
294 ;; These two are needed only to allow the tests to run successfully.
295 ("xorg-server" ,xorg-server)
296 ("shared-mime-info" ,shared-mime-info)))
c4c4cc05 297 (native-inputs
44add1ce 298 `(("intltool" ,intltool)
221ed17a 299 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
c4c4cc05 300 ("pkg-config" ,pkg-config)))
95d439b2
JD
301 (arguments
302 `(#:phases
303 ;; Unfortunately, some of the tests in "make check" are highly dependent
304 ;; on the environment therefore, some black magic is required.
305 (alist-cons-before
306 'check 'start-xserver
307 (lambda* (#:key inputs #:allow-other-keys)
308 (let ((xorg-server (assoc-ref inputs "xorg-server"))
309 (mime (assoc-ref inputs "shared-mime-info")))
310
311 ;; There must be a running X server and make check doesn't start one.
312 ;; Therefore we must do it.
313 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
314 (setenv "DISPLAY" ":1")
315
316 ;; The .lang files must be found in $XDG_DATA_HOME/gtksourceview-2.0
317 (system "ln -s gtksourceview gtksourceview-2.0")
318 (setenv "XDG_DATA_HOME" (getcwd))
319
320 ;; Finally, the mimetypes must be available.
321 (setenv "XDG_DATA_DIRS" (string-append mime "/share/")) ))
322 %standard-phases)))
323 (synopsis "Widget that extends the standard GTK+ 2.x 'GtkTextView' widget")
324 (description
325 "GtkSourceView is a portable C library that extends the standard GTK+
326framework for multiline text editing with support for configurable syntax
327highlighting, unlimited undo/redo, search and replace, a completion framework,
328printing and other features typical of a source code editor.")
329 (license license:lgpl2.0+)
330 (home-page "https://developer.gnome.org/gtksourceview/")))
331
527e7961
AE
332(define-public gdk-pixbuf
333 (package
334 (name "gdk-pixbuf")
9511de1e 335 (version "2.32.1")
527e7961
AE
336 (source (origin
337 (method url-fetch)
b38e45d8
EB
338 (uri (string-append "mirror://gnome/sources/" name "/"
339 (version-major+minor version) "/"
340 name "-" version ".tar.xz"))
527e7961
AE
341 (sha256
342 (base32
9511de1e 343 "1g7kjxv67jcdasi14n7jan4icrnnppd1m99wrdmpv32k4m7vfcj4"))))
527e7961 344 (build-system gnu-build-system)
48f46dc3 345 (arguments
a63a73dc
SB
346 '(#:configure-flags '("--with-x11")
347 #:phases
348 (modify-phases %standard-phases
349 (add-after
350 'unpack 'disable-failing-tests
351 (lambda _
352 (substitute* "tests/Makefile.in"
353 ;; XXX FIXME: This test fails on some machines with:
354 ;; GLib-FATAL-ERROR: gmem.c:103: failed to allocate
355 ;; 6039798016 bytes
356 (("cve-2015-4491\\$\\(EXEEXT\\) ") "")
357 ;; XXX FIXME: This test fails with:
358 ;; ERROR:pixbuf-jpeg.c:74:test_type9_rotation_exif_tag:
359 ;; assertion failed (error == NULL): Data differ
360 ;; (gdk-pixbuf-error-quark, 0)
361 (("pixbuf-jpeg\\$\\(EXEEXT\\) ") ""))
362 #t)))))
1b5758a6 363 (propagated-inputs ; required by gdk-pixbuf-2.0.pc
527e7961 364 `(("glib" ,glib)
1b5758a6
SB
365 ("libpng" ,libpng)))
366 (inputs
367 `(("libjpeg" ,libjpeg)
48f46dc3
SB
368 ("libtiff" ,libtiff)
369 ("libx11" ,libx11)))
c4c4cc05 370 (native-inputs
141aed80 371 `(("pkg-config" ,pkg-config)
426adbe8 372 ("glib" ,glib "bin") ; glib-mkenums, etc.
141aed80 373 ("gobject-introspection", gobject-introspection))) ; g-ir-compiler, etc.
527e7961
AE
374 (synopsis "GNOME image loading and manipulation library")
375 (description
376 "GdkPixbuf is a library for image loading and manipulation developed
377in the GNOME project.")
378 (license license:lgpl2.0+)
379 (home-page "https://developer.gnome.org/gdk-pixbuf/")))
cf2135ff 380
f3fb92e5
AE
381(define-public at-spi2-core
382 (package
383 (name "at-spi2-core")
f14c0a49 384 (version "2.18.1")
f3fb92e5
AE
385 (source (origin
386 (method url-fetch)
387 (uri (string-append "mirror://gnome/sources/" name "/"
b38e45d8
EB
388 (version-major+minor version) "/"
389 name "-" version ".tar.xz"))
f3fb92e5
AE
390 (sha256
391 (base32
f14c0a49 392 "1kq17w4fm51d49vzmglkxqdm6s0yvjvrpgw78r2hajf69jz5bmap"))))
f3fb92e5 393 (build-system gnu-build-system)
068a53c3 394 (outputs '("out" "doc"))
f3fb92e5 395 (arguments
b19d6805 396 '(#:configure-flags
068a53c3
SB
397 (list (string-append "--with-html-dir="
398 (assoc-ref %outputs "doc")
399 "/share/gtk-doc/html"))
50cc7f41 400 #:phases
af108677 401 (modify-phases %standard-phases
3a4de6b2 402 (replace 'check
af108677
SB
403 ;; Run test-suite under a dbus session.
404 (lambda _
405 (zero? (system* "dbus-launch" "make" "check")))))))
c6a552da
SB
406 (propagated-inputs
407 ;; atspi-2.pc refers to all these.
408 `(("dbus" ,dbus)
409 ("glib" ,glib)))
410 (inputs
411 `(("libxi" ,libxi)
412 ("libxtst" ,libxtst)))
c4c4cc05 413 (native-inputs
50cc7f41
SB
414 `(("gobject-introspection" ,gobject-introspection)
415 ("intltool" ,intltool)
416 ("pkg-config" ,pkg-config)))
f3fb92e5
AE
417 (synopsis "Assistive Technology Service Provider Interface, core components")
418 (description
419 "The Assistive Technology Service Provider Interface, core components,
420is part of the GNOME accessibility project.")
421 (license license:lgpl2.0+)
422 (home-page "https://projects.gnome.org/accessibility/")))
423
5fda4784
AE
424(define-public at-spi2-atk
425 (package
426 (name "at-spi2-atk")
9fbfb4ec 427 (version "2.18.1")
5fda4784
AE
428 (source (origin
429 (method url-fetch)
430 (uri (string-append "mirror://gnome/sources/" name "/"
b38e45d8
EB
431 (version-major+minor version) "/"
432 name "-" version ".tar.xz"))
5fda4784
AE
433 (sha256
434 (base32
9fbfb4ec 435 "0bf1g5cj84rmx7p1q547vwbc0hlpcs2wrxnmv96lckfkhs9mzcf4"))))
5fda4784 436 (build-system gnu-build-system)
5fda4784 437 (arguments
57fcd224
SB
438 '(#:phases
439 (modify-phases %standard-phases
3a4de6b2 440 (replace 'check
57fcd224
SB
441 ;; Run test-suite under a dbus session.
442 (lambda _
443 (zero? (system* "dbus-launch" "make" "check")))))))
6967cc3f
SB
444 (propagated-inputs
445 `(("at-spi2-core" ,at-spi2-core))) ; required by atk-bridge-2.0.pc
446 (inputs
447 `(("atk" ,atk)))
c4c4cc05 448 (native-inputs
6967cc3f
SB
449 `(("dbus" ,dbus) ; for testing
450 ("pkg-config" ,pkg-config)))
5fda4784
AE
451 (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
452 (description
453 "The Assistive Technology Service Provider Interface
454is part of the GNOME accessibility project.")
455 (license license:lgpl2.0+)
456 (home-page "https://projects.gnome.org/accessibility/")))
457
8b79a547 458(define-public gtk+-2
cf2135ff
AE
459 (package
460 (name "gtk+")
62b7015b 461 (version "2.24.28")
cf2135ff
AE
462 (source (origin
463 (method url-fetch)
1c8362a8 464 (uri (string-append "mirror://gnome/sources/" name "/"
b38e45d8
EB
465 (version-major+minor version) "/"
466 name "-" version ".tar.xz"))
cf2135ff
AE
467 (sha256
468 (base32
62b7015b 469 "0mj6xn40py9r9lvzg633fal81xfwfm89d9mvz7jk4lmwk0g49imj"))))
cf2135ff 470 (build-system gnu-build-system)
6b1f2388 471 (outputs '("out" "doc"))
4169a4bc 472 (propagated-inputs
cf2135ff 473 `(("atk" ,atk)
cf2135ff 474 ("gdk-pixbuf" ,gdk-pixbuf)
4169a4bc 475 ("pango" ,pango)))
dfbce50c
SB
476 (inputs
477 `(("cups" ,cups)
478 ("libxcomposite" ,libxcomposite)
479 ("libxcursor" ,libxcursor)
480 ("libxdamage" ,libxdamage)
481 ("libxi" ,libxi)
482 ("libxinerama" ,libxinerama)
483 ("libxrandr" ,libxrandr)))
c4c4cc05 484 (native-inputs
1c8362a8 485 `(("perl" ,perl)
dfbce50c 486 ("gettext" ,gnu-gettext)
426adbe8 487 ("glib" ,glib "bin")
9d297fae 488 ("gobject-introspection" ,gobject-introspection)
1c8362a8
AE
489 ("pkg-config" ,pkg-config)
490 ("python-wrapper" ,python-wrapper)))
cf2135ff 491 (arguments
b19d6805 492 `(#:configure-flags
6b1f2388
SB
493 (list "--with-xinput=yes"
494 (string-append "--with-html-dir="
495 (assoc-ref %outputs "doc")
496 "/share/gtk-doc/html"))
9d297fae 497 #:phases
d4bf49b1
EB
498 (alist-cons-before
499 'configure 'disable-tests
500 (lambda _
501 ;; FIXME: re-enable tests requiring an X server
502 (substitute* "gtk/Makefile.in"
503 (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits .")))
cf2135ff 504 %standard-phases)))
0327ced2 505 (synopsis "Cross-platform toolkit for creating graphical user interfaces")
cf2135ff
AE
506 (description
507 "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
35b9e423 508graphical user interfaces. Offering a complete set of widgets, GTK+ is
cf2135ff
AE
509suitable for projects ranging from small one-off tools to complete
510application suites.")
511 (license license:lgpl2.0+)
512 (home-page "http://www.gtk.org/")))
8e70e6d2 513
8b79a547
AE
514(define-public gtk+
515 (package (inherit gtk+-2)
b38e45d8 516 (name "gtk+")
9fe2e17d 517 (version "3.18.2")
8b79a547
AE
518 (source (origin
519 (method url-fetch)
b38e45d8
EB
520 (uri (string-append "mirror://gnome/sources/" name "/"
521 (version-major+minor version) "/"
522 name "-" version ".tar.xz"))
8b79a547
AE
523 (sha256
524 (base32
9fe2e17d 525 "0lp1hn0qydxx03bianzzr0a4maqzsvylrkzr7c3p0050qihwbgjx"))))
0e112540 526 (propagated-inputs
8b79a547 527 `(("at-spi2-atk" ,at-spi2-atk)
0e112540
AE
528 ("atk" ,atk)
529 ("gdk-pixbuf" ,gdk-pixbuf)
31b254a3 530 ("libepoxy" ,libepoxy)
8b79a547
AE
531 ("libxi" ,libxi)
532 ("libxinerama" ,libxinerama)
9e5c0927 533 ("libxdamage" ,libxdamage)
0e112540
AE
534 ("pango" ,pango)))
535 (inputs
52b8beb1
SB
536 `(("librsvg" ,librsvg) ;for gtk-encode-symbolic-svg
537 ("libxml2" ,libxml2)
37cb3a69 538 ("cups" ,cups))) ;for printing support
c4c4cc05 539 (native-inputs
141aed80 540 `(("perl" ,perl)
426adbe8 541 ("glib" ,glib "bin")
31b254a3 542 ("gettext" ,gnu-gettext)
8b79a547 543 ("pkg-config" ,pkg-config)
141aed80 544 ("gobject-introspection" ,gobject-introspection)
8b79a547 545 ("python-wrapper" ,python-wrapper)
97f94f5e 546 ("xorg-server" ,xorg-server)))
8b79a547 547 (arguments
260b07a7
LC
548 `(;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
549 ;; to "doc".
550 #:configure-flags (list (string-append "--with-html-dir="
551 (assoc-ref %outputs "doc")
552 "/share/gtk-doc/html"))
553 #:phases
31b254a3
AW
554 (alist-cons-before
555 'configure 'pre-configure
556 (lambda _
557 ;; Disable most tests, failing in the chroot with the message:
558 ;; D-Bus library appears to be incorrectly set up; failed to read
559 ;; machine uuid: Failed to open "/etc/machine-id": No such file or
560 ;; directory.
561 ;; See the manual page for dbus-uuidgen to correct this issue.
562 (substitute* "testsuite/Makefile.in"
563 (("SUBDIRS = gdk gtk a11y css reftests")
564 "SUBDIRS = gdk"))
31b254a3 565 #t)
52b8beb1
SB
566 (alist-cons-after
567 'install 'wrap-gtk-encode-symbolic-svg
568 ;; By using GdkPixbuf, gtk-encode-symbolic-svg needs to know
569 ;; librsvg's loaders.cache to handle SVG files.
570 (lambda* (#:key inputs outputs #:allow-other-keys)
571 (let* ((out (assoc-ref outputs "out"))
572 (prog (string-append out "/bin/gtk-encode-symbolic-svg"))
573 (librsvg (assoc-ref inputs "librsvg"))
574 (loaders.cache (find-files librsvg "^loaders\\.cache$")))
575 (wrap-program prog
576 `("GDK_PIXBUF_MODULE_FILE" = ,loaders.cache))))
577 %standard-phases))))))
5fda4784 578
8e70e6d2
LC
579;;;
580;;; Guile bindings.
581;;;
582
583(define-public guile-cairo
584 (package
585 (name "guile-cairo")
586 (version "1.4.1")
587 (source (origin
588 (method url-fetch)
589 (uri (string-append
590 "http://download.gna.org/guile-cairo/guile-cairo-"
591 version
592 ".tar.gz"))
593 (sha256
594 (base32
595 "1f5nd9n46n6cwfl1byjml02q3y2hgn7nkx98km1czgwarxl7ws3x"))))
596 (build-system gnu-build-system)
597 (arguments
598 '(#:phases (alist-cons-before
599 'configure 'set-module-directory
600 (lambda* (#:key outputs #:allow-other-keys)
601 ;; Install modules under $out/share/guile/site/2.0.
602 (let ((out (assoc-ref outputs "out")))
603 (substitute* "Makefile.in"
604 (("scmdir = ([[:graph:]]+).*" _ value)
605 (string-append "scmdir = " value "/2.0\n")))
606 (substitute* "cairo/Makefile.in"
607 (("moduledir = ([[:graph:]]+).*" _ value)
608 (string-append "moduledir = "
609 "$(prefix)/share/guile/site/2.0/cairo\n'")))))
610 (alist-cons-after
611 'install 'install-missing-file
612 (lambda* (#:key outputs #:allow-other-keys)
613 ;; By default 'vector-types.scm' is not installed, so do
614 ;; it here.
615 (let ((out (assoc-ref outputs "out")))
616 (copy-file "cairo/vector-types.scm"
617 (string-append out "/share/guile/site/2.0"
618 "/cairo/vector-types.scm"))))
619 %standard-phases))))
620 (inputs
621 `(("guile-lib" ,guile-lib)
622 ("expat" ,expat)
8e70e6d2 623 ("guile" ,guile-2.0)))
49710cea
LC
624 (propagated-inputs
625 ;; The .pc file refers to 'cairo'.
626 `(("cairo" ,cairo)))
c4c4cc05
JD
627 (native-inputs
628 `(("pkg-config" ,pkg-config)))
8e70e6d2
LC
629 (home-page "http://www.nongnu.org/guile-cairo/")
630 (synopsis "Cairo bindings for GNU Guile")
631 (description
632 "Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
633Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API
634stable, providing a firm base on which to do graphics work. Finally, and
635importantly, it is pleasant to use. You get a powerful and well-maintained
636graphics library with all of the benefits of Scheme: memory management,
637exceptions, macros, and a dynamic programming environment.")
638 (license license:lgpl3+)))
66663503 639
1a51fe27
LC
640(define-public guile-rsvg
641 (package
642 (name "guile-rsvg")
643 (version "2.18.1")
644 (source (origin
645 (method url-fetch)
646 (uri (string-append "http://wingolog.org/pub/guile-rsvg/"
647 name "-" version ".tar.gz"))
648 (sha256
649 (base32
650 "136f236iw3yrrz6pkkp1ma9c5mrs5icqha6pnawinqpk892r3jh7"))
651 (patches (list (search-patch "guile-rsvg-pkgconfig.patch")))
652 (modules '((guix build utils)))
653 (snippet
654 '(substitute* (find-files "." "Makefile\\.am")
655 (("/share/guile/site")
656 "/share/guile/site/2.0")))))
657 (build-system gnu-build-system)
658 (arguments
659 `(#:phases (modify-phases %standard-phases
660 (add-before 'configure 'bootstrap
661 (lambda _
662 (zero? (system* "autoreconf" "-vfi")))))))
663 (native-inputs `(("pkg-config" ,pkg-config)
664 ("autoconf" ,autoconf)
665 ("automake" ,automake)
666 ("libtool" ,libtool)
667 ("texinfo" ,texinfo)))
668 (inputs `(("guile" ,guile-2.0)
669 ("librsvg" ,librsvg)
670 ("guile-lib" ,guile-lib))) ;for (unit-test)
671 (propagated-inputs `(("guile-cairo" ,guile-cairo)))
672 (synopsis "Render SVG images using Cairo from Guile")
673 (description
674 "Guile-RSVG wraps the RSVG library for Guile, allowing you to render SVG
675images onto Cairo surfaces.")
676 (home-page "http://wingolog.org/projects/guile-rsvg/")
677 (license license:lgpl2.1+)))
7ca0dbc3 678
cdd383e9
LC
679(define-public guile-present
680 (package
681 (name "guile-present")
682 (version "0.3.0")
683 (source (origin
684 (method url-fetch)
685 (uri (string-append "http://wingolog.org/pub/guile-present/"
686 "guile-present-" version ".tar.gz"))
687 (sha256
688 (base32
689 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
690 (patches (list (search-patch "guile-present-coding.patch")))
691 (modules '((guix build utils)))
692 (snippet
693 '(substitute* "Makefile.in"
694 (("godir = .*$")
695 "godir = $(moddir)\n")))))
696 (build-system gnu-build-system)
697 (arguments
698 '(#:phases (alist-cons-after
699 'install 'post-install
700 (lambda* (#:key inputs outputs #:allow-other-keys)
701 (let* ((out (assoc-ref outputs "out"))
702 (bin (string-append out "/bin"))
703 (guile (assoc-ref inputs "guile")))
704 (substitute* (find-files bin ".*")
705 (("guile")
706 (string-append guile "/bin/guile -L "
707 out "/share/guile/site/2.0 -C "
708 out "/share/guile/site/2.0 ")))))
709 %standard-phases)))
710 (native-inputs `(("pkg-config" ,pkg-config)))
711 (inputs `(("guile" ,guile-2.0)))
712 (propagated-inputs
713 ;; These are used by the (present …) modules.
714 `(("guile-lib" ,guile-lib)
715 ("guile-cairo" ,guile-cairo)
716 ("guile-rsvg" ,guile-rsvg)))
717 (home-page "http://wingolog.org/software/guile-present/")
718 (synopsis "Create SVG or PDF presentations in Guile")
719 (description
720 "Guile-Present defines a declarative vocabulary for presentations,
721together with tools to render presentation documents as SVG or PDF.
722Guile-Present can be used to make presentations programmatically, but also
723includes a tools to generate PDF presentations out of Org mode and Texinfo
724documents.")
725 (license license:lgpl3+)))
7ca0dbc3 726
66663503
LC
727;;;
728;;; C++ bindings.
729;;;
730
731(define-public cairomm
732 (package
733 (name "cairomm")
d36caa10 734 (version "1.11.2")
66663503
LC
735 (source (origin
736 (method url-fetch)
737 (uri (string-append "http://cairographics.org/releases/cairomm-"
738 version ".tar.gz"))
739 (sha256
740 (base32
d36caa10 741 "138052ybc58q5yl92m2p0br0k0a9g1pi9gfhmn4y220yih4pgxnc"))))
66663503
LC
742 (build-system gnu-build-system)
743 (arguments
744 ;; The examples lack -lcairo.
745 '(#:make-flags '("LDFLAGS=-lcairo")))
c4c4cc05 746 (native-inputs `(("pkg-config" ,pkg-config)))
66663503
LC
747 (propagated-inputs
748 `(("libsigc++" ,libsigc++)
749 ("freetype" ,freetype)
750 ("fontconfig" ,fontconfig)
751 ("cairo" ,cairo)))
752 (home-page "http://cairographics.org/")
753 (synopsis "C++ bindings to the Cairo 2D graphics library")
754 (description
755 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
756library.")
757 (license license:lgpl2.0+)))
c5cc5006
LC
758
759(define-public pangomm
760 (package
761 (name "pangomm")
a8054b4e 762 (version "2.36.0")
c5cc5006
LC
763 (source (origin
764 (method url-fetch)
b38e45d8
EB
765 (uri (string-append "mirror://gnome/sources/" name "/"
766 (version-major+minor version) "/"
767 name "-" version ".tar.xz"))
c5cc5006
LC
768 (sha256
769 (base32
a8054b4e 770 "1w11d05nkxglzg67rfa81vqghm75xhy6j396xmmp5mq8qx96knd8"))))
c5cc5006 771 (build-system gnu-build-system)
c4c4cc05 772 (native-inputs `(("pkg-config" ,pkg-config)))
c5cc5006
LC
773 (propagated-inputs
774 `(("cairo" ,cairo)
775 ("cairomm" ,cairomm)
776 ("glibmm" ,glibmm)
777 ("pango" ,pango)))
778 (home-page "http://www.pango.org/")
779 (synopsis "C++ interface to the Pango text rendering library")
780 (description
781 "Pangomm provides a C++ programming interface to the Pango text rendering
782library.")
783 (license license:lgpl2.1+)))
784
785(define-public atkmm
786 (package
787 (name "atkmm")
788 (version "2.22.7")
789 (source (origin
790 (method url-fetch)
b38e45d8
EB
791 (uri (string-append "mirror://gnome/sources/" name "/"
792 (version-major+minor version) "/"
793 name "-" version ".tar.xz"))
c5cc5006
LC
794 (sha256
795 (base32
796 "06zrf2ymml2dzp53sss0d4ch4dk9v09jm8rglnrmwk4v81mq9gxz"))))
797 (build-system gnu-build-system)
c4c4cc05 798 (native-inputs `(("pkg-config" ,pkg-config)))
c5cc5006
LC
799 (propagated-inputs
800 `(("glibmm" ,glibmm) ("atk" ,atk)))
801 (home-page "http://www.gtkmm.org")
802 (synopsis "C++ interface to the ATK accessibility library")
803 (description
804 "ATKmm provides a C++ programming interface to the ATK accessibility
805toolkit.")
806 (license license:lgpl2.1+)))
807
808(define-public gtkmm
809 (package
810 (name "gtkmm")
09a5c4c3 811 (version "3.16.0")
c5cc5006
LC
812 (source (origin
813 (method url-fetch)
b38e45d8
EB
814 (uri (string-append "mirror://gnome/sources/" name "/"
815 (version-major+minor version) "/"
816 name "-" version ".tar.xz"))
c5cc5006
LC
817 (sha256
818 (base32
09a5c4c3 819 "036xn22jkaf3akpid7w23b8vkqa3xxqz93mwacmyar5vw7slm3cv"))))
c5cc5006 820 (build-system gnu-build-system)
c4c4cc05 821 (native-inputs `(("pkg-config" ,pkg-config)))
c5cc5006
LC
822 (propagated-inputs
823 `(("pangomm" ,pangomm)
824 ("cairomm" ,cairomm)
825 ("atkmm" ,atkmm)
826 ("gtk+" ,gtk+)
827 ("glibmm" ,glibmm)))
828 (home-page "http://gtkmm.org/")
829 (synopsis
830 "C++ interface to the GTK+ graphical user interface library")
831 (description
832 "gtkmm is the official C++ interface for the popular GUI library GTK+.
833Highlights include typesafe callbacks, and a comprehensive set of widgets that
834are easily extensible via inheritance. You can create user interfaces either
835in code or with the Glade User Interface designer, using libglademm. There's
836extensive documentation, including API reference and a tutorial.")
837 (license license:lgpl2.1+)))
9c086443
JD
838
839
840(define-public gtkmm-2
841 (package (inherit gtkmm)
b38e45d8 842 (name "gtkmm")
f8f63893 843 (version "2.24.4")
9c086443
JD
844 (source (origin
845 (method url-fetch)
b38e45d8
EB
846 (uri (string-append "mirror://gnome/sources/" name "/"
847 (version-major+minor version) "/"
848 name "-" version ".tar.xz"))
9c086443
JD
849 (sha256
850 (base32
f8f63893 851 "1vpmjqv0aqb1ds0xi6nigxnhlr0c74090xzi15b92amlzkrjyfj4"))))
9c086443
JD
852 (propagated-inputs
853 `(("pangomm" ,pangomm)
854 ("cairomm" ,cairomm)
855 ("atkmm" ,atkmm)
856 ("gtk+" ,gtk+-2)
857 ("glibmm" ,glibmm)))))
fbcfa730
EB
858
859(define-public python-pycairo
860 (package
861 (name "python-pycairo")
862 (version "1.10.0")
863 (source
864 (origin
865 (method url-fetch)
866 (uri (string-append "http://cairographics.org/releases/pycairo-"
867 version ".tar.bz2"))
868 (sha256
869 (base32
b837e658
SB
870 "1gjkf8x6hyx1skq3hhwcbvwifxvrf9qxis5vx8x5igmmgs70g94s"))
871 (patches (list (search-patch "pycairo-wscript.patch")))))
872 (build-system waf-build-system)
fbcfa730 873 (native-inputs
b837e658
SB
874 `(("pkg-config" ,pkg-config)
875 ("python-waf" ,python-waf)))
fbcfa730
EB
876 (propagated-inputs ;pycairo.pc references cairo
877 `(("cairo" ,cairo)))
878 (arguments
879 `(#:tests? #f
b837e658
SB
880 #:phases
881 (modify-phases %standard-phases
882 (add-before
883 'configure 'patch-waf
884 (lambda* (#:key inputs #:allow-other-keys)
885 ;; The bundled `waf' doesn't work with python-3.4.x.
886 (copy-file (assoc-ref %build-inputs "python-waf") "./waf"))))))
fbcfa730
EB
887 (home-page "http://cairographics.org/pycairo/")
888 (synopsis "Python bindings for cairo")
889 (description
890 "Pycairo is a set of Python bindings for the Cairo graphics library.")
891 (license license:lgpl3+)))
892
7ca0dbc3 893(define-public python2-pycairo
fbcfa730 894 (package (inherit python-pycairo)
7ca0dbc3 895 (name "python2-pycairo")
fbcfa730
EB
896 (version "1.10.0")
897 (source
898 (origin
899 (method url-fetch)
900 (uri (string-append "http://cairographics.org/releases/py2cairo-"
901 version ".tar.bz2"))
902 (sha256
903 (base32
904 "0cblk919wh6w0pgb45zf48xwxykfif16qk264yga7h9fdkq3j16k"))))
905 (arguments
906 `(#:python ,python-2
b837e658
SB
907 ,@(substitute-keyword-arguments (package-arguments python-pycairo)
908 ((#:phases phases)
909 `(alist-delete 'patch-waf ,phases))
910 ((#:native-inputs native-inputs)
911 `(alist-delete "python-waf" ,native-inputs)))))
fbcfa730 912 ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
0d6a8339 913 (license (list license:lgpl2.1 license:mpl1.1))))
fbcfa730
EB
914
915(define-public python2-pygtk
916 (package
917 (name "python2-pygtk")
918 (version "2.24.0")
919 (source
920 (origin
921 (method url-fetch)
922 (uri (string-append "http://ftp.gnome.org/pub/GNOME/sources"
923 "/pygtk/" (version-major+minor version)
924 "/pygtk-" version ".tar.bz2"))
925 (sha256
926 (base32
927 "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
928 (build-system gnu-build-system)
929 (native-inputs
930 `(("pkg-config" ,pkg-config)))
931 (inputs
932 `(("python" ,python-2)
933 ("glib" ,glib)))
934 (propagated-inputs
7ca0dbc3 935 `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
fbcfa730
EB
936 ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
937 ("gtk+" ,gtk+-2)))
938 (arguments
939 `(#:tests? #f
940 #:phases (alist-cons-after
cb4d3d86
RW
941 'configure 'fix-codegen
942 (lambda* (#:key inputs #:allow-other-keys)
943 (substitute* "pygtk-codegen-2.0"
944 (("^prefix=.*$")
945 (string-append
946 "prefix="
947 (assoc-ref inputs "python-pygobject") "\n"))))
948 (alist-cons-after
949 'install 'install-pth
950 (lambda* (#:key inputs outputs #:allow-other-keys)
951 ;; pygtk's modules are stored in a subdirectory of python's
952 ;; site-packages directory. Add a .pth file so that python
953 ;; will add that subdirectory to its module search path.
954 (let* ((out (assoc-ref outputs "out"))
955 (site (string-append out "/lib/python"
956 ,(version-major+minor
957 (package-version python-2))
958 "/site-packages")))
959 (call-with-output-file (string-append site "/pygtk.pth")
960 (lambda (port)
961 (format port "gtk-2.0~%")))))
962 %standard-phases))))
fbcfa730
EB
963 (home-page "http://www.pygtk.org/")
964 (synopsis "Python bindings for GTK+")
965 (description
966 "PyGTK allows you to write full featured GTK programs in Python. It is
967targetted at GTK 2.x, and can be used in conjunction with gnome-python to
968write GNOME applications.")
969 (license license:lgpl2.1+)))
136770c9
PW
970
971(define-public girara
972 (package
973 (name "girara")
90ab5dd2 974 (version "0.2.4")
136770c9
PW
975 (source (origin
976 (method url-fetch)
977 (uri
978 (string-append "https://pwmt.org/projects/girara/download/girara-"
979 version ".tar.gz"))
980 (sha256
981 (base32
90ab5dd2 982 "0pnfdsg435b5vc4x8l9pgm77aj7ram1q0bzrp9g4a3bh1r64xq1f"))))
136770c9
PW
983 (native-inputs `(("pkg-config" ,pkg-config)
984 ("gettext" ,gnu-gettext)))
985 (inputs `(("gtk+" ,gtk+)
986 ("check" ,check)))
987 (arguments
988 `(#:make-flags
989 `(,(string-append "PREFIX=" (assoc-ref %outputs "out"))
990 "COLOR=0" "CC=gcc")
991 #:test-target "test"
992 #:tests? #f ; Tests fail with "Gtk cannot open display:"
993 #:phases
994 (alist-delete 'configure %standard-phases)))
995 (build-system gnu-build-system)
996 (home-page "https://pwmt.org/projects/girara/")
997 (synopsis "Library for minimalistic gtk+3 user interfaces")
998 (description "Girara is a library that implements a user interface that
999focuses on simplicity and minimalism. Currently based on GTK+, a
1000cross-platform widget toolkit, it provides an interface that focuses on three
1001main components: a so-called view widget that represents the actual
1002application, an input bar that is used to execute commands of the
1003application and the status bar which provides the user with current
1004information.")
1005 (license license:zlib)))
3bc45449
AW
1006
1007(define-public gtk-doc
1008 (package
1009 (name "gtk-doc")
1010 (version "1.24")
1011 (source (origin
1012 (method url-fetch)
1013 (uri (string-append "mirror://gnome/sources/" name "/"
1014 (version-major+minor version) "/"
1015 name "-" version ".tar.xz"))
1016 (sha256
1017 (base32
1018 "12xmmcnq4138dlbhmqa45wqza8dky4lf856sp80h6xjwl2g7a85l"))))
1019 (build-system gnu-build-system)
1020 (arguments
1021 `(#:configure-flags
1022 (list (string-append "--with-xml-catalog="
1023 (assoc-ref %build-inputs "docbook-xml")
1024 "/xml/dtd/docbook/catalog.xml"))))
1025 (native-inputs
1026 `(("pkg-config" ,pkg-config)
1027 ("itstool" ,itstool)
1028 ("libxml" ,libxml2)
1029 ("gettext" ,gnu-gettext)
1030 ("bc" ,bc)))
1031 (inputs
1032 `(("perl" ,perl)
1033 ("python" ,python)
1034 ("xsltproc" ,libxslt)
1035 ("dblatex" ,dblatex)
1036 ("docbook-xml" ,docbook-xml-4.3)
1037 ("docbook-xsl" ,docbook-xsl)
1038 ("source-highlight" ,source-highlight)
1039 ("glib" ,glib)))
1040 (home-page "http://www.gtk.org/gtk-doc/")
1041 (synopsis "Documentation generator from C source code")
1042 (description
1043 "GTK-Doc generates API documentation from comments added to C code. It is
1044typically used to document the public API of GTK+ and GNOME libraries, but it
1045can also be used to document application code.")
1046 (license license:gpl2+)))