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