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