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