gnu: gtkspell3: Update to 3.0.9.
[jackhill/guix/guix.git] / gnu / packages / gtk.scm
CommitLineData
3a08a411
AE
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
b9743865 3;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
b9acdad7 4;;; Copyright © 2014, 2015, 2017 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>
136770c9 7;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
dfbce50c 8;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
3bc45449 9;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
c900f843 10;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
a20608a5 11;;; Coypright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
5b003972 12;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
b7807bb2 13;;; Copyright © 2016 Fabian Harfert <fhmgufs@web.de>
3c8ba11a 14;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
9b381643 15;;; Copyright © 2016 Patrick Hetu <patrick.hetu@auf.org>
97b66a91 16;;; Coypright © 2016 ng0 <ng0@we.make.ritual.n0.is>
61af2675 17;;; Coypright © 2017 Roel Janssen <roel@gnu.org>
3be65cde 18;;; Coypright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
7d24c26e 19;;; Coypright © 2017 Marius Bakke <mbakke@fastmail.com>
3a08a411
AE
20;;;
21;;; This file is part of GNU Guix.
22;;;
23;;; GNU Guix is free software; you can redistribute it and/or modify it
24;;; under the terms of the GNU General Public License as published by
25;;; the Free Software Foundation; either version 3 of the License, or (at
26;;; your option) any later version.
27;;;
28;;; GNU Guix is distributed in the hope that it will be useful, but
29;;; WITHOUT ANY WARRANTY; without even the implied warranty of
30;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31;;; GNU General Public License for more details.
32;;;
33;;; You should have received a copy of the GNU General Public License
34;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
35
36(define-module (gnu packages gtk)
b5b73a82 37 #:use-module ((guix licenses) #:prefix license:)
b38e45d8 38 #:use-module (guix utils)
3a08a411
AE
39 #:use-module (guix packages)
40 #:use-module (guix download)
a9276c12 41 #:use-module (guix git-download)
3a08a411 42 #:use-module (guix build-system gnu)
0b96fb2a 43 #:use-module (guix build-system python)
e926ba71 44 #:use-module (guix build-system waf)
b837e658 45 #:use-module (gnu packages)
3bc45449 46 #:use-module (gnu packages algebra)
1a51fe27 47 #:use-module (gnu packages autotools)
61af2675 48 #:use-module (gnu packages base)
1a51fe27 49 #:use-module (gnu packages texinfo)
136770c9 50 #:use-module (gnu packages check)
6131c43d 51 #:use-module (gnu packages compression)
3bc45449 52 #:use-module (gnu packages docbook)
9c0c77f8 53 #:use-module (gnu packages enchant)
6131c43d 54 #:use-module (gnu packages fontutils)
982b3574 55 #:use-module (gnu packages freedesktop)
3bc45449 56 #:use-module (gnu packages gettext)
6131c43d 57 #:use-module (gnu packages ghostscript)
31b254a3 58 #:use-module (gnu packages gl)
3a08a411 59 #:use-module (gnu packages glib)
95d439b2 60 #:use-module (gnu packages gnome)
a2609b41 61 #:use-module (gnu packages icu4c)
e55354b8 62 #:use-module (gnu packages image)
9b381643 63 #:use-module (gnu packages libffi)
6131c43d 64 #:use-module (gnu packages pdf)
8b79a547 65 #:use-module (gnu packages perl)
6131c43d 66 #:use-module (gnu packages pkg-config)
3bc45449 67 #:use-module (gnu packages pretty-print)
6131c43d 68 #:use-module (gnu packages python)
8e70e6d2 69 #:use-module (gnu packages guile)
37cb3a69 70 #:use-module (gnu packages cups)
8e70e6d2 71 #:use-module (gnu packages xml)
6c0e878e
LC
72 #:use-module (gnu packages xorg)
73 #:use-module (gnu packages xdisorg))
3a08a411
AE
74
75(define-public atk
76 (package
77 (name "atk")
df54e0b3 78 (version "2.24.0")
3a08a411
AE
79 (source (origin
80 (method url-fetch)
3b8e4347 81 (uri (string-append "mirror://gnome/sources/" name "/"
b38e45d8
EB
82 (version-major+minor version) "/"
83 name "-" version ".tar.xz"))
3a08a411
AE
84 (sha256
85 (base32
df54e0b3 86 "0jbs90vacl95mwgvmqsizi1bwx5sw0rz70r9knksfwwch2dalbdv"))))
3a08a411 87 (build-system gnu-build-system)
cd0466eb
SB
88 (outputs '("out" "doc"))
89 (arguments
90 `(#:configure-flags
91 (list (string-append "--with-html-dir="
92 (assoc-ref %outputs "doc")
93 "/share/gtk-doc/html"))))
13a9e291 94 (propagated-inputs `(("glib" ,glib))) ; required by atk.pc
141aed80
LC
95 (native-inputs
96 `(("pkg-config" ,pkg-config)
426adbe8 97 ("glib" ,glib "bin") ; glib-mkenums, etc.
141aed80 98 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
c5cc5006 99 (synopsis "GNOME accessibility toolkit")
3a08a411
AE
100 (description
101 "ATK provides the set of accessibility interfaces that are implemented
35b9e423 102by other toolkits and applications. Using the ATK interfaces, accessibility
3a08a411
AE
103tools have full access to view and control running applications.")
104 (license license:lgpl2.0+)
105 (home-page "https://developer.gnome.org/atk/")))
6131c43d
AE
106
107(define-public cairo
108 (package
109 (name "cairo")
de02edbf 110 (version "1.14.10")
6131c43d
AE
111 (source (origin
112 (method url-fetch)
b3822954 113 (uri (string-append "https://cairographics.org/releases/cairo-"
6131c43d
AE
114 version ".tar.xz"))
115 (sha256
116 (base32
de02edbf 117 "02banr0wxckq62nbhc3mqidfdh2q956i2r7w2hd9bjgjb238g1vy"))
bc118f1a 118 (patches (search-patches "cairo-CVE-2016-9082.patch"))))
6131c43d
AE
119 (build-system gnu-build-system)
120 (propagated-inputs
121 `(("fontconfig" ,fontconfig)
122 ("freetype" ,freetype)
123 ("glib" ,glib)
124 ("libpng" ,libpng)
125 ("libx11" ,libx11)
126 ("libxext" ,libxext)
127 ("libxrender" ,libxrender)
128 ("pixman" ,pixman)))
129 (inputs
130 `(("ghostscript" ,ghostscript)
131 ("libspectre" ,libspectre)
6131c43d 132 ("poppler" ,poppler)
6131c43d
AE
133 ("xextproto" ,xextproto)
134 ("zlib" ,zlib)))
c4c4cc05
JD
135 (native-inputs
136 `(("pkg-config" ,pkg-config)
137 ("python" ,python-wrapper)))
6131c43d 138 (arguments
77888fae
MW
139 `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html
140 #:configure-flags '("--enable-tee"))) ; needed for GNU Icecat
6131c43d
AE
141 (synopsis "2D graphics library")
142 (description
143 "Cairo is a 2D graphics library with support for multiple output devices.
144Currently supported output targets include the X Window System (via both
145Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file
35b9e423 146output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.
6131c43d
AE
147
148Cairo is designed to produce consistent output on all output media while
149taking advantage of display hardware acceleration when available
150eg. through the X Render Extension).
151
152The cairo API provides operations similar to the drawing operators of
35b9e423 153PostScript and PDF. Operations in cairo including stroking and filling cubic
6131c43d 154Bézier splines, transforming and compositing translucent images, and
35b9e423 155antialiased text rendering. All drawing operations can be transformed by any
e881752c 156affine transformation (scale, rotation, shear, etc.).")
6131c43d 157 (license license:lgpl2.1) ; or Mozilla Public License 1.1
b3822954 158 (home-page "https://cairographics.org/")))
a2609b41 159
40b3f523
DC
160(define-public cairo-xcb
161 (package
162 (inherit cairo)
163 (name "cairo-xcb")
164 (inputs
165 `(("mesa" ,mesa)
166 ,@(package-inputs cairo)))
167 (arguments
168 `(#:tests? #f
169 #:configure-flags
170 '("--enable-xlib-xcb" "--enable-gl" "--enable-egl")))
171 (synopsis "2D graphics library (with X11 support)")))
172
a2609b41
AE
173(define-public harfbuzz
174 (package
175 (name "harfbuzz")
7c9b8760 176 (version "1.5.1")
a2609b41 177 (source (origin
fd9b3b43 178 (method url-fetch)
5cc3096c 179 (uri (string-append "https://www.freedesktop.org/software/"
fd9b3b43
SB
180 "harfbuzz/release/harfbuzz-"
181 version ".tar.bz2"))
182 (sha256
183 (base32
7c9b8760 184 "0lbwzif7ndvx1iqzp7wxv6j3ilal6di2vj33cy3bha97mpyqv0sn"))))
a2609b41 185 (build-system gnu-build-system)
0a129f39
SB
186 (outputs '("out"
187 "bin")) ; 160K, only hb-view depend on cairo
a2609b41 188 (inputs
fd9b3b43
SB
189 `(("cairo" ,cairo)))
190 (propagated-inputs
191 ;; There are all in the Requires or Requires.private field of '.pc'.
192 `(("glib" ,glib)
27383915 193 ("graphite2" ,graphite2)
c4c4cc05
JD
194 ("icu4c" ,icu4c)))
195 (native-inputs
a30a0455
SB
196 `(("gobject-introspection" ,gobject-introspection)
197 ("pkg-config" ,pkg-config)
ac462e52 198 ("python" ,python-2))) ; incompatible with Python 3 (print syntax)
27383915 199 (arguments
a30a0455 200 `(#:configure-flags `("--with-graphite2"
eb6afbcd
SB
201 "--with-gobject"
202 ,(string-append
203 "--bindir=" (assoc-ref %outputs "bin") "/bin"))))
35b9e423 204 (synopsis "OpenType text shaping engine")
a2609b41
AE
205 (description
206 "HarfBuzz is an OpenType text shaping engine.")
207 (license (license:x11-style "file://COPYING"
208 "See 'COPYING' in the distribution."))
61320932 209 (home-page "https://www.freedesktop.org/wiki/Software/HarfBuzz/")))
4b9adff9
AE
210
211(define-public pango
212 (package
213 (name "pango")
3b6f8373 214 (version "1.40.12")
4b9adff9
AE
215 (source (origin
216 (method url-fetch)
dca1b58d
FB
217 (uri (string-append "mirror://gnome/sources/pango/"
218 (version-major+minor version) "/"
219 name "-" version ".tar.xz"))
4b9adff9
AE
220 (sha256
221 (base32
3b6f8373 222 "1z0w2vrx3qh3aryfkbfijkcxxr3yjbxc2l4b0yy8rcp2wjlakwbm"))))
4b9adff9 223 (build-system gnu-build-system)
cf2135ff 224 (propagated-inputs
4b9adff9 225 `(("cairo" ,cairo)
4169a4bc
AE
226 ("harfbuzz" ,harfbuzz)))
227 (inputs
9a5acb54
JL
228 `(("zlib" ,zlib)
229
230 ;; Some packages, such as Openbox, expect Pango to be built with the
231 ;; optional libxft support.
232 ("libxft" ,libxft)))
c4c4cc05 233 (native-inputs
141aed80 234 `(("pkg-config" ,pkg-config)
426adbe8 235 ("glib" ,glib "bin") ; glib-mkenums, etc.
141aed80 236 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
4b9adff9
AE
237 (synopsis "GNOME text and font handling library")
238 (description
239 "Pango is the core text and font handling library used in GNOME
35b9e423 240applications. It has extensive support for the different writing systems
4b9adff9
AE
241used throughout the world.")
242 (license license:lgpl2.0+)
243 (home-page "https://developer.gnome.org/pango/")))
527e7961 244
5698b8b8
JD
245(define-public pangox-compat
246 (package
247 (name "pangox-compat")
248 (version "0.0.2")
249 (source (origin
250 (method url-fetch)
b38e45d8
EB
251 (uri (string-append "mirror://gnome/sources/" name "/"
252 (version-major+minor version) "/"
253 name "-" version ".tar.xz"))
5698b8b8
JD
254 (sha256
255 (base32
256 "0ip0ziys6mrqqmz4n71ays0kf5cs1xflj1gfpvs4fgy2nsrr482m"))))
257 (build-system gnu-build-system)
258 (inputs
259 `(("glib" ,glib)
260 ("pango" ,pango)))
261 (native-inputs
262 `(("intltool" ,intltool)
263 ("pkg-config" ,pkg-config)))
264 (home-page "https://developer.gnome.org/pango")
35b9e423 265 (synopsis "Obsolete pango functions")
5698b8b8
JD
266 (description "Pangox was a X backend to pango. It is now obsolete and no
267longer provided by recent pango releases. pangox-compat provides the
268functions which were removed.")
269 (license license:lgpl2.0+)))
270
e926ba71
RW
271(define-public ganv
272 (package
273 (name "ganv")
274 (version "1.4.2")
275 (source (origin
276 (method url-fetch)
277 (uri (string-append "http://download.drobilla.net/ganv-"
ea7f3349 278 version ".tar.bz2"))
e926ba71
RW
279 (sha256
280 (base32
281 "0g7s5mp14qgbfjdql0k1s8464r21g47ssn5dws6jazsnw6njhl0l"))))
282 (build-system waf-build-system)
ea7f3349 283 (arguments
dc1d3cde
KK
284 `(#:phases
285 (modify-phases %standard-phases
286 (add-before 'configure 'set-flags
287 (lambda* (#:key outputs #:allow-other-keys)
288 ;; Compile with C++11, required by gtkmm.
289 (setenv "CXXFLAGS" "-std=c++11")
290 ;; Allow 'bin/ganv_bench' to find libganv-1.so.
291 (setenv "LDFLAGS"
292 (string-append "-Wl,-rpath="
293 (assoc-ref outputs "out") "/lib"))
294 #t)))
ea7f3349 295 #:tests? #f)) ; no check target
e926ba71
RW
296 (inputs
297 `(("gtk" ,gtk+-2)
298 ("gtkmm" ,gtkmm-2)))
299 (native-inputs
300 `(("glib" ,glib "bin") ; for glib-genmarshal, etc.
301 ("pkg-config" ,pkg-config)))
302 (home-page "http://drobilla.net/software/ganv/")
303 (synopsis "GTK+ widget for interactive graph-like environments")
304 (description
305 "Ganv is an interactive GTK+ widget for interactive “boxes and lines” or
306graph-like environments, e.g. modular synths or finite state machine
307diagrams.")
308 (license license:gpl3+)))
95d439b2 309
a9276c12 310(define-public ganv-devel
ab8f4a70 311 (let ((commit "12f7d6b0438c94dd87f773a92eee3453d971846e")
a9276c12
RW
312 (revision "1"))
313 (package
314 (inherit ganv)
315 (name "ganv")
ab8f4a70 316 (version (string-append "1.5.4-" revision "."
a9276c12
RW
317 (string-take commit 9)))
318 (source (origin
319 (method git-fetch)
320 (uri (git-reference
321 (url "http://git.drobilla.net/ganv.git")
322 (commit commit)))
323 (sha256
324 (base32
ab8f4a70 325 "1cr8w02lr6bk9mkxa12j3imq721b2an2yn4bj5wnwmpm91ddn2gi")))))))
a9276c12 326
c900f843 327(define-public gtksourceview-2
95d439b2
JD
328 (package
329 (name "gtksourceview")
330 (version "2.10.5") ; This is the last version which builds against gtk+2
331 (source (origin
332 (method url-fetch)
b38e45d8
EB
333 (uri (string-append "mirror://gnome/sources/" name "/"
334 (version-major+minor version) "/"
335 name "-" version ".tar.bz2"))
95d439b2
JD
336 (sha256
337 (base32
338 "07hrabhpl6n8ajz10s0d960jdwndxs87szxyn428mpxi8cvpg1f5"))))
339 (build-system gnu-build-system)
c4c4cc05 340 (native-inputs
44add1ce 341 `(("intltool" ,intltool)
221ed17a 342 ("glib" ,glib "bin") ; for glib-genmarshal, etc.
bd05ea41
SB
343 ("pkg-config" ,pkg-config)
344 ;; For testing.
345 ("xorg-server" ,xorg-server)
346 ("shared-mime-info" ,shared-mime-info)))
68d85de1
TUBK
347 (propagated-inputs
348 ;; As per the pkg-config file.
bd05ea41
SB
349 `(("gtk" ,gtk+-2)
350 ("libxml2" ,libxml2)))
95d439b2
JD
351 (arguments
352 `(#:phases
353 ;; Unfortunately, some of the tests in "make check" are highly dependent
354 ;; on the environment therefore, some black magic is required.
dc1d3cde
KK
355 (modify-phases %standard-phases
356 (add-before 'check 'start-xserver
357 (lambda* (#:key inputs #:allow-other-keys)
358 (let ((xorg-server (assoc-ref inputs "xorg-server"))
359 (mime (assoc-ref inputs "shared-mime-info")))
95d439b2 360
dc1d3cde
KK
361 ;; There must be a running X server and make check doesn't start one.
362 ;; Therefore we must do it.
363 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
364 (setenv "DISPLAY" ":1")
95d439b2 365
dc1d3cde
KK
366 ;; The .lang files must be found in $XDG_DATA_HOME/gtksourceview-2.0
367 (system "ln -s gtksourceview gtksourceview-2.0")
368 (setenv "XDG_DATA_HOME" (getcwd))
95d439b2 369
dc1d3cde
KK
370 ;; Finally, the mimetypes must be available.
371 (setenv "XDG_DATA_DIRS" (string-append mime "/share/")))
372 #t)))))
95d439b2
JD
373 (synopsis "Widget that extends the standard GTK+ 2.x 'GtkTextView' widget")
374 (description
375 "GtkSourceView is a portable C library that extends the standard GTK+
376framework for multiline text editing with support for configurable syntax
377highlighting, unlimited undo/redo, search and replace, a completion framework,
378printing and other features typical of a source code editor.")
379 (license license:lgpl2.0+)
380 (home-page "https://developer.gnome.org/gtksourceview/")))
381
c900f843
DH
382(define-public gtksourceview
383 (package
384 (name "gtksourceview")
57202f2e 385 (version "3.24.6")
c900f843
DH
386 (source (origin
387 (method url-fetch)
388 (uri (string-append "mirror://gnome/sources/" name "/"
389 (version-major+minor version) "/"
390 name "-" version ".tar.xz"))
391 (sha256
392 (base32
57202f2e 393 "1261fwjpwn3qizmvjns9z3k3a264j3ql5anyvmisfwywpkzbv9ks"))))
c900f843
DH
394 (build-system gnu-build-system)
395 (arguments
396 '(#:phases
397 (modify-phases %standard-phases
398 (add-before
399 'check 'pre-check
400 (lambda* (#:key inputs #:allow-other-keys)
401 (let ((xorg-server (assoc-ref inputs "xorg-server")))
402 ;; Tests require a running X server.
403 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
404 (setenv "DISPLAY" ":1")
405 ;; For the missing /etc/machine-id.
406 (setenv "DBUS_FATAL_WARNINGS" "0")
407 #t))))))
408 (native-inputs
409 `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc.
410 ("intltool" ,intltool)
b3546174 411 ("itstool" ,itstool)
c900f843
DH
412 ("gobject-introspection" ,gobject-introspection)
413 ("pkg-config" ,pkg-config)
414 ("vala" ,vala)
415 ;; For testing.
416 ("xorg-server" ,xorg-server)
417 ("shared-mime-info" ,shared-mime-info)))
418 (propagated-inputs
419 ;; gtksourceview-3.0.pc refers to all these.
420 `(("glib" ,glib)
421 ("gtk+" ,gtk+)
422 ("libxml2" ,libxml2)))
423 (home-page "https://wiki.gnome.org/Projects/GtkSourceView")
424 (synopsis "GNOME source code widget")
425 (description "GtkSourceView is a text widget that extends the standard
426GTK+ text widget GtkTextView. It improves GtkTextView by implementing syntax
427highlighting and other features typical of a source code editor.")
428 (license license:lgpl2.1+)))
429
527e7961
AE
430(define-public gdk-pixbuf
431 (package
432 (name "gdk-pixbuf")
171bcdf7 433 (version "2.36.10")
527e7961
AE
434 (source (origin
435 (method url-fetch)
b38e45d8
EB
436 (uri (string-append "mirror://gnome/sources/" name "/"
437 (version-major+minor version) "/"
438 name "-" version ".tar.xz"))
527e7961
AE
439 (sha256
440 (base32
171bcdf7 441 "1klsjkdbashd8yb8xjsc9ff3bz32n2id5s79nrrmqiw9df4zmxpq"))))
527e7961 442 (build-system gnu-build-system)
48f46dc3 443 (arguments
a63a73dc
SB
444 '(#:configure-flags '("--with-x11")
445 #:phases
446 (modify-phases %standard-phases
447 (add-after
448 'unpack 'disable-failing-tests
449 (lambda _
450 (substitute* "tests/Makefile.in"
fe08b6e1
EF
451 ;; XXX FIXME: This test fails on armhf machines with:
452 ;; SKIP Not enough memory to load bitmap image
453 ;; ERROR: cve-2015-4491 - too few tests run (expected 4, got 2)
a63a73dc
SB
454 (("cve-2015-4491\\$\\(EXEEXT\\) ") "")
455 ;; XXX FIXME: This test fails with:
456 ;; ERROR:pixbuf-jpeg.c:74:test_type9_rotation_exif_tag:
457 ;; assertion failed (error == NULL): Data differ
458 ;; (gdk-pixbuf-error-quark, 0)
459 (("pixbuf-jpeg\\$\\(EXEEXT\\) ") ""))
460 #t)))))
6983ba56
SB
461 (propagated-inputs
462 `(;; Required by gdk-pixbuf-2.0.pc
463 ("glib" ,glib)
464 ("libpng" ,libpng)
465 ;; Used for testing and required at runtime.
466 ("shared-mime-info" ,shared-mime-info)))
1b5758a6
SB
467 (inputs
468 `(("libjpeg" ,libjpeg)
48f46dc3 469 ("libtiff" ,libtiff)
224276ab 470 ("libx11" ,libx11)))
c4c4cc05 471 (native-inputs
141aed80 472 `(("pkg-config" ,pkg-config)
426adbe8 473 ("glib" ,glib "bin") ; glib-mkenums, etc.
b3546174 474 ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
527e7961
AE
475 (synopsis "GNOME image loading and manipulation library")
476 (description
477 "GdkPixbuf is a library for image loading and manipulation developed
478in the GNOME project.")
479 (license license:lgpl2.0+)
480 (home-page "https://developer.gnome.org/gdk-pixbuf/")))
cf2135ff 481
34dc3907
SB
482;; To build gdk-pixbuf with SVG support, we need librsvg, and librsvg depends
483;; on gdk-pixbuf, so this new varibale. Also, librsvg adds 90MiB to the
484;; closure size.
485(define-public gdk-pixbuf+svg
e60d3a55 486 (package (inherit gdk-pixbuf)
34dc3907
SB
487 (name "gdk-pixbuf+svg")
488 (inputs
489 `(("librsvg" ,librsvg)
490 ,@(package-inputs gdk-pixbuf)))
491 (arguments
492 '(#:configure-flags '("--with-x11")
493 #:tests? #f ; tested by the gdk-pixbuf package already
494 #:phases
495 (modify-phases %standard-phases
496 (add-after 'install 'register-svg-loader
497 (lambda* (#:key inputs outputs #:allow-other-keys)
498 (let* ((out (assoc-ref outputs "out"))
499 (librsvg (assoc-ref inputs "librsvg"))
500 (loaders
501 (append
502 (find-files out "^libpixbufloader-.*\\.so$")
503 (find-files librsvg "^libpixbufloader-.*\\.so$")))
504 (gdk-pixbuf-query-loaders
505 (string-append out "/bin/gdk-pixbuf-query-loaders")))
506 (zero? (apply system* `(,gdk-pixbuf-query-loaders
507 "--update-cache" ,@loaders)))))))))
508 (synopsis
509 "GNOME image loading and manipulation library, with SVG support")))
510
f3fb92e5
AE
511(define-public at-spi2-core
512 (package
513 (name "at-spi2-core")
feaf6a14 514 (version "2.24.1")
f3fb92e5
AE
515 (source (origin
516 (method url-fetch)
517 (uri (string-append "mirror://gnome/sources/" name "/"
b38e45d8
EB
518 (version-major+minor version) "/"
519 name "-" version ".tar.xz"))
f3fb92e5
AE
520 (sha256
521 (base32
feaf6a14 522 "0nwvjmd30rgq6d1zznavx0bdfa1xwv3jl8wnkbkwzaipp5jd140y"))))
f3fb92e5 523 (build-system gnu-build-system)
068a53c3 524 (outputs '("out" "doc"))
f3fb92e5 525 (arguments
b19d6805 526 '(#:configure-flags
068a53c3
SB
527 (list (string-append "--with-html-dir="
528 (assoc-ref %outputs "doc")
529 "/share/gtk-doc/html"))
50cc7f41 530 #:phases
af108677 531 (modify-phases %standard-phases
3a4de6b2 532 (replace 'check
af108677
SB
533 ;; Run test-suite under a dbus session.
534 (lambda _
37fe56cf
SB
535 ;; Don't fail on missing '/etc/machine-id'.
536 (setenv "DBUS_FATAL_WARNINGS" "0")
af108677 537 (zero? (system* "dbus-launch" "make" "check")))))))
c6a552da
SB
538 (propagated-inputs
539 ;; atspi-2.pc refers to all these.
540 `(("dbus" ,dbus)
541 ("glib" ,glib)))
542 (inputs
543 `(("libxi" ,libxi)
544 ("libxtst" ,libxtst)))
c4c4cc05 545 (native-inputs
50cc7f41
SB
546 `(("gobject-introspection" ,gobject-introspection)
547 ("intltool" ,intltool)
548 ("pkg-config" ,pkg-config)))
f3fb92e5
AE
549 (synopsis "Assistive Technology Service Provider Interface, core components")
550 (description
551 "The Assistive Technology Service Provider Interface, core components,
552is part of the GNOME accessibility project.")
553 (license license:lgpl2.0+)
554 (home-page "https://projects.gnome.org/accessibility/")))
555
5fda4784
AE
556(define-public at-spi2-atk
557 (package
558 (name "at-spi2-atk")
04881396 559 (version "2.24.1")
5fda4784
AE
560 (source (origin
561 (method url-fetch)
562 (uri (string-append "mirror://gnome/sources/" name "/"
b38e45d8
EB
563 (version-major+minor version) "/"
564 name "-" version ".tar.xz"))
5fda4784
AE
565 (sha256
566 (base32
04881396 567 "0zcmsq7g4jg5dpmfzkyfpa0v6hx4119c4qwkdblzzf3l9yn91p30"))))
5fda4784 568 (build-system gnu-build-system)
5fda4784 569 (arguments
57fcd224
SB
570 '(#:phases
571 (modify-phases %standard-phases
3a4de6b2 572 (replace 'check
57fcd224
SB
573 ;; Run test-suite under a dbus session.
574 (lambda _
5fba12ec 575 (setenv "DBUS_FATAL_WARNINGS" "0")
57fcd224 576 (zero? (system* "dbus-launch" "make" "check")))))))
6967cc3f
SB
577 (propagated-inputs
578 `(("at-spi2-core" ,at-spi2-core))) ; required by atk-bridge-2.0.pc
579 (inputs
580 `(("atk" ,atk)))
c4c4cc05 581 (native-inputs
6967cc3f
SB
582 `(("dbus" ,dbus) ; for testing
583 ("pkg-config" ,pkg-config)))
5fda4784
AE
584 (synopsis "Assistive Technology Service Provider Interface, ATK bindings")
585 (description
586 "The Assistive Technology Service Provider Interface
587is part of the GNOME accessibility project.")
588 (license license:lgpl2.0+)
589 (home-page "https://projects.gnome.org/accessibility/")))
590
8b79a547 591(define-public gtk+-2
cf2135ff
AE
592 (package
593 (name "gtk+")
3de764f7 594 (version "2.24.31")
cf2135ff
AE
595 (source (origin
596 (method url-fetch)
1c8362a8 597 (uri (string-append "mirror://gnome/sources/" name "/"
b38e45d8
EB
598 (version-major+minor version) "/"
599 name "-" version ".tar.xz"))
cf2135ff
AE
600 (sha256
601 (base32
3de764f7 602 "0n26jm09n03nqbd00d2ij63xrby3vik56sk5yj6w1vy768kr5hb8"))
6983ba56 603 (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch"
711670c0 604 "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch"
6983ba56 605 "gtk2-theme-paths.patch"))))
cf2135ff 606 (build-system gnu-build-system)
6b1f2388 607 (outputs '("out" "doc"))
4169a4bc 608 (propagated-inputs
cf2135ff 609 `(("atk" ,atk)
6983ba56 610 ("gdk-pixbuf" ,gdk-pixbuf+svg)
4169a4bc 611 ("pango" ,pango)))
dfbce50c
SB
612 (inputs
613 `(("cups" ,cups)
614 ("libxcomposite" ,libxcomposite)
615 ("libxcursor" ,libxcursor)
616 ("libxdamage" ,libxdamage)
617 ("libxi" ,libxi)
618 ("libxinerama" ,libxinerama)
619 ("libxrandr" ,libxrandr)))
c4c4cc05 620 (native-inputs
1c8362a8 621 `(("perl" ,perl)
b94a6ca0 622 ("gettext" ,gettext-minimal)
426adbe8 623 ("glib" ,glib "bin")
9d297fae 624 ("gobject-introspection" ,gobject-introspection)
1c8362a8
AE
625 ("pkg-config" ,pkg-config)
626 ("python-wrapper" ,python-wrapper)))
cf2135ff 627 (arguments
b19d6805 628 `(#:configure-flags
6b1f2388
SB
629 (list "--with-xinput=yes"
630 (string-append "--with-html-dir="
631 (assoc-ref %outputs "doc")
632 "/share/gtk-doc/html"))
9d297fae 633 #:phases
d4bf49b1
EB
634 (alist-cons-before
635 'configure 'disable-tests
636 (lambda _
637 ;; FIXME: re-enable tests requiring an X server
638 (substitute* "gtk/Makefile.in"
639 (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits .")))
2a6afac9
RW
640 %standard-phases)))
641 (native-search-paths
642 (list (search-path-specification
643 (variable "GUIX_GTK2_PATH")
644 (files '("lib/gtk-2.0")))))
0327ced2 645 (synopsis "Cross-platform toolkit for creating graphical user interfaces")
cf2135ff
AE
646 (description
647 "GTK+, or the GIMP Toolkit, is a multi-platform toolkit for creating
35b9e423 648graphical user interfaces. Offering a complete set of widgets, GTK+ is
cf2135ff
AE
649suitable for projects ranging from small one-off tools to complete
650application suites.")
651 (license license:lgpl2.0+)
652 (home-page "http://www.gtk.org/")))
8e70e6d2 653
8b79a547
AE
654(define-public gtk+
655 (package (inherit gtk+-2)
b38e45d8 656 (name "gtk+")
2d5785ad
MW
657 ;; NOTE: When updating the version of 'gtk+', the hash of 'mate-themes' in
658 ;; mate.scm will also need to be updated.
6345cefa 659 (version "3.22.21")
8b79a547
AE
660 (source (origin
661 (method url-fetch)
b38e45d8
EB
662 (uri (string-append "mirror://gnome/sources/" name "/"
663 (version-major+minor version) "/"
664 name "-" version ".tar.xz"))
8b79a547
AE
665 (sha256
666 (base32
6345cefa 667 "11vb1shgr4rlayfk0b858gz986jsn2mpjlxvr89b2kgvbjlc3lqv"))
234e7980
RW
668 (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
669 "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
7b808d76 670 (outputs '("out" "bin" "doc"))
0e112540 671 (propagated-inputs
8b79a547 672 `(("at-spi2-atk" ,at-spi2-atk)
0e112540 673 ("atk" ,atk)
6983ba56 674 ("gdk-pixbuf" ,gdk-pixbuf+svg)
31b254a3 675 ("libepoxy" ,libepoxy)
a572dca8 676 ("libxcursor" ,libxcursor)
8b79a547
AE
677 ("libxi" ,libxi)
678 ("libxinerama" ,libxinerama)
982b3574 679 ("libxkbcommon" ,libxkbcommon)
9e5c0927 680 ("libxdamage" ,libxdamage)
982b3574
KK
681 ("mesa" ,mesa)
682 ("pango" ,pango)
683 ("wayland" ,wayland)
684 ("wayland-protocols" ,wayland-protocols)))
0e112540 685 (inputs
6983ba56 686 `(("libxml2" ,libxml2)
1cb16f1e
SB
687 ;; XXX: colord depends on mozjs (through polkit), which fails on
688 ;; on non-intel systems now.
689 ;;("colord" ,colord)
a572dca8 690 ("cups" ,cups) ;for printing support
a2651b54
SB
691 ;; XXX: rest depends on p11-kit, which fails on mips64el now.
692 ;;("rest" ,rest)
a572dca8 693 ("json-glib" ,json-glib)))
c4c4cc05 694 (native-inputs
141aed80 695 `(("perl" ,perl)
426adbe8 696 ("glib" ,glib "bin")
b94a6ca0 697 ("gettext" ,gettext-minimal)
8b79a547 698 ("pkg-config" ,pkg-config)
141aed80 699 ("gobject-introspection" ,gobject-introspection)
8b79a547 700 ("python-wrapper" ,python-wrapper)
da79e82b
LF
701 ;; By using a special xorg-server for GTK+'s tests, we reduce the impact
702 ;; of updating xorg-server directly on the master branch.
3433413b 703 ("xorg-server" ,xorg-server-1.19.3)))
8b79a547 704 (arguments
3433413b 705 `(#:disallowed-references (,xorg-server-1.19.3)
da79e82b 706 ;; 47 MiB goes to "out" (24 of which is locale data!), and 26 MiB goes
260b07a7
LC
707 ;; to "doc".
708 #:configure-flags (list (string-append "--with-html-dir="
709 (assoc-ref %outputs "doc")
982b3574
KK
710 "/share/gtk-doc/html")
711 ;; The header file <gdk/gdkwayland.h> is required
712 ;; by gnome-control-center
713 "--enable-wayland-backend"
714 ;; This is necessary to build both backends.
715 "--enable-x11-backend")
e4360e16
JD
716 #:phases (modify-phases %standard-phases
717 (add-before 'configure 'pre-configure
718 (lambda _
719 ;; Disable most tests, failing in the chroot with the message:
720 ;; D-Bus library appears to be incorrectly set up; failed to read
721 ;; machine uuid: Failed to open "/etc/machine-id": No such file or
722 ;; directory.
723 ;; See the manual page for dbus-uuidgen to correct this issue.
724 (substitute* "testsuite/Makefile.in"
725 (("SUBDIRS = gdk gtk a11y css reftests")
726 "SUBDIRS = gdk"))
4c8c2b0f
SB
727 #t))
728 (add-after 'install 'move-desktop-files
729 ;; Move desktop files into 'bin' to avoid cycle references.
730 (lambda* (#:key outputs #:allow-other-keys)
731 (let ((out (assoc-ref outputs "out"))
732 (bin (assoc-ref outputs "bin")))
733 (mkdir-p (string-append bin "/share"))
734 (rename-file (string-append out "/share/applications")
735 (string-append bin "/share/applications"))
736 #t))))))
4828ff91
RW
737 (native-search-paths
738 (list (search-path-specification
739 (variable "GUIX_GTK3_PATH")
740 (files '("lib/gtk-3.0")))))))
5fda4784 741
8e70e6d2
LC
742;;;
743;;; Guile bindings.
744;;;
745
746(define-public guile-cairo
747 (package
748 (name "guile-cairo")
749 (version "1.4.1")
750 (source (origin
b9743865
LC
751 (method url-fetch)
752 (uri (string-append
753 "http://download.gna.org/guile-cairo/guile-cairo-"
754 version
755 ".tar.gz"))
756 (sha256
757 (base32
758 "1f5nd9n46n6cwfl1byjml02q3y2hgn7nkx98km1czgwarxl7ws3x"))))
8e70e6d2
LC
759 (build-system gnu-build-system)
760 (arguments
0f11f640
LC
761 '(#:modules ((guix build utils)
762 (guix build gnu-build-system)
763 (ice-9 popen)
764 (ice-9 rdelim))
765
766 #:phases (modify-phases %standard-phases
b9743865
LC
767 (add-before 'configure 'set-module-directory
768 (lambda* (#:key outputs #:allow-other-keys)
769 ;; Install modules under $out/share/guile/site/2.0.
0f11f640
LC
770 (let ((out (assoc-ref outputs "out"))
771 (effective
772 (read-line
773 (open-pipe* OPEN_READ "guile" "-c"
774 "(display (effective-version))"))))
b9743865
LC
775 (substitute* "Makefile.in"
776 (("scmdir = ([[:graph:]]+).*" _ value)
0f11f640 777 (string-append "scmdir = " value "/" effective "\n")))
b9743865
LC
778 (substitute* "cairo/Makefile.in"
779 (("moduledir = ([[:graph:]]+).*" _ value)
780 (string-append "moduledir = "
0f11f640
LC
781 "$(prefix)/share/guile/site/"
782 effective "/cairo\n'")))
783 #t)))
b9743865
LC
784 (add-after 'install 'install-missing-file
785 (lambda* (#:key outputs #:allow-other-keys)
786 ;; By default 'vector-types.scm' is not installed, so do
787 ;; it here.
0f11f640
LC
788 (let ((out (assoc-ref outputs "out"))
789 (effective
790 (read-line
791 (open-pipe* OPEN_READ "guile" "-c"
792 "(display (effective-version))"))))
793 (install-file "cairo/vector-types.scm"
794 (string-append out "/share/guile/site/"
795 effective "/cairo"))
796 #t))))))
8e70e6d2 797 (inputs
5ace0919 798 `(("guile-lib" ,guile-lib)
8e70e6d2 799 ("expat" ,expat)
1b0f266e 800 ("guile" ,guile-2.2)))
49710cea
LC
801 (propagated-inputs
802 ;; The .pc file refers to 'cairo'.
803 `(("cairo" ,cairo)))
c4c4cc05 804 (native-inputs
b9743865 805 `(("pkg-config" ,pkg-config)))
8e70e6d2
LC
806 (home-page "http://www.nongnu.org/guile-cairo/")
807 (synopsis "Cairo bindings for GNU Guile")
808 (description
809 "Guile-Cairo wraps the Cairo graphics library for Guile Scheme.
810Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API
811stable, providing a firm base on which to do graphics work. Finally, and
812importantly, it is pleasant to use. You get a powerful and well-maintained
813graphics library with all of the benefits of Scheme: memory management,
814exceptions, macros, and a dynamic programming environment.")
815 (license license:lgpl3+)))
66663503 816
1a51fe27 817(define-public guile-rsvg
1b0f266e
LC
818 ;; Use a recent snapshot that supports Guile 2.2 and beyond.
819 (let ((commit "05c6a2fd67e4fea1a7c3ff776729dc931bae6678")
820 (revision "0"))
821 (package
822 (name "guile-rsvg")
823 (version (string-append "2.18.1-" revision "."
824 (string-take commit 7)))
825 (source (origin
826 (method url-fetch)
827 (uri (string-append "https://gitlab.com/wingo/guile-rsvg/"
828 "repository/archive.tar.gz?ref="
829 commit))
830 (sha256
831 (base32
832 "0vdzjx8l5nc4y2xjqs0g1rqn1zrwfsm30brh5gz00r1x41a2pvv2"))
833 (patches (search-patches "guile-rsvg-pkgconfig.patch"))
834 (modules '((guix build utils)))
835 (snippet
836 '(substitute* (find-files "." "Makefile\\.am")
837 (("/share/guile/site")
838 "/share/guile/site/@GUILE_EFFECTIVE_VERSION@")))
839 (file-name (string-append name "-" version ".tar.gz"))))
840 (build-system gnu-build-system)
841 (arguments
842 `(#:phases (modify-phases %standard-phases
d10092b8 843 (add-after 'unpack 'bootstrap
1b0f266e
LC
844 (lambda _
845 (zero? (system* "autoreconf" "-vfi")))))))
846 (native-inputs `(("pkg-config" ,pkg-config)
847 ("autoconf" ,autoconf)
848 ("automake" ,automake)
849 ("libtool" ,libtool)
850 ("texinfo" ,texinfo)))
851 (inputs `(("guile" ,guile-2.2)
852 ("librsvg" ,librsvg)
853 ("guile-lib" ,guile-lib))) ;for (unit-test)
854 (propagated-inputs `(("guile-cairo" ,guile-cairo)))
855 (synopsis "Render SVG images using Cairo from Guile")
856 (description
857 "Guile-RSVG wraps the RSVG library for Guile, allowing you to render SVG
1a51fe27 858images onto Cairo surfaces.")
1b0f266e
LC
859 (home-page "http://wingolog.org/projects/guile-rsvg/")
860 (license license:lgpl2.1+))))
7ca0dbc3 861
cdd383e9
LC
862(define-public guile-present
863 (package
864 (name "guile-present")
865 (version "0.3.0")
866 (source (origin
867 (method url-fetch)
868 (uri (string-append "http://wingolog.org/pub/guile-present/"
869 "guile-present-" version ".tar.gz"))
870 (sha256
871 (base32
872 "1qam447m05sxxv6x8dlzg7qnyfc4dh8apjw1idpfhpns671gfr6m"))
fc1adab1 873 (patches (search-patches "guile-present-coding.patch"))
cdd383e9
LC
874 (modules '((guix build utils)))
875 (snippet
876 '(substitute* "Makefile.in"
877 (("godir = .*$")
878 "godir = $(moddir)\n")))))
879 (build-system gnu-build-system)
880 (arguments
dc1d3cde
KK
881 '(#:phases
882 (modify-phases %standard-phases
883 (add-after 'install 'post-install
884 (lambda* (#:key inputs outputs #:allow-other-keys)
885 (let* ((out (assoc-ref outputs "out"))
886 (bin (string-append out "/bin"))
887 (guile (assoc-ref inputs "guile")))
888 (substitute* (find-files bin ".*")
889 (("guile")
890 (string-append guile "/bin/guile -L "
891 out "/share/guile/site/2.0 -C "
892 out "/share/guile/site/2.0 "))))
893 #t)))))
cdd383e9 894 (native-inputs `(("pkg-config" ,pkg-config)))
1b0f266e 895 (inputs `(("guile" ,guile-2.2)))
cdd383e9
LC
896 (propagated-inputs
897 ;; These are used by the (present …) modules.
5ace0919 898 `(("guile-lib" ,guile-lib)
cdd383e9
LC
899 ("guile-cairo" ,guile-cairo)
900 ("guile-rsvg" ,guile-rsvg)))
901 (home-page "http://wingolog.org/software/guile-present/")
902 (synopsis "Create SVG or PDF presentations in Guile")
903 (description
904 "Guile-Present defines a declarative vocabulary for presentations,
905together with tools to render presentation documents as SVG or PDF.
906Guile-Present can be used to make presentations programmatically, but also
907includes a tools to generate PDF presentations out of Org mode and Texinfo
908documents.")
909 (license license:lgpl3+)))
7ca0dbc3 910
9b381643
PH
911(define-public guile-gnome
912 (package
913 (name "guile-gnome")
1b0f266e 914 (version "2.16.5")
9b381643
PH
915 (source (origin
916 (method url-fetch)
917 (uri
918 (string-append "mirror://gnu/" name
919 "/guile-gnome-platform/guile-gnome-platform-"
920 version ".tar.gz"))
921 (sha256
922 (base32
1b0f266e 923 "1gnf3j96nip5kl99a268i0dy1hj7s1cfs66sps3zwysnkd7qr399"))))
9b381643
PH
924 (build-system gnu-build-system)
925 (native-inputs
926 `(("pkg-config" ,pkg-config)
927 ("atk" ,atk)
928 ;;("corba" ,corba) ; not packaged yet
929 ("gconf" ,gconf)
930 ("gobject-introspection" ,gobject-introspection)
931 ;;("gthread" ,gthread) ; not packaged yet
932 ("gnome-vfs" ,gnome-vfs)
933 ("gdk-pixbuf" ,gdk-pixbuf)
934 ("gtk+" ,gtk+-2)
935 ("libglade" ,libglade)
936 ("libgnome" ,libgnome)
937 ("libgnomecanvas" ,libgnomecanvas)
938 ("libgnomeui" ,libgnomeui)
939 ("pango" ,pango)
940 ("libffi" ,libffi)
941 ("glib" ,glib)))
1b0f266e 942 (inputs `(("guile" ,guile-2.2)))
9b381643
PH
943 (propagated-inputs
944 `(("guile-cairo" ,guile-cairo)
945 ("g-wrap" ,g-wrap)
5ace0919 946 ("guile-lib" ,guile-lib)))
9b381643
PH
947 (arguments
948 `(#:tests? #f ;FIXME
949 #:phases (modify-phases %standard-phases
950 (add-before 'configure 'pre-configure
951 (lambda* (#:key outputs #:allow-other-keys)
952 (let ((out (assoc-ref outputs "out")))
953 (substitute* (find-files "." "^Makefile.in$")
954 (("guilesite :=.*guile/site" all)
1b0f266e 955 (string-append all "/@GUILE_EFFECTIVE_VERSION@")))
9b381643
PH
956 #t))))))
957 (outputs '("out" "debug"))
958 (synopsis "Guile interface for GTK+ programming for GNOME")
959 (description
960 "Includes guile-clutter, guile-gnome-gstreamer,
961guile-gnome-platform (GNOME developer libraries), and guile-gtksourceview.")
6fd52309 962 (home-page "https://www.gnu.org/software/guile-gnome/")
1b0f266e
LC
963 (license license:gpl2+)
964 (properties '((upstream-name . "guile-gnome-platform")
965 (ftp-directory . "/gnu/guile-gnome/guile-gnome-platform")))))
9b381643 966
66663503
LC
967;;;
968;;; C++ bindings.
969;;;
970
971(define-public cairomm
972 (package
973 (name "cairomm")
5a52e86e 974 (version "1.12.2")
66663503 975 (source (origin
2079087c 976 (method url-fetch)
5a52e86e
EF
977 (uri (string-append "https://www.cairographics.org/releases/"
978 name "-" version ".tar.gz"))
2079087c
SB
979 (sha256
980 (base32
5a52e86e 981 "16fmigxsaz85c3lgcls7biwyz8zy8c8h3jndfm54cxxas3a7zi25"))))
66663503
LC
982 (build-system gnu-build-system)
983 (arguments
984 ;; The examples lack -lcairo.
985 '(#:make-flags '("LDFLAGS=-lcairo")))
c4c4cc05 986 (native-inputs `(("pkg-config" ,pkg-config)))
66663503
LC
987 (propagated-inputs
988 `(("libsigc++" ,libsigc++)
989 ("freetype" ,freetype)
990 ("fontconfig" ,fontconfig)
991 ("cairo" ,cairo)))
5a52e86e 992 (home-page "https://cairographics.org/")
66663503
LC
993 (synopsis "C++ bindings to the Cairo 2D graphics library")
994 (description
995 "Cairomm provides a C++ programming interface to the Cairo 2D graphics
996library.")
997 (license license:lgpl2.0+)))
c5cc5006
LC
998
999(define-public pangomm
1000 (package
1001 (name "pangomm")
3086d9b9 1002 (version "2.40.1")
c5cc5006
LC
1003 (source (origin
1004 (method url-fetch)
b38e45d8
EB
1005 (uri (string-append "mirror://gnome/sources/" name "/"
1006 (version-major+minor version) "/"
1007 name "-" version ".tar.xz"))
c5cc5006
LC
1008 (sha256
1009 (base32
3086d9b9 1010 "1bz3gciff23bpw9bqc4v2l3lkq9w7394v3a4jxkvx0ap5lmfwqlp"))))
c5cc5006 1011 (build-system gnu-build-system)
c4c4cc05 1012 (native-inputs `(("pkg-config" ,pkg-config)))
c5cc5006
LC
1013 (propagated-inputs
1014 `(("cairo" ,cairo)
1015 ("cairomm" ,cairomm)
1016 ("glibmm" ,glibmm)
1017 ("pango" ,pango)))
1018 (home-page "http://www.pango.org/")
1019 (synopsis "C++ interface to the Pango text rendering library")
1020 (description
1021 "Pangomm provides a C++ programming interface to the Pango text rendering
1022library.")
1023 (license license:lgpl2.1+)))
1024
1025(define-public atkmm
1026 (package
1027 (name "atkmm")
5b003972 1028 (version "2.24.2")
c5cc5006
LC
1029 (source (origin
1030 (method url-fetch)
b38e45d8
EB
1031 (uri (string-append "mirror://gnome/sources/" name "/"
1032 (version-major+minor version) "/"
1033 name "-" version ".tar.xz"))
c5cc5006
LC
1034 (sha256
1035 (base32
5b003972 1036 "1gaqwhviadsmy0fsr47686yglv1p4mpkamj0in127bz2b5bki5gz"))))
c5cc5006 1037 (build-system gnu-build-system)
c4c4cc05 1038 (native-inputs `(("pkg-config" ,pkg-config)))
c5cc5006
LC
1039 (propagated-inputs
1040 `(("glibmm" ,glibmm) ("atk" ,atk)))
1041 (home-page "http://www.gtkmm.org")
1042 (synopsis "C++ interface to the ATK accessibility library")
1043 (description
1044 "ATKmm provides a C++ programming interface to the ATK accessibility
1045toolkit.")
1046 (license license:lgpl2.1+)))
1047
1048(define-public gtkmm
1049 (package
1050 (name "gtkmm")
b1d6910e 1051 (version "3.22.0")
c5cc5006
LC
1052 (source (origin
1053 (method url-fetch)
b38e45d8
EB
1054 (uri (string-append "mirror://gnome/sources/" name "/"
1055 (version-major+minor version) "/"
1056 name "-" version ".tar.xz"))
c5cc5006
LC
1057 (sha256
1058 (base32
b1d6910e 1059 "1x8l0ny6r3ym53z82q9d5fan4m9vi93xy3b3hj1hrclgc95lvnh5"))))
c5cc5006 1060 (build-system gnu-build-system)
ff5c33fe 1061 (native-inputs `(("pkg-config" ,pkg-config)
ba470833
LC
1062 ("glib" ,glib "bin") ;for 'glib-compile-resources'
1063 ("xorg-server" ,xorg-server)))
c5cc5006
LC
1064 (propagated-inputs
1065 `(("pangomm" ,pangomm)
1066 ("cairomm" ,cairomm)
1067 ("atkmm" ,atkmm)
1068 ("gtk+" ,gtk+)
1069 ("glibmm" ,glibmm)))
ba470833
LC
1070 (arguments
1071 '(#:phases (modify-phases %standard-phases
1072 (add-before 'check 'run-xvfb
1073 (lambda* (#:key inputs #:allow-other-keys)
1074 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1075 ;; Tests such as 'object_move/test' require a running
1076 ;; X server.
1077 (system (string-append xorg-server "/bin/Xvfb :1 &"))
1078 (setenv "DISPLAY" ":1")
1079 ;; Don't fail because of the missing /etc/machine-id.
1080 (setenv "DBUS_FATAL_WARNINGS" "0")
1081 #t))))))
c5cc5006
LC
1082 (home-page "http://gtkmm.org/")
1083 (synopsis
1084 "C++ interface to the GTK+ graphical user interface library")
1085 (description
1086 "gtkmm is the official C++ interface for the popular GUI library GTK+.
1087Highlights include typesafe callbacks, and a comprehensive set of widgets that
1088are easily extensible via inheritance. You can create user interfaces either
1089in code or with the Glade User Interface designer, using libglademm. There's
1090extensive documentation, including API reference and a tutorial.")
1091 (license license:lgpl2.1+)))
9c086443
JD
1092
1093
1094(define-public gtkmm-2
1095 (package (inherit gtkmm)
b38e45d8 1096 (name "gtkmm")
124596f2 1097 (version "2.24.5")
9c086443
JD
1098 (source (origin
1099 (method url-fetch)
b38e45d8
EB
1100 (uri (string-append "mirror://gnome/sources/" name "/"
1101 (version-major+minor version) "/"
1102 name "-" version ".tar.xz"))
9c086443
JD
1103 (sha256
1104 (base32
124596f2 1105 "0wkbzvsx4kgw16f6xjdc1dz7f77ldngdila4yi5lw2zrgcxsb006"))))
3ad29c9e
SB
1106 (arguments
1107 '(#:configure-flags '("CPPFLAGS=-std=c++11"))) ; required by libsigc++
ff5c33fe 1108 (native-inputs `(("pkg-config" ,pkg-config)))
9c086443
JD
1109 (propagated-inputs
1110 `(("pangomm" ,pangomm)
1111 ("cairomm" ,cairomm)
1112 ("atkmm" ,atkmm)
1113 ("gtk+" ,gtk+-2)
1114 ("glibmm" ,glibmm)))))
fbcfa730
EB
1115
1116(define-public python-pycairo
1117 (package
1118 (name "python-pycairo")
1119 (version "1.10.0")
1120 (source
1121 (origin
1122 (method url-fetch)
1123 (uri (string-append "http://cairographics.org/releases/pycairo-"
1124 version ".tar.bz2"))
1125 (sha256
1126 (base32
b837e658 1127 "1gjkf8x6hyx1skq3hhwcbvwifxvrf9qxis5vx8x5igmmgs70g94s"))
fc1adab1 1128 (patches (search-patches "pycairo-wscript.patch"))))
b837e658 1129 (build-system waf-build-system)
fbcfa730 1130 (native-inputs
b837e658
SB
1131 `(("pkg-config" ,pkg-config)
1132 ("python-waf" ,python-waf)))
fbcfa730
EB
1133 (propagated-inputs ;pycairo.pc references cairo
1134 `(("cairo" ,cairo)))
1135 (arguments
1136 `(#:tests? #f
b837e658
SB
1137 #:phases
1138 (modify-phases %standard-phases
1139 (add-before
1140 'configure 'patch-waf
1141 (lambda* (#:key inputs #:allow-other-keys)
1142 ;; The bundled `waf' doesn't work with python-3.4.x.
1143 (copy-file (assoc-ref %build-inputs "python-waf") "./waf"))))))
fbcfa730
EB
1144 (home-page "http://cairographics.org/pycairo/")
1145 (synopsis "Python bindings for cairo")
1146 (description
1147 "Pycairo is a set of Python bindings for the Cairo graphics library.")
7ec42f1d
LC
1148 (license license:lgpl3+)
1149 (properties `((python2-variant . ,(delay python2-pycairo))))))
fbcfa730 1150
7ca0dbc3 1151(define-public python2-pycairo
7ec42f1d 1152 (package (inherit (strip-python2-variant python-pycairo))
7ca0dbc3 1153 (name "python2-pycairo")
fbcfa730
EB
1154 (version "1.10.0")
1155 (source
1156 (origin
1157 (method url-fetch)
1158 (uri (string-append "http://cairographics.org/releases/py2cairo-"
1159 version ".tar.bz2"))
1160 (sha256
1161 (base32
1162 "0cblk919wh6w0pgb45zf48xwxykfif16qk264yga7h9fdkq3j16k"))))
1163 (arguments
1164 `(#:python ,python-2
b837e658
SB
1165 ,@(substitute-keyword-arguments (package-arguments python-pycairo)
1166 ((#:phases phases)
dc1d3cde 1167 `(modify-phases ,phases (delete 'patch-waf)))
b837e658
SB
1168 ((#:native-inputs native-inputs)
1169 `(alist-delete "python-waf" ,native-inputs)))))
fbcfa730 1170 ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1
0d6a8339 1171 (license (list license:lgpl2.1 license:mpl1.1))))
fbcfa730
EB
1172
1173(define-public python2-pygtk
1174 (package
1175 (name "python2-pygtk")
1176 (version "2.24.0")
1177 (source
1178 (origin
1179 (method url-fetch)
966a543b 1180 (uri (string-append "mirror://gnome/sources"
fbcfa730
EB
1181 "/pygtk/" (version-major+minor version)
1182 "/pygtk-" version ".tar.bz2"))
1183 (sha256
1184 (base32
1185 "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"))))
1186 (build-system gnu-build-system)
594e7b47
LC
1187 (outputs '("out"
1188 "doc")) ;13 MiB of gtk-doc HTML
fbcfa730
EB
1189 (native-inputs
1190 `(("pkg-config" ,pkg-config)))
1191 (inputs
1192 `(("python" ,python-2)
6ab4712d 1193 ("libglade" ,libglade)
fbcfa730
EB
1194 ("glib" ,glib)))
1195 (propagated-inputs
7ca0dbc3 1196 `(("python-pycairo" ,python2-pycairo) ;loaded at runtime
fbcfa730
EB
1197 ("python-pygobject" ,python2-pygobject-2) ;referenced in pc file
1198 ("gtk+" ,gtk+-2)))
1199 (arguments
1200 `(#:tests? #f
ae115bc7 1201 #:phases (modify-phases %standard-phases
594e7b47
LC
1202 (add-before 'configure 'set-gtk-doc-directory
1203 (lambda* (#:key outputs #:allow-other-keys)
1204 ;; Install documentation to "doc".
1205 (let ((doc (assoc-ref outputs "doc")))
1206 (substitute* "docs/Makefile.in"
1207 (("TARGET_DIR = \\$\\(datadir\\)")
1208 (string-append "TARGET_DIR = " doc))))))
ae115bc7
LC
1209 (add-after 'configure 'fix-codegen
1210 (lambda* (#:key inputs #:allow-other-keys)
1211 (substitute* "pygtk-codegen-2.0"
1212 (("^prefix=.*$")
1213 (string-append
1214 "prefix="
1215 (assoc-ref inputs "python-pygobject") "\n")))))
1216 (add-after 'install 'install-pth
1217 (lambda* (#:key inputs outputs #:allow-other-keys)
1218 ;; pygtk's modules are stored in a subdirectory of
1219 ;; python's site-packages directory. Add a .pth file so
1220 ;; that python will add that subdirectory to its module
1221 ;; search path.
1222 (let* ((out (assoc-ref outputs "out"))
1223 (site (string-append out "/lib/python"
1224 ,(version-major+minor
1225 (package-version python-2))
1226 "/site-packages")))
1227 (call-with-output-file (string-append site "/pygtk.pth")
1228 (lambda (port)
1229 (format port "gtk-2.0~%")))))))))
fbcfa730
EB
1230 (home-page "http://www.pygtk.org/")
1231 (synopsis "Python bindings for GTK+")
1232 (description
1233 "PyGTK allows you to write full featured GTK programs in Python. It is
d1e4ad1b 1234targeted at GTK 2.x, and can be used in conjunction with gnome-python to
fbcfa730
EB
1235write GNOME applications.")
1236 (license license:lgpl2.1+)))
136770c9
PW
1237
1238(define-public girara
1239 (package
1240 (name "girara")
bf38d5be 1241 (version "0.2.8")
136770c9
PW
1242 (source (origin
1243 (method url-fetch)
1244 (uri
1245 (string-append "https://pwmt.org/projects/girara/download/girara-"
1246 version ".tar.gz"))
1247 (sha256
1248 (base32
bf38d5be 1249 "18wss3sak3djip090v2vdbvq1mvkwcspfswc87zbvv3magihan98"))))
136770c9 1250 (native-inputs `(("pkg-config" ,pkg-config)
b82d5b09 1251 ("check" ,check)
bf38d5be 1252 ("gettext" ,gettext-minimal)
7d24c26e
MB
1253 ("glib:bin" ,glib "bin")
1254 ("xorg-server" ,xorg-server)))
b82d5b09
MB
1255 ;; Listed in 'Requires.private' of 'girara.pc'.
1256 (propagated-inputs `(("gtk+" ,gtk+)))
136770c9
PW
1257 (arguments
1258 `(#:make-flags
1259 `(,(string-append "PREFIX=" (assoc-ref %outputs "out"))
1260 "COLOR=0" "CC=gcc")
1261 #:test-target "test"
7d24c26e
MB
1262 #:phases (modify-phases %standard-phases
1263 (delete 'configure)
1264 (add-before 'check 'start-xserver
1265 ;; Tests require a running X server.
1266 (lambda* (#:key inputs #:allow-other-keys)
1267 (let ((xorg-server (assoc-ref inputs "xorg-server"))
1268 (display ":1"))
1269 (setenv "DISPLAY" display)
1270 ;; Don't fail due to missing '/etc/machine-id'.
1271 (setenv "DBUS_FATAL_WARNINGS" "0")
1272 (zero? (system (string-append xorg-server "/bin/Xvfb "
1273 display " &")))))))))
136770c9
PW
1274 (build-system gnu-build-system)
1275 (home-page "https://pwmt.org/projects/girara/")
1276 (synopsis "Library for minimalistic gtk+3 user interfaces")
1277 (description "Girara is a library that implements a user interface that
1278focuses on simplicity and minimalism. Currently based on GTK+, a
1279cross-platform widget toolkit, it provides an interface that focuses on three
1280main components: a so-called view widget that represents the actual
1281application, an input bar that is used to execute commands of the
1282application and the status bar which provides the user with current
1283information.")
1284 (license license:zlib)))
3bc45449
AW
1285
1286(define-public gtk-doc
1287 (package
1288 (name "gtk-doc")
9d19e18d 1289 (version "1.25")
3bc45449
AW
1290 (source (origin
1291 (method url-fetch)
1292 (uri (string-append "mirror://gnome/sources/" name "/"
1293 (version-major+minor version) "/"
1294 name "-" version ".tar.xz"))
1295 (sha256
1296 (base32
9d19e18d 1297 "0hpxcij9xx9ny3gs9p0iz4r8zslw8wqymbyababiyl7603a6x90y"))))
3bc45449
AW
1298 (build-system gnu-build-system)
1299 (arguments
6ad08117
AE
1300 `(#:parallel-tests? #f
1301 #:phases
b4787e71 1302 (modify-phases %standard-phases
a20608a5
RW
1303 (add-before 'build 'set-HOME
1304 (lambda _
1305 ;; FIXME: dblatex with texlive-union does not find the built
1306 ;; metafonts, so it tries to generate them in HOME.
1307 (setenv "HOME" "/tmp")
1308 #t))
1309 (add-before 'configure 'fix-docbook
b4787e71
AW
1310 (lambda* (#:key inputs #:allow-other-keys)
1311 (substitute* "configure"
1312 ;; The configure check is overzealous about making sure that
1313 ;; things are in place -- it uses the xmlcatalog tool to make
1314 ;; sure that docbook-xsl is available, but this tool can only
1315 ;; look in one catalog file, unlike the $XML_CATALOG_FILES
1316 ;; variable that Guix defines. Fool the test by using the
1317 ;; docbook-xsl catalog explicitly and get on with life.
1318 (("\"\\$XML_CATALOG_FILE\" \
1319\"http://docbook.sourceforge.net/release/xsl/")
4ed737b2
MW
1320 (string-append (car (find-files (assoc-ref inputs "docbook-xsl")
1321 "^catalog.xml$"))
1322 " \"http://docbook.sourceforge.net/release/xsl/")))
1323 #t)))
b4787e71 1324 #:configure-flags
3bc45449
AW
1325 (list (string-append "--with-xml-catalog="
1326 (assoc-ref %build-inputs "docbook-xml")
1327 "/xml/dtd/docbook/catalog.xml"))))
1328 (native-inputs
1329 `(("pkg-config" ,pkg-config)
1330 ("itstool" ,itstool)
1331 ("libxml" ,libxml2)
b94a6ca0 1332 ("gettext" ,gettext-minimal)
3bc45449
AW
1333 ("bc" ,bc)))
1334 (inputs
1335 `(("perl" ,perl)
1336 ("python" ,python)
1337 ("xsltproc" ,libxslt)
1338 ("dblatex" ,dblatex)
1339 ("docbook-xml" ,docbook-xml-4.3)
1340 ("docbook-xsl" ,docbook-xsl)
1341 ("source-highlight" ,source-highlight)
1342 ("glib" ,glib)))
1343 (home-page "http://www.gtk.org/gtk-doc/")
1344 (synopsis "Documentation generator from C source code")
1345 (description
a124bbd2 1346 "GTK-Doc generates API documentation from comments added to C code. It is
3bc45449
AW
1347typically used to document the public API of GTK+ and GNOME libraries, but it
1348can also be used to document application code.")
1349 (license license:gpl2+)))
9ba5198c
FH
1350
1351(define-public gtk-engines
1352 (package
1353 (name "gtk-engines")
1354 (version "2.20.2")
1355 (source (origin
1356 (method url-fetch)
1357 (uri (string-append "mirror://gnome/sources/" name "/"
1358 (version-major+minor version) "/"
1359 name "-" version ".tar.bz2"))
1360 (sha256
1361 (base32
1362 "1db65pb0j0mijmswrvpgkdabilqd23x22d95hp5kwxvcramq1dhm"))))
1363 (build-system gnu-build-system)
1364 (arguments
1365 `(#:configure-flags
1366 `("--enable-animation")))
1367 (native-inputs
1368 `(("pkg-config" ,pkg-config)
1369 ("intltool" ,intltool)))
9fff9e64
SB
1370 (inputs
1371 ;; Don't propagate GTK+ to reduce "profile pollution".
9ba5198c 1372 `(("gtk+" ,gtk+-2))) ; required by gtk-engines-2.pc
f032d0be 1373 (home-page "https://live.gnome.org/GnomeArt")
9ba5198c
FH
1374 (synopsis "Theming engines for GTK+ 2.x")
1375 (description
1376 "This package contains the standard GTK+ 2.x theming engines including
1377Clearlooks, Crux, High Contrast, Industrial, LighthouseBlue, Metal, Mist,
1378Redmond95 and ThinIce.")
1379 (license (list license:gpl2+ license:lgpl2.1+))))
b7807bb2
FH
1380
1381(define-public murrine
1382 (package
1383 (name "murrine")
1384 (version "0.98.2")
1385 (source (origin
1386 (method url-fetch)
1387 (uri (string-append "mirror://gnome/sources/" name "/"
1388 (version-major+minor version) "/"
1389 name "-" version ".tar.xz"))
1390 (sha256
1391 (base32
1392 "129cs5bqw23i76h3nmc29c9mqkm9460iwc8vkl7hs4xr07h8mip9"))))
1393 (build-system gnu-build-system)
1394 (arguments
1395 `(#:configure-flags
1396 `("--enable-animation"
1397 "--enable-animationrtl")))
1398 (native-inputs
1399 `(("pkg-config" ,pkg-config)
1400 ("intltool" ,intltool)))
1401 (propagated-inputs
1402 `(("gtk+" ,gtk+-2)))
f032d0be 1403 (home-page "https://live.gnome.org/GnomeArt")
b7807bb2
FH
1404 (synopsis "Cairo-based theming engine for GTK+ 2.x")
1405 (description
1406 "Murrine is a cairo-based GTK+ theming engine. It is named after the
1407glass artworks done by Venicians glass blowers.")
1408 (license license:gpl2+)))
9c0c77f8
KY
1409
1410(define-public gtkspell3
1411 (package
1412 (name "gtkspell3")
3be65cde 1413 (version "3.0.9")
9c0c77f8
KY
1414 (source (origin
1415 (method url-fetch)
1416 (uri (string-append "mirror://sourceforge/gtkspell/"
3be65cde 1417 version "/" name "-" version ".tar.xz"))
9c0c77f8
KY
1418 (sha256
1419 (base32
3be65cde 1420 "09jdicmpipmj4v84gnkqwbmj4lh8v0i6pn967rb9jx4zg2ia9x54"))))
9c0c77f8
KY
1421 (build-system gnu-build-system)
1422 (native-inputs
1423 `(("intltool" ,intltool)
1424 ("pkg-config" ,pkg-config)))
1425 (inputs
1426 `(("enchant" ,enchant)
1427 ("gobject-introspection" ,gobject-introspection)
1428 ("gtk+" ,gtk+)
1429 ("pango" ,pango)))
1430 (home-page "http://gtkspell.sourceforge.net")
1431 (synopsis "Spell-checking addon for GTK's TextView widget")
1432 (description
1433 "GtkSpell provides word-processor-style highlighting and replacement of
1434misspelled words in a GtkTextView widget.")
1435 (license license:gpl2+)))
37355498 1436
1437(define-public clipit
1438 (package
1439 (name "clipit")
1440 (version "1.4.2")
1441 (source (origin
1442 (method url-fetch)
1443 (uri (string-append
1444 "https://github.com/downloads/ClipIt/clipit-"
1445 version ".tar.gz"))
1446 (sha256
1447 (base32
1448 "0jrwn8qfgb15rwspdp1p8hb1nc0ngmpvgr87d4k3lhlvqg2cfqva"))))
1449 (build-system gnu-build-system)
1450 (native-inputs
1451 `(("intltool" ,intltool)
1452 ("pkg-config" ,pkg-config)))
1453 (inputs
1454 `(("gtk+" ,gtk+-2)))
1455 (home-page "https://github.com/CristianHenzel/ClipIt")
1456 (synopsis "Lightweight GTK+ clipboard manager")
1457 (description
1458 "ClipIt is a clipboard manager with features such as a history, search
1459thereof, global hotkeys and clipboard item actions. It was forked from
1460Parcellite and adds bugfixes and features.")
1461 (license license:gpl2+)))
61af2675
RJ
1462
1463(define-public graphene
1464 (package
1465 (name "graphene")
1466 (version "1.6.0")
1467 (source (origin
1468 (method url-fetch)
1469 (uri (string-append
1470 "https://github.com/ebassi/graphene/archive/"
1471 version ".tar.gz"))
1472 (file-name (string-append name "-" version ".tar.gz"))
1473 (sha256
1474 (base32 "1zd2daj7y590wnzn4jw0niyc4fnzgxrcl9i7nwhy8b25ks2hz5wq"))))
1475 (build-system gnu-build-system)
1476 (arguments
1477 `(#:configure-flags '("--enable-introspection=yes")
1478 #:phases
1479 (modify-phases %standard-phases
1480 (add-before 'configure 'autogen
1481 (lambda _
1482 (zero? (system* "./autogen.sh")))))))
1483 (native-inputs
1484 `(("autoconf" ,autoconf)
1485 ("which" ,which)
1486 ("pkg-config" ,pkg-config)
1487 ("automake" ,automake)
1488 ("libtool" ,libtool)))
1489 (inputs
1490 `(("python" ,python)
1491 ("python-2" ,python-2)
1492 ("glib" ,glib)
1493 ("gobject-introspection" ,gobject-introspection)))
1494 (home-page "http://ebassi.github.io/graphene")
1495 (synopsis "Thin layer of graphic data types")
1496 (description "This library provides graphic types and their relative API;
1497it does not deal with windowing system surfaces, drawing, scene graphs, or
1498input.")
1499 (license license:expat)))