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