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