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