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