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