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