Merge branch 'core-updates'
[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 "https://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 (patches (search-patches "intltool-perl-compatibility.patch"))
351 (sha256
352 (base32
353 "1karx4sb7bnm2j67q0q74hspkfn6lqprpy5r99vkn5bb36a4viv7"))))
354 (build-system gnu-build-system)
355 (inputs
356 `(("file" ,file)))
357 (propagated-inputs
358 `(;; Propagate gettext because users expect it to be there, and so does
359 ;; the `intltool-update' script.
360 ("gettext" ,gettext-minimal)
361
362 ("perl-xml-parser" ,perl-xml-parser)
363 ("perl" ,perl)))
364 (arguments
365 `(#:phases (alist-cons-after
366 'unpack 'patch-file-references
367 (lambda* (#:key inputs #:allow-other-keys)
368 (let ((file (assoc-ref inputs "file")))
369 (substitute* "intltool-update.in"
370 (("`file") (string-append "`" file "/bin/file")))))
371 %standard-phases)))
372 (home-page "https://launchpad.net/intltool/+download")
373 (synopsis "Tools to centralise translations of different file formats")
374 (description
375 "Intltool is a set of tools to centralise translations of many different
376 file formats using GNU gettext-compatible PO files.
377
378 The intltool collection can be used to do these things:
379
380 Extract translatable strings from various source files (.xml.in,
381 glade, .desktop.in, .server.in, .oaf.in).
382
383 Collect the extracted strings together with messages from traditional
384 source files (.c, .h) in po/$(PACKAGE).pot.
385
386 Merge back the translations from .po files into .xml, .desktop and
387 oaf files. This merge step will happen at build resp. installation time.")
388 (license license:gpl2+)))
389
390 (define itstool
391 (package
392 (name "itstool")
393 (version "2.0.2")
394 (source (origin
395 (method url-fetch)
396 (uri (string-append "http://files.itstool.org/itstool/itstool-"
397 version ".tar.bz2"))
398 (sha256
399 (base32
400 "0fh34wi52i0qikgvlmrcpf1vx6gc1xqdad4539l4d9hikfsrz45z"))))
401 (build-system gnu-build-system)
402 (inputs
403 `(("libxml2" ,libxml2)
404 ("python2-libxml2" ,python2-libxml2)
405 ("python-2" ,python-2)))
406 (arguments
407 '(#:phases
408 (modify-phases %standard-phases
409 (add-after
410 'install 'wrap-program
411 (lambda* (#:key outputs #:allow-other-keys)
412 (let ((prog (string-append (assoc-ref outputs "out")
413 "/bin/itstool")))
414 (wrap-program prog
415 `("PYTHONPATH" = (,(getenv "PYTHONPATH"))))))))))
416 (home-page "http://www.itstool.org")
417 (synopsis "Tool to translate XML documents with PO files")
418 (description
419 "ITS Tool allows you to translate your XML documents with PO files, using
420 rules from the W3C Internationalization Tag Set (ITS) to determine what to
421 translate and how to separate it into PO file messages.
422
423 PO files are the standard translation format for GNU and other Unix-like
424 systems. They present translatable information as discrete messages, allowing
425 each message to be translated independently. In contrast to whole-page
426 translation, translating with a message-based format like PO means you can
427 easily track changes to the source document down to the paragraph. When new
428 strings are added or existing strings are modified, you only need to update the
429 corresponding messages.
430
431 ITS Tool is designed to make XML documents translatable through PO files by
432 applying standard ITS rules, as well as extension rules specific to ITS Tool.
433 ITS also provides an industry standard way for authors to override translation
434 information in their documents, such as whether a particular element should be
435 translated.")
436 (license license:gpl3+)))
437
438 (define dbus-glib
439 (package
440 (name "dbus-glib")
441 (version "0.108")
442 (source (origin
443 (method url-fetch)
444 (uri
445 (string-append "https://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-"
446 version ".tar.gz"))
447 (sha256
448 (base32
449 "0b307hw9j41npzr6niw1bs6ryp87m5yafg492gqwvsaj4dz0qd4z"))))
450 (build-system gnu-build-system)
451 (propagated-inputs ; according to dbus-glib-1.pc
452 `(("dbus" ,dbus)
453 ("glib" ,glib)))
454 (inputs
455 `(("expat" ,expat)))
456 (native-inputs
457 `(("glib" ,glib "bin")
458 ("pkg-config" ,pkg-config)))
459 (home-page "http://dbus.freedesktop.org/doc/dbus-glib/")
460 (synopsis "D-Bus GLib bindings")
461 (description
462 "GLib bindings for D-Bus. The package is obsolete and superseded
463 by GDBus included in Glib.")
464 (license license:gpl2))) ; or Academic Free License 2.1
465
466 (define libsigc++
467 (package
468 (name "libsigc++")
469 (version "2.10.0")
470 (source (origin
471 (method url-fetch)
472 (uri (string-append "mirror://gnome/sources/libsigc++/"
473 (version-major+minor version) "/"
474 name "-" version ".tar.xz"))
475 (sha256
476 (base32
477 "10cd54l4zihss9qxfhd2iip2k7mr292k37i54r2cpgv0c8sdchzq"))))
478 (build-system gnu-build-system)
479 (native-inputs `(("pkg-config" ,pkg-config)
480 ("m4" ,m4)))
481 (home-page "http://libsigc.sourceforge.net/")
482 (synopsis "Type-safe callback system for standard C++")
483 (description
484 "Libsigc++ implements a type-safe callback system for standard C++. It
485 allows you to define signals and to connect those signals to any callback
486 function, either global or a member function, regardless of whether it is
487 static or virtual.
488
489 It also contains adaptor classes for connection of dissimilar callbacks and
490 has an ease of use unmatched by other C++ callback libraries.")
491 (license license:lgpl2.1+)))
492
493 (define glibmm
494 (package
495 (name "glibmm")
496 (version "2.50.1")
497 (source (origin
498 (method url-fetch)
499 (uri (string-append "mirror://gnome/sources/glibmm/"
500 (version-major+minor version)
501 "/glibmm-" version ".tar.xz"))
502 (sha256
503 (base32
504 "1926b3adx903hzvdp8glblsgjyadzqnwgkj8hg605d4wv98m1n0z"))))
505 (build-system gnu-build-system)
506 (arguments
507 `(#:phases (alist-cons-before
508 'build 'pre-build
509 (lambda _
510 ;; This test uses /etc/fstab as an example file to read
511 ;; from; choose a better example.
512 (substitute* "tests/giomm_simple/main.cc"
513 (("/etc/fstab")
514 (string-append (getcwd)
515 "/tests/giomm_simple/main.cc")))
516
517 ;; This test does a DNS lookup, and then expects to be able
518 ;; to open a TLS session; just skip it.
519 (substitute* "tests/giomm_tls_client/main.cc"
520 (("Gio::init.*$")
521 "return 77;\n")))
522 %standard-phases)))
523 (native-inputs `(("pkg-config" ,pkg-config)
524 ("glib" ,glib "bin")))
525 (propagated-inputs
526 `(("libsigc++" ,libsigc++)
527 ("glib" ,glib)))
528 (home-page "http://gtkmm.org/")
529 (synopsis "C++ interface to the GLib library")
530 (description
531 "Glibmm provides a C++ programming interface to the part of GLib that are
532 useful for C++.")
533 (license license:lgpl2.1+)))
534
535 (define-public python2-pygobject-2
536 (package
537 (name "python2-pygobject")
538 ;; This was the last version to declare the 2.0 platform number, i.e. its
539 ;; pkg-config files were named pygobject-2.0.pc
540 (version "2.28.6")
541 (source
542 (origin
543 (method url-fetch)
544 (uri (string-append "mirror://gnome/sources/pygobject/"
545 (version-major+minor version)
546 "/pygobject-" version ".tar.xz"))
547 (sha256
548 (base32
549 "1f5dfxjnil2glfwxnqr14d2cjfbkghsbsn8n04js2c2icr7iv2pv"))
550 (patches (search-patches
551 "python2-pygobject-2-gi-info-type-error-domain.patch"))))
552 (build-system gnu-build-system)
553 (native-inputs
554 `(("which" ,which)
555 ("glib-bin" ,glib "bin") ;for tests: glib-compile-schemas
556 ("pkg-config" ,pkg-config)
557 ("dbus" ,dbus))) ;for tests
558 (inputs
559 `(("python" ,python-2)
560 ("glib" ,glib)
561 ("python2-pycairo" ,python2-pycairo)
562 ("gobject-introspection" ,gobject-introspection)))
563 (propagated-inputs
564 `(("libffi" ,libffi))) ;mentioned in pygobject-2.0.pc
565 (arguments
566 `(#:tests? #f ;segfaults during tests
567 #:configure-flags '("LIBS=-lcairo-gobject")))
568 (home-page "https://pypi.python.org/pypi/PyGObject")
569 (synopsis "Python bindings for GObject")
570 (description
571 "Python bindings for GLib, GObject, and GIO.")
572 (license license:lgpl2.1+)))
573
574 (define-public python-pygobject
575 (package
576 (name "python-pygobject")
577 (version "3.24.1")
578 (source
579 (origin
580 (method url-fetch)
581 (uri (string-append "mirror://gnome/sources/pygobject/"
582 (version-major+minor version)
583 "/pygobject-" version ".tar.xz"))
584 (sha256
585 (base32
586 "1zdzznrj2s1gsrv2z4r0n88fzba8zjc1n2r313xi77lhl1daja56"))))
587 (build-system gnu-build-system)
588 (native-inputs
589 `(("which" ,which)
590 ;for tests: dbus-run-session and glib-compile-schemas
591 ("dbus" ,dbus)
592 ("glib-bin" ,glib "bin")
593 ("pkg-config" ,pkg-config)))
594 (inputs
595 `(("python" ,python)
596 ("python-pycairo" ,python-pycairo)
597 ("gobject-introspection" ,gobject-introspection)))
598 (propagated-inputs
599 ;; pygobject-3.0.pc refers to all these.
600 `(("glib" ,glib)
601 ("libffi" ,libffi)))
602 ;; For finding typelib files, since gobject-introscpetion isn't propagated.
603 (native-search-paths (package-native-search-paths gobject-introspection))
604 (home-page "https://live.gnome.org/PyGObject")
605 (synopsis "Python bindings for GObject")
606 (description
607 "Python bindings for GLib, GObject, and GIO.")
608 (license license:lgpl2.1+)
609 (properties `((python2-variant . ,(delay python2-pygobject))))))
610
611 (define-public python2-pygobject
612 (package (inherit (strip-python2-variant python-pygobject))
613 (name "python2-pygobject")
614 (inputs
615 `(("python" ,python-2)
616 ("python-pycairo" ,python2-pycairo)
617 ("gobject-introspection" ,gobject-introspection)))))
618
619 (define telepathy-glib
620 (package
621 (name "telepathy-glib")
622 (version "0.24.1")
623 (source
624 (origin
625 (method url-fetch)
626 (uri
627 (string-append
628 "https://telepathy.freedesktop.org/releases/telepathy-glib/"
629 "telepathy-glib-" version ".tar.gz"))
630 (sha256
631 (base32
632 "1symyzbjmxvksn2ifdkk50lafjm2llf2sbmky062gq2pz3cg23cy"))
633 (patches
634 (list
635 ;; Don't use the same test name for multiple tests.
636 ;; <https://bugs.freedesktop.org/show_bug.cgi?id=92245>
637 (origin
638 (method url-fetch)
639 (uri "https://bugs.freedesktop.org/attachment.cgi?id=118608")
640 (file-name (string-append "telepathy-glib-duplicate-tests.patch"))
641 (sha256
642 (base32
643 "0z261fwrszxb28ccg3hsg9rizig4s84zvwmx6y31a4pyv7bvs5w3")))))))
644 (build-system gnu-build-system)
645 (arguments
646 '(#:configure-flags '("--enable-vala-bindings")))
647 (native-inputs
648 `(("glib" ,glib "bin") ; uses glib-mkenums
649 ("gobject-introspection" ,gobject-introspection)
650 ("pkg-config" ,pkg-config)
651 ("python" ,python-2)
652 ("vala" ,vala)
653 ("xsltproc" ,libxslt)))
654 (propagated-inputs
655 ;; There are all in the Requires.private field of telepathy-glib.pc.
656 `(("dbus" ,dbus)
657 ("dbus-glib" ,dbus-glib)
658 ("glib" ,glib)))
659 (home-page "http://telepathy.freedesktop.org/wiki/")
660 (synopsis "GLib Real-time communications framework over D-Bus")
661 (description "Telepathy is a flexible, modular communications framework
662 that enables real-time communication over D-Bus via pluggable protocol
663 backends. Telepathy is a communications service that can be accessed by
664 many applications simultaneously.
665
666 This package provides the library for GLib applications.")
667 (license license:lgpl2.1+)))
668
669 (define-public dbus-c++
670 (package
671 (name "dbus-c++")
672 (version "0.9.0")
673 (source (origin
674 (method url-fetch)
675 (uri
676 (string-append
677 "mirror://sourceforge/dbus-cplusplus/dbus-c%2B%2B/"
678 version "/libdbus-c%2B%2B-" version ".tar.gz"))
679 (file-name (string-append name "-" version ".tar.gz"))
680 (sha256
681 (base32
682 "0qafmy2i6dzx4n1dqp6pygyy6gjljnb7hwjcj2z11c1wgclsq4dw"))))
683 (build-system gnu-build-system)
684 (propagated-inputs
685 `(("dbus" ,dbus))) ;mentioned in the pkg-config file
686 (inputs
687 `(("efl" ,efl)
688 ("expat" ,expat)
689 ("glib" ,glib)))
690 (native-inputs
691 `(("pkg-config" ,pkg-config)))
692 (arguments
693 `(;; The 'configure' machinery fails to detect that it needs -lpthread.
694 #:configure-flags (list "LDFLAGS=-lpthread")
695 #:phases
696 (modify-phases %standard-phases
697 (add-before 'configure 'add-missing-header
698 (lambda _
699 (substitute* "include/dbus-c++/eventloop-integration.h"
700 (("#include <errno.h>")
701 "#include <errno.h>\n#include <unistd.h>")))))))
702 (synopsis "D-Bus API for C++")
703 (description "This package provides D-Bus client API bindings for the C++
704 programming langauage. It also contains the utility
705 @command{dbuscxx-xml2cpp}.")
706 (home-page "https://sourceforge.net/projects/dbus-cplusplus/")
707 (license license:lgpl2.1+)))
708
709 (define-public appstream-glib
710 (package
711 (name "appstream-glib")
712 (version "0.6.7")
713 (source (origin
714 (method url-fetch)
715 (uri (string-append "https://people.freedesktop.org/~hughsient/"
716 "appstream-glib/releases/"
717 "appstream-glib-" version ".tar.xz"))
718 (sha256
719 (base32
720 "08mrf4k0jhnpdd4fig2grmi2vbxkgdhrwk0d0zq0j1wp5ip7arwp"))))
721 (build-system gnu-build-system)
722 (native-inputs
723 `(("pkg-config" ,pkg-config)))
724 (inputs
725 `(("gdk-pixbuf" ,gdk-pixbuf)
726 ("glib" ,glib)
727 ("gtk+" ,gtk+)
728 ("json-glib" ,json-glib)
729 ("libarchive" ,libarchive)
730 ("libsoup" ,libsoup)
731 ("nettle" ,nettle)
732 ("util-linux" ,util-linux)))
733 (arguments
734 `(#:configure-flags
735 '("--disable-firmware" "--disable-dep11")
736 #:phases
737 (modify-phases %standard-phases
738 (add-after 'unpack 'patch-tests
739 (lambda _
740 (substitute* "libappstream-glib/as-self-test.c"
741 (("g_test_add_func.*as_test_store_local_appdata_func);") "")
742 (("g_test_add_func.*as_test_store_speed_appdata_func);") "")
743 (("g_test_add_func.*as_test_store_speed_desktop_func);") ""))
744 #t)))))
745 (home-page "https://github.com/hughsie/appstream-glib")
746 (synopsis "Library for reading and writing AppStream metadata")
747 (description "This library provides objects and helper methods to help
748 reading and writing @uref{https://www.freedesktop.org/wiki/Distributions/AppStream,AppStream}
749 metadata.")
750 (license license:lgpl2.1+)))