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