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