gnu: Add wpebackend-fdo.
[jackhill/guix/guix.git] / gnu / packages / glib.scm
CommitLineData
3889a82e 1;;; GNU Guix --- Functional package management for GNU
df09e1d6 2;;; Copyright © 2013, 2014, 2015, 2016, 2019 Ludovic Courtès <ludo@gnu.org>
7873318d 3;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
d6b8cb5c 4;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
95346874 5;;; Copyright © 2014, 2015, 2016, 2017, 2018 Mark H Weaver <mhw@netris.org>
22b0caa3 6;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
89eb7581 7;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
3b3046db 8;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
a372c4da 9;;; Copyright © 2017 Petter <petter@mykolab.ch>
93394133 10;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
451f6e30 11;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
19d0554f 12;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
3889a82e
NK
13;;;
14;;; This file is part of GNU Guix.
15;;;
16;;; GNU Guix is free software; you can redistribute it and/or modify it
17;;; under the terms of the GNU General Public License as published by
18;;; the Free Software Foundation; either version 3 of the License, or (at
19;;; your option) any later version.
20;;;
21;;; GNU Guix is distributed in the hope that it will be useful, but
22;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24;;; GNU General Public License for more details.
25;;;
26;;; You should have received a copy of the GNU General Public License
27;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28
943f33a3 29(define-module (gnu packages glib)
943f33a3 30 #:use-module (gnu packages)
7b83b695 31 #:use-module (gnu packages backup)
08a1e906
TGR
32 #:use-module (gnu packages base)
33 #:use-module (gnu packages bash)
9ceb630c 34 #:use-module (gnu packages bison)
59f6dfe5 35 #:use-module (gnu packages check)
943f33a3 36 #:use-module (gnu packages compression)
89eb7581 37 #:use-module (gnu packages enlightenment)
08a1e906 38 #:use-module (gnu packages file)
9ceb630c 39 #:use-module (gnu packages flex)
1dba6407 40 #:use-module (gnu packages gettext)
c73d4c59 41 #:use-module (gnu packages gnome)
318bc429 42 #:use-module (gnu packages gperf)
9ceb630c 43 #:use-module (gnu packages gtk)
943f33a3 44 #:use-module (gnu packages libffi)
2b95aed4 45 #:use-module (gnu packages linux)
08a1e906 46 #:use-module (gnu packages m4)
7b83b695 47 #:use-module (gnu packages nettle)
6983ba56 48 #:use-module (gnu packages pcre)
318bc429 49 #:use-module (gnu packages package-management)
d6b8cb5c 50 #:use-module (gnu packages perl)
5ccde207 51 #:use-module (gnu packages perl-check)
943f33a3
LC
52 #:use-module (gnu packages pkg-config)
53 #:use-module (gnu packages python)
318bc429 54 #:use-module (gnu packages web)
7bc5cc2b 55 #:use-module (gnu packages xml)
80370441 56 #:use-module (gnu packages xorg)
08a1e906 57 #:use-module (guix build-system gnu)
318bc429 58 #:use-module (guix build-system meson)
08a1e906
TGR
59 #:use-module (guix build-system perl)
60 #:use-module (guix build-system python)
61 #:use-module (guix download)
62 #:use-module ((guix licenses) #:prefix license:)
63 #:use-module (guix packages)
64 #:use-module (guix utils)
943f33a3 65
80370441
LC
66 ;; Export variables up-front to allow circular dependency with the 'xorg'
67 ;; module.
68 #:export (dbus
69 glib
6ac6a6b9 70 gobject-introspection
80370441
LC
71 dbus-glib
72 intltool
a5a7d374
LC
73 itstool
74 libsigc++
7873318d 75 glibmm
a372c4da 76 telepathy-glib
fc4083c5
P
77 perl-net-dbus
78 perl-net-dbus-glib))
80370441
LC
79
80(define dbus
943f33a3
LC
81 (package
82 (name "dbus")
7ede9a5e 83 (version "1.12.12")
377bd155 84 (replacement dbus/fixed)
943f33a3 85 (source (origin
25087f60
SB
86 (method url-fetch)
87 (uri (string-append
7fb51d97 88 "https://dbus.freedesktop.org/releases/dbus/dbus-"
25087f60
SB
89 version ".tar.gz"))
90 (sha256
91 (base32
7ede9a5e 92 "1y7mxhkw2shd9mi9s62k81lz8npjkrafapr4fyfms7hs04kg4ilm"))
fc1adab1 93 (patches (search-patches "dbus-helper-search-path.patch"))))
943f33a3 94 (build-system gnu-build-system)
8eaa8a3b 95 (arguments
25087f60
SB
96 '(#:configure-flags
97 (list
98 ;; Install the system bus socket under /var.
99 "--localstatedir=/var"
8eaa8a3b 100
25087f60
SB
101 ;; Install the session bus socket under /tmp.
102 "--with-session-socket-dir=/tmp"
8eaa8a3b 103
25087f60
SB
104 ;; Use /etc/dbus-1 for system-wide config.
105 ;; Look for configuration file under
106 ;; /etc/dbus-1. This is notably required by
107 ;; 'dbus-daemon-launch-helper', which looks for
108 ;; the 'system.conf' file in that place,
109 ;; regardless of what '--config-file' was
110 ;; passed to 'dbus-daemon' on the command line;
111 ;; see <https://bugs.freedesktop.org/show_bug.cgi?id=92458>.
112 "--sysconfdir=/etc")
113 #:phases
114 (modify-phases %standard-phases
115 (replace 'install
116 (lambda _
117 ;; Don't try to create /var and /etc.
d009c44a
MW
118 (invoke "make"
119 "localstatedir=/tmp/dummy"
120 "sysconfdir=/tmp/dummy"
121 "install"))))))
708be46b
LC
122 (native-inputs
123 `(("pkg-config" ,pkg-config)))
943f33a3 124 (inputs
d6b8cb5c 125 `(("expat" ,expat)
80370441
LC
126
127 ;; Add a dependency on libx11 so that 'dbus-launch' has support for
128 ;; '--autolaunch'.
129 ("libx11" ,libx11)))
130
57e7d748 131 (home-page "https://www.freedesktop.org/wiki/Software/dbus/")
943f33a3
LC
132 (synopsis "Message bus for inter-process communication (IPC)")
133 (description
134 "D-Bus is a message bus system, a simple way for applications to
35b9e423 135talk to one another. In addition to interprocess communication, D-Bus
943f33a3
LC
136helps coordinate process lifecycle; it makes it simple and reliable to
137code a \"single instance\" application or daemon, and to launch
138applications and daemons on demand when their services are needed.
139
140D-Bus supplies both a system daemon (for events such as \"new hardware
141device added\" or \"printer queue changed\") and a
142per-user-login-session daemon (for general IPC needs among user
35b9e423 143applications). Also, the message bus is built on top of a general
943f33a3
LC
144one-to-one message passing framework, which can be used by any two apps
145to communicate directly (without going through the message bus
35b9e423 146daemon). Currently the communicating applications are on one computer,
943f33a3
LC
147or through unencrypted TCP/IP suitable for use behind a firewall with
148shared NFS home directories.")
d6b8cb5c 149 (license license:gpl2+))) ; or Academic Free License 2.1
3889a82e 150
377bd155
MB
151(define dbus/fixed
152 (package
153 (inherit dbus)
154 (source (origin
155 (inherit (package-source dbus))
156 (patches (append (search-patches "dbus-CVE-2019-12749.patch")
157 (origin-patches (package-source dbus))))))))
158
80370441 159(define glib
3889a82e
NK
160 (package
161 (name "glib")
51c40a06 162 (version "2.56.3")
3889a82e
NK
163 (source (origin
164 (method url-fetch)
785db4d8 165 (uri (string-append "mirror://gnome/sources/"
d274f499 166 name "/" (string-take version 4) "/"
943f33a3 167 name "-" version ".tar.xz"))
3889a82e 168 (sha256
f47f6761 169 (base32
51c40a06 170 "1cjcqz77m62zrx7224vl3f2cxwqf28r5xpqb2jy7av0vr2scb959"))
2f437b22 171 (patches (search-patches "glib-tests-timer.patch"))))
3889a82e 172 (build-system gnu-build-system)
426adbe8
LC
173 (outputs '("out" ; everything
174 "bin" ; glib-mkenums, gtester, etc.; depends on Python
175 "doc")) ; 20 MiB of GTK-Doc reference
6983ba56
SB
176 (propagated-inputs
177 `(("pcre" ,pcre))) ; in the Requires.private field of glib-2.0.pc
3889a82e
NK
178 (inputs
179 `(("coreutils" ,coreutils)
2b95aed4 180 ("util-linux" ,util-linux) ; for libmount
3889a82e 181 ("libffi" ,libffi)
3ffaec13 182 ("zlib" ,zlib)))
c4c4cc05 183 (native-inputs
b94a6ca0 184 `(("gettext" ,gettext-minimal)
c4c4cc05 185 ("dbus" ,dbus) ; for GDBus tests
3889a82e 186 ("pkg-config" ,pkg-config)
ee3e314b 187 ("python" ,python-wrapper)
943f33a3 188 ("perl" ,perl) ; needed by GIO tests
3ffaec13 189 ("bash" ,bash)
f9c3bd2e 190 ("tzdata" ,tzdata-for-tests))) ; for tests/gdatetime.c
943f33a3 191 (arguments
f9c3bd2e 192 `(#:disallowed-references (,tzdata-for-tests)
3ffaec13 193 #:phases
6983ba56
SB
194 (modify-phases %standard-phases
195 (add-before 'build 'pre-build
196 (lambda* (#:key inputs outputs #:allow-other-keys)
197 ;; For tests/gdatetime.c.
198 (setenv "TZDIR"
199 (string-append (assoc-ref inputs "tzdata")
200 "/share/zoneinfo"))
201
202 ;; Some tests want write access there.
203 (setenv "HOME" (getcwd))
204 (setenv "XDG_CACHE_HOME" (getcwd))
205
206 (substitute* '("glib/gspawn.c"
207 "glib/tests/utils.c"
208 "tests/spawn-test.c")
209 (("/bin/sh")
81f6bf2d
MW
210 (string-append (assoc-ref inputs "bash") "/bin/sh")))
211 #t))
6983ba56
SB
212 (add-before 'check 'disable-failing-tests
213 (lambda _
214 (let ((disable
215 (lambda (test-file test-paths)
216 (define pattern+procs
217 (map (lambda (test-path)
218 (cons
219 ;; XXX: only works for single line statements.
220 (format #f "g_test_add_func.*\"~a\".*" test-path)
221 (const "")))
222 test-paths))
223 (substitute test-file pattern+procs)))
224 (failing-tests
225 '(("glib/tests/thread.c"
226 (;; prlimit(2) returns ENOSYS on Linux 2.6.32-5-xen-amd64
227 ;; as found on hydra.gnu.org, and strace(1) doesn't
228 ;; recognize it.
229 "/thread/thread4"))
230
231 ("glib/tests/timer.c"
232 (;; fails if compiler optimizations are enabled, which they
233 ;; are by default.
234 "/timer/stop"))
235
236 ("gio/tests/gapplication.c"
237 (;; XXX: proven to be unreliable. See:
238 ;; <https://bugs.debian.org/756273>
239 ;; <http://bugs.gnu.org/18445>
240 "/gapplication/quit"
241
242 ;; XXX: fails randomly for unknown reason. See:
243 ;; <https://lists.gnu.org/archive/html/guix-devel/2016-04/msg00215.html>
244 "/gapplication/local-actions"))
245
246 ("gio/tests/contenttype.c"
247 (;; XXX: requires shared-mime-info.
248 "/contenttype/guess"
2f437b22 249 "/contenttype/guess_svg_from_data"
6983ba56
SB
250 "/contenttype/subtype"
251 "/contenttype/list"
252 "/contenttype/icon"
253 "/contenttype/symbolic-icon"
254 "/contenttype/tree"))
255
256 ("gio/tests/appinfo.c"
257 (;; XXX: requires update-desktop-database.
258 "/appinfo/associations"))
259
260 ("gio/tests/desktop-app-info.c"
261 (;; XXX: requires update-desktop-database.
262 "/desktop-app-info/delete"
263 "/desktop-app-info/default"
264 "/desktop-app-info/fallback"
265 "/desktop-app-info/lastused"
266 "/desktop-app-info/search"))
267
268 ("gio/tests/gdbus-peer.c"
269 (;; Requires /etc/machine-id.
270 "/gdbus/codegen-peer-to-peer"))
271
272 ("gio/tests/gdbus-unix-addresses.c"
273 (;; Requires /etc/machine-id.
c60ecc35 274 "/gdbus/x11-autolaunch")))))
81f6bf2d
MW
275 (for-each (lambda (x) (apply disable x)) failing-tests)
276 #t))))
943f33a3
LC
277
278 ;; Note: `--docdir' and `--htmldir' are not honored, so work around it.
279 #:configure-flags (list (string-append "--with-html-dir="
280 (assoc-ref %outputs "doc")
b2a80c78 281 "/share/gtk-doc/html"))
00585a55
LC
282
283 ;; In 'gio/tests', 'gdbus-test-codegen-generated.h' is #included in a
284 ;; file that gets compiled possibly before it has been fully generated.
285 #:parallel-tests? #f))
ce2df078
LC
286
287 (native-search-paths
288 ;; This variable is not really "owned" by GLib, but several related
289 ;; packages refer to it: gobject-introspection's tools use it as a search
290 ;; path for .gir files, and it's also a search path for schemas produced
291 ;; by 'glib-compile-schemas'.
292 (list (search-path-specification
293 (variable "XDG_DATA_DIRS")
1b85e57f
SB
294 (files '("share")))
295 ;; To load extra gio modules from glib-networking, etc.
296 (search-path-specification
297 (variable "GIO_EXTRA_MODULES")
298 (files '("lib/gio/modules")))))
ce2df078
LC
299 (search-paths native-search-paths)
300
f50d2669 301 (synopsis "Thread-safe general utility library; basis of GTK+ and GNOME")
3889a82e
NK
302 (description
303 "GLib provides data structure handling for C, portability wrappers,
304and interfaces for such runtime functionality as an event loop, threads,
305dynamic loading, and an object system.")
f032d0be 306 (home-page "https://developer.gnome.org/glib/")
c60ecc35 307 (license license:lgpl2.1+)))
71eb5c10 308
6ac6a6b9 309(define gobject-introspection
9ceb630c
CR
310 (package
311 (name "gobject-introspection")
e85f7ac2 312 (version "1.56.1")
9ceb630c
CR
313 (source (origin
314 (method url-fetch)
cc84b08c 315 (uri (string-append "mirror://gnome/sources/"
2474b81d
FB
316 "gobject-introspection/" (version-major+minor version)
317 "/gobject-introspection-" version ".tar.xz"))
9ceb630c 318 (sha256
e85f7ac2 319 (base32 "0jx2kryjd7l0vl5gb3qp1qjfy3cjiizvcd1snsm7pzwrzz67aa2v"))
ed89d901
SB
320 (modules '((guix build utils)))
321 (snippet
6cbee49d
MW
322 '(begin
323 (substitute* "tools/g-ir-tool-template.in"
324 (("#!/usr/bin/env @PYTHON@") "#!@PYTHON@"))
325 #t))
fc1adab1
AK
326 (patches (search-patches
327 "gobject-introspection-cc.patch"
328 "gobject-introspection-girepository.patch"
329 "gobject-introspection-absolute-shlib-path.patch"))))
9ceb630c
CR
330 (build-system gnu-build-system)
331 (inputs
332 `(("bison" ,bison)
9ceb630c
CR
333 ("flex" ,flex)
334 ("glib" ,glib)
9ceb630c 335 ("python-2" ,python-2)))
426adbe8 336 (native-inputs
d7e92b87
ML
337 `(("glib" ,glib "bin")
338 ("pkg-config" ,pkg-config)))
af949e8e
CR
339 (propagated-inputs
340 `(;; In practice, GIR users will need libffi when using
341 ;; gobject-introspection.
342 ("libffi" ,libffi)))
5a4753a6
FB
343 (native-search-paths
344 (list (search-path-specification
345 (variable "GI_TYPELIB_PATH")
af070955 346 (files '("lib/girepository-1.0")))))
5a4753a6 347 (search-paths native-search-paths)
9ceb630c 348 (arguments
d4331082
MW
349 `(;; The build system has at least one race condition involving Gio-2.0.gir
350 ;; which causes intermittent failures, as of 1.56.0.
351 #:parallel-build? #f
352 ;; The patch 'gobject-introspection-absolute-shlib-path.patch' causes
2474b81d 353 ;; some tests to fail.
cc84b08c 354 #:tests? #f))
9ceb630c
CR
355 (home-page "https://wiki.gnome.org/GObjectIntrospection")
356 (synopsis "Generate interface introspection data for GObject libraries")
357 (description
358 "GObject introspection is a middleware layer between C libraries (using
359GObject) and language bindings. The C library can be scanned at compile time
360and generate a metadata file, in addition to the actual native C library. Then
361at runtime, language bindings can read this metadata and automatically provide
362bindings to call into the C library.")
363 ; Some bits are distributed under the LGPL2+, others under the GPL2+
364 (license license:gpl2+)))
365
80370441 366(define intltool
71eb5c10
LC
367 (package
368 (name "intltool")
fa09ebfa 369 (version "0.51.0")
71eb5c10
LC
370 (source (origin
371 (method url-fetch)
d6b8cb5c
AE
372 (uri (string-append "https://launchpad.net/intltool/trunk/"
373 version "/+download/intltool-"
374 version ".tar.gz"))
92cb946b 375 (patches (search-patches "intltool-perl-compatibility.patch"))
71eb5c10
LC
376 (sha256
377 (base32
fa09ebfa 378 "1karx4sb7bnm2j67q0q74hspkfn6lqprpy5r99vkn5bb36a4viv7"))))
71eb5c10 379 (build-system gnu-build-system)
93882f0e
EB
380 (inputs
381 `(("file" ,file)))
71eb5c10 382 (propagated-inputs
107b415e
LC
383 `(;; Propagate gettext because users expect it to be there, and so does
384 ;; the `intltool-update' script.
b94a6ca0 385 ("gettext" ,gettext-minimal)
107b415e 386
e33d9d6f 387 ("perl-xml-parser" ,perl-xml-parser)
107b415e 388 ("perl" ,perl)))
93882f0e 389 (arguments
e0f71c80
TGR
390 `(#:phases
391 (modify-phases %standard-phases
392 (add-after 'unpack 'patch-file-references
393 (lambda* (#:key inputs #:allow-other-keys)
394 (let ((file (assoc-ref inputs "file")))
395 (substitute* "intltool-update.in"
396 (("`file") (string-append "`" file "/bin/file")))
397 #t))))))
d6b8cb5c
AE
398 (home-page "https://launchpad.net/intltool/+download")
399 (synopsis "Tools to centralise translations of different file formats")
71eb5c10 400 (description
35b9e423 401 "Intltool is a set of tools to centralise translations of many different
71eb5c10
LC
402file formats using GNU gettext-compatible PO files.
403
404The intltool collection can be used to do these things:
405
406 Extract translatable strings from various source files (.xml.in,
407 glade, .desktop.in, .server.in, .oaf.in).
408
409 Collect the extracted strings together with messages from traditional
410 source files (.c, .h) in po/$(PACKAGE).pot.
411
412 Merge back the translations from .po files into .xml, .desktop and
35b9e423 413 oaf files. This merge step will happen at build resp. installation time.")
d6b8cb5c 414 (license license:gpl2+)))
24b5c463 415
80370441 416(define itstool
20a26ff5
CR
417 (package
418 (name "itstool")
ada53b1d 419 (version "2.0.2")
20a26ff5
CR
420 (source (origin
421 (method url-fetch)
422 (uri (string-append "http://files.itstool.org/itstool/itstool-"
423 version ".tar.bz2"))
424 (sha256
425 (base32
ada53b1d 426 "0fh34wi52i0qikgvlmrcpf1vx6gc1xqdad4539l4d9hikfsrz45z"))))
20a26ff5 427 (build-system gnu-build-system)
4b58d88b 428 (inputs
f922fc42 429 `(("libxml2" ,libxml2)
ada53b1d
MB
430 ("python2-libxml2" ,python2-libxml2)
431 ("python-2" ,python-2)))
4b58d88b
SB
432 (arguments
433 '(#:phases
434 (modify-phases %standard-phases
13fbd174
KK
435 (add-after 'install 'wrap-program
436 (lambda* (#:key outputs #:allow-other-keys)
437 (let ((prog (string-append (assoc-ref outputs "out")
438 "/bin/itstool")))
439 (wrap-program prog
bca24131
MW
440 `("PYTHONPATH" = (,(getenv "PYTHONPATH"))))
441 #t))))))
20a26ff5
CR
442 (home-page "http://www.itstool.org")
443 (synopsis "Tool to translate XML documents with PO files")
444 (description
445 "ITS Tool allows you to translate your XML documents with PO files, using
446rules from the W3C Internationalization Tag Set (ITS) to determine what to
447translate and how to separate it into PO file messages.
448
449PO files are the standard translation format for GNU and other Unix-like
450systems. They present translatable information as discrete messages, allowing
451each message to be translated independently. In contrast to whole-page
452translation, translating with a message-based format like PO means you can
453easily track changes to the source document down to the paragraph. When new
454strings are added or existing strings are modified, you only need to update the
455corresponding messages.
456
457ITS Tool is designed to make XML documents translatable through PO files by
458applying standard ITS rules, as well as extension rules specific to ITS Tool.
459ITS also provides an industry standard way for authors to override translation
460information in their documents, such as whether a particular element should be
461translated.")
a129e0d8 462 (license license:gpl3+)))
20a26ff5 463
80370441 464(define dbus-glib
24b5c463
AE
465 (package
466 (name "dbus-glib")
919fc6aa 467 (version "0.108")
24b5c463
AE
468 (source (origin
469 (method url-fetch)
470 (uri
5cc3096c 471 (string-append "https://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-"
24b5c463
AE
472 version ".tar.gz"))
473 (sha256
474 (base32
919fc6aa 475 "0b307hw9j41npzr6niw1bs6ryp87m5yafg492gqwvsaj4dz0qd4z"))))
24b5c463 476 (build-system gnu-build-system)
2e88d113 477 (propagated-inputs ; according to dbus-glib-1.pc
24b5c463 478 `(("dbus" ,dbus)
44add1ce 479 ("glib" ,glib)))
2e88d113
AE
480 (inputs
481 `(("expat" ,expat)))
44add1ce
LC
482 (native-inputs
483 `(("glib" ,glib "bin")
24b5c463 484 ("pkg-config" ,pkg-config)))
57e7d748 485 (home-page "https://dbus.freedesktop.org/doc/dbus-glib/")
24b5c463
AE
486 (synopsis "D-Bus GLib bindings")
487 (description
488 "GLib bindings for D-Bus. The package is obsolete and superseded
489by GDBus included in Glib.")
490 (license license:gpl2))) ; or Academic Free License 2.1
a5a7d374
LC
491
492(define libsigc++
493 (package
494 (name "libsigc++")
14b53192 495 (version "2.10.2")
a5a7d374
LC
496 (source (origin
497 (method url-fetch)
e7a720e6
SB
498 (uri (string-append "mirror://gnome/sources/libsigc++/"
499 (version-major+minor version) "/"
500 name "-" version ".tar.xz"))
a5a7d374
LC
501 (sha256
502 (base32
14b53192 503 "163s14d1rqp82gc1vsm3q0wzsbdicb9q6307kz0zk5lm6x9h5jmi"))))
a5a7d374 504 (build-system gnu-build-system)
41eb1198
LC
505 (native-inputs `(("pkg-config" ,pkg-config)
506 ("m4" ,m4)))
a5a7d374
LC
507 (home-page "http://libsigc.sourceforge.net/")
508 (synopsis "Type-safe callback system for standard C++")
509 (description
35b9e423 510 "Libsigc++ implements a type-safe callback system for standard C++. It
a5a7d374
LC
511allows you to define signals and to connect those signals to any callback
512function, either global or a member function, regardless of whether it is
513static or virtual.
514
515It also contains adaptor classes for connection of dissimilar callbacks and
516has an ease of use unmatched by other C++ callback libraries.")
517 (license license:lgpl2.1+)))
518
519(define glibmm
520 (package
521 (name "glibmm")
1258112a 522 (version "2.56.0")
a5a7d374
LC
523 (source (origin
524 (method url-fetch)
3d6befa4
MW
525 (uri (string-append "mirror://gnome/sources/glibmm/"
526 (version-major+minor version)
527 "/glibmm-" version ".tar.xz"))
a5a7d374
LC
528 (sha256
529 (base32
1258112a 530 "1abrkqhca5p8n6ly3vp1232rny03s7lrd8f8iz2m2m141nxgqx3f"))))
a5a7d374
LC
531 (build-system gnu-build-system)
532 (arguments
7700c6ca
MB
533 `(;; XXX: Some tests uses C++14 features. Remove this when the default
534 ;; compiler is >= GCC6.
535 #:configure-flags '("CXXFLAGS=-std=gnu++14")
536 #:phases
dc1d3cde
KK
537 (modify-phases %standard-phases
538 (add-before 'build 'pre-build
539 (lambda _
540 ;; This test uses /etc/fstab as an example file to read
541 ;; from; choose a better example.
542 (substitute* "tests/giomm_simple/main.cc"
543 (("/etc/fstab")
544 (string-append (getcwd)
545 "/tests/giomm_simple/main.cc")))
546
547 ;; This test does a DNS lookup, and then expects to be able
548 ;; to open a TLS session; just skip it.
549 (substitute* "tests/giomm_tls_client/main.cc"
550 (("Gio::init.*$")
551 "return 77;\n"))
552 #t)))))
41eb1198
LC
553 (native-inputs `(("pkg-config" ,pkg-config)
554 ("glib" ,glib "bin")))
a5a7d374
LC
555 (propagated-inputs
556 `(("libsigc++" ,libsigc++)
557 ("glib" ,glib)))
8e933cb3 558 (home-page "https://gtkmm.org/")
a5a7d374
LC
559 (synopsis "C++ interface to the GLib library")
560 (description
35b9e423 561 "Glibmm provides a C++ programming interface to the part of GLib that are
a5a7d374
LC
562useful for C++.")
563 (license license:lgpl2.1+)))
a1de06b6
EB
564
565(define-public python2-pygobject-2
566 (package
567 (name "python2-pygobject")
568 ;; This was the last version to declare the 2.0 platform number, i.e. its
569 ;; pkg-config files were named pygobject-2.0.pc
30e43e81 570 (version "2.28.7")
a1de06b6
EB
571 (source
572 (origin
573 (method url-fetch)
574 (uri (string-append "mirror://gnome/sources/pygobject/"
575 (version-major+minor version)
576 "/pygobject-" version ".tar.xz"))
577 (sha256
578 (base32
30e43e81 579 "0nkam61rsn7y3wik3vw46wk5q2cjfh2iph57hl9m39rc8jijb7dv"))
fc1adab1
AK
580 (patches (search-patches
581 "python2-pygobject-2-gi-info-type-error-domain.patch"))))
a1de06b6
EB
582 (build-system gnu-build-system)
583 (native-inputs
584 `(("which" ,which)
585 ("glib-bin" ,glib "bin") ;for tests: glib-compile-schemas
586 ("pkg-config" ,pkg-config)
587 ("dbus" ,dbus))) ;for tests
588 (inputs
589 `(("python" ,python-2)
590 ("glib" ,glib)
7ca0dbc3 591 ("python2-pycairo" ,python2-pycairo)
a1de06b6
EB
592 ("gobject-introspection" ,gobject-introspection)))
593 (propagated-inputs
594 `(("libffi" ,libffi))) ;mentioned in pygobject-2.0.pc
595 (arguments
596 `(#:tests? #f ;segfaults during tests
597 #:configure-flags '("LIBS=-lcairo-gobject")))
598 (home-page "https://pypi.python.org/pypi/PyGObject")
599 (synopsis "Python bindings for GObject")
600 (description
601 "Python bindings for GLib, GObject, and GIO.")
602 (license license:lgpl2.1+)))
603
604(define-public python-pygobject
605 (package
606 (name "python-pygobject")
74f3fdbd 607 (version "3.28.3")
a1de06b6
EB
608 (source
609 (origin
610 (method url-fetch)
611 (uri (string-append "mirror://gnome/sources/pygobject/"
612 (version-major+minor version)
613 "/pygobject-" version ".tar.xz"))
614 (sha256
615 (base32
74f3fdbd 616 "1c6h3brzlyvzbpdsammnd957azmp6cbzqrd65r400vnh2l8f5lrx"))))
a1de06b6 617 (build-system gnu-build-system)
d2e1da18
RW
618 (arguments
619 `(#:phases
620 (modify-phases %standard-phases
621 (add-after 'unpack 'delete-broken-tests
622 (lambda _
623 ;; FIXME: this test freezes and times out.
624 (delete-file "tests/test_mainloop.py")
625 ;; FIXME: this test fails with this kind of error:
626 ;; AssertionError: <Handlers.SIG_IGN: 1> != <built-in function default_int_handler
627 (delete-file "tests/test_ossig.py")
628 #t)))))
a1de06b6 629 (native-inputs
8a831c6f 630 `(("which" ,which)
ae40e02c
KK
631 ;for tests: dbus-run-session and glib-compile-schemas
632 ("dbus" ,dbus)
633 ("glib-bin" ,glib "bin")
59f6dfe5
RW
634 ("pkg-config" ,pkg-config)
635 ("python-pytest" ,python-pytest)))
a1de06b6
EB
636 (inputs
637 `(("python" ,python)
a1de06b6 638 ("python-pycairo" ,python-pycairo)
fa7cf82e
SB
639 ("gobject-introspection" ,gobject-introspection)))
640 (propagated-inputs
641 ;; pygobject-3.0.pc refers to all these.
642 `(("glib" ,glib)
a1de06b6 643 ("libffi" ,libffi)))
e28f95a9
SB
644 ;; For finding typelib files, since gobject-introscpetion isn't propagated.
645 (native-search-paths (package-native-search-paths gobject-introspection))
594a362b 646 (home-page "https://live.gnome.org/PyGObject")
a1de06b6
EB
647 (synopsis "Python bindings for GObject")
648 (description
649 "Python bindings for GLib, GObject, and GIO.")
00f2bf34
LC
650 (license license:lgpl2.1+)
651 (properties `((python2-variant . ,(delay python2-pygobject))))))
7873318d 652
0f49d7ba 653(define-public python2-pygobject
00f2bf34 654 (package (inherit (strip-python2-variant python-pygobject))
0f49d7ba
RW
655 (name "python2-pygobject")
656 (inputs
657 `(("python" ,python-2)
0f49d7ba 658 ("python-pycairo" ,python2-pycairo)
1b043aeb
RW
659 ("gobject-introspection" ,gobject-introspection)))
660 (native-inputs
8a831c6f 661 `(("which" ,which)
1b043aeb
RW
662 ;for tests: dbus-run-session and glib-compile-schemas
663 ("dbus" ,dbus)
664 ("glib-bin" ,glib "bin")
665 ("pkg-config" ,pkg-config)
666 ("python-pytest" ,python2-pytest)))))
0f49d7ba 667
451f6e30
AV
668(define-public perl-glib
669 (package
670 (name "perl-glib")
93394133 671 (version "1.329")
451f6e30
AV
672 (source (origin
673 (method url-fetch)
674 (uri (string-append
675 "mirror://cpan/authors/id/X/XA/XAOC/Glib-"
676 version ".tar.gz"))
677 (sha256
678 (base32
93394133 679 "0d9ak0zknz81lv3cqkzr2mxdic6g5rrbb87skqc4jj48rz4f2k3v"))))
451f6e30
AV
680 (build-system perl-build-system)
681 (native-inputs
682 `(("perl-extutils-depends" ,perl-extutils-depends)
683 ("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)))
684 (inputs
685 `(("glib" ,glib)))
9aba9b12 686 (home-page "https://metacpan.org/release/Glib")
451f6e30
AV
687 (synopsis "Perl wrappers for the GLib utility and Object libraries")
688 (description "This module provides perl access to GLib and GLib's GObject
689libraries. GLib is a portability and utility library; GObject provides a
690generic type system with inheritance and a powerful signal system. Together
691these libraries are used as the foundation for many of the libraries that make
692up the Gnome environment, and are used in many unrelated projects.")
693 (license license:lgpl2.1+)))
694
7873318d
AE
695(define telepathy-glib
696 (package
697 (name "telepathy-glib")
698 (version "0.24.1")
699 (source
700 (origin
701 (method url-fetch)
702 (uri
703 (string-append
5cc3096c 704 "https://telepathy.freedesktop.org/releases/telepathy-glib/"
7873318d
AE
705 "telepathy-glib-" version ".tar.gz"))
706 (sha256
707 (base32
7f48be41
SB
708 "1symyzbjmxvksn2ifdkk50lafjm2llf2sbmky062gq2pz3cg23cy"))
709 (patches
710 (list
711 ;; Don't use the same test name for multiple tests.
712 ;; <https://bugs.freedesktop.org/show_bug.cgi?id=92245>
713 (origin
714 (method url-fetch)
715 (uri "https://bugs.freedesktop.org/attachment.cgi?id=118608")
716 (file-name (string-append "telepathy-glib-duplicate-tests.patch"))
717 (sha256
718 (base32
719 "0z261fwrszxb28ccg3hsg9rizig4s84zvwmx6y31a4pyv7bvs5w3")))))))
7873318d 720 (build-system gnu-build-system)
c73d4c59 721 (arguments
df09e1d6
LC
722 '(#:configure-flags '("--enable-vala-bindings")
723
724 ;; '../tools/glib-*.py' generate files but the target dependencies are
725 ;; (presumably) not fully specified in the makefile, leading to
726 ;; parallel build errors like:
727 ;;
728 ;; EOFError: EOF read where object expected
729 ;; make[2]: *** [Makefile:1906: _gen/register-dbus-glib-marshallers-body.h] Error 1
730 #:parallel-build? #f))
7873318d
AE
731 (native-inputs
732 `(("glib" ,glib "bin") ; uses glib-mkenums
d2ab0e90 733 ("gobject-introspection" ,gobject-introspection)
7873318d 734 ("pkg-config" ,pkg-config)
d2ab0e90 735 ("python" ,python-2)
c73d4c59 736 ("vala" ,vala)
d2ab0e90
SB
737 ("xsltproc" ,libxslt)))
738 (propagated-inputs
739 ;; There are all in the Requires.private field of telepathy-glib.pc.
7873318d
AE
740 `(("dbus" ,dbus)
741 ("dbus-glib" ,dbus-glib)
d2ab0e90 742 ("glib" ,glib)))
57e7d748 743 (home-page "https://telepathy.freedesktop.org/wiki/")
7873318d
AE
744 (synopsis "GLib Real-time communications framework over D-Bus")
745 (description "Telepathy is a flexible, modular communications framework
746that enables real-time communication over D-Bus via pluggable protocol
747backends. Telepathy is a communications service that can be accessed by
748many applications simultaneously.
749
750This package provides the library for GLib applications.")
751 (license license:lgpl2.1+)))
89eb7581 752
89eb7581
LG
753(define-public dbus-c++
754 (package
755 (name "dbus-c++")
756 (version "0.9.0")
757 (source (origin
758 (method url-fetch)
759 (uri
760 (string-append
761 "mirror://sourceforge/dbus-cplusplus/dbus-c%2B%2B/"
762 version "/libdbus-c%2B%2B-" version ".tar.gz"))
763 (file-name (string-append name "-" version ".tar.gz"))
764 (sha256
765 (base32
766 "0qafmy2i6dzx4n1dqp6pygyy6gjljnb7hwjcj2z11c1wgclsq4dw"))))
767 (build-system gnu-build-system)
768 (propagated-inputs
769 `(("dbus" ,dbus))) ;mentioned in the pkg-config file
770 (inputs
771 `(("efl" ,efl)
772 ("expat" ,expat)
773 ("glib" ,glib)))
774 (native-inputs
775 `(("pkg-config" ,pkg-config)))
776 (arguments
777 `(;; The 'configure' machinery fails to detect that it needs -lpthread.
778 #:configure-flags (list "LDFLAGS=-lpthread")
779 #:phases
780 (modify-phases %standard-phases
781 (add-before 'configure 'add-missing-header
782 (lambda _
783 (substitute* "include/dbus-c++/eventloop-integration.h"
784 (("#include <errno.h>")
785 "#include <errno.h>\n#include <unistd.h>")))))))
786 (synopsis "D-Bus API for C++")
787 (description "This package provides D-Bus client API bindings for the C++
add43093 788programming language. It also contains the utility
89eb7581
LG
789@command{dbuscxx-xml2cpp}.")
790 (home-page "https://sourceforge.net/projects/dbus-cplusplus/")
d06ce046 791 (license license:lgpl2.1+)))
7b83b695
DC
792
793(define-public appstream-glib
794 (package
795 (name "appstream-glib")
0d6f2ea1 796 (version "0.7.15")
7b83b695
DC
797 (source (origin
798 (method url-fetch)
799 (uri (string-append "https://people.freedesktop.org/~hughsient/"
800 "appstream-glib/releases/"
801 "appstream-glib-" version ".tar.xz"))
802 (sha256
803 (base32
0d6f2ea1 804 "17ram4j3cvs78si0gi1labarr91pw68zn8kam41cqbvlwdyr89vy"))))
318bc429 805 (build-system meson-build-system)
7b83b695 806 (native-inputs
318bc429
TGR
807 `(("gettext" ,gettext-minimal)
808 ("glib:bin" ,glib "bin") ; for glib-compile-resources
809 ("pkg-config" ,pkg-config)))
a48b877e
DM
810 (propagated-inputs
811 `(("gcab" ,gcab) ; for .pc file
812 ("gdk-pixbuf" ,gdk-pixbuf) ; for .pc file
813 ("util-linux" ,util-linux))) ; for .pc file
7b83b695 814 (inputs
a48b877e 815 `(("glib" ,glib)
318bc429 816 ("gperf" ,gperf)
7b83b695
DC
817 ("gtk+" ,gtk+)
818 ("json-glib" ,json-glib)
819 ("libarchive" ,libarchive)
820 ("libsoup" ,libsoup)
a48b877e 821 ("libyaml" ,libyaml)))
7b83b695
DC
822 (arguments
823 `(#:configure-flags
b1de6129
TGR
824 (list "-Ddep11=false"
825 "-Dintrospection=false" ; avoid g-ir-scanner dependency
826 "-Drpm=false"
827 "-Dstemmer=false")
7b83b695
DC
828 #:phases
829 (modify-phases %standard-phases
830 (add-after 'unpack 'patch-tests
831 (lambda _
832 (substitute* "libappstream-glib/as-self-test.c"
318bc429 833 (("g_test_add_func.*as_test_store_local_appdata_func);") ""))
7b83b695
DC
834 #t)))))
835 (home-page "https://github.com/hughsie/appstream-glib")
836 (synopsis "Library for reading and writing AppStream metadata")
837 (description "This library provides objects and helper methods to help
838reading and writing @uref{https://www.freedesktop.org/wiki/Distributions/AppStream,AppStream}
839metadata.")
840 (license license:lgpl2.1+)))
a372c4da
P
841
842(define perl-net-dbus
843 (package
844 (name "perl-net-dbus")
845 (version "1.1.0")
846 (source
847 (origin
848 (method url-fetch)
849 (uri (string-append "mirror://cpan/authors/id/D/DA/DANBERR/Net-DBus-"
850 version ".tar.gz"))
851 (sha256
852 (base32
853 "0sg2w147b9r9ykfzjs7y9qxry73xkjnhnk4qf95kfv79p5nnk4c3"))))
854 (build-system perl-build-system)
855 (native-inputs
856 `(("pkg-config" ,pkg-config)
857 ("perl-test-pod" ,perl-test-pod)
858 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
859 (inputs
860 `(("dbus" ,dbus)))
861 (propagated-inputs
862 `(("perl-xml-twig" ,perl-xml-twig)))
9aba9b12 863 (home-page "https://metacpan.org/release/Net-DBus")
a372c4da
P
864 (synopsis "Extension for the DBus bindings")
865 (description "@code{Net::DBus} provides a Perl XS API to the DBus
866inter-application messaging system. The Perl API covers the core base level
867of the DBus APIs, not concerning itself yet with the GLib or QT wrappers.")
868 (license license:perl-license)))
fc4083c5
P
869
870(define perl-net-dbus-glib
871 (package
872 (name "perl-net-dbus-glib")
873 (version "0.33.0")
874 (source
875 (origin
876 (method url-fetch)
877 (uri (string-append "mirror://cpan/authors/id/D/DA/DANBERR/"
878 "Net-DBus-GLib-" version ".tar.gz"))
879 (sha256
880 (base32
881 "1z4mbv8z0rad604xahijpg5szzi8qak07hbahh230z4jf96fkxvj"))))
882 (build-system perl-build-system)
883 (native-inputs
884 `(("pkg-config" ,pkg-config)))
885 (inputs
886 `(("dbus-glib" ,dbus-glib)))
9aba9b12 887 (home-page "https://metacpan.org/release/Net-DBus-GLib")
fc4083c5
P
888 (synopsis "Perl extension for the DBus GLib bindings")
889 (description "This package provides an extension to the @code{Net::DBus}
890module allowing integration with the GLib mainloop. To integrate with the
891main loop, simply get a connection to the bus via the methods in
892@code{Net::DBus::GLib} rather than the usual @code{Net::DBus} module. Every
893other API remains the same.")
894 (license license:gpl2+)))
19d0554f
GL
895
896(define-public template-glib
897 (package
898 (name "template-glib")
899 (version "3.32.0")
900 (source (origin
901 (method url-fetch)
902 (uri (string-append "mirror://gnome/sources/" name "/"
903 (version-major+minor version) "/"
904 name "-" version ".tar.xz"))
905 (sha256
906 (base32
907 "1g0zx0sxpw8kqp7p3sgl9kngaqrg9xl6cir24nrahks0vgsk98rr"))))
908 (build-system meson-build-system)
909 (arguments
910 `(#:configure-flags '("-D" "enable_gtk_doc=true")))
911 (inputs
912 `(("gettext" ,gettext-minimal)
913 ("glib" ,glib)
914 ("gobject-introspection" ,gobject-introspection)))
915 (native-inputs
916 `(("bison" ,bison)
917 ("flex" ,flex)
918 ("glib:bin" ,glib "bin") ;; For glib-mkenums
919 ("gtk-doc" ,gtk-doc)
920 ("pkg-config" ,pkg-config)
921 ("vala" ,vala)))
922 (home-page "https://gitlab.gnome.org/GNOME/template-glib")
923 (synopsis "Library for template expansion")
924 (description
925 "Template-GLib is a library to help you generate text based on a template and
926user defined state. Template-GLib does not use a language runtime, so it is
927safe to use from any GObject-Introspectable language.
928
929Template-GLib allows you to access properties on GObjects as well as call
930simple methods via GObject-Introspection.")
931 (license license:lgpl2.1+)))