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