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