Commit | Line | Data |
---|---|---|
3889a82e | 1 | ;;; GNU Guix --- Functional package management for GNU |
00585a55 | 2 | ;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> |
d6b8cb5c AE |
3 | ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> |
4 | ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> | |
3889a82e NK |
5 | ;;; |
6 | ;;; This file is part of GNU Guix. | |
7 | ;;; | |
8 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
9 | ;;; under the terms of the GNU General Public License as published by | |
10 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
11 | ;;; your option) any later version. | |
12 | ;;; | |
13 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
14 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | ;;; GNU General Public License for more details. | |
17 | ;;; | |
18 | ;;; You should have received a copy of the GNU General Public License | |
19 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
20 | ||
943f33a3 | 21 | (define-module (gnu packages glib) |
d6b8cb5c AE |
22 | #:use-module ((guix licenses) |
23 | #:renamer (symbol-prefix-proc 'license:)) | |
3889a82e NK |
24 | #:use-module (guix packages) |
25 | #:use-module (guix download) | |
26 | #:use-module (guix build-system gnu) | |
943f33a3 LC |
27 | #:use-module (gnu packages) |
28 | #:use-module (gnu packages base) | |
9ceb630c | 29 | #:use-module (gnu packages bison) |
943f33a3 | 30 | #:use-module (gnu packages compression) |
9ceb630c | 31 | #:use-module (gnu packages flex) |
1dba6407 | 32 | #:use-module (gnu packages gettext) |
9ceb630c | 33 | #:use-module (gnu packages gtk) |
943f33a3 | 34 | #:use-module (gnu packages libffi) |
d6b8cb5c | 35 | #:use-module (gnu packages perl) |
943f33a3 LC |
36 | #:use-module (gnu packages pkg-config) |
37 | #:use-module (gnu packages python) | |
7bc5cc2b | 38 | #:use-module (gnu packages xml) |
5aa601a3 | 39 | #:use-module (gnu packages bash) |
80370441 LC |
40 | #:use-module (gnu packages file) |
41 | #:use-module (gnu packages xorg) | |
a5a7d374 | 42 | #:use-module (gnu packages m4) |
943f33a3 | 43 | |
80370441 LC |
44 | ;; Export variables up-front to allow circular dependency with the 'xorg' |
45 | ;; module. | |
46 | #:export (dbus | |
47 | glib | |
6ac6a6b9 | 48 | gobject-introspection |
80370441 LC |
49 | dbus-glib |
50 | intltool | |
a5a7d374 LC |
51 | itstool |
52 | libsigc++ | |
53 | glibmm)) | |
80370441 LC |
54 | |
55 | (define dbus | |
943f33a3 LC |
56 | (package |
57 | (name "dbus") | |
58 | (version "1.6.4") | |
59 | (source (origin | |
60 | (method url-fetch) | |
61 | (uri | |
62 | (string-append "http://dbus.freedesktop.org/releases/dbus/dbus-" | |
63 | version ".tar.gz")) | |
64 | (sha256 | |
65 | (base32 | |
01eafd38 LC |
66 | "1wacqyfkcpayg7f8rvx9awqg275n5pksxq5q7y21lxjx85x6pfjz")) |
67 | (patches (list (search-patch "dbus-localstatedir.patch"))))) | |
943f33a3 | 68 | (build-system gnu-build-system) |
8eaa8a3b LC |
69 | (arguments |
70 | '(#:configure-flags (list ;; Install the system bus socket under /var. | |
71 | "--localstatedir=/var" | |
72 | ||
73 | ;; XXX: Fix the following to allow system-wide | |
74 | ;; config. | |
75 | ;; "--sysconfdir=/etc" | |
76 | ||
01eafd38 | 77 | "--with-session-socket-dir=/tmp"))) |
943f33a3 | 78 | (inputs |
d6b8cb5c | 79 | `(("expat" ,expat) |
8eaa8a3b | 80 | ("pkg-config" ,pkg-config) |
80370441 LC |
81 | |
82 | ;; Add a dependency on libx11 so that 'dbus-launch' has support for | |
83 | ;; '--autolaunch'. | |
84 | ("libx11" ,libx11))) | |
85 | ||
943f33a3 LC |
86 | (home-page "http://dbus.freedesktop.org/") |
87 | (synopsis "Message bus for inter-process communication (IPC)") | |
88 | (description | |
89 | "D-Bus is a message bus system, a simple way for applications to | |
90 | talk to one another. In addition to interprocess communication, D-Bus | |
91 | helps coordinate process lifecycle; it makes it simple and reliable to | |
92 | code a \"single instance\" application or daemon, and to launch | |
93 | applications and daemons on demand when their services are needed. | |
94 | ||
95 | D-Bus supplies both a system daemon (for events such as \"new hardware | |
96 | device added\" or \"printer queue changed\") and a | |
97 | per-user-login-session daemon (for general IPC needs among user | |
98 | applications). Also, the message bus is built on top of a general | |
99 | one-to-one message passing framework, which can be used by any two apps | |
100 | to communicate directly (without going through the message bus | |
101 | daemon). Currently the communicating applications are on one computer, | |
102 | or through unencrypted TCP/IP suitable for use behind a firewall with | |
103 | shared NFS home directories.") | |
d6b8cb5c | 104 | (license license:gpl2+))) ; or Academic Free License 2.1 |
3889a82e | 105 | |
80370441 | 106 | (define glib |
3889a82e NK |
107 | (package |
108 | (name "glib") | |
00585a55 | 109 | (version "2.39.1") |
3889a82e NK |
110 | (source (origin |
111 | (method url-fetch) | |
785db4d8 | 112 | (uri (string-append "mirror://gnome/sources/" |
d274f499 | 113 | name "/" (string-take version 4) "/" |
943f33a3 | 114 | name "-" version ".tar.xz")) |
3889a82e | 115 | (sha256 |
00585a55 | 116 | (base32 "0lqi6z47068vgh91fm59jn0kq969wf3g2q8k4m33jsb0amprg36h")) |
01eafd38 LC |
117 | (patches (list (search-patch "glib-tests-homedir.patch") |
118 | (search-patch "glib-tests-desktop.patch") | |
93a3d8f6 LC |
119 | (search-patch "glib-tests-prlimit.patch") |
120 | (search-patch "glib-tests-newnet.patch"))))) | |
3889a82e | 121 | (build-system gnu-build-system) |
943f33a3 LC |
122 | (outputs '("out" ; everything |
123 | "doc")) ; 20 MiB of GTK-Doc reference | |
3889a82e NK |
124 | (inputs |
125 | `(("coreutils" ,coreutils) | |
3889a82e | 126 | ("libffi" ,libffi) |
c4c4cc05 JD |
127 | ("zlib" ,zlib) |
128 | ("tzdata" ,tzdata))) ; for tests/gdatetime.c | |
129 | (native-inputs | |
130 | `(("gettext" ,gnu-gettext) | |
131 | ("dbus" ,dbus) ; for GDBus tests | |
3889a82e | 132 | ("pkg-config" ,pkg-config) |
ee3e314b | 133 | ("python" ,python-wrapper) |
943f33a3 | 134 | ("perl" ,perl) ; needed by GIO tests |
c4c4cc05 | 135 | ("bash" ,bash))) |
943f33a3 | 136 | (arguments |
01eafd38 | 137 | '(#:phases (alist-cons-before |
943f33a3 LC |
138 | 'build 'pre-build |
139 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
7bc5cc2b LC |
140 | ;; For tests/gdatetime.c. |
141 | (setenv "TZDIR" | |
142 | (string-append (assoc-ref inputs "tzdata") | |
143 | "/share/zoneinfo")) | |
144 | ||
145 | ;; Some tests want write access there. | |
146 | (setenv "XDG_CACHE_HOME" (getcwd)) | |
147 | ||
943f33a3 LC |
148 | (substitute* '("glib/gspawn.c" |
149 | "glib/tests/utils.c" | |
150 | "tests/spawn-test.c") | |
7bc5cc2b | 151 | (("/bin/sh") |
d274f499 | 152 | (string-append (assoc-ref inputs "bash") "/bin/sh")))) |
943f33a3 LC |
153 | %standard-phases) |
154 | ||
155 | ;; Note: `--docdir' and `--htmldir' are not honored, so work around it. | |
156 | #:configure-flags (list (string-append "--with-html-dir=" | |
157 | (assoc-ref %outputs "doc") | |
00585a55 LC |
158 | "/share/gtk-doc")) |
159 | ||
160 | ;; In 'gio/tests', 'gdbus-test-codegen-generated.h' is #included in a | |
161 | ;; file that gets compiled possibly before it has been fully generated. | |
162 | #:parallel-tests? #f)) | |
f50d2669 | 163 | (synopsis "Thread-safe general utility library; basis of GTK+ and GNOME") |
3889a82e NK |
164 | (description |
165 | "GLib provides data structure handling for C, portability wrappers, | |
166 | and interfaces for such runtime functionality as an event loop, threads, | |
167 | dynamic loading, and an object system.") | |
168 | (home-page "http://developer.gnome.org/glib/") | |
d6b8cb5c | 169 | (license license:lgpl2.0+))) ; some files are under lgpl2.1+ |
71eb5c10 | 170 | |
6ac6a6b9 | 171 | (define gobject-introspection |
9ceb630c CR |
172 | (package |
173 | (name "gobject-introspection") | |
174 | (version "1.38.0") | |
175 | (source (origin | |
176 | (method url-fetch) | |
177 | (uri (string-append "http://ftp.gnome.org/pub/GNOME/sources/" | |
178 | "gobject-introspection/" | |
179 | (substring version 0 (string-rindex version #\.)) | |
180 | "/gobject-introspection-" | |
181 | version ".tar.xz")) | |
182 | (sha256 | |
503c5f6d CR |
183 | (base32 "0wvxyvgajmms2bb6k3pf1rdpnd79xdxamykzvxzmcyn1ag9yax9m")) |
184 | (patches (list (search-patch "gobject-introspection-cc.patch"))))) | |
9ceb630c CR |
185 | (build-system gnu-build-system) |
186 | (inputs | |
187 | `(("bison" ,bison) | |
188 | ("cairo" ,cairo) | |
189 | ("flex" ,flex) | |
190 | ("glib" ,glib) | |
9ceb630c CR |
191 | ("pkg-config" ,pkg-config) |
192 | ("python-2" ,python-2))) | |
af949e8e CR |
193 | (propagated-inputs |
194 | `(;; In practice, GIR users will need libffi when using | |
195 | ;; gobject-introspection. | |
196 | ("libffi" ,libffi))) | |
9ceb630c CR |
197 | (arguments |
198 | `(#:phases | |
d4bf49b1 EB |
199 | (alist-cons-before |
200 | 'configure 'patch-paths | |
201 | (lambda _ | |
503c5f6d | 202 | (substitute* "giscanner/sourcescanner.py" |
d4bf49b1 | 203 | (("GUIX_GCC_PATH") (which "gcc")))) |
9ceb630c CR |
204 | %standard-phases))) |
205 | (home-page "https://wiki.gnome.org/GObjectIntrospection") | |
206 | (synopsis "Generate interface introspection data for GObject libraries") | |
207 | (description | |
208 | "GObject introspection is a middleware layer between C libraries (using | |
209 | GObject) and language bindings. The C library can be scanned at compile time | |
210 | and generate a metadata file, in addition to the actual native C library. Then | |
211 | at runtime, language bindings can read this metadata and automatically provide | |
212 | bindings to call into the C library.") | |
213 | ; Some bits are distributed under the LGPL2+, others under the GPL2+ | |
214 | (license license:gpl2+))) | |
215 | ||
80370441 | 216 | (define intltool |
71eb5c10 LC |
217 | (package |
218 | (name "intltool") | |
d6b8cb5c | 219 | (version "0.50.2") |
71eb5c10 LC |
220 | (source (origin |
221 | (method url-fetch) | |
d6b8cb5c AE |
222 | (uri (string-append "https://launchpad.net/intltool/trunk/" |
223 | version "/+download/intltool-" | |
224 | version ".tar.gz")) | |
71eb5c10 LC |
225 | (sha256 |
226 | (base32 | |
d6b8cb5c | 227 | "01j4yd7i84n9nk4ccs6yifg84pp68nr9by57jdbhj7dpdxf5rwk7")))) |
71eb5c10 | 228 | (build-system gnu-build-system) |
71eb5c10 | 229 | (propagated-inputs |
107b415e LC |
230 | `(;; Propagate gettext because users expect it to be there, and so does |
231 | ;; the `intltool-update' script. | |
1dba6407 | 232 | ("gettext" ,gnu-gettext) |
107b415e | 233 | |
5aa601a3 LC |
234 | ;; `file' is used by `intltool-update' too. |
235 | ("file" ,file) | |
236 | ||
e33d9d6f | 237 | ("perl-xml-parser" ,perl-xml-parser) |
107b415e | 238 | ("perl" ,perl))) |
d6b8cb5c AE |
239 | (home-page "https://launchpad.net/intltool/+download") |
240 | (synopsis "Tools to centralise translations of different file formats") | |
71eb5c10 | 241 | (description |
d6b8cb5c | 242 | "intltool is a set of tools to centralise translations of many different |
71eb5c10 LC |
243 | file formats using GNU gettext-compatible PO files. |
244 | ||
245 | The intltool collection can be used to do these things: | |
246 | ||
247 | Extract translatable strings from various source files (.xml.in, | |
248 | glade, .desktop.in, .server.in, .oaf.in). | |
249 | ||
250 | Collect the extracted strings together with messages from traditional | |
251 | source files (.c, .h) in po/$(PACKAGE).pot. | |
252 | ||
253 | Merge back the translations from .po files into .xml, .desktop and | |
254 | oaf files. This merge step will happen at build resp. installation time.") | |
d6b8cb5c | 255 | (license license:gpl2+))) |
24b5c463 | 256 | |
80370441 | 257 | (define itstool |
20a26ff5 CR |
258 | (package |
259 | (name "itstool") | |
260 | (version "1.2.0") | |
261 | (source (origin | |
262 | (method url-fetch) | |
263 | (uri (string-append "http://files.itstool.org/itstool/itstool-" | |
264 | version ".tar.bz2")) | |
265 | (sha256 | |
266 | (base32 | |
267 | "1akq75aflihm3y7js8biy7b5mw2g11vl8yq90gydnwlwp0zxdzj6")))) | |
268 | (build-system gnu-build-system) | |
f922fc42 AE |
269 | (propagated-inputs |
270 | `(("libxml2" ,libxml2) | |
271 | ("python-2" ,python-2))) | |
20a26ff5 CR |
272 | (home-page "http://www.itstool.org") |
273 | (synopsis "Tool to translate XML documents with PO files") | |
274 | (description | |
275 | "ITS Tool allows you to translate your XML documents with PO files, using | |
276 | rules from the W3C Internationalization Tag Set (ITS) to determine what to | |
277 | translate and how to separate it into PO file messages. | |
278 | ||
279 | PO files are the standard translation format for GNU and other Unix-like | |
280 | systems. They present translatable information as discrete messages, allowing | |
281 | each message to be translated independently. In contrast to whole-page | |
282 | translation, translating with a message-based format like PO means you can | |
283 | easily track changes to the source document down to the paragraph. When new | |
284 | strings are added or existing strings are modified, you only need to update the | |
285 | corresponding messages. | |
286 | ||
287 | ITS Tool is designed to make XML documents translatable through PO files by | |
288 | applying standard ITS rules, as well as extension rules specific to ITS Tool. | |
289 | ITS also provides an industry standard way for authors to override translation | |
290 | information in their documents, such as whether a particular element should be | |
291 | translated.") | |
a129e0d8 | 292 | (license license:gpl3+))) |
20a26ff5 | 293 | |
80370441 | 294 | (define dbus-glib |
24b5c463 AE |
295 | (package |
296 | (name "dbus-glib") | |
297 | (version "0.100.2") | |
298 | (source (origin | |
299 | (method url-fetch) | |
300 | (uri | |
301 | (string-append "http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-" | |
302 | version ".tar.gz")) | |
303 | (sha256 | |
304 | (base32 | |
305 | "1ibav91yg70f2l3l18cr0hf4mna1h9d4mrg0c60w4l8zjbd45fx5")))) | |
306 | (build-system gnu-build-system) | |
307 | (inputs | |
308 | `(("dbus" ,dbus) | |
309 | ("expat" ,expat) | |
310 | ("glib" ,glib) | |
311 | ("pkg-config" ,pkg-config))) | |
312 | (home-page "http://dbus.freedesktop.org/doc/dbus-glib/") | |
313 | (synopsis "D-Bus GLib bindings") | |
314 | (description | |
315 | "GLib bindings for D-Bus. The package is obsolete and superseded | |
316 | by GDBus included in Glib.") | |
317 | (license license:gpl2))) ; or Academic Free License 2.1 | |
a5a7d374 LC |
318 | |
319 | (define libsigc++ | |
320 | (package | |
321 | (name "libsigc++") | |
322 | (version "2.3.1") | |
323 | (source (origin | |
324 | (method url-fetch) | |
325 | (uri (string-append "mirror://gnome/sources/libsigc++/2.3/libsigc++-" | |
326 | version ".tar.xz")) | |
327 | (sha256 | |
328 | (base32 | |
329 | "14q3sq6d43f6wfcmwhw4v1aal4ba0h5x9v6wkxy2dnqznd95il37")))) | |
330 | (build-system gnu-build-system) | |
331 | (inputs `(("pkg-config" ,pkg-config))) | |
332 | (native-inputs `(("m4" ,m4))) | |
333 | (home-page "http://libsigc.sourceforge.net/") | |
334 | (synopsis "Type-safe callback system for standard C++") | |
335 | (description | |
336 | "libsigc++ implements a type-safe callback system for standard C++. It | |
337 | allows you to define signals and to connect those signals to any callback | |
338 | function, either global or a member function, regardless of whether it is | |
339 | static or virtual. | |
340 | ||
341 | It also contains adaptor classes for connection of dissimilar callbacks and | |
342 | has an ease of use unmatched by other C++ callback libraries.") | |
343 | (license license:lgpl2.1+))) | |
344 | ||
345 | (define glibmm | |
346 | (package | |
347 | (name "glibmm") | |
348 | (version "2.37.7") | |
349 | (source (origin | |
350 | (method url-fetch) | |
351 | (uri (string-append "mirror://gnome/sources/glibmm/2.37/glibmm-" | |
352 | version ".tar.xz")) | |
353 | (sha256 | |
354 | (base32 | |
355 | "0mms4yl5izsya1135772z4jkb184ss86x0wlg6dm7yvwxvb6bjlw")))) | |
356 | (build-system gnu-build-system) | |
357 | (arguments | |
358 | `(#:phases (alist-cons-before | |
359 | 'build 'pre-build | |
360 | (lambda _ | |
361 | ;; This test uses /etc/fstab as an example file to read | |
362 | ;; from; choose a better example. | |
363 | (substitute* "tests/giomm_simple/main.cc" | |
364 | (("/etc/fstab") | |
365 | (string-append (getcwd) | |
366 | "/tests/giomm_simple/main.cc"))) | |
367 | ||
368 | ;; This test does a DNS lookup, and then expects to be able | |
369 | ;; to open a TLS session; just skip it. | |
370 | (substitute* "tests/giomm_tls_client/main.cc" | |
371 | (("Gio::init.*$") | |
372 | "return 77;\n"))) | |
373 | %standard-phases))) | |
374 | (inputs `(("pkg-config" ,pkg-config))) | |
375 | (propagated-inputs | |
376 | `(("libsigc++" ,libsigc++) | |
377 | ("glib" ,glib))) | |
378 | (home-page "http://gtkmm.org/") | |
379 | (synopsis "C++ interface to the GLib library") | |
380 | (description | |
381 | "glibmm provides a C++ programming interface to the part of GLib that are | |
382 | useful for C++.") | |
383 | (license license:lgpl2.1+))) |