1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
5 ;;; This file is part of GNU Guix.
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20 (define-module (gnu packages gtk)
21 #:use-module ((guix licenses)
22 #:renamer (symbol-prefix-proc 'license:))
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix build-system gnu)
26 #:use-module (gnu packages compression)
27 #:use-module (gnu packages fontutils)
28 #:use-module (gnu packages ghostscript)
29 #:use-module (gnu packages glib)
30 #:use-module (gnu packages gnome)
31 #:use-module (gnu packages icu4c)
32 #:use-module (gnu packages libjpeg)
33 #:use-module (gnu packages libpng)
34 #:use-module (gnu packages libtiff)
35 #:use-module (gnu packages pdf)
36 #:use-module (gnu packages perl)
37 #:use-module (gnu packages pkg-config)
38 #:use-module (gnu packages python)
39 #:use-module (gnu packages guile)
40 #:use-module (gnu packages xml)
41 #:use-module (gnu packages xorg))
49 (uri (string-append "mirror://gnome/sources/" name "/"
50 (string-take version 4) "/" name "-"
54 "1c2hbg66wfvibsz2ia0ri48yr62751fn950i97c53j3b0fjifsb3"))))
55 (build-system gnu-build-system)
56 (inputs `(("glib" ,glib)))
57 (native-inputs `(("pkg-config" ,pkg-config)))
58 (synopsis "GNOME accessibility toolkit")
60 "ATK provides the set of accessibility interfaces that are implemented
61 by other toolkits and applications. Using the ATK interfaces, accessibility
62 tools have full access to view and control running applications.")
63 (license license:lgpl2.0+)
64 (home-page "https://developer.gnome.org/atk/")))
72 (uri (string-append "http://cairographics.org/releases/cairo-"
76 "0inqwsylqkrzcjivdirkjx5nhdgxbdc62fq284c3xppinfg9a195"))))
77 (build-system gnu-build-system)
79 `(("fontconfig" ,fontconfig)
80 ("freetype" ,freetype)
85 ("libxrender" ,libxrender)
88 `(("ghostscript" ,ghostscript)
89 ("libspectre" ,libspectre)
91 ("xextproto" ,xextproto)
94 `(("pkg-config" ,pkg-config)
95 ("python" ,python-wrapper)))
97 `(#:tests? #f)) ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
98 (synopsis "2D graphics library")
100 "Cairo is a 2D graphics library with support for multiple output devices.
101 Currently supported output targets include the X Window System (via both
102 Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
103 output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
105 Cairo is designed to produce consistent output on all output media while
106 taking advantage of display hardware acceleration when available
107 eg. through the X Render Extension).
109 The cairo API provides operations similar to the drawing operators of
110 PostScript and PDF. Operations in cairo including stroking and filling cubic
111 Bézier splines, transforming and compositing translucent images, and
112 antialiased text rendering. All drawing operations can be transformed by any
113 affine transformation (scale, rotation, shear, etc.)")
114 (license license:lgpl2.1) ; or Mozilla Public License 1.1
115 (home-page "http://cairographics.org/")))
117 (define-public harfbuzz
123 (uri (string-append "http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-"
127 "1nkimwadri6v2kzrmz8y0crmy59gw0kg4i4f6cc786bngs0815lq"))))
128 (build-system gnu-build-system)
133 `(("pkg-config" ,pkg-config)
134 ("python" ,python-wrapper)))
135 (synopsis "opentype text shaping engine")
137 "HarfBuzz is an OpenType text shaping engine.")
138 (license (license:x11-style "file://COPYING"
139 "See 'COPYING' in the distribution."))
140 (home-page "http://www.freedesktop.org/wiki/Software/HarfBuzz/")))
148 (uri (string-append "mirror://gnome/sources/pango/1.34/pango-"
152 "0k7662qix7zzh7mf6ikdj594n8jpbfm25z8swz64zbm86kgk1shs"))))
153 (build-system gnu-build-system)
156 ("harfbuzz" ,harfbuzz)))
160 `(("pkg-config" ,pkg-config)))
161 (synopsis "GNOME text and font handling library")
163 "Pango is the core text and font handling library used in GNOME
164 applications. It has extensive support for the different writing systems
165 used throughout the world.")
166 (license license:lgpl2.0+)
167 (home-page "https://developer.gnome.org/pango/")))
170 (define-public gtksourceview
172 (name "gtksourceview")
173 (version "2.10.5") ; This is the last version which builds against gtk+2
176 (uri (string-append "mirror://gnome/sources/gtksourceview/"
177 (string-take version 4) "/gtksourceview-"
181 "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5"))))
182 (build-system gnu-build-system)
186 ;; These two are needed only to allow the tests to run successfully.
187 ("xorg-server" ,xorg-server)
188 ("shared-mime-info" ,shared-mime-info)))
190 `(("intltool" ,intltool)
191 ("pkg-config" ,pkg-config)))
194 ;; Unfortunately, some of the tests in "make check" are highly dependent
195 ;; on the environment therefore, some black magic is required.
197 'check 'start-xserver
198 (lambda* (#:key inputs #:allow-other-keys)
199 (let ((xorg-server (assoc-ref inputs "xorg-server"))
200 (mime (assoc-ref inputs "shared-mime-info")))
202 ;; There must be a running X server and make check doesn't start one.
203 ;; Therefore we must do it.
204 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
205 (setenv "DISPLAY" ":1")
207 ;; The .lang files must be found in $XDG_DATA_HOME/gtksourceview-2.0
208 (system "ln -s gtksourceview gtksourceview-2.0")
209 (setenv "XDG_DATA_HOME" (getcwd))
211 ;; Finally, the mimetypes must be available.
212 (setenv "XDG_DATA_DIRS" (string-append mime "/share/")) ))
214 (synopsis "Widget that extends the standard GTK+ 2.x 'GtkTextView' widget")
216 "GtkSourceView is a portable C library that extends the standard GTK+
217 framework for multiline text editing with support for configurable syntax
218 highlighting, unlimited undo/redo, search and replace, a completion framework,
219 printing and other features typical of a source code editor.")
220 (license license:lgpl2.0+)
221 (home-page "https://developer.gnome.org/gtksourceview/")))
223 (define-public gdk-pixbuf
229 (uri (string-append "mirror://gnome/sources/gdk-pixbuf/2.28/gdk-pixbuf-"
233 "05s6ksvy1yan6h6zny9n3bmvygcnzma6ljl6i0z9cci2xg116c8q"))))
234 (build-system gnu-build-system)
239 ("libtiff" ,libtiff)))
241 `(("pkg-config" ,pkg-config)))
242 (synopsis "GNOME image loading and manipulation library")
244 "GdkPixbuf is a library for image loading and manipulation developed
245 in the GNOME project.")
246 (license license:lgpl2.0+)
247 (home-page "https://developer.gnome.org/gdk-pixbuf/")))
249 (define-public at-spi2-core
251 (name "at-spi2-core")
255 (uri (string-append "mirror://gnome/sources/" name "/"
256 (string-take version 4) "/" name "-"
260 "1ns44yibdgcwzwri7sr075hfs5rh5lgxkh71247a0822az3mahcn"))))
261 (build-system gnu-build-system)
262 (inputs `(("dbus" ,dbus)
265 ("libxtst" ,libxtst)))
267 `(("intltool" ,intltool)
268 ("pkg-config" ,pkg-config)))
270 `(#:tests? #f)) ; FIXME: dbind/dbtest fails; one should disable tests in
271 ; a more fine-grained way.
272 (synopsis "Assistive Technology Service Provider Interface, core components")
274 "The Assistive Technology Service Provider Interface, core components,
275 is part of the GNOME accessibility project.")
276 (license license:lgpl2.0+)
277 (home-page "https://projects.gnome.org/accessibility/")))
279 (define-public at-spi2-atk
285 (uri (string-append "mirror://gnome/sources/" name "/"
286 (string-take version 4) "/" name "-"
290 "150sqc21difazqd53llwfdaqnwfy73bic9hia41xpfy9kcpzz9yy"))))
291 (build-system gnu-build-system)
292 (inputs `(("atk" ,atk)
293 ("at-spi2-core" ,at-spi2-core)
297 `(("pkg-config" ,pkg-config)))
299 `(#:tests? #f)) ; FIXME: droute/droute-test fails; one should disable
300 ; tests in a more fine-grained way.
301 (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
303 "The Assistive Technology Service Provider Interface
304 is part of the GNOME accessibility project.")
305 (license license:lgpl2.0+)
306 (home-page "https://projects.gnome.org/accessibility/")))
308 (define-public gtk+-2
314 (uri (string-append "mirror://gnome/sources/" name "/"
315 (string-take version 4) "/" name "-"
319 "1qyw73pr9ryqhir2h1kbx3vm70km4dg2fxrgkrdlpv0rvlb94bih"))))
320 (build-system gnu-build-system)
323 ("gdk-pixbuf" ,gdk-pixbuf)
327 ("pkg-config" ,pkg-config)
328 ("python-wrapper" ,python-wrapper)))
333 (lambda* (#:key #:allow-other-keys #:rest args)
334 (let ((configure (assoc-ref %standard-phases 'configure)))
335 ;; FIXME: re-enable tests requiring an X server
336 (substitute* "gtk/Makefile.in"
337 (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits ."))
338 (apply configure args)))
340 (synopsis "Cross-platform toolkit for creating graphical user interfaces")
342 "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
343 graphical user interfaces. Offering a complete set of widgets, GTK+ is
344 suitable for projects ranging from small one-off tools to complete
345 application suites.")
346 (license license:lgpl2.0+)
347 (home-page "http://www.gtk.org/")))
350 (package (inherit gtk+-2)
354 (uri (string-append "mirror://gnome/sources/gtk+/"
355 (string-take version 4) "/gtk+-"
359 "1f3a7r3z7i9xh5imlfpfcgyydzkj2fnd0v6ylvqxij0yzfbnhbn1"))))
361 `(("at-spi2-atk" ,at-spi2-atk)
363 ("gdk-pixbuf" ,gdk-pixbuf)
365 ("libxinerama" ,libxinerama)
368 `(("libxml2" ,libxml2)))
371 ("pkg-config" ,pkg-config)
372 ("python-wrapper" ,python-wrapper)
373 ("xorg-server" ,xorg-server)))
378 (lambda* (#:key #:allow-other-keys #:rest args)
379 (let ((configure (assoc-ref %standard-phases 'configure)))
380 ;; Disable most tests, failing in the chroot with the message:
381 ;; D-Bus library appears to be incorrectly set up; failed to read
382 ;; machine uuid: Failed to open "/etc/machine-id": No such file or
384 ;; See the manual page for dbus-uuidgen to correct this issue.
385 (substitute* "testsuite/Makefile.in"
386 (("SUBDIRS = gdk gtk a11y css reftests") "SUBDIRS = gdk"))
387 (apply configure args)))
388 %standard-phases)))))
394 (define-public guile-cairo
401 "http://download.gna.org/guile-cairo/guile-cairo-"
406 "1f5nd9n46n6cwfl1byjml02q3y2hgn7nkx98km1czgwarxl7ws3x"))))
407 (build-system gnu-build-system)
409 '(#:phases (alist-cons-before
410 'configure 'set-module-directory
411 (lambda* (#:key outputs #:allow-other-keys)
412 ;; Install modules under $out/share/guile/site/2.0.
413 (let ((out (assoc-ref outputs "out")))
414 (substitute* "Makefile.in"
415 (("scmdir = ([[:graph:]]+).*" _ value)
416 (string-append "scmdir = " value "/2.0\n")))
417 (substitute* "cairo/Makefile.in"
418 (("moduledir = ([[:graph:]]+).*" _ value)
419 (string-append "moduledir = "
420 "$(prefix)/share/guile/site/2.0/cairo\n'")))))
422 'install 'install-missing-file
423 (lambda* (#:key outputs #:allow-other-keys)
424 ;; By default 'vector-types.scm' is not installed, so do
426 (let ((out (assoc-ref outputs "out")))
427 (copy-file "cairo/vector-types.scm"
428 (string-append out "/share/guile/site/2.0"
429 "/cairo/vector-types.scm"))))
432 `(("guile-lib" ,guile-lib)
435 ("guile" ,guile-2.0)))
437 `(("pkg-config" ,pkg-config)))
438 (home-page "http://www.nongnu.org/guile-cairo/")
439 (synopsis "Cairo bindings for GNU Guile")
441 "Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
442 Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API
443 stable, providing a firm base on which to do graphics work. Finally, and
444 importantly, it is pleasant to use. You get a powerful and well-maintained
445 graphics library with all of the benefits of Scheme: memory management,
446 exceptions, macros, and a dynamic programming environment.")
447 (license license:lgpl3+)))
454 (define-public cairomm
460 (uri (string-append "http://cairographics.org/releases/cairomm-"
464 "13rrp96px95m6xnvmsaqb0wcqsnizg3bz334k0yhlyxf7v29d386"))))
465 (build-system gnu-build-system)
467 ;; The examples lack -lcairo.
468 '(#:make-flags '("LDFLAGS=-lcairo")))
469 (native-inputs `(("pkg-config" ,pkg-config)))
471 `(("libsigc++" ,libsigc++)
472 ("freetype" ,freetype)
473 ("fontconfig" ,fontconfig)
475 (home-page "http://cairographics.org/")
476 (synopsis "C++ bindings to the Cairo 2D graphics library")
478 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
480 (license license:lgpl2.0+)))
482 (define-public pangomm
488 (uri (string-append "mirror://gnome/sources/pangomm/2.34/pangomm-"
492 "0hcyvv7c5zmivprdam6cp111i6hn2y5jsxzk00m6j9pncbzvp0hf"))))
493 (build-system gnu-build-system)
494 (native-inputs `(("pkg-config" ,pkg-config)))
500 (home-page "http://www.pango.org/")
501 (synopsis "C++ interface to the Pango text rendering library")
503 "Pangomm provides a C++ programming interface to the Pango text rendering
505 (license license:lgpl2.1+)))
513 (uri (string-append "mirror://gnome/sources/atkmm/2.22/atkmm-"
517 "06zrf2ymml2dzp53sss0d4ch4dk9v09jm8rglnrmwk4v81mq9gxz"))))
518 (build-system gnu-build-system)
519 (native-inputs `(("pkg-config" ,pkg-config)))
521 `(("glibmm" ,glibmm) ("atk" ,atk)))
522 (home-page "http://www.gtkmm.org")
523 (synopsis "C++ interface to the ATK accessibility library")
525 "ATKmm provides a C++ programming interface to the ATK accessibility
527 (license license:lgpl2.1+)))
535 (uri (string-append "mirror://gnome/sources/gtkmm/3.9/gtkmm-"
539 "0yf8wwv4w02p70nrxsbs0nhm0w4gkn2wggdjygd8vif062anf1rs"))))
540 (build-system gnu-build-system)
541 (native-inputs `(("pkg-config" ,pkg-config)))
543 `(("pangomm" ,pangomm)
548 (home-page "http://gtkmm.org/")
550 "C++ interface to the GTK+ graphical user interface library")
552 "gtkmm is the official C++ interface for the popular GUI library GTK+.
553 Highlights include typesafe callbacks, and a comprehensive set of widgets that
554 are easily extensible via inheritance. You can create user interfaces either
555 in code or with the Glade User Interface designer, using libglademm. There's
556 extensive documentation, including API reference and a tutorial.")
557 (license license:lgpl2.1+)))