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