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