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