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