Commit | Line | Data |
---|---|---|
3a08a411 AE |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> | |
37cb3a69 | 3 | ;;; Copyright © 2013, 2014, 2015 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> |
3a08a411 AE |
7 | ;;; |
8 | ;;; This file is part of GNU Guix. | |
9 | ;;; | |
10 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
11 | ;;; under the terms of the GNU General Public License as published by | |
12 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
13 | ;;; your option) any later version. | |
14 | ;;; | |
15 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
16 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | ;;; GNU General Public License for more details. | |
19 | ;;; | |
20 | ;;; You should have received a copy of the GNU General Public License | |
21 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
22 | ||
23 | (define-module (gnu packages gtk) | |
b5b73a82 | 24 | #:use-module ((guix licenses) #:prefix license:) |
b38e45d8 | 25 | #:use-module (guix utils) |
3a08a411 AE |
26 | #:use-module (guix packages) |
27 | #:use-module (guix download) | |
28 | #:use-module (guix build-system gnu) | |
0b96fb2a | 29 | #:use-module (guix build-system python) |
6131c43d AE |
30 | #:use-module (gnu packages compression) |
31 | #:use-module (gnu packages fontutils) | |
32 | #:use-module (gnu packages ghostscript) | |
3a08a411 | 33 | #:use-module (gnu packages glib) |
95d439b2 | 34 | #:use-module (gnu packages gnome) |
a2609b41 | 35 | #:use-module (gnu packages icu4c) |
e55354b8 | 36 | #:use-module (gnu packages image) |
6131c43d | 37 | #:use-module (gnu packages pdf) |
8b79a547 | 38 | #:use-module (gnu packages perl) |
6131c43d AE |
39 | #:use-module (gnu packages pkg-config) |
40 | #:use-module (gnu packages python) | |
8e70e6d2 | 41 | #:use-module (gnu packages guile) |
37cb3a69 | 42 | #:use-module (gnu packages cups) |
8e70e6d2 | 43 | #:use-module (gnu packages xml) |
6c0e878e LC |
44 | #:use-module (gnu packages xorg) |
45 | #:use-module (gnu packages xdisorg)) | |
3a08a411 AE |
46 | |
47 | (define-public atk | |
48 | (package | |
49 | (name "atk") | |
8597ab7d | 50 | (version "2.15.3") |
3a08a411 AE |
51 | (source (origin |
52 | (method url-fetch) | |
3b8e4347 | 53 | (uri (string-append "mirror://gnome/sources/" name "/" |
b38e45d8 EB |
54 | (version-major+minor version) "/" |
55 | name "-" version ".tar.xz")) | |
3a08a411 AE |
56 | (sha256 |
57 | (base32 | |
8597ab7d | 58 | "177a9x6lz2im0mfgxv2crv0l740wy7rg5vlnb8wyyf4fmnh0q19f")))) ; 2.15.3 |
3a08a411 | 59 | (build-system gnu-build-system) |
141aed80 LC |
60 | (inputs `(("glib" ,glib))) |
61 | (native-inputs | |
62 | `(("pkg-config" ,pkg-config) | |
426adbe8 | 63 | ("glib" ,glib "bin") ; glib-mkenums, etc. |
141aed80 | 64 | ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc. |
c5cc5006 | 65 | (synopsis "GNOME accessibility toolkit") |
3a08a411 AE |
66 | (description |
67 | "ATK provides the set of accessibility interfaces that are implemented | |
35b9e423 | 68 | by other toolkits and applications. Using the ATK interfaces, accessibility |
3a08a411 AE |
69 | tools have full access to view and control running applications.") |
70 | (license license:lgpl2.0+) | |
71 | (home-page "https://developer.gnome.org/atk/"))) | |
6131c43d AE |
72 | |
73 | (define-public cairo | |
74 | (package | |
75 | (name "cairo") | |
9e5c0927 | 76 | (version "1.12.18") |
6131c43d AE |
77 | (source (origin |
78 | (method url-fetch) | |
79 | (uri (string-append "http://cairographics.org/releases/cairo-" | |
80 | version ".tar.xz")) | |
81 | (sha256 | |
82 | (base32 | |
9e5c0927 | 83 | "1dpmlxmmigpiyv0jchjsn2l1a29655x24g5073hy8p4lmjvz0nfw")))) |
6131c43d AE |
84 | (build-system gnu-build-system) |
85 | (propagated-inputs | |
86 | `(("fontconfig" ,fontconfig) | |
87 | ("freetype" ,freetype) | |
88 | ("glib" ,glib) | |
89 | ("libpng" ,libpng) | |
90 | ("libx11" ,libx11) | |
91 | ("libxext" ,libxext) | |
92 | ("libxrender" ,libxrender) | |
93 | ("pixman" ,pixman))) | |
94 | (inputs | |
95 | `(("ghostscript" ,ghostscript) | |
96 | ("libspectre" ,libspectre) | |
6131c43d | 97 | ("poppler" ,poppler) |
6131c43d AE |
98 | ("xextproto" ,xextproto) |
99 | ("zlib" ,zlib))) | |
c4c4cc05 JD |
100 | (native-inputs |
101 | `(("pkg-config" ,pkg-config) | |
102 | ("python" ,python-wrapper))) | |
6131c43d AE |
103 | (arguments |
104 | `(#:tests? #f)) ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html | |
105 | (synopsis "2D graphics library") | |
106 | (description | |
107 | "Cairo is a 2D graphics library with support for multiple output devices. | |
108 | Currently supported output targets include the X Window System (via both | |
109 | Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file | |
35b9e423 | 110 | output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB. |
6131c43d AE |
111 | |
112 | Cairo is designed to produce consistent output on all output media while | |
113 | taking advantage of display hardware acceleration when available | |
114 | eg. through the X Render Extension). | |
115 | ||
116 | The cairo API provides operations similar to the drawing operators of | |
35b9e423 | 117 | PostScript and PDF. Operations in cairo including stroking and filling cubic |
6131c43d | 118 | Bézier splines, transforming and compositing translucent images, and |
35b9e423 | 119 | antialiased text rendering. All drawing operations can be transformed by any |
6131c43d AE |
120 | affine transformation (scale, rotation, shear, etc.)") |
121 | (license license:lgpl2.1) ; or Mozilla Public License 1.1 | |
122 | (home-page "http://cairographics.org/"))) | |
a2609b41 AE |
123 | |
124 | (define-public harfbuzz | |
125 | (package | |
126 | (name "harfbuzz") | |
418e82b5 | 127 | (version "0.9.22") |
a2609b41 AE |
128 | (source (origin |
129 | (method url-fetch) | |
130 | (uri (string-append "http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-" | |
131 | version ".tar.bz2")) | |
132 | (sha256 | |
133 | (base32 | |
418e82b5 | 134 | "1nkimwadri6v2kzrmz8y0crmy59gw0kg4i4f6cc786bngs0815lq")))) |
a2609b41 AE |
135 | (build-system gnu-build-system) |
136 | (inputs | |
137 | `(("cairo" ,cairo) | |
27383915 | 138 | ("graphite2" ,graphite2) |
c4c4cc05 JD |
139 | ("icu4c" ,icu4c))) |
140 | (native-inputs | |
27383915 | 141 | `(("pkg-config" ,pkg-config) |
ee3e314b | 142 | ("python" ,python-wrapper))) |
27383915 AE |
143 | (arguments |
144 | `(#:configure-flags `("--with-graphite2=yes"))) | |
35b9e423 | 145 | (synopsis "OpenType text shaping engine") |
a2609b41 AE |
146 | (description |
147 | "HarfBuzz is an OpenType text shaping engine.") | |
148 | (license (license:x11-style "file://COPYING" | |
149 | "See 'COPYING' in the distribution.")) | |
150 | (home-page "http://www.freedesktop.org/wiki/Software/HarfBuzz/"))) | |
4b9adff9 AE |
151 | |
152 | (define-public pango | |
153 | (package | |
154 | (name "pango") | |
dca1b58d | 155 | (version "1.36.8") |
4b9adff9 AE |
156 | (source (origin |
157 | (method url-fetch) | |
dca1b58d FB |
158 | (uri (string-append "mirror://gnome/sources/pango/" |
159 | (version-major+minor version) "/" | |
160 | name "-" version ".tar.xz")) | |
4b9adff9 AE |
161 | (sha256 |
162 | (base32 | |
dca1b58d | 163 | "01rdzjh68w8l5zn0648yibyarj8p6g7yfn59nw5awaz1i8dvbnqq")))) |
4b9adff9 | 164 | (build-system gnu-build-system) |
cf2135ff | 165 | (propagated-inputs |
4b9adff9 | 166 | `(("cairo" ,cairo) |
4169a4bc AE |
167 | ("harfbuzz" ,harfbuzz))) |
168 | (inputs | |
9a5acb54 JL |
169 | `(("zlib" ,zlib) |
170 | ||
171 | ;; Some packages, such as Openbox, expect Pango to be built with the | |
172 | ;; optional libxft support. | |
173 | ("libxft" ,libxft))) | |
c4c4cc05 | 174 | (native-inputs |
141aed80 | 175 | `(("pkg-config" ,pkg-config) |
426adbe8 | 176 | ("glib" ,glib "bin") ; glib-mkenums, etc. |
141aed80 | 177 | ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc. |
4b9adff9 AE |
178 | (synopsis "GNOME text and font handling library") |
179 | (description | |
180 | "Pango is the core text and font handling library used in GNOME | |
35b9e423 | 181 | applications. It has extensive support for the different writing systems |
4b9adff9 AE |
182 | used throughout the world.") |
183 | (license license:lgpl2.0+) | |
184 | (home-page "https://developer.gnome.org/pango/"))) | |
527e7961 | 185 | |
5698b8b8 JD |
186 | (define-public pangox-compat |
187 | (package | |
188 | (name "pangox-compat") | |
189 | (version "0.0.2") | |
190 | (source (origin | |
191 | (method url-fetch) | |
b38e45d8 EB |
192 | (uri (string-append "mirror://gnome/sources/" name "/" |
193 | (version-major+minor version) "/" | |
194 | name "-" version ".tar.xz")) | |
5698b8b8 JD |
195 | (sha256 |
196 | (base32 | |
197 | "0ip0ziys6mrqqmz4n71ays0kf5cs1xflj1gfpvs4fgy2nsrr482m")))) | |
198 | (build-system gnu-build-system) | |
199 | (inputs | |
200 | `(("glib" ,glib) | |
201 | ("pango" ,pango))) | |
202 | (native-inputs | |
203 | `(("intltool" ,intltool) | |
204 | ("pkg-config" ,pkg-config))) | |
205 | (home-page "https://developer.gnome.org/pango") | |
35b9e423 | 206 | (synopsis "Obsolete pango functions") |
5698b8b8 JD |
207 | (description "Pangox was a X backend to pango. It is now obsolete and no |
208 | longer provided by recent pango releases. pangox-compat provides the | |
209 | functions which were removed.") | |
210 | (license license:lgpl2.0+))) | |
211 | ||
95d439b2 JD |
212 | |
213 | (define-public gtksourceview | |
214 | (package | |
215 | (name "gtksourceview") | |
216 | (version "2.10.5") ; This is the last version which builds against gtk+2 | |
217 | (source (origin | |
218 | (method url-fetch) | |
b38e45d8 EB |
219 | (uri (string-append "mirror://gnome/sources/" name "/" |
220 | (version-major+minor version) "/" | |
221 | name "-" version ".tar.bz2")) | |
95d439b2 JD |
222 | (sha256 |
223 | (base32 | |
224 | "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5")))) | |
225 | (build-system gnu-build-system) | |
226 | (inputs | |
c4c4cc05 | 227 | `(("gtk" ,gtk+-2) |
95d439b2 | 228 | ("libxml2" ,libxml2) |
95d439b2 JD |
229 | ;; These two are needed only to allow the tests to run successfully. |
230 | ("xorg-server" ,xorg-server) | |
231 | ("shared-mime-info" ,shared-mime-info))) | |
c4c4cc05 | 232 | (native-inputs |
44add1ce | 233 | `(("intltool" ,intltool) |
221ed17a | 234 | ("glib" ,glib "bin") ; for glib-genmarshal, etc. |
c4c4cc05 | 235 | ("pkg-config" ,pkg-config))) |
95d439b2 JD |
236 | (arguments |
237 | `(#:phases | |
238 | ;; Unfortunately, some of the tests in "make check" are highly dependent | |
239 | ;; on the environment therefore, some black magic is required. | |
240 | (alist-cons-before | |
241 | 'check 'start-xserver | |
242 | (lambda* (#:key inputs #:allow-other-keys) | |
243 | (let ((xorg-server (assoc-ref inputs "xorg-server")) | |
244 | (mime (assoc-ref inputs "shared-mime-info"))) | |
245 | ||
246 | ;; There must be a running X server and make check doesn't start one. | |
247 | ;; Therefore we must do it. | |
248 | (system (format #f "~a/bin/Xvfb :1 &" xorg-server)) | |
249 | (setenv "DISPLAY" ":1") | |
250 | ||
251 | ;; The .lang files must be found in $XDG_DATA_HOME/gtksourceview-2.0 | |
252 | (system "ln -s gtksourceview gtksourceview-2.0") | |
253 | (setenv "XDG_DATA_HOME" (getcwd)) | |
254 | ||
255 | ;; Finally, the mimetypes must be available. | |
256 | (setenv "XDG_DATA_DIRS" (string-append mime "/share/")) )) | |
257 | %standard-phases))) | |
258 | (synopsis "Widget that extends the standard GTK+ 2.x 'GtkTextView' widget") | |
259 | (description | |
260 | "GtkSourceView is a portable C library that extends the standard GTK+ | |
261 | framework for multiline text editing with support for configurable syntax | |
262 | highlighting, unlimited undo/redo, search and replace, a completion framework, | |
263 | printing and other features typical of a source code editor.") | |
264 | (license license:lgpl2.0+) | |
265 | (home-page "https://developer.gnome.org/gtksourceview/"))) | |
266 | ||
527e7961 AE |
267 | (define-public gdk-pixbuf |
268 | (package | |
269 | (name "gdk-pixbuf") | |
5c880636 | 270 | (version "2.31.1") |
527e7961 AE |
271 | (source (origin |
272 | (method url-fetch) | |
b38e45d8 EB |
273 | (uri (string-append "mirror://gnome/sources/" name "/" |
274 | (version-major+minor version) "/" | |
275 | name "-" version ".tar.xz")) | |
527e7961 AE |
276 | (sha256 |
277 | (base32 | |
5c880636 | 278 | "1kajvfckn88bzcdnl73b933gmjhwjm3dhsj1yrpixhfsc4y5x9r5")))) |
527e7961 | 279 | (build-system gnu-build-system) |
48f46dc3 SB |
280 | (arguments |
281 | '(#:configure-flags '("--with-x11"))) | |
1b5758a6 | 282 | (propagated-inputs ; required by gdk-pixbuf-2.0.pc |
527e7961 | 283 | `(("glib" ,glib) |
1b5758a6 SB |
284 | ("libpng" ,libpng))) |
285 | (inputs | |
286 | `(("libjpeg" ,libjpeg) | |
48f46dc3 SB |
287 | ("libtiff" ,libtiff) |
288 | ("libx11" ,libx11))) | |
c4c4cc05 | 289 | (native-inputs |
141aed80 | 290 | `(("pkg-config" ,pkg-config) |
426adbe8 | 291 | ("glib" ,glib "bin") ; glib-mkenums, etc. |
141aed80 | 292 | ("gobject-introspection", gobject-introspection))) ; g-ir-compiler, etc. |
527e7961 AE |
293 | (synopsis "GNOME image loading and manipulation library") |
294 | (description | |
295 | "GdkPixbuf is a library for image loading and manipulation developed | |
296 | in the GNOME project.") | |
297 | (license license:lgpl2.0+) | |
298 | (home-page "https://developer.gnome.org/gdk-pixbuf/"))) | |
cf2135ff | 299 | |
f3fb92e5 AE |
300 | (define-public at-spi2-core |
301 | (package | |
302 | (name "at-spi2-core") | |
303 | (version "2.10.0") | |
304 | (source (origin | |
305 | (method url-fetch) | |
306 | (uri (string-append "mirror://gnome/sources/" name "/" | |
b38e45d8 EB |
307 | (version-major+minor version) "/" |
308 | name "-" version ".tar.xz")) | |
f3fb92e5 AE |
309 | (sha256 |
310 | (base32 | |
311 | "1ns44yibdgcwzwri7sr075hfs5rh5lgxkh71247a0822az3mahcn")))) | |
312 | (build-system gnu-build-system) | |
313 | (inputs `(("dbus" ,dbus) | |
314 | ("glib" ,glib) | |
f3fb92e5 | 315 | ("libxi" ,libxi) |
c4c4cc05 JD |
316 | ("libxtst" ,libxtst))) |
317 | (native-inputs | |
318 | `(("intltool" ,intltool) | |
319 | ("pkg-config" ,pkg-config))) | |
f3fb92e5 AE |
320 | (arguments |
321 | `(#:tests? #f)) ; FIXME: dbind/dbtest fails; one should disable tests in | |
322 | ; a more fine-grained way. | |
323 | (synopsis "Assistive Technology Service Provider Interface, core components") | |
324 | (description | |
325 | "The Assistive Technology Service Provider Interface, core components, | |
326 | is part of the GNOME accessibility project.") | |
327 | (license license:lgpl2.0+) | |
328 | (home-page "https://projects.gnome.org/accessibility/"))) | |
329 | ||
5fda4784 AE |
330 | (define-public at-spi2-atk |
331 | (package | |
332 | (name "at-spi2-atk") | |
333 | (version "2.10.0") | |
334 | (source (origin | |
335 | (method url-fetch) | |
336 | (uri (string-append "mirror://gnome/sources/" name "/" | |
b38e45d8 EB |
337 | (version-major+minor version) "/" |
338 | name "-" version ".tar.xz")) | |
5fda4784 AE |
339 | (sha256 |
340 | (base32 | |
341 | "150sqc21difazqd53llwfdaqnwfy73bic9hia41xpfy9kcpzz9yy")))) | |
342 | (build-system gnu-build-system) | |
343 | (inputs `(("atk" ,atk) | |
344 | ("at-spi2-core" ,at-spi2-core) | |
345 | ("dbus" ,dbus) | |
c4c4cc05 JD |
346 | ("glib" ,glib))) |
347 | (native-inputs | |
348 | `(("pkg-config" ,pkg-config))) | |
5fda4784 AE |
349 | (arguments |
350 | `(#:tests? #f)) ; FIXME: droute/droute-test fails; one should disable | |
351 | ; tests in a more fine-grained way. | |
352 | (synopsis "Assistive Technology Service Provider Interface, ATK bindings") | |
353 | (description | |
354 | "The Assistive Technology Service Provider Interface | |
355 | is part of the GNOME accessibility project.") | |
356 | (license license:lgpl2.0+) | |
357 | (home-page "https://projects.gnome.org/accessibility/"))) | |
358 | ||
8b79a547 | 359 | (define-public gtk+-2 |
cf2135ff AE |
360 | (package |
361 | (name "gtk+") | |
1c8362a8 | 362 | (version "2.24.21") |
cf2135ff AE |
363 | (source (origin |
364 | (method url-fetch) | |
1c8362a8 | 365 | (uri (string-append "mirror://gnome/sources/" name "/" |
b38e45d8 EB |
366 | (version-major+minor version) "/" |
367 | name "-" version ".tar.xz")) | |
cf2135ff AE |
368 | (sha256 |
369 | (base32 | |
1c8362a8 | 370 | "1qyw73pr9ryqhir2h1kbx3vm70km4dg2fxrgkrdlpv0rvlb94bih")))) |
cf2135ff | 371 | (build-system gnu-build-system) |
4169a4bc | 372 | (propagated-inputs |
cf2135ff | 373 | `(("atk" ,atk) |
cf2135ff | 374 | ("gdk-pixbuf" ,gdk-pixbuf) |
4169a4bc | 375 | ("pango" ,pango))) |
c4c4cc05 | 376 | (native-inputs |
1c8362a8 | 377 | `(("perl" ,perl) |
426adbe8 | 378 | ("glib" ,glib "bin") |
1c8362a8 AE |
379 | ("pkg-config" ,pkg-config) |
380 | ("python-wrapper" ,python-wrapper))) | |
cf2135ff AE |
381 | (arguments |
382 | `(#:phases | |
d4bf49b1 EB |
383 | (alist-cons-before |
384 | 'configure 'disable-tests | |
385 | (lambda _ | |
386 | ;; FIXME: re-enable tests requiring an X server | |
387 | (substitute* "gtk/Makefile.in" | |
388 | (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits ."))) | |
cf2135ff | 389 | %standard-phases))) |
0327ced2 | 390 | (synopsis "Cross-platform toolkit for creating graphical user interfaces") |
cf2135ff AE |
391 | (description |
392 | "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating | |
35b9e423 | 393 | graphical user interfaces. Offering a complete set of widgets, GTK+ is |
cf2135ff AE |
394 | suitable for projects ranging from small one-off tools to complete |
395 | application suites.") | |
396 | (license license:lgpl2.0+) | |
397 | (home-page "http://www.gtk.org/"))) | |
8e70e6d2 | 398 | |
8b79a547 AE |
399 | (define-public gtk+ |
400 | (package (inherit gtk+-2) | |
b38e45d8 | 401 | (name "gtk+") |
a6035fc1 | 402 | (version "3.14.7") |
8b79a547 AE |
403 | (source (origin |
404 | (method url-fetch) | |
b38e45d8 EB |
405 | (uri (string-append "mirror://gnome/sources/" name "/" |
406 | (version-major+minor version) "/" | |
407 | name "-" version ".tar.xz")) | |
8b79a547 AE |
408 | (sha256 |
409 | (base32 | |
a6035fc1 | 410 | "0vm40n6nf0w3vv54wqy67jcxddka7hplksi093xim3119yq196gv")))) |
0e112540 | 411 | (propagated-inputs |
8b79a547 | 412 | `(("at-spi2-atk" ,at-spi2-atk) |
0e112540 AE |
413 | ("atk" ,atk) |
414 | ("gdk-pixbuf" ,gdk-pixbuf) | |
8b79a547 AE |
415 | ("libxi" ,libxi) |
416 | ("libxinerama" ,libxinerama) | |
9e5c0927 | 417 | ("libxdamage" ,libxdamage) |
0e112540 AE |
418 | ("pango" ,pango))) |
419 | (inputs | |
37cb3a69 LC |
420 | `(("libxml2" ,libxml2) |
421 | ("cups" ,cups))) ;for printing support | |
c4c4cc05 | 422 | (native-inputs |
141aed80 | 423 | `(("perl" ,perl) |
426adbe8 | 424 | ("glib" ,glib "bin") |
8b79a547 | 425 | ("pkg-config" ,pkg-config) |
141aed80 | 426 | ("gobject-introspection" ,gobject-introspection) |
8b79a547 | 427 | ("python-wrapper" ,python-wrapper) |
97f94f5e | 428 | ("xorg-server" ,xorg-server))) |
8b79a547 | 429 | (arguments |
97f94f5e | 430 | `(#:phases |
8b79a547 AE |
431 | (alist-replace |
432 | 'configure | |
af949e8e | 433 | (lambda* (#:key inputs #:allow-other-keys #:rest args) |
8b79a547 AE |
434 | (let ((configure (assoc-ref %standard-phases 'configure))) |
435 | ;; Disable most tests, failing in the chroot with the message: | |
436 | ;; D-Bus library appears to be incorrectly set up; failed to read | |
437 | ;; machine uuid: Failed to open "/etc/machine-id": No such file or | |
438 | ;; directory. | |
439 | ;; See the manual page for dbus-uuidgen to correct this issue. | |
440 | (substitute* "testsuite/Makefile.in" | |
ce2df078 LC |
441 | (("SUBDIRS = gdk gtk a11y css reftests") |
442 | "SUBDIRS = gdk")) | |
8b79a547 AE |
443 | (apply configure args))) |
444 | %standard-phases))))) | |
5fda4784 | 445 | |
8e70e6d2 LC |
446 | ;;; |
447 | ;;; Guile bindings. | |
448 | ;;; | |
449 | ||
450 | (define-public guile-cairo | |
451 | (package | |
452 | (name "guile-cairo") | |
453 | (version "1.4.1") | |
454 | (source (origin | |
455 | (method url-fetch) | |
456 | (uri (string-append | |
457 | "http://download.gna.org/guile-cairo/guile-cairo-" | |
458 | version | |
459 | ".tar.gz")) | |
460 | (sha256 | |
461 | (base32 | |
462 | "1f5nd9n46n6cwfl1byjml02q3y2hgn7nkx98km1czgwarxl7ws3x")))) | |
463 | (build-system gnu-build-system) | |
464 | (arguments | |
465 | '(#:phases (alist-cons-before | |
466 | 'configure 'set-module-directory | |
467 | (lambda* (#:key outputs #:allow-other-keys) | |
468 | ;; Install modules under $out/share/guile/site/2.0. | |
469 | (let ((out (assoc-ref outputs "out"))) | |
470 | (substitute* "Makefile.in" | |
471 | (("scmdir = ([[:graph:]]+).*" _ value) | |
472 | (string-append "scmdir = " value "/2.0\n"))) | |
473 | (substitute* "cairo/Makefile.in" | |
474 | (("moduledir = ([[:graph:]]+).*" _ value) | |
475 | (string-append "moduledir = " | |
476 | "$(prefix)/share/guile/site/2.0/cairo\n'"))))) | |
477 | (alist-cons-after | |
478 | 'install 'install-missing-file | |
479 | (lambda* (#:key outputs #:allow-other-keys) | |
480 | ;; By default 'vector-types.scm' is not installed, so do | |
481 | ;; it here. | |
482 | (let ((out (assoc-ref outputs "out"))) | |
483 | (copy-file "cairo/vector-types.scm" | |
484 | (string-append out "/share/guile/site/2.0" | |
485 | "/cairo/vector-types.scm")))) | |
486 | %standard-phases)))) | |
487 | (inputs | |
488 | `(("guile-lib" ,guile-lib) | |
489 | ("expat" ,expat) | |
8e70e6d2 | 490 | ("guile" ,guile-2.0))) |
49710cea LC |
491 | (propagated-inputs |
492 | ;; The .pc file refers to 'cairo'. | |
493 | `(("cairo" ,cairo))) | |
c4c4cc05 JD |
494 | (native-inputs |
495 | `(("pkg-config" ,pkg-config))) | |
8e70e6d2 LC |
496 | (home-page "http://www.nongnu.org/guile-cairo/") |
497 | (synopsis "Cairo bindings for GNU Guile") | |
498 | (description | |
499 | "Guile-Cairo wraps the Cairo graphics library for Guile Scheme. | |
500 | Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API | |
501 | stable, providing a firm base on which to do graphics work. Finally, and | |
502 | importantly, it is pleasant to use. You get a powerful and well-maintained | |
503 | graphics library with all of the benefits of Scheme: memory management, | |
504 | exceptions, macros, and a dynamic programming environment.") | |
505 | (license license:lgpl3+))) | |
66663503 LC |
506 | |
507 | \f | |
508 | ;;; | |
509 | ;;; C++ bindings. | |
510 | ;;; | |
511 | ||
512 | (define-public cairomm | |
513 | (package | |
514 | (name "cairomm") | |
d36caa10 | 515 | (version "1.11.2") |
66663503 LC |
516 | (source (origin |
517 | (method url-fetch) | |
518 | (uri (string-append "http://cairographics.org/releases/cairomm-" | |
519 | version ".tar.gz")) | |
520 | (sha256 | |
521 | (base32 | |
d36caa10 | 522 | "138052ybc58q5yl92m2p0br0k0a9g1pi9gfhmn4y220yih4pgxnc")))) |
66663503 LC |
523 | (build-system gnu-build-system) |
524 | (arguments | |
525 | ;; The examples lack -lcairo. | |
526 | '(#:make-flags '("LDFLAGS=-lcairo"))) | |
c4c4cc05 | 527 | (native-inputs `(("pkg-config" ,pkg-config))) |
66663503 LC |
528 | (propagated-inputs |
529 | `(("libsigc++" ,libsigc++) | |
530 | ("freetype" ,freetype) | |
531 | ("fontconfig" ,fontconfig) | |
532 | ("cairo" ,cairo))) | |
533 | (home-page "http://cairographics.org/") | |
534 | (synopsis "C++ bindings to the Cairo 2D graphics library") | |
535 | (description | |
536 | "Cairomm provides a C++ programming interface to the Cairo 2D graphics | |
537 | library.") | |
538 | (license license:lgpl2.0+))) | |
c5cc5006 LC |
539 | |
540 | (define-public pangomm | |
541 | (package | |
542 | (name "pangomm") | |
543 | (version "2.34.0") | |
544 | (source (origin | |
545 | (method url-fetch) | |
b38e45d8 EB |
546 | (uri (string-append "mirror://gnome/sources/" name "/" |
547 | (version-major+minor version) "/" | |
548 | name "-" version ".tar.xz")) | |
c5cc5006 LC |
549 | (sha256 |
550 | (base32 | |
551 | "0hcyvv7c5zmivprdam6cp111i6hn2y5jsxzk00m6j9pncbzvp0hf")))) | |
552 | (build-system gnu-build-system) | |
c4c4cc05 | 553 | (native-inputs `(("pkg-config" ,pkg-config))) |
c5cc5006 LC |
554 | (propagated-inputs |
555 | `(("cairo" ,cairo) | |
556 | ("cairomm" ,cairomm) | |
557 | ("glibmm" ,glibmm) | |
558 | ("pango" ,pango))) | |
559 | (home-page "http://www.pango.org/") | |
560 | (synopsis "C++ interface to the Pango text rendering library") | |
561 | (description | |
562 | "Pangomm provides a C++ programming interface to the Pango text rendering | |
563 | library.") | |
564 | (license license:lgpl2.1+))) | |
565 | ||
566 | (define-public atkmm | |
567 | (package | |
568 | (name "atkmm") | |
569 | (version "2.22.7") | |
570 | (source (origin | |
571 | (method url-fetch) | |
b38e45d8 EB |
572 | (uri (string-append "mirror://gnome/sources/" name "/" |
573 | (version-major+minor version) "/" | |
574 | name "-" version ".tar.xz")) | |
c5cc5006 LC |
575 | (sha256 |
576 | (base32 | |
577 | "06zrf2ymml2dzp53sss0d4ch4dk9v09jm8rglnrmwk4v81mq9gxz")))) | |
578 | (build-system gnu-build-system) | |
c4c4cc05 | 579 | (native-inputs `(("pkg-config" ,pkg-config))) |
c5cc5006 LC |
580 | (propagated-inputs |
581 | `(("glibmm" ,glibmm) ("atk" ,atk))) | |
582 | (home-page "http://www.gtkmm.org") | |
583 | (synopsis "C++ interface to the ATK accessibility library") | |
584 | (description | |
585 | "ATKmm provides a C++ programming interface to the ATK accessibility | |
586 | toolkit.") | |
587 | (license license:lgpl2.1+))) | |
588 | ||
589 | (define-public gtkmm | |
590 | (package | |
591 | (name "gtkmm") | |
0404c34c | 592 | (version "3.14.0") |
c5cc5006 LC |
593 | (source (origin |
594 | (method url-fetch) | |
b38e45d8 EB |
595 | (uri (string-append "mirror://gnome/sources/" name "/" |
596 | (version-major+minor version) "/" | |
597 | name "-" version ".tar.xz")) | |
c5cc5006 LC |
598 | (sha256 |
599 | (base32 | |
0404c34c | 600 | "12z4g2in82nk92nfjs2hmrdcwbav8v3laz1813x2dhkf5jk2ixfr")))) |
c5cc5006 | 601 | (build-system gnu-build-system) |
c4c4cc05 | 602 | (native-inputs `(("pkg-config" ,pkg-config))) |
c5cc5006 LC |
603 | (propagated-inputs |
604 | `(("pangomm" ,pangomm) | |
605 | ("cairomm" ,cairomm) | |
606 | ("atkmm" ,atkmm) | |
607 | ("gtk+" ,gtk+) | |
608 | ("glibmm" ,glibmm))) | |
609 | (home-page "http://gtkmm.org/") | |
610 | (synopsis | |
611 | "C++ interface to the GTK+ graphical user interface library") | |
612 | (description | |
613 | "gtkmm is the official C++ interface for the popular GUI library GTK+. | |
614 | Highlights include typesafe callbacks, and a comprehensive set of widgets that | |
615 | are easily extensible via inheritance. You can create user interfaces either | |
616 | in code or with the Glade User Interface designer, using libglademm. There's | |
617 | extensive documentation, including API reference and a tutorial.") | |
618 | (license license:lgpl2.1+))) | |
9c086443 JD |
619 | |
620 | ||
621 | (define-public gtkmm-2 | |
622 | (package (inherit gtkmm) | |
b38e45d8 | 623 | (name "gtkmm") |
9c086443 JD |
624 | (version "2.24.2") |
625 | (source (origin | |
626 | (method url-fetch) | |
b38e45d8 EB |
627 | (uri (string-append "mirror://gnome/sources/" name "/" |
628 | (version-major+minor version) "/" | |
629 | name "-" version ".tar.xz")) | |
9c086443 JD |
630 | (sha256 |
631 | (base32 | |
632 | "0gcm91sc1a05c56kzh74l370ggj0zz8nmmjvjaaxgmhdq8lpl369")))) | |
633 | (propagated-inputs | |
634 | `(("pangomm" ,pangomm) | |
635 | ("cairomm" ,cairomm) | |
636 | ("atkmm" ,atkmm) | |
637 | ("gtk+" ,gtk+-2) | |
638 | ("glibmm" ,glibmm))))) | |
fbcfa730 EB |
639 | |
640 | (define-public python-pycairo | |
641 | (package | |
642 | (name "python-pycairo") | |
643 | (version "1.10.0") | |
644 | (source | |
645 | (origin | |
646 | (method url-fetch) | |
647 | (uri (string-append "http://cairographics.org/releases/pycairo-" | |
648 | version ".tar.bz2")) | |
649 | (sha256 | |
650 | (base32 | |
651 | "1gjkf8x6hyx1skq3hhwcbvwifxvrf9qxis5vx8x5igmmgs70g94s")))) | |
652 | (build-system python-build-system) | |
653 | (native-inputs | |
654 | `(("pkg-config" ,pkg-config))) | |
655 | (propagated-inputs ;pycairo.pc references cairo | |
656 | `(("cairo" ,cairo))) | |
657 | (arguments | |
658 | `(#:tests? #f | |
659 | #:phases (alist-cons-before | |
660 | 'build 'configure | |
661 | (lambda* (#:key outputs #:allow-other-keys) | |
662 | (zero? (system* "./waf" "configure" | |
663 | (string-append "--prefix=" | |
664 | (assoc-ref outputs "out"))))) | |
665 | (alist-replace | |
666 | 'build | |
667 | (lambda _ | |
668 | (zero? (system* "./waf" "build"))) | |
669 | (alist-replace | |
670 | 'install | |
671 | (lambda _ | |
672 | (zero? (system* "./waf" "install"))) | |
673 | %standard-phases))))) | |
674 | (home-page "http://cairographics.org/pycairo/") | |
675 | (synopsis "Python bindings for cairo") | |
676 | (description | |
677 | "Pycairo is a set of Python bindings for the Cairo graphics library.") | |
678 | (license license:lgpl3+))) | |
679 | ||
680 | (define-public python2-py2cairo | |
681 | (package (inherit python-pycairo) | |
682 | (name "python2-py2cairo") | |
683 | (version "1.10.0") | |
684 | (source | |
685 | (origin | |
686 | (method url-fetch) | |
687 | (uri (string-append "http://cairographics.org/releases/py2cairo-" | |
688 | version ".tar.bz2")) | |
689 | (sha256 | |
690 | (base32 | |
691 | "0cblk919wh6w0pgb45zf48xwxykfif16qk264yga7h9fdkq3j16k")))) | |
692 | (arguments | |
693 | `(#:python ,python-2 | |
694 | ,@(package-arguments python-pycairo))) | |
695 | ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1 | |
0d6a8339 | 696 | (license (list license:lgpl2.1 license:mpl1.1)))) |
fbcfa730 EB |
697 | |
698 | (define-public python2-pygtk | |
699 | (package | |
700 | (name "python2-pygtk") | |
701 | (version "2.24.0") | |
702 | (source | |
703 | (origin | |
704 | (method url-fetch) | |
705 | (uri (string-append "http://ftp.gnome.org/pub/GNOME/sources" | |
706 | "/pygtk/" (version-major+minor version) | |
707 | "/pygtk-" version ".tar.bz2")) | |
708 | (sha256 | |
709 | (base32 | |
710 | "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d")))) | |
711 | (build-system gnu-build-system) | |
712 | (native-inputs | |
713 | `(("pkg-config" ,pkg-config))) | |
714 | (inputs | |
715 | `(("python" ,python-2) | |
716 | ("glib" ,glib))) | |
717 | (propagated-inputs | |
718 | `(("python-pycairo" ,python2-py2cairo) ;loaded at runtime | |
719 | ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file | |
720 | ("gtk+" ,gtk+-2))) | |
721 | (arguments | |
722 | `(#:tests? #f | |
723 | #:phases (alist-cons-after | |
724 | 'install 'install-pth | |
725 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
726 | ;; pygtk's modules are stored in a subdirectory of python's | |
727 | ;; site-packages directory. Add a .pth file so that python | |
728 | ;; will add that subdirectory to its module search path. | |
729 | (let* ((out (assoc-ref outputs "out")) | |
730 | (site (string-append out "/lib/python" | |
731 | ,(version-major+minor | |
732 | (package-version python-2)) | |
733 | "/site-packages"))) | |
734 | (call-with-output-file (string-append site "/pygtk.pth") | |
735 | (lambda (port) | |
736 | (format port "gtk-2.0~%"))))) | |
737 | %standard-phases))) | |
738 | (home-page "http://www.pygtk.org/") | |
739 | (synopsis "Python bindings for GTK+") | |
740 | (description | |
741 | "PyGTK allows you to write full featured GTK programs in Python. It is | |
742 | targetted at GTK 2.x, and can be used in conjunction with gnome-python to | |
743 | write GNOME applications.") | |
744 | (license license:lgpl2.1+))) |