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>
11 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
66 (uri (string-append "mirror://gnome/sources/" name "/"
67 (version-major+minor version) "/"
68 name "-" version ".tar.xz"))
71 "0ay9s137x49f0akx658p7kznz0rdapfrd8ym54q0hlgrggblhv6f"))))
72 (build-system gnu-build-system)
73 (outputs '("out" "doc"))
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
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")
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/")))
98 (uri (string-append "http://cairographics.org/releases/cairo-"
102 "1sycbq0agbwmg1bj9lhkgsf0glmblaf2jrdy9g6vxfxivncxj6f9"))))
103 (build-system gnu-build-system)
105 `(("fontconfig" ,fontconfig)
106 ("freetype" ,freetype)
111 ("libxrender" ,libxrender)
114 `(("ghostscript" ,ghostscript)
115 ("libspectre" ,libspectre)
117 ("xextproto" ,xextproto)
120 `(("pkg-config" ,pkg-config)
121 ("python" ,python-wrapper)))
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")
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.
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).
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/")))
144 (define-public harfbuzz
150 (uri (string-append "http://www.freedesktop.org/software/"
151 "harfbuzz/release/harfbuzz-"
155 "0h2l362qzkck5dnnj7zlz593hf1ni3k25dfaii9mbjwflp3d56ad"))))
156 (build-system gnu-build-system)
158 "bin")) ; 160K, only hb-view depend on cairo
162 ;; There are all in the Requires or Requires.private field of '.pc'.
164 ("graphite2" ,graphite2)
167 `(("gobject-introspection" ,gobject-introspection)
168 ("pkg-config" ,pkg-config)
169 ("python" ,python-2))) ; incompatible with Python 3 (print syntax)
171 `(#:configure-flags `("--with-graphite2"
174 "--bindir=" (assoc-ref %outputs "bin") "/bin"))))
175 (synopsis "OpenType text shaping engine")
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/")))
188 (uri (string-append "mirror://gnome/sources/pango/"
189 (version-major+minor version) "/"
190 name "-" version ".tar.xz"))
193 "1dsf45m51i4rcyvh5wlxxrjfhvn5b67d5ckjc6vdcxbddjgmc80k"))))
194 (build-system gnu-build-system)
197 ("harfbuzz" ,harfbuzz)))
201 ;; Some packages, such as Openbox, expect Pango to be built with the
202 ;; optional libxft support.
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")
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/")))
216 (define-public pangox-compat
218 (name "pangox-compat")
222 (uri (string-append "mirror://gnome/sources/" name "/"
223 (version-major+minor version) "/"
224 name "-" version ".tar.xz"))
227 "0ip0ziys6mrqqmz4n71ays0kf5cs1xflj1gfpvs4fgy2nsrr482m"))))
228 (build-system gnu-build-system)
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+)))
248 (uri (string-append "http://download.drobilla.net/ganv-"
252 "0g7s5mp14qgbfjdql0k1s8464r21g47ssn5dws6jazsnw6njhl0l"))))
253 (build-system waf-build-system)
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.
260 (string-append "-Wl,-rpath="
261 (assoc-ref outputs "out") "/lib")))
263 #:tests? #f)) ; no check target
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")
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
276 (license license:gpl3+)))
278 (define-public gtksourceview
280 (name "gtksourceview")
281 (version "2.10.5") ; This is the last version which builds against gtk+2
284 (uri (string-append "mirror://gnome/sources/" name "/"
285 (version-major+minor version) "/"
286 name "-" version ".tar.bz2"))
289 "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5"))))
290 (build-system gnu-build-system)
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)))
298 `(("intltool" ,intltool)
299 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
300 ("pkg-config" ,pkg-config)))
303 ;; Unfortunately, some of the tests in "make check" are highly dependent
304 ;; on the environment therefore, some black magic is required.
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")))
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")
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))
320 ;; Finally, the mimetypes must be available.
321 (setenv "XDG_DATA_DIRS" (string-append mime "/share/")) ))
323 (synopsis "Widget that extends the standard GTK+ 2.x 'GtkTextView' widget")
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/")))
332 (define-public gdk-pixbuf
338 (uri (string-append "mirror://gnome/sources/" name "/"
339 (version-major+minor version) "/"
340 name "-" version ".tar.xz"))
343 "1g7kjxv67jcdasi14n7jan4icrnnppd1m99wrdmpv32k4m7vfcj4"))))
344 (build-system gnu-build-system)
346 '(#:configure-flags '("--with-x11")
348 (modify-phases %standard-phases
350 'unpack 'disable-failing-tests
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
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\\) ") ""))
363 (propagated-inputs ; required by gdk-pixbuf-2.0.pc
367 `(("libjpeg" ,libjpeg)
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")
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/")))
381 (define-public at-spi2-core
383 (name "at-spi2-core")
387 (uri (string-append "mirror://gnome/sources/" name "/"
388 (version-major+minor version) "/"
389 name "-" version ".tar.xz"))
392 "1kq17w4fm51d49vzmglkxqdm6s0yvjvrpgw78r2hajf69jz5bmap"))))
393 (build-system gnu-build-system)
394 (outputs '("out" "doc"))
397 (list (string-append "--with-html-dir="
398 (assoc-ref %outputs "doc")
399 "/share/gtk-doc/html"))
401 (modify-phases %standard-phases
403 ;; Run test-suite under a dbus session.
405 ;; Don't fail on missing '/etc/machine-id'.
406 (setenv "DBUS_FATAL_WARNINGS" "0")
407 (zero? (system* "dbus-launch" "make" "check")))))))
409 ;; atspi-2.pc refers to all these.
414 ("libxtst" ,libxtst)))
416 `(("gobject-introspection" ,gobject-introspection)
417 ("intltool" ,intltool)
418 ("pkg-config" ,pkg-config)))
419 (synopsis "Assistive Technology Service Provider Interface, core components")
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/")))
426 (define-public at-spi2-atk
432 (uri (string-append "mirror://gnome/sources/" name "/"
433 (version-major+minor version) "/"
434 name "-" version ".tar.xz"))
437 "0bf1g5cj84rmx7p1q547vwbc0hlpcs2wrxnmv96lckfkhs9mzcf4"))))
438 (build-system gnu-build-system)
441 (modify-phases %standard-phases
443 ;; Run test-suite under a dbus session.
445 (setenv "DBUS_FATAL_WARNINGS" "0")
446 (zero? (system* "dbus-launch" "make" "check")))))))
448 `(("at-spi2-core" ,at-spi2-core))) ; required by atk-bridge-2.0.pc
452 `(("dbus" ,dbus) ; for testing
453 ("pkg-config" ,pkg-config)))
454 (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
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/")))
461 (define-public gtk+-2
467 (uri (string-append "mirror://gnome/sources/" name "/"
468 (version-major+minor version) "/"
469 name "-" version ".tar.xz"))
472 "0mj6xn40py9r9lvzg633fal81xfwfm89d9mvz7jk4lmwk0g49imj"))))
473 (build-system gnu-build-system)
474 (outputs '("out" "doc"))
477 ("gdk-pixbuf" ,gdk-pixbuf)
481 ("libxcomposite" ,libxcomposite)
482 ("libxcursor" ,libxcursor)
483 ("libxdamage" ,libxdamage)
485 ("libxinerama" ,libxinerama)
486 ("libxrandr" ,libxrandr)))
489 ("gettext" ,gnu-gettext)
491 ("gobject-introspection" ,gobject-introspection)
492 ("pkg-config" ,pkg-config)
493 ("python-wrapper" ,python-wrapper)))
496 (list "--with-xinput=yes"
497 (string-append "--with-html-dir="
498 (assoc-ref %outputs "doc")
499 "/share/gtk-doc/html"))
502 'configure 'disable-tests
504 ;; FIXME: re-enable tests requiring an X server
505 (substitute* "gtk/Makefile.in"
506 (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits .")))
508 (synopsis "Cross-platform toolkit for creating graphical user interfaces")
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/")))
518 (package (inherit gtk+-2)
523 (uri (string-append "mirror://gnome/sources/" name "/"
524 (version-major+minor version) "/"
525 name "-" version ".tar.xz"))
528 "0lp1hn0qydxx03bianzzr0a4maqzsvylrkzr7c3p0050qihwbgjx"))))
530 `(("at-spi2-atk" ,at-spi2-atk)
532 ("gdk-pixbuf" ,gdk-pixbuf)
533 ("libepoxy" ,libepoxy)
534 ("libxcursor" ,libxcursor)
536 ("libxinerama" ,libxinerama)
537 ("libxdamage" ,libxdamage)
540 `(("librsvg" ,librsvg) ;for gtk-encode-symbolic-svg
542 ;; XXX: colord depends on mozjs (through polkit), which fails on
543 ;; on non-intel systems now.
545 ("cups" ,cups) ;for printing support
546 ;; XXX: rest depends on p11-kit, which fails on mips64el now.
548 ("json-glib" ,json-glib)))
552 ("gettext" ,gnu-gettext)
553 ("pkg-config" ,pkg-config)
554 ("gobject-introspection" ,gobject-introspection)
555 ("python-wrapper" ,python-wrapper)
556 ("xorg-server" ,xorg-server)))
558 `(;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
560 #:configure-flags (list (string-append "--with-html-dir="
561 (assoc-ref %outputs "doc")
562 "/share/gtk-doc/html"))
565 'configure 'pre-configure
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
571 ;; See the manual page for dbus-uuidgen to correct this issue.
572 (substitute* "testsuite/Makefile.in"
573 (("SUBDIRS = gdk gtk a11y css reftests")
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$")))
586 `("GDK_PIXBUF_MODULE_FILE" = ,loaders.cache))))
587 %standard-phases))))))
593 (define-public guile-cairo
600 "http://download.gna.org/guile-cairo/guile-cairo-"
605 "1f5nd9n46n6cwfl1byjml02q3y2hgn7nkx98km1czgwarxl7ws3x"))))
606 (build-system gnu-build-system)
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'")))))
621 'install 'install-missing-file
622 (lambda* (#:key outputs #:allow-other-keys)
623 ;; By default 'vector-types.scm' is not installed, so do
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"))))
631 `(("guile-lib" ,guile-lib)
633 ("guile" ,guile-2.0)))
635 ;; The .pc file refers to 'cairo'.
638 `(("pkg-config" ,pkg-config)))
639 (home-page "http://www.nongnu.org/guile-cairo/")
640 (synopsis "Cairo bindings for GNU Guile")
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+)))
650 (define-public guile-rsvg
656 (uri (string-append "http://wingolog.org/pub/guile-rsvg/"
657 name "-" version ".tar.gz"))
660 "136f236iw3yrrz6pkkp1ma9c5mrs5icqha6pnawinqpk892r3jh7"))
661 (patches (list (search-patch "guile-rsvg-pkgconfig.patch")))
662 (modules '((guix build utils)))
664 '(substitute* (find-files "." "Makefile\\.am")
665 (("/share/guile/site")
666 "/share/guile/site/2.0")))))
667 (build-system gnu-build-system)
669 `(#:phases (modify-phases %standard-phases
670 (add-before 'configure 'bootstrap
672 (zero? (system* "autoreconf" "-vfi")))))))
673 (native-inputs `(("pkg-config" ,pkg-config)
674 ("autoconf" ,autoconf)
675 ("automake" ,automake)
677 ("texinfo" ,texinfo)))
678 (inputs `(("guile" ,guile-2.0)
680 ("guile-lib" ,guile-lib))) ;for (unit-test)
681 (propagated-inputs `(("guile-cairo" ,guile-cairo)))
682 (synopsis "Render SVG images using Cairo from Guile")
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+)))
689 (define-public guile-present
691 (name "guile-present")
695 (uri (string-append "http://wingolog.org/pub/guile-present/"
696 "guile-present-" version ".tar.gz"))
699 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
700 (patches (list (search-patch "guile-present-coding.patch")))
701 (modules '((guix build utils)))
703 '(substitute* "Makefile.in"
705 "godir = $(moddir)\n")))))
706 (build-system gnu-build-system)
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 ".*")
716 (string-append guile "/bin/guile -L "
717 out "/share/guile/site/2.0 -C "
718 out "/share/guile/site/2.0 ")))))
720 (native-inputs `(("pkg-config" ,pkg-config)))
721 (inputs `(("guile" ,guile-2.0)))
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")
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
735 (license license:lgpl3+)))
741 (define-public cairomm
747 (uri (string-append "mirror://gnome/sources/cairomm/"
748 (version-major+minor version) "/"
749 name "-" version ".tar.xz"))
752 "1rmgs6zjj2vaxh9hsa0944m23fdn1psycqh7bi984qd8jj1xljm5"))))
753 (build-system gnu-build-system)
755 ;; The examples lack -lcairo.
756 '(#:make-flags '("LDFLAGS=-lcairo")))
757 (native-inputs `(("pkg-config" ,pkg-config)))
759 `(("libsigc++" ,libsigc++)
760 ("freetype" ,freetype)
761 ("fontconfig" ,fontconfig)
763 (home-page "http://cairographics.org/")
764 (synopsis "C++ bindings to the Cairo 2D graphics library")
766 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
768 (license license:lgpl2.0+)))
770 (define-public pangomm
776 (uri (string-append "mirror://gnome/sources/" name "/"
777 (version-major+minor version) "/"
778 name "-" version ".tar.xz"))
781 "12xwjvqfxhqblcv7641k0l6r8n3qifnrx8w9571izn1nbd81iyzg"))))
782 (build-system gnu-build-system)
783 (native-inputs `(("pkg-config" ,pkg-config)))
789 (home-page "http://www.pango.org/")
790 (synopsis "C++ interface to the Pango text rendering library")
792 "Pangomm provides a C++ programming interface to the Pango text rendering
794 (license license:lgpl2.1+)))
802 (uri (string-append "mirror://gnome/sources/" name "/"
803 (version-major+minor version) "/"
804 name "-" version ".tar.xz"))
807 "08zd6s5c1q90wm8310mdrb5f2lj8v63wxihrybwyw13xlf6ivi16"))))
808 (build-system gnu-build-system)
809 (native-inputs `(("pkg-config" ,pkg-config)))
811 `(("glibmm" ,glibmm) ("atk" ,atk)))
812 (home-page "http://www.gtkmm.org")
813 (synopsis "C++ interface to the ATK accessibility library")
815 "ATKmm provides a C++ programming interface to the ATK accessibility
817 (license license:lgpl2.1+)))
825 (uri (string-append "mirror://gnome/sources/" name "/"
826 (version-major+minor version) "/"
827 name "-" version ".tar.xz"))
830 "0sxq700invkjpksn790gbnl8px8751kvgwn39663jx7dv89s37w2"))))
831 (build-system gnu-build-system)
832 (native-inputs `(("pkg-config" ,pkg-config)))
834 `(("pangomm" ,pangomm)
839 (home-page "http://gtkmm.org/")
841 "C++ interface to the GTK+ graphical user interface library")
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+)))
851 (define-public gtkmm-2
852 (package (inherit gtkmm)
857 (uri (string-append "mirror://gnome/sources/" name "/"
858 (version-major+minor version) "/"
859 name "-" version ".tar.xz"))
862 "1vpmjqv0aqb1ds0xi6nigxnhlr0c74090xzi15b92amlzkrjyfj4"))))
864 '(#:configure-flags '("CPPFLAGS=-std=c++11"))) ; required by libsigc++
866 `(("pangomm" ,pangomm)
870 ("glibmm" ,glibmm)))))
872 (define-public python-pycairo
874 (name "python-pycairo")
879 (uri (string-append "http://cairographics.org/releases/pycairo-"
883 "1gjkf8x6hyx1skq3hhwcbvwifxvrf9qxis5vx8x5igmmgs70g94s"))
884 (patches (list (search-patch "pycairo-wscript.patch")))))
885 (build-system waf-build-system)
887 `(("pkg-config" ,pkg-config)
888 ("python-waf" ,python-waf)))
889 (propagated-inputs ;pycairo.pc references cairo
894 (modify-phases %standard-phases
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")
903 "Pycairo is a set of Python bindings for the Cairo graphics library.")
904 (license license:lgpl3+)))
906 (define-public python2-pycairo
907 (package (inherit python-pycairo)
908 (name "python2-pycairo")
913 (uri (string-append "http://cairographics.org/releases/py2cairo-"
917 "0cblk919wh6w0pgb45zf48xwxykfif16qk264yga7h9fdkq3j16k"))))
920 ,@(substitute-keyword-arguments (package-arguments python-pycairo)
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))))
928 (define-public python2-pygtk
930 (name "python2-pygtk")
935 (uri (string-append "http://ftp.gnome.org/pub/GNOME/sources"
936 "/pygtk/" (version-major+minor version)
937 "/pygtk-" version ".tar.bz2"))
940 "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
941 (build-system gnu-build-system)
943 `(("pkg-config" ,pkg-config)))
945 `(("python" ,python-2)
948 `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
949 ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
953 #:phases (alist-cons-after
954 'configure 'fix-codegen
955 (lambda* (#:key inputs #:allow-other-keys)
956 (substitute* "pygtk-codegen-2.0"
960 (assoc-ref inputs "python-pygobject") "\n"))))
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))
972 (call-with-output-file (string-append site "/pygtk.pth")
974 (format port "gtk-2.0~%")))))
976 (home-page "http://www.pygtk.org/")
977 (synopsis "Python bindings for GTK+")
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+)))
984 (define-public girara
991 (string-append "https://pwmt.org/projects/girara/download/girara-"
995 "0pnfdsg435b5vc4x8l9pgm77aj7ram1q0bzrp9g4a3bh1r64xq1f"))))
996 (native-inputs `(("pkg-config" ,pkg-config)
997 ("gettext" ,gnu-gettext)))
998 (inputs `(("gtk+" ,gtk+)
1002 `(,(string-append "PREFIX=" (assoc-ref %outputs "out"))
1004 #:test-target "test"
1005 #:tests? #f ; Tests fail with "Gtk cannot open display:"
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
1018 (license license:zlib)))
1020 (define-public gtk-doc
1026 (uri (string-append "mirror://gnome/sources/" name "/"
1027 (version-major+minor version) "/"
1028 name "-" version ".tar.xz"))
1031 "12xmmcnq4138dlbhmqa45wqza8dky4lf856sp80h6xjwl2g7a85l"))))
1032 (build-system gnu-build-system)
1035 (list (string-append "--with-xml-catalog="
1036 (assoc-ref %build-inputs "docbook-xml")
1037 "/xml/dtd/docbook/catalog.xml"))))
1039 `(("pkg-config" ,pkg-config)
1040 ("itstool" ,itstool)
1042 ("gettext" ,gnu-gettext)
1047 ("xsltproc" ,libxslt)
1048 ("dblatex" ,dblatex)
1049 ("docbook-xml" ,docbook-xml-4.3)
1050 ("docbook-xsl" ,docbook-xsl)
1051 ("source-highlight" ,source-highlight)
1053 (home-page "http://www.gtk.org/gtk-doc/")
1054 (synopsis "Documentation generator from C source code")
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+)))