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