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