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