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