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