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