gnu: python-html5lib: Add dependency on python-webencodings.
[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>
7fb51d97 5;;; Copyright © 2014, 2015, 2016 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>
3889a82e
NK
8;;;
9;;; This file is part of GNU Guix.
10;;;
11;;; GNU Guix is free software; you can redistribute it and/or modify it
12;;; under the terms of the GNU General Public License as published by
13;;; the Free Software Foundation; either version 3 of the License, or (at
14;;; your option) any later version.
15;;;
16;;; GNU Guix is distributed in the hope that it will be useful, but
17;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19;;; GNU General Public License for more details.
20;;;
21;;; You should have received a copy of the GNU General Public License
22;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
943f33a3 24(define-module (gnu packages glib)
b5b73a82 25 #:use-module ((guix licenses) #:prefix license:)
3889a82e
NK
26 #:use-module (guix packages)
27 #:use-module (guix download)
a1de06b6 28 #:use-module (guix utils)
3889a82e 29 #:use-module (guix build-system gnu)
00f2bf34 30 #:use-module (guix build-system python)
943f33a3
LC
31 #:use-module (gnu packages)
32 #:use-module (gnu packages base)
9ceb630c 33 #:use-module (gnu packages bison)
943f33a3 34 #:use-module (gnu packages compression)
89eb7581 35 #:use-module (gnu packages enlightenment)
9ceb630c 36 #:use-module (gnu packages flex)
1dba6407 37 #:use-module (gnu packages gettext)
c73d4c59 38 #:use-module (gnu packages gnome)
9ceb630c 39 #:use-module (gnu packages gtk)
943f33a3 40 #:use-module (gnu packages libffi)
6983ba56 41 #:use-module (gnu packages pcre)
d6b8cb5c 42 #:use-module (gnu packages perl)
943f33a3
LC
43 #:use-module (gnu packages pkg-config)
44 #:use-module (gnu packages python)
7bc5cc2b 45 #:use-module (gnu packages xml)
5aa601a3 46 #:use-module (gnu packages bash)
80370441 47 #:use-module (gnu packages file)
89eb7581 48 #:use-module (gnu packages xml)
80370441 49 #:use-module (gnu packages xorg)
a5a7d374 50 #:use-module (gnu packages m4)
943f33a3 51
80370441
LC
52 ;; Export variables up-front to allow circular dependency with the 'xorg'
53 ;; module.
54 #:export (dbus
55 glib
6ac6a6b9 56 gobject-introspection
80370441
LC
57 dbus-glib
58 intltool
a5a7d374
LC
59 itstool
60 libsigc++
7873318d
AE
61 glibmm
62 telepathy-glib))
80370441
LC
63
64(define dbus
943f33a3
LC
65 (package
66 (name "dbus")
90dcd496 67 (replacement dbus-1.10.12)
e732737a 68 (version "1.10.10")
943f33a3 69 (source (origin
25087f60
SB
70 (method url-fetch)
71 (uri (string-append
7fb51d97 72 "https://dbus.freedesktop.org/releases/dbus/dbus-"
25087f60
SB
73 version ".tar.gz"))
74 (sha256
75 (base32
e732737a 76 "0hwsfczhx2djmc9116vj5v230i7gpjihwh3vbljs1ldlk831v3wx"))
fc1adab1 77 (patches (search-patches "dbus-helper-search-path.patch"))))
943f33a3 78 (build-system gnu-build-system)
8eaa8a3b 79 (arguments
25087f60
SB
80 '(#:configure-flags
81 (list
82 ;; Install the system bus socket under /var.
83 "--localstatedir=/var"
8eaa8a3b 84
25087f60
SB
85 ;; Install the session bus socket under /tmp.
86 "--with-session-socket-dir=/tmp"
8eaa8a3b 87
25087f60
SB
88 ;; Use /etc/dbus-1 for system-wide config.
89 ;; Look for configuration file under
90 ;; /etc/dbus-1. This is notably required by
91 ;; 'dbus-daemon-launch-helper', which looks for
92 ;; the 'system.conf' file in that place,
93 ;; regardless of what '--config-file' was
94 ;; passed to 'dbus-daemon' on the command line;
95 ;; see <https://bugs.freedesktop.org/show_bug.cgi?id=92458>.
96 "--sysconfdir=/etc")
97 #:phases
98 (modify-phases %standard-phases
99 (replace 'install
100 (lambda _
101 ;; Don't try to create /var and /etc.
102 (system* "make"
103 "localstatedir=/tmp/dummy"
104 "sysconfdir=/tmp/dummy"
105 "install"))))))
708be46b
LC
106 (native-inputs
107 `(("pkg-config" ,pkg-config)))
943f33a3 108 (inputs
d6b8cb5c 109 `(("expat" ,expat)
80370441
LC
110
111 ;; Add a dependency on libx11 so that 'dbus-launch' has support for
112 ;; '--autolaunch'.
113 ("libx11" ,libx11)))
114
943f33a3
LC
115 (home-page "http://dbus.freedesktop.org/")
116 (synopsis "Message bus for inter-process communication (IPC)")
117 (description
118 "D-Bus is a message bus system, a simple way for applications to
35b9e423 119talk to one another. In addition to interprocess communication, D-Bus
943f33a3
LC
120helps coordinate process lifecycle; it makes it simple and reliable to
121code a \"single instance\" application or daemon, and to launch
122applications and daemons on demand when their services are needed.
123
124D-Bus supplies both a system daemon (for events such as \"new hardware
125device added\" or \"printer queue changed\") and a
126per-user-login-session daemon (for general IPC needs among user
35b9e423 127applications). Also, the message bus is built on top of a general
943f33a3
LC
128one-to-one message passing framework, which can be used by any two apps
129to communicate directly (without going through the message bus
35b9e423 130daemon). Currently the communicating applications are on one computer,
943f33a3
LC
131or through unencrypted TCP/IP suitable for use behind a firewall with
132shared NFS home directories.")
d6b8cb5c 133 (license license:gpl2+))) ; or Academic Free License 2.1
3889a82e 134
90dcd496
LF
135(define dbus-1.10.12
136 (package
137 (inherit dbus)
138 (name "dbus")
139 (source
140 (let ((version "1.10.12"))
141 (origin
fcb9b934 142 (inherit (package-source dbus))
90dcd496
LF
143 (uri (string-append
144 "https://dbus.freedesktop.org/releases/dbus/dbus-"
145 version ".tar.gz"))
146 (sha256
147 (base32
148 "0pa71vf5c0d7k3gni06iascmplj0j5g70wbc833ayvi71d1pj2i1")))))))
149
80370441 150(define glib
3889a82e
NK
151 (package
152 (name "glib")
008a081c 153 (version "2.48.2")
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
008a081c 161 "1x6kwrk1zyd3csv0ca3pmwc4bnkc33agn95cds15h6nbi4apappj"))
6983ba56 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)
3889a82e 171 ("libffi" ,libffi)
c4c4cc05
JD
172 ("zlib" ,zlib)
173 ("tzdata" ,tzdata))) ; for tests/gdatetime.c
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
c4c4cc05 180 ("bash" ,bash)))
943f33a3 181 (arguments
6983ba56
SB
182 '(#:phases
183 (modify-phases %standard-phases
184 (add-before 'build 'pre-build
185 (lambda* (#:key inputs outputs #:allow-other-keys)
186 ;; For tests/gdatetime.c.
187 (setenv "TZDIR"
188 (string-append (assoc-ref inputs "tzdata")
189 "/share/zoneinfo"))
190
191 ;; Some tests want write access there.
192 (setenv "HOME" (getcwd))
193 (setenv "XDG_CACHE_HOME" (getcwd))
194
195 (substitute* '("glib/gspawn.c"
196 "glib/tests/utils.c"
197 "tests/spawn-test.c")
198 (("/bin/sh")
199 (string-append (assoc-ref inputs "bash") "/bin/sh")))))
200 (add-before 'check 'disable-failing-tests
201 (lambda _
202 (let ((disable
203 (lambda (test-file test-paths)
204 (define pattern+procs
205 (map (lambda (test-path)
206 (cons
207 ;; XXX: only works for single line statements.
208 (format #f "g_test_add_func.*\"~a\".*" test-path)
209 (const "")))
210 test-paths))
211 (substitute test-file pattern+procs)))
212 (failing-tests
213 '(("glib/tests/thread.c"
214 (;; prlimit(2) returns ENOSYS on Linux 2.6.32-5-xen-amd64
215 ;; as found on hydra.gnu.org, and strace(1) doesn't
216 ;; recognize it.
217 "/thread/thread4"))
218
219 ("glib/tests/timer.c"
220 (;; fails if compiler optimizations are enabled, which they
221 ;; are by default.
222 "/timer/stop"))
223
224 ("gio/tests/gapplication.c"
225 (;; XXX: proven to be unreliable. See:
226 ;; <https://bugs.debian.org/756273>
227 ;; <http://bugs.gnu.org/18445>
228 "/gapplication/quit"
229
230 ;; XXX: fails randomly for unknown reason. See:
231 ;; <https://lists.gnu.org/archive/html/guix-devel/2016-04/msg00215.html>
232 "/gapplication/local-actions"))
233
234 ("gio/tests/contenttype.c"
235 (;; XXX: requires shared-mime-info.
236 "/contenttype/guess"
237 "/contenttype/subtype"
238 "/contenttype/list"
239 "/contenttype/icon"
240 "/contenttype/symbolic-icon"
241 "/contenttype/tree"))
242
243 ("gio/tests/appinfo.c"
244 (;; XXX: requires update-desktop-database.
245 "/appinfo/associations"))
246
247 ("gio/tests/desktop-app-info.c"
248 (;; XXX: requires update-desktop-database.
249 "/desktop-app-info/delete"
250 "/desktop-app-info/default"
251 "/desktop-app-info/fallback"
252 "/desktop-app-info/lastused"
253 "/desktop-app-info/search"))
254
255 ("gio/tests/gdbus-peer.c"
256 (;; Requires /etc/machine-id.
257 "/gdbus/codegen-peer-to-peer"))
258
259 ("gio/tests/gdbus-unix-addresses.c"
260 (;; Requires /etc/machine-id.
261 "/gdbus/x11-autolaunch")))))
262 (and-map (lambda (x) (apply disable x)) failing-tests)))))
943f33a3
LC
263
264 ;; Note: `--docdir' and `--htmldir' are not honored, so work around it.
265 #:configure-flags (list (string-append "--with-html-dir="
266 (assoc-ref %outputs "doc")
b2a80c78 267 "/share/gtk-doc/html"))
00585a55
LC
268
269 ;; In 'gio/tests', 'gdbus-test-codegen-generated.h' is #included in a
270 ;; file that gets compiled possibly before it has been fully generated.
271 #:parallel-tests? #f))
ce2df078
LC
272
273 (native-search-paths
274 ;; This variable is not really "owned" by GLib, but several related
275 ;; packages refer to it: gobject-introspection's tools use it as a search
276 ;; path for .gir files, and it's also a search path for schemas produced
277 ;; by 'glib-compile-schemas'.
278 (list (search-path-specification
279 (variable "XDG_DATA_DIRS")
1b85e57f
SB
280 (files '("share")))
281 ;; To load extra gio modules from glib-networking, etc.
282 (search-path-specification
283 (variable "GIO_EXTRA_MODULES")
284 (files '("lib/gio/modules")))))
ce2df078
LC
285 (search-paths native-search-paths)
286
f50d2669 287 (synopsis "Thread-safe general utility library; basis of GTK+ and GNOME")
3889a82e
NK
288 (description
289 "GLib provides data structure handling for C, portability wrappers,
290and interfaces for such runtime functionality as an event loop, threads,
291dynamic loading, and an object system.")
292 (home-page "http://developer.gnome.org/glib/")
d6b8cb5c 293 (license license:lgpl2.0+))) ; some files are under lgpl2.1+
71eb5c10 294
6ac6a6b9 295(define gobject-introspection
9ceb630c
CR
296 (package
297 (name "gobject-introspection")
6983ba56 298 (version "1.48.0")
9ceb630c
CR
299 (source (origin
300 (method url-fetch)
cc84b08c 301 (uri (string-append "mirror://gnome/sources/"
2474b81d
FB
302 "gobject-introspection/" (version-major+minor version)
303 "/gobject-introspection-" version ".tar.xz"))
9ceb630c 304 (sha256
6983ba56 305 (base32 "0xsqwxhfqzr79av89mg766kxpb2i41bd0vwspk01xjdzrnn5l9zs"))
ed89d901
SB
306 (modules '((guix build utils)))
307 (snippet
308 '(substitute* "tools/g-ir-tool-template.in"
309 (("#!/usr/bin/env @PYTHON@") "#!@PYTHON@")))
fc1adab1
AK
310 (patches (search-patches
311 "gobject-introspection-cc.patch"
312 "gobject-introspection-girepository.patch"
313 "gobject-introspection-absolute-shlib-path.patch"))))
9ceb630c
CR
314 (build-system gnu-build-system)
315 (inputs
316 `(("bison" ,bison)
9ceb630c
CR
317 ("flex" ,flex)
318 ("glib" ,glib)
9ceb630c 319 ("python-2" ,python-2)))
426adbe8 320 (native-inputs
d7e92b87
ML
321 `(("glib" ,glib "bin")
322 ("pkg-config" ,pkg-config)))
af949e8e
CR
323 (propagated-inputs
324 `(;; In practice, GIR users will need libffi when using
325 ;; gobject-introspection.
326 ("libffi" ,libffi)))
5a4753a6
FB
327 (native-search-paths
328 (list (search-path-specification
329 (variable "GI_TYPELIB_PATH")
af070955 330 (files '("lib/girepository-1.0")))))
5a4753a6 331 (search-paths native-search-paths)
9ceb630c 332 (arguments
2474b81d
FB
333 `(;; The patch 'gobject-introspection-absolute-shlib-path.patch' causes
334 ;; some tests to fail.
cc84b08c 335 #:tests? #f))
9ceb630c
CR
336 (home-page "https://wiki.gnome.org/GObjectIntrospection")
337 (synopsis "Generate interface introspection data for GObject libraries")
338 (description
339 "GObject introspection is a middleware layer between C libraries (using
340GObject) and language bindings. The C library can be scanned at compile time
341and generate a metadata file, in addition to the actual native C library. Then
342at runtime, language bindings can read this metadata and automatically provide
343bindings to call into the C library.")
344 ; Some bits are distributed under the LGPL2+, others under the GPL2+
345 (license license:gpl2+)))
346
80370441 347(define intltool
71eb5c10
LC
348 (package
349 (name "intltool")
fa09ebfa 350 (version "0.51.0")
71eb5c10
LC
351 (source (origin
352 (method url-fetch)
d6b8cb5c
AE
353 (uri (string-append "https://launchpad.net/intltool/trunk/"
354 version "/+download/intltool-"
355 version ".tar.gz"))
71eb5c10
LC
356 (sha256
357 (base32
fa09ebfa 358 "1karx4sb7bnm2j67q0q74hspkfn6lqprpy5r99vkn5bb36a4viv7"))))
71eb5c10 359 (build-system gnu-build-system)
93882f0e
EB
360 (inputs
361 `(("file" ,file)))
71eb5c10 362 (propagated-inputs
107b415e
LC
363 `(;; Propagate gettext because users expect it to be there, and so does
364 ;; the `intltool-update' script.
b94a6ca0 365 ("gettext" ,gettext-minimal)
107b415e 366
e33d9d6f 367 ("perl-xml-parser" ,perl-xml-parser)
107b415e 368 ("perl" ,perl)))
93882f0e
EB
369 (arguments
370 `(#:phases (alist-cons-after
371 'unpack 'patch-file-references
372 (lambda* (#:key inputs #:allow-other-keys)
373 (let ((file (assoc-ref inputs "file")))
374 (substitute* "intltool-update.in"
375 (("`file") (string-append "`" file "/bin/file")))))
376 %standard-phases)))
d6b8cb5c
AE
377 (home-page "https://launchpad.net/intltool/+download")
378 (synopsis "Tools to centralise translations of different file formats")
71eb5c10 379 (description
35b9e423 380 "Intltool is a set of tools to centralise translations of many different
71eb5c10
LC
381file formats using GNU gettext-compatible PO files.
382
383The intltool collection can be used to do these things:
384
385 Extract translatable strings from various source files (.xml.in,
386 glade, .desktop.in, .server.in, .oaf.in).
387
388 Collect the extracted strings together with messages from traditional
389 source files (.c, .h) in po/$(PACKAGE).pot.
390
391 Merge back the translations from .po files into .xml, .desktop and
35b9e423 392 oaf files. This merge step will happen at build resp. installation time.")
d6b8cb5c 393 (license license:gpl2+)))
24b5c463 394
80370441 395(define itstool
20a26ff5
CR
396 (package
397 (name "itstool")
3c87c02e 398 (version "2.0.2")
20a26ff5
CR
399 (source (origin
400 (method url-fetch)
401 (uri (string-append "http://files.itstool.org/itstool/itstool-"
402 version ".tar.bz2"))
403 (sha256
404 (base32
3c87c02e 405 "0fh34wi52i0qikgvlmrcpf1vx6gc1xqdad4539l4d9hikfsrz45z"))))
20a26ff5 406 (build-system gnu-build-system)
4b58d88b 407 (inputs
f922fc42 408 `(("libxml2" ,libxml2)
264d57b6 409 ("python2-libxml2" ,python2-libxml2)
f922fc42 410 ("python-2" ,python-2)))
4b58d88b
SB
411 (arguments
412 '(#:phases
413 (modify-phases %standard-phases
414 (add-after
415 'install 'wrap-program
416 (lambda* (#:key outputs #:allow-other-keys)
417 (let ((prog (string-append (assoc-ref outputs "out")
418 "/bin/itstool")))
419 (wrap-program prog
420 `("PYTHONPATH" = (,(getenv "PYTHONPATH"))))))))))
20a26ff5
CR
421 (home-page "http://www.itstool.org")
422 (synopsis "Tool to translate XML documents with PO files")
423 (description
424 "ITS Tool allows you to translate your XML documents with PO files, using
425rules from the W3C Internationalization Tag Set (ITS) to determine what to
426translate and how to separate it into PO file messages.
427
428PO files are the standard translation format for GNU and other Unix-like
429systems. They present translatable information as discrete messages, allowing
430each message to be translated independently. In contrast to whole-page
431translation, translating with a message-based format like PO means you can
432easily track changes to the source document down to the paragraph. When new
433strings are added or existing strings are modified, you only need to update the
434corresponding messages.
435
436ITS Tool is designed to make XML documents translatable through PO files by
437applying standard ITS rules, as well as extension rules specific to ITS Tool.
438ITS also provides an industry standard way for authors to override translation
439information in their documents, such as whether a particular element should be
440translated.")
a129e0d8 441 (license license:gpl3+)))
20a26ff5 442
80370441 443(define dbus-glib
24b5c463
AE
444 (package
445 (name "dbus-glib")
e6a64a1f 446 (version "0.106")
24b5c463
AE
447 (source (origin
448 (method url-fetch)
449 (uri
5cc3096c 450 (string-append "https://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-"
24b5c463
AE
451 version ".tar.gz"))
452 (sha256
453 (base32
e6a64a1f 454 "0in0i6v68ixcy0ip28i84hdczf10ykq9x682qgcvls6gdmq552dk"))))
24b5c463 455 (build-system gnu-build-system)
2e88d113 456 (propagated-inputs ; according to dbus-glib-1.pc
24b5c463 457 `(("dbus" ,dbus)
44add1ce 458 ("glib" ,glib)))
2e88d113
AE
459 (inputs
460 `(("expat" ,expat)))
44add1ce
LC
461 (native-inputs
462 `(("glib" ,glib "bin")
24b5c463
AE
463 ("pkg-config" ,pkg-config)))
464 (home-page "http://dbus.freedesktop.org/doc/dbus-glib/")
465 (synopsis "D-Bus GLib bindings")
466 (description
467 "GLib bindings for D-Bus. The package is obsolete and superseded
468by GDBus included in Glib.")
469 (license license:gpl2))) ; or Academic Free License 2.1
a5a7d374
LC
470
471(define libsigc++
472 (package
473 (name "libsigc++")
000c5a11 474 (version "2.10.0")
a5a7d374
LC
475 (source (origin
476 (method url-fetch)
e7a720e6
SB
477 (uri (string-append "mirror://gnome/sources/libsigc++/"
478 (version-major+minor version) "/"
479 name "-" version ".tar.xz"))
a5a7d374
LC
480 (sha256
481 (base32
000c5a11 482 "10cd54l4zihss9qxfhd2iip2k7mr292k37i54r2cpgv0c8sdchzq"))))
a5a7d374 483 (build-system gnu-build-system)
41eb1198
LC
484 (native-inputs `(("pkg-config" ,pkg-config)
485 ("m4" ,m4)))
a5a7d374
LC
486 (home-page "http://libsigc.sourceforge.net/")
487 (synopsis "Type-safe callback system for standard C++")
488 (description
35b9e423 489 "Libsigc++ implements a type-safe callback system for standard C++. It
a5a7d374
LC
490allows you to define signals and to connect those signals to any callback
491function, either global or a member function, regardless of whether it is
492static or virtual.
493
494It also contains adaptor classes for connection of dissimilar callbacks and
495has an ease of use unmatched by other C++ callback libraries.")
496 (license license:lgpl2.1+)))
497
498(define glibmm
499 (package
500 (name "glibmm")
6983ba56 501 (version "2.48.1")
a5a7d374
LC
502 (source (origin
503 (method url-fetch)
3d6befa4
MW
504 (uri (string-append "mirror://gnome/sources/glibmm/"
505 (version-major+minor version)
506 "/glibmm-" version ".tar.xz"))
a5a7d374
LC
507 (sha256
508 (base32
6983ba56 509 "1pvw2mrm03p51p03179rb6fk9p42iykkwj1jcdv7jr265xymy8nw"))))
a5a7d374
LC
510 (build-system gnu-build-system)
511 (arguments
512 `(#:phases (alist-cons-before
513 'build 'pre-build
514 (lambda _
515 ;; This test uses /etc/fstab as an example file to read
516 ;; from; choose a better example.
517 (substitute* "tests/giomm_simple/main.cc"
518 (("/etc/fstab")
519 (string-append (getcwd)
520 "/tests/giomm_simple/main.cc")))
521
522 ;; This test does a DNS lookup, and then expects to be able
523 ;; to open a TLS session; just skip it.
524 (substitute* "tests/giomm_tls_client/main.cc"
525 (("Gio::init.*$")
526 "return 77;\n")))
527 %standard-phases)))
41eb1198
LC
528 (native-inputs `(("pkg-config" ,pkg-config)
529 ("glib" ,glib "bin")))
a5a7d374
LC
530 (propagated-inputs
531 `(("libsigc++" ,libsigc++)
532 ("glib" ,glib)))
533 (home-page "http://gtkmm.org/")
534 (synopsis "C++ interface to the GLib library")
535 (description
35b9e423 536 "Glibmm provides a C++ programming interface to the part of GLib that are
a5a7d374
LC
537useful for C++.")
538 (license license:lgpl2.1+)))
a1de06b6
EB
539
540(define-public python2-pygobject-2
541 (package
542 (name "python2-pygobject")
543 ;; This was the last version to declare the 2.0 platform number, i.e. its
544 ;; pkg-config files were named pygobject-2.0.pc
545 (version "2.28.6")
546 (source
547 (origin
548 (method url-fetch)
549 (uri (string-append "mirror://gnome/sources/pygobject/"
550 (version-major+minor version)
551 "/pygobject-" version ".tar.xz"))
552 (sha256
553 (base32
554 "1f5dfxjnil2glfwxnqr14d2cjfbkghsbsn8n04js2c2icr7iv2pv"))
fc1adab1
AK
555 (patches (search-patches
556 "python2-pygobject-2-gi-info-type-error-domain.patch"))))
a1de06b6
EB
557 (build-system gnu-build-system)
558 (native-inputs
559 `(("which" ,which)
560 ("glib-bin" ,glib "bin") ;for tests: glib-compile-schemas
561 ("pkg-config" ,pkg-config)
562 ("dbus" ,dbus))) ;for tests
563 (inputs
564 `(("python" ,python-2)
565 ("glib" ,glib)
7ca0dbc3 566 ("python2-pycairo" ,python2-pycairo)
a1de06b6
EB
567 ("gobject-introspection" ,gobject-introspection)))
568 (propagated-inputs
569 `(("libffi" ,libffi))) ;mentioned in pygobject-2.0.pc
570 (arguments
571 `(#:tests? #f ;segfaults during tests
572 #:configure-flags '("LIBS=-lcairo-gobject")))
573 (home-page "https://pypi.python.org/pypi/PyGObject")
574 (synopsis "Python bindings for GObject")
575 (description
576 "Python bindings for GLib, GObject, and GIO.")
577 (license license:lgpl2.1+)))
578
579(define-public python-pygobject
580 (package
581 (name "python-pygobject")
6983ba56 582 (version "3.20.0")
a1de06b6
EB
583 (source
584 (origin
585 (method url-fetch)
586 (uri (string-append "mirror://gnome/sources/pygobject/"
587 (version-major+minor version)
588 "/pygobject-" version ".tar.xz"))
589 (sha256
590 (base32
6983ba56 591 "0ikzh3l7g1gjh8jj8vg6mdvrb25svp63gxcam4m0i404yh0lgari"))))
a1de06b6
EB
592 (build-system gnu-build-system)
593 (native-inputs
594 `(("which" ,which)
595 ("glib-bin" ,glib "bin") ;for tests: glib-compile-schemas
596 ("pkg-config" ,pkg-config)))
597 (inputs
598 `(("python" ,python)
a1de06b6 599 ("python-pycairo" ,python-pycairo)
fa7cf82e
SB
600 ("gobject-introspection" ,gobject-introspection)))
601 (propagated-inputs
602 ;; pygobject-3.0.pc refers to all these.
603 `(("glib" ,glib)
a1de06b6
EB
604 ("libffi" ,libffi)))
605 (arguments
606 ;; TODO: failing tests: test_native_calls_async
607 ;; test_native_calls_async_errors test_native_calls_sync
608 ;; test_native_calls_sync_errors test_python_calls_async
609 ;; test_python_calls_async_error test_python_calls_async_error_result
610 ;; test_python_calls_sync test_python_calls_sync_errors
611 ;; test_python_calls_sync_noargs test_callback_user_data_middle_none
612 ;; test_callback_user_data_middle_single
613 ;; test_callback_user_data_middle_tuple
614 '(#:tests? #f))
e28f95a9
SB
615 ;; For finding typelib files, since gobject-introscpetion isn't propagated.
616 (native-search-paths (package-native-search-paths gobject-introspection))
594a362b 617 (home-page "https://live.gnome.org/PyGObject")
a1de06b6
EB
618 (synopsis "Python bindings for GObject")
619 (description
620 "Python bindings for GLib, GObject, and GIO.")
00f2bf34
LC
621 (license license:lgpl2.1+)
622 (properties `((python2-variant . ,(delay python2-pygobject))))))
7873318d 623
0f49d7ba 624(define-public python2-pygobject
00f2bf34 625 (package (inherit (strip-python2-variant python-pygobject))
0f49d7ba
RW
626 (name "python2-pygobject")
627 (inputs
628 `(("python" ,python-2)
0f49d7ba 629 ("python-pycairo" ,python2-pycairo)
fa7cf82e 630 ("gobject-introspection" ,gobject-introspection)))))
0f49d7ba 631
7873318d
AE
632(define telepathy-glib
633 (package
634 (name "telepathy-glib")
635 (version "0.24.1")
636 (source
637 (origin
638 (method url-fetch)
639 (uri
640 (string-append
5cc3096c 641 "https://telepathy.freedesktop.org/releases/telepathy-glib/"
7873318d
AE
642 "telepathy-glib-" version ".tar.gz"))
643 (sha256
644 (base32
7f48be41
SB
645 "1symyzbjmxvksn2ifdkk50lafjm2llf2sbmky062gq2pz3cg23cy"))
646 (patches
647 (list
648 ;; Don't use the same test name for multiple tests.
649 ;; <https://bugs.freedesktop.org/show_bug.cgi?id=92245>
650 (origin
651 (method url-fetch)
652 (uri "https://bugs.freedesktop.org/attachment.cgi?id=118608")
653 (file-name (string-append "telepathy-glib-duplicate-tests.patch"))
654 (sha256
655 (base32
656 "0z261fwrszxb28ccg3hsg9rizig4s84zvwmx6y31a4pyv7bvs5w3")))))))
7873318d 657 (build-system gnu-build-system)
c73d4c59
LF
658 (arguments
659 '(#:configure-flags '("--enable-vala-bindings")))
7873318d
AE
660 (native-inputs
661 `(("glib" ,glib "bin") ; uses glib-mkenums
d2ab0e90 662 ("gobject-introspection" ,gobject-introspection)
7873318d 663 ("pkg-config" ,pkg-config)
d2ab0e90 664 ("python" ,python-2)
c73d4c59 665 ("vala" ,vala)
d2ab0e90
SB
666 ("xsltproc" ,libxslt)))
667 (propagated-inputs
668 ;; There are all in the Requires.private field of telepathy-glib.pc.
7873318d
AE
669 `(("dbus" ,dbus)
670 ("dbus-glib" ,dbus-glib)
d2ab0e90 671 ("glib" ,glib)))
7873318d
AE
672 (home-page "http://telepathy.freedesktop.org/wiki/")
673 (synopsis "GLib Real-time communications framework over D-Bus")
674 (description "Telepathy is a flexible, modular communications framework
675that enables real-time communication over D-Bus via pluggable protocol
676backends. Telepathy is a communications service that can be accessed by
677many applications simultaneously.
678
679This package provides the library for GLib applications.")
680 (license license:lgpl2.1+)))
89eb7581
LG
681
682
683(define-public dbus-c++
684 (package
685 (name "dbus-c++")
686 (version "0.9.0")
687 (source (origin
688 (method url-fetch)
689 (uri
690 (string-append
691 "mirror://sourceforge/dbus-cplusplus/dbus-c%2B%2B/"
692 version "/libdbus-c%2B%2B-" version ".tar.gz"))
693 (file-name (string-append name "-" version ".tar.gz"))
694 (sha256
695 (base32
696 "0qafmy2i6dzx4n1dqp6pygyy6gjljnb7hwjcj2z11c1wgclsq4dw"))))
697 (build-system gnu-build-system)
698 (propagated-inputs
699 `(("dbus" ,dbus))) ;mentioned in the pkg-config file
700 (inputs
701 `(("efl" ,efl)
702 ("expat" ,expat)
703 ("glib" ,glib)))
704 (native-inputs
705 `(("pkg-config" ,pkg-config)))
706 (arguments
707 `(;; The 'configure' machinery fails to detect that it needs -lpthread.
708 #:configure-flags (list "LDFLAGS=-lpthread")
709 #:phases
710 (modify-phases %standard-phases
711 (add-before 'configure 'add-missing-header
712 (lambda _
713 (substitute* "include/dbus-c++/eventloop-integration.h"
714 (("#include <errno.h>")
715 "#include <errno.h>\n#include <unistd.h>")))))))
716 (synopsis "D-Bus API for C++")
717 (description "This package provides D-Bus client API bindings for the C++
718programming langauage. It also contains the utility
719@command{dbuscxx-xml2cpp}.")
720 (home-page "https://sourceforge.net/projects/dbus-cplusplus/")
d06ce046 721 (license license:lgpl2.1+)))