gnu: glibc/linux: Add patches for CVE-2017-1000366.
[jackhill/guix/guix.git] / gnu / packages / glib.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016 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 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
8 ;;;
9 ;;; This file is part of GNU Guix.
10 ;;;
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
15 ;;;
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
20 ;;;
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24 (define-module (gnu packages glib)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (guix packages)
27 #:use-module (guix download)
28 #:use-module (guix utils)
29 #:use-module (guix build-system gnu)
30 #:use-module (guix build-system python)
31 #:use-module (gnu packages)
32 #:use-module (gnu packages base)
33 #:use-module (gnu packages backup)
34 #:use-module (gnu packages bison)
35 #:use-module (gnu packages compression)
36 #:use-module (gnu packages enlightenment)
37 #:use-module (gnu packages flex)
38 #:use-module (gnu packages gettext)
39 #:use-module (gnu packages gnome)
40 #:use-module (gnu packages gtk)
41 #:use-module (gnu packages libffi)
42 #:use-module (gnu packages linux)
43 #:use-module (gnu packages nettle)
44 #:use-module (gnu packages pcre)
45 #:use-module (gnu packages perl)
46 #:use-module (gnu packages pkg-config)
47 #:use-module (gnu packages python)
48 #:use-module (gnu packages xml)
49 #:use-module (gnu packages bash)
50 #:use-module (gnu packages file)
51 #:use-module (gnu packages xml)
52 #:use-module (gnu packages xorg)
53 #:use-module (gnu packages m4)
54
55 ;; Export variables up-front to allow circular dependency with the 'xorg'
56 ;; module.
57 #:export (dbus
58 glib
59 gobject-introspection
60 dbus-glib
61 intltool
62 itstool
63 libsigc++
64 glibmm
65 telepathy-glib))
66
67 (define dbus
68 (package
69 (name "dbus")
70 (version "1.10.18")
71 (source (origin
72 (method url-fetch)
73 (uri (string-append
74 "https://dbus.freedesktop.org/releases/dbus/dbus-"
75 version ".tar.gz"))
76 (sha256
77 (base32
78 "0jjirhw6xwz2ffmbg5kr79108l8i1bdaw7szc67n3qpkygaxsjb0"))
79 (patches (search-patches "dbus-helper-search-path.patch"))))
80 (build-system gnu-build-system)
81 (arguments
82 '(#:configure-flags
83 (list
84 ;; Install the system bus socket under /var.
85 "--localstatedir=/var"
86
87 ;; Install the session bus socket under /tmp.
88 "--with-session-socket-dir=/tmp"
89
90 ;; Use /etc/dbus-1 for system-wide config.
91 ;; Look for configuration file under
92 ;; /etc/dbus-1. This is notably required by
93 ;; 'dbus-daemon-launch-helper', which looks for
94 ;; the 'system.conf' file in that place,
95 ;; regardless of what '--config-file' was
96 ;; passed to 'dbus-daemon' on the command line;
97 ;; see <https://bugs.freedesktop.org/show_bug.cgi?id=92458>.
98 "--sysconfdir=/etc")
99 #:phases
100 (modify-phases %standard-phases
101 (replace 'install
102 (lambda _
103 ;; Don't try to create /var and /etc.
104 (system* "make"
105 "localstatedir=/tmp/dummy"
106 "sysconfdir=/tmp/dummy"
107 "install"))))))
108 (native-inputs
109 `(("pkg-config" ,pkg-config)))
110 (inputs
111 `(("expat" ,expat)
112
113 ;; Add a dependency on libx11 so that 'dbus-launch' has support for
114 ;; '--autolaunch'.
115 ("libx11" ,libx11)))
116
117 (home-page "http://dbus.freedesktop.org/")
118 (synopsis "Message bus for inter-process communication (IPC)")
119 (description
120 "D-Bus is a message bus system, a simple way for applications to
121 talk to one another. In addition to interprocess communication, D-Bus
122 helps coordinate process lifecycle; it makes it simple and reliable to
123 code a \"single instance\" application or daemon, and to launch
124 applications and daemons on demand when their services are needed.
125
126 D-Bus supplies both a system daemon (for events such as \"new hardware
127 device added\" or \"printer queue changed\") and a
128 per-user-login-session daemon (for general IPC needs among user
129 applications). Also, the message bus is built on top of a general
130 one-to-one message passing framework, which can be used by any two apps
131 to communicate directly (without going through the message bus
132 daemon). Currently the communicating applications are on one computer,
133 or through unencrypted TCP/IP suitable for use behind a firewall with
134 shared NFS home directories.")
135 (license license:gpl2+))) ; or Academic Free License 2.1
136
137 (define glib
138 (package
139 (name "glib")
140 (version "2.52.2")
141 (source (origin
142 (method url-fetch)
143 (uri (string-append "mirror://gnome/sources/"
144 name "/" (string-take version 4) "/"
145 name "-" version ".tar.xz"))
146 (sha256
147 (base32
148 "1l65kab6jr9zlllgbjcbvrbgah3sdd577fpw4pdb2j195ag5s3ph"))
149 (patches (search-patches "glib-tests-timer.patch"))))
150 (build-system gnu-build-system)
151 (outputs '("out" ; everything
152 "bin" ; glib-mkenums, gtester, etc.; depends on Python
153 "doc")) ; 20 MiB of GTK-Doc reference
154 (propagated-inputs
155 `(("pcre" ,pcre))) ; in the Requires.private field of glib-2.0.pc
156 (inputs
157 `(("coreutils" ,coreutils)
158 ("util-linux" ,util-linux) ; for libmount
159 ("libffi" ,libffi)
160 ("zlib" ,zlib)))
161 (native-inputs
162 `(("gettext" ,gettext-minimal)
163 ("dbus" ,dbus) ; for GDBus tests
164 ("pkg-config" ,pkg-config)
165 ("python" ,python-wrapper)
166 ("perl" ,perl) ; needed by GIO tests
167 ("bash" ,bash)
168 ("tzdata" ,tzdata-2017a))) ; for tests/gdatetime.c
169 (arguments
170 `(#:disallowed-references (,tzdata-2017a)
171 #:phases
172 (modify-phases %standard-phases
173 (add-before 'build 'pre-build
174 (lambda* (#:key inputs outputs #:allow-other-keys)
175 ;; For tests/gdatetime.c.
176 (setenv "TZDIR"
177 (string-append (assoc-ref inputs "tzdata")
178 "/share/zoneinfo"))
179
180 ;; Some tests want write access there.
181 (setenv "HOME" (getcwd))
182 (setenv "XDG_CACHE_HOME" (getcwd))
183
184 (substitute* '("glib/gspawn.c"
185 "glib/tests/utils.c"
186 "tests/spawn-test.c")
187 (("/bin/sh")
188 (string-append (assoc-ref inputs "bash") "/bin/sh")))))
189 (add-before 'check 'disable-failing-tests
190 (lambda _
191 (let ((disable
192 (lambda (test-file test-paths)
193 (define pattern+procs
194 (map (lambda (test-path)
195 (cons
196 ;; XXX: only works for single line statements.
197 (format #f "g_test_add_func.*\"~a\".*" test-path)
198 (const "")))
199 test-paths))
200 (substitute test-file pattern+procs)))
201 (failing-tests
202 '(("glib/tests/thread.c"
203 (;; prlimit(2) returns ENOSYS on Linux 2.6.32-5-xen-amd64
204 ;; as found on hydra.gnu.org, and strace(1) doesn't
205 ;; recognize it.
206 "/thread/thread4"))
207
208 ("glib/tests/timer.c"
209 (;; fails if compiler optimizations are enabled, which they
210 ;; are by default.
211 "/timer/stop"))
212
213 ("gio/tests/gapplication.c"
214 (;; XXX: proven to be unreliable. See:
215 ;; <https://bugs.debian.org/756273>
216 ;; <http://bugs.gnu.org/18445>
217 "/gapplication/quit"
218
219 ;; XXX: fails randomly for unknown reason. See:
220 ;; <https://lists.gnu.org/archive/html/guix-devel/2016-04/msg00215.html>
221 "/gapplication/local-actions"))
222
223 ("gio/tests/contenttype.c"
224 (;; XXX: requires shared-mime-info.
225 "/contenttype/guess"
226 "/contenttype/subtype"
227 "/contenttype/list"
228 "/contenttype/icon"
229 "/contenttype/symbolic-icon"
230 "/contenttype/tree"))
231
232 ("gio/tests/appinfo.c"
233 (;; XXX: requires update-desktop-database.
234 "/appinfo/associations"))
235
236 ("gio/tests/desktop-app-info.c"
237 (;; XXX: requires update-desktop-database.
238 "/desktop-app-info/delete"
239 "/desktop-app-info/default"
240 "/desktop-app-info/fallback"
241 "/desktop-app-info/lastused"
242 "/desktop-app-info/search"))
243
244 ("gio/tests/gdbus-peer.c"
245 (;; Requires /etc/machine-id.
246 "/gdbus/codegen-peer-to-peer"))
247
248 ("gio/tests/gdbus-unix-addresses.c"
249 (;; Requires /etc/machine-id.
250 "/gdbus/x11-autolaunch"))
251
252 ("glib/tests/gdatetime.c"
253 (;; Assumes that the Brasilian time zone is named 'BRT',
254 ;; which is no longer true as of tzdata-2017a.
255 "/GDateTime/new_full")))))
256 (and-map (lambda (x) (apply disable x)) failing-tests)))))
257
258 ;; Note: `--docdir' and `--htmldir' are not honored, so work around it.
259 #:configure-flags (list (string-append "--with-html-dir="
260 (assoc-ref %outputs "doc")
261 "/share/gtk-doc/html"))
262
263 ;; In 'gio/tests', 'gdbus-test-codegen-generated.h' is #included in a
264 ;; file that gets compiled possibly before it has been fully generated.
265 #:parallel-tests? #f))
266
267 (native-search-paths
268 ;; This variable is not really "owned" by GLib, but several related
269 ;; packages refer to it: gobject-introspection's tools use it as a search
270 ;; path for .gir files, and it's also a search path for schemas produced
271 ;; by 'glib-compile-schemas'.
272 (list (search-path-specification
273 (variable "XDG_DATA_DIRS")
274 (files '("share")))
275 ;; To load extra gio modules from glib-networking, etc.
276 (search-path-specification
277 (variable "GIO_EXTRA_MODULES")
278 (files '("lib/gio/modules")))))
279 (search-paths native-search-paths)
280
281 (synopsis "Thread-safe general utility library; basis of GTK+ and GNOME")
282 (description
283 "GLib provides data structure handling for C, portability wrappers,
284 and interfaces for such runtime functionality as an event loop, threads,
285 dynamic loading, and an object system.")
286 (home-page "http://developer.gnome.org/glib/")
287 (license license:lgpl2.0+))) ; some files are under lgpl2.1+
288
289 (define gobject-introspection
290 (package
291 (name "gobject-introspection")
292 (version "1.52.1")
293 (source (origin
294 (method url-fetch)
295 (uri (string-append "mirror://gnome/sources/"
296 "gobject-introspection/" (version-major+minor version)
297 "/gobject-introspection-" version ".tar.xz"))
298 (sha256
299 (base32 "1x5gkyrglv3dn9b4fsgw6asqgjw1wj7qc37g9pyac6pyaa6w7l1f"))
300 (modules '((guix build utils)))
301 (snippet
302 '(substitute* "tools/g-ir-tool-template.in"
303 (("#!/usr/bin/env @PYTHON@") "#!@PYTHON@")))
304 (patches (search-patches
305 "gobject-introspection-cc.patch"
306 "gobject-introspection-girepository.patch"
307 "gobject-introspection-absolute-shlib-path.patch"))))
308 (build-system gnu-build-system)
309 (inputs
310 `(("bison" ,bison)
311 ("flex" ,flex)
312 ("glib" ,glib)
313 ("python-2" ,python-2)))
314 (native-inputs
315 `(("glib" ,glib "bin")
316 ("pkg-config" ,pkg-config)))
317 (propagated-inputs
318 `(;; In practice, GIR users will need libffi when using
319 ;; gobject-introspection.
320 ("libffi" ,libffi)))
321 (native-search-paths
322 (list (search-path-specification
323 (variable "GI_TYPELIB_PATH")
324 (files '("lib/girepository-1.0")))))
325 (search-paths native-search-paths)
326 (arguments
327 `(;; The patch 'gobject-introspection-absolute-shlib-path.patch' causes
328 ;; some tests to fail.
329 #:tests? #f))
330 (home-page "https://wiki.gnome.org/GObjectIntrospection")
331 (synopsis "Generate interface introspection data for GObject libraries")
332 (description
333 "GObject introspection is a middleware layer between C libraries (using
334 GObject) and language bindings. The C library can be scanned at compile time
335 and generate a metadata file, in addition to the actual native C library. Then
336 at runtime, language bindings can read this metadata and automatically provide
337 bindings to call into the C library.")
338 ; Some bits are distributed under the LGPL2+, others under the GPL2+
339 (license license:gpl2+)))
340
341 (define intltool
342 (package
343 (name "intltool")
344 (version "0.51.0")
345 (source (origin
346 (method url-fetch)
347 (uri (string-append "https://launchpad.net/intltool/trunk/"
348 version "/+download/intltool-"
349 version ".tar.gz"))
350 (sha256
351 (base32
352 "1karx4sb7bnm2j67q0q74hspkfn6lqprpy5r99vkn5bb36a4viv7"))))
353 (build-system gnu-build-system)
354 (inputs
355 `(("file" ,file)))
356 (propagated-inputs
357 `(;; Propagate gettext because users expect it to be there, and so does
358 ;; the `intltool-update' script.
359 ("gettext" ,gettext-minimal)
360
361 ("perl-xml-parser" ,perl-xml-parser)
362 ("perl" ,perl)))
363 (arguments
364 `(#:phases (alist-cons-after
365 'unpack 'patch-file-references
366 (lambda* (#:key inputs #:allow-other-keys)
367 (let ((file (assoc-ref inputs "file")))
368 (substitute* "intltool-update.in"
369 (("`file") (string-append "`" file "/bin/file")))))
370 %standard-phases)))
371 (home-page "https://launchpad.net/intltool/+download")
372 (synopsis "Tools to centralise translations of different file formats")
373 (description
374 "Intltool is a set of tools to centralise translations of many different
375 file formats using GNU gettext-compatible PO files.
376
377 The intltool collection can be used to do these things:
378
379 Extract translatable strings from various source files (.xml.in,
380 glade, .desktop.in, .server.in, .oaf.in).
381
382 Collect the extracted strings together with messages from traditional
383 source files (.c, .h) in po/$(PACKAGE).pot.
384
385 Merge back the translations from .po files into .xml, .desktop and
386 oaf files. This merge step will happen at build resp. installation time.")
387 (license license:gpl2+)))
388
389 (define itstool
390 (package
391 (name "itstool")
392 (version "2.0.2")
393 (source (origin
394 (method url-fetch)
395 (uri (string-append "http://files.itstool.org/itstool/itstool-"
396 version ".tar.bz2"))
397 (sha256
398 (base32
399 "0fh34wi52i0qikgvlmrcpf1vx6gc1xqdad4539l4d9hikfsrz45z"))))
400 (build-system gnu-build-system)
401 (inputs
402 `(("libxml2" ,libxml2)
403 ("python2-libxml2" ,python2-libxml2)
404 ("python-2" ,python-2)))
405 (arguments
406 '(#:phases
407 (modify-phases %standard-phases
408 (add-after
409 'install 'wrap-program
410 (lambda* (#:key outputs #:allow-other-keys)
411 (let ((prog (string-append (assoc-ref outputs "out")
412 "/bin/itstool")))
413 (wrap-program prog
414 `("PYTHONPATH" = (,(getenv "PYTHONPATH"))))))))))
415 (home-page "http://www.itstool.org")
416 (synopsis "Tool to translate XML documents with PO files")
417 (description
418 "ITS Tool allows you to translate your XML documents with PO files, using
419 rules from the W3C Internationalization Tag Set (ITS) to determine what to
420 translate and how to separate it into PO file messages.
421
422 PO files are the standard translation format for GNU and other Unix-like
423 systems. They present translatable information as discrete messages, allowing
424 each message to be translated independently. In contrast to whole-page
425 translation, translating with a message-based format like PO means you can
426 easily track changes to the source document down to the paragraph. When new
427 strings are added or existing strings are modified, you only need to update the
428 corresponding messages.
429
430 ITS Tool is designed to make XML documents translatable through PO files by
431 applying standard ITS rules, as well as extension rules specific to ITS Tool.
432 ITS also provides an industry standard way for authors to override translation
433 information in their documents, such as whether a particular element should be
434 translated.")
435 (license license:gpl3+)))
436
437 (define dbus-glib
438 (package
439 (name "dbus-glib")
440 (version "0.108")
441 (source (origin
442 (method url-fetch)
443 (uri
444 (string-append "https://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-"
445 version ".tar.gz"))
446 (sha256
447 (base32
448 "0b307hw9j41npzr6niw1bs6ryp87m5yafg492gqwvsaj4dz0qd4z"))))
449 (build-system gnu-build-system)
450 (propagated-inputs ; according to dbus-glib-1.pc
451 `(("dbus" ,dbus)
452 ("glib" ,glib)))
453 (inputs
454 `(("expat" ,expat)))
455 (native-inputs
456 `(("glib" ,glib "bin")
457 ("pkg-config" ,pkg-config)))
458 (home-page "http://dbus.freedesktop.org/doc/dbus-glib/")
459 (synopsis "D-Bus GLib bindings")
460 (description
461 "GLib bindings for D-Bus. The package is obsolete and superseded
462 by GDBus included in Glib.")
463 (license license:gpl2))) ; or Academic Free License 2.1
464
465 (define libsigc++
466 (package
467 (name "libsigc++")
468 (version "2.10.0")
469 (source (origin
470 (method url-fetch)
471 (uri (string-append "mirror://gnome/sources/libsigc++/"
472 (version-major+minor version) "/"
473 name "-" version ".tar.xz"))
474 (sha256
475 (base32
476 "10cd54l4zihss9qxfhd2iip2k7mr292k37i54r2cpgv0c8sdchzq"))))
477 (build-system gnu-build-system)
478 (native-inputs `(("pkg-config" ,pkg-config)
479 ("m4" ,m4)))
480 (home-page "http://libsigc.sourceforge.net/")
481 (synopsis "Type-safe callback system for standard C++")
482 (description
483 "Libsigc++ implements a type-safe callback system for standard C++. It
484 allows you to define signals and to connect those signals to any callback
485 function, either global or a member function, regardless of whether it is
486 static or virtual.
487
488 It also contains adaptor classes for connection of dissimilar callbacks and
489 has an ease of use unmatched by other C++ callback libraries.")
490 (license license:lgpl2.1+)))
491
492 (define glibmm
493 (package
494 (name "glibmm")
495 (version "2.50.1")
496 (source (origin
497 (method url-fetch)
498 (uri (string-append "mirror://gnome/sources/glibmm/"
499 (version-major+minor version)
500 "/glibmm-" version ".tar.xz"))
501 (sha256
502 (base32
503 "1926b3adx903hzvdp8glblsgjyadzqnwgkj8hg605d4wv98m1n0z"))))
504 (build-system gnu-build-system)
505 (arguments
506 `(#:phases (alist-cons-before
507 'build 'pre-build
508 (lambda _
509 ;; This test uses /etc/fstab as an example file to read
510 ;; from; choose a better example.
511 (substitute* "tests/giomm_simple/main.cc"
512 (("/etc/fstab")
513 (string-append (getcwd)
514 "/tests/giomm_simple/main.cc")))
515
516 ;; This test does a DNS lookup, and then expects to be able
517 ;; to open a TLS session; just skip it.
518 (substitute* "tests/giomm_tls_client/main.cc"
519 (("Gio::init.*$")
520 "return 77;\n")))
521 %standard-phases)))
522 (native-inputs `(("pkg-config" ,pkg-config)
523 ("glib" ,glib "bin")))
524 (propagated-inputs
525 `(("libsigc++" ,libsigc++)
526 ("glib" ,glib)))
527 (home-page "http://gtkmm.org/")
528 (synopsis "C++ interface to the GLib library")
529 (description
530 "Glibmm provides a C++ programming interface to the part of GLib that are
531 useful for C++.")
532 (license license:lgpl2.1+)))
533
534 (define-public python2-pygobject-2
535 (package
536 (name "python2-pygobject")
537 ;; This was the last version to declare the 2.0 platform number, i.e. its
538 ;; pkg-config files were named pygobject-2.0.pc
539 (version "2.28.6")
540 (source
541 (origin
542 (method url-fetch)
543 (uri (string-append "mirror://gnome/sources/pygobject/"
544 (version-major+minor version)
545 "/pygobject-" version ".tar.xz"))
546 (sha256
547 (base32
548 "1f5dfxjnil2glfwxnqr14d2cjfbkghsbsn8n04js2c2icr7iv2pv"))
549 (patches (search-patches
550 "python2-pygobject-2-gi-info-type-error-domain.patch"))))
551 (build-system gnu-build-system)
552 (native-inputs
553 `(("which" ,which)
554 ("glib-bin" ,glib "bin") ;for tests: glib-compile-schemas
555 ("pkg-config" ,pkg-config)
556 ("dbus" ,dbus))) ;for tests
557 (inputs
558 `(("python" ,python-2)
559 ("glib" ,glib)
560 ("python2-pycairo" ,python2-pycairo)
561 ("gobject-introspection" ,gobject-introspection)))
562 (propagated-inputs
563 `(("libffi" ,libffi))) ;mentioned in pygobject-2.0.pc
564 (arguments
565 `(#:tests? #f ;segfaults during tests
566 #:configure-flags '("LIBS=-lcairo-gobject")))
567 (home-page "https://pypi.python.org/pypi/PyGObject")
568 (synopsis "Python bindings for GObject")
569 (description
570 "Python bindings for GLib, GObject, and GIO.")
571 (license license:lgpl2.1+)))
572
573 (define-public python-pygobject
574 (package
575 (name "python-pygobject")
576 (version "3.24.1")
577 (source
578 (origin
579 (method url-fetch)
580 (uri (string-append "mirror://gnome/sources/pygobject/"
581 (version-major+minor version)
582 "/pygobject-" version ".tar.xz"))
583 (sha256
584 (base32
585 "1zdzznrj2s1gsrv2z4r0n88fzba8zjc1n2r313xi77lhl1daja56"))))
586 (build-system gnu-build-system)
587 (native-inputs
588 `(("which" ,which)
589 ;for tests: dbus-run-session and glib-compile-schemas
590 ("dbus" ,dbus)
591 ("glib-bin" ,glib "bin")
592 ("pkg-config" ,pkg-config)))
593 (inputs
594 `(("python" ,python)
595 ("python-pycairo" ,python-pycairo)
596 ("gobject-introspection" ,gobject-introspection)))
597 (propagated-inputs
598 ;; pygobject-3.0.pc refers to all these.
599 `(("glib" ,glib)
600 ("libffi" ,libffi)))
601 ;; For finding typelib files, since gobject-introscpetion isn't propagated.
602 (native-search-paths (package-native-search-paths gobject-introspection))
603 (home-page "https://live.gnome.org/PyGObject")
604 (synopsis "Python bindings for GObject")
605 (description
606 "Python bindings for GLib, GObject, and GIO.")
607 (license license:lgpl2.1+)
608 (properties `((python2-variant . ,(delay python2-pygobject))))))
609
610 (define-public python2-pygobject
611 (package (inherit (strip-python2-variant python-pygobject))
612 (name "python2-pygobject")
613 (inputs
614 `(("python" ,python-2)
615 ("python-pycairo" ,python2-pycairo)
616 ("gobject-introspection" ,gobject-introspection)))))
617
618 (define telepathy-glib
619 (package
620 (name "telepathy-glib")
621 (version "0.24.1")
622 (source
623 (origin
624 (method url-fetch)
625 (uri
626 (string-append
627 "https://telepathy.freedesktop.org/releases/telepathy-glib/"
628 "telepathy-glib-" version ".tar.gz"))
629 (sha256
630 (base32
631 "1symyzbjmxvksn2ifdkk50lafjm2llf2sbmky062gq2pz3cg23cy"))
632 (patches
633 (list
634 ;; Don't use the same test name for multiple tests.
635 ;; <https://bugs.freedesktop.org/show_bug.cgi?id=92245>
636 (origin
637 (method url-fetch)
638 (uri "https://bugs.freedesktop.org/attachment.cgi?id=118608")
639 (file-name (string-append "telepathy-glib-duplicate-tests.patch"))
640 (sha256
641 (base32
642 "0z261fwrszxb28ccg3hsg9rizig4s84zvwmx6y31a4pyv7bvs5w3")))))))
643 (build-system gnu-build-system)
644 (arguments
645 '(#:configure-flags '("--enable-vala-bindings")))
646 (native-inputs
647 `(("glib" ,glib "bin") ; uses glib-mkenums
648 ("gobject-introspection" ,gobject-introspection)
649 ("pkg-config" ,pkg-config)
650 ("python" ,python-2)
651 ("vala" ,vala)
652 ("xsltproc" ,libxslt)))
653 (propagated-inputs
654 ;; There are all in the Requires.private field of telepathy-glib.pc.
655 `(("dbus" ,dbus)
656 ("dbus-glib" ,dbus-glib)
657 ("glib" ,glib)))
658 (home-page "http://telepathy.freedesktop.org/wiki/")
659 (synopsis "GLib Real-time communications framework over D-Bus")
660 (description "Telepathy is a flexible, modular communications framework
661 that enables real-time communication over D-Bus via pluggable protocol
662 backends. Telepathy is a communications service that can be accessed by
663 many applications simultaneously.
664
665 This package provides the library for GLib applications.")
666 (license license:lgpl2.1+)))
667
668 (define-public dbus-c++
669 (package
670 (name "dbus-c++")
671 (version "0.9.0")
672 (source (origin
673 (method url-fetch)
674 (uri
675 (string-append
676 "mirror://sourceforge/dbus-cplusplus/dbus-c%2B%2B/"
677 version "/libdbus-c%2B%2B-" version ".tar.gz"))
678 (file-name (string-append name "-" version ".tar.gz"))
679 (sha256
680 (base32
681 "0qafmy2i6dzx4n1dqp6pygyy6gjljnb7hwjcj2z11c1wgclsq4dw"))))
682 (build-system gnu-build-system)
683 (propagated-inputs
684 `(("dbus" ,dbus))) ;mentioned in the pkg-config file
685 (inputs
686 `(("efl" ,efl)
687 ("expat" ,expat)
688 ("glib" ,glib)))
689 (native-inputs
690 `(("pkg-config" ,pkg-config)))
691 (arguments
692 `(;; The 'configure' machinery fails to detect that it needs -lpthread.
693 #:configure-flags (list "LDFLAGS=-lpthread")
694 #:phases
695 (modify-phases %standard-phases
696 (add-before 'configure 'add-missing-header
697 (lambda _
698 (substitute* "include/dbus-c++/eventloop-integration.h"
699 (("#include <errno.h>")
700 "#include <errno.h>\n#include <unistd.h>")))))))
701 (synopsis "D-Bus API for C++")
702 (description "This package provides D-Bus client API bindings for the C++
703 programming langauage. It also contains the utility
704 @command{dbuscxx-xml2cpp}.")
705 (home-page "https://sourceforge.net/projects/dbus-cplusplus/")
706 (license license:lgpl2.1+)))
707
708 (define-public appstream-glib
709 (package
710 (name "appstream-glib")
711 (version "0.6.7")
712 (source (origin
713 (method url-fetch)
714 (uri (string-append "https://people.freedesktop.org/~hughsient/"
715 "appstream-glib/releases/"
716 "appstream-glib-" version ".tar.xz"))
717 (sha256
718 (base32
719 "08mrf4k0jhnpdd4fig2grmi2vbxkgdhrwk0d0zq0j1wp5ip7arwp"))))
720 (build-system gnu-build-system)
721 (native-inputs
722 `(("pkg-config" ,pkg-config)))
723 (inputs
724 `(("gdk-pixbuf" ,gdk-pixbuf)
725 ("glib" ,glib)
726 ("gtk+" ,gtk+)
727 ("json-glib" ,json-glib)
728 ("libarchive" ,libarchive)
729 ("libsoup" ,libsoup)
730 ("nettle" ,nettle)
731 ("util-linux" ,util-linux)))
732 (arguments
733 `(#:configure-flags
734 '("--disable-firmware" "--disable-dep11")
735 #:phases
736 (modify-phases %standard-phases
737 (add-after 'unpack 'patch-tests
738 (lambda _
739 (substitute* "libappstream-glib/as-self-test.c"
740 (("g_test_add_func.*as_test_store_local_appdata_func);") "")
741 (("g_test_add_func.*as_test_store_speed_appdata_func);") "")
742 (("g_test_add_func.*as_test_store_speed_desktop_func);") ""))
743 #t)))))
744 (home-page "https://github.com/hughsie/appstream-glib")
745 (synopsis "Library for reading and writing AppStream metadata")
746 (description "This library provides objects and helper methods to help
747 reading and writing @uref{https://www.freedesktop.org/wiki/Distributions/AppStream,AppStream}
748 metadata.")
749 (license license:lgpl2.1+)))