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) | |
943f33a3 | 43 | |
80370441 LC |
44 | ;; Export variables up-front to allow circular dependency with the 'xorg' |
45 | ;; module. | |
46 | #:export (dbus | |
47 | glib | |
48 | dbus-glib | |
49 | intltool | |
50 | itstool)) | |
51 | ||
52 | (define dbus | |
943f33a3 LC |
53 | (package |
54 | (name "dbus") | |
55 | (version "1.6.4") | |
56 | (source (origin | |
57 | (method url-fetch) | |
58 | (uri | |
59 | (string-append "http://dbus.freedesktop.org/releases/dbus/dbus-" | |
60 | version ".tar.gz")) | |
61 | (sha256 | |
62 | (base32 | |
63 | "1wacqyfkcpayg7f8rvx9awqg275n5pksxq5q7y21lxjx85x6pfjz")))) | |
64 | (build-system gnu-build-system) | |
8eaa8a3b LC |
65 | (arguments |
66 | '(#:configure-flags (list ;; Install the system bus socket under /var. | |
67 | "--localstatedir=/var" | |
68 | ||
69 | ;; XXX: Fix the following to allow system-wide | |
70 | ;; config. | |
71 | ;; "--sysconfdir=/etc" | |
72 | ||
73 | "--with-session-socket-dir=/tmp") | |
74 | #:patches (list (assoc-ref %build-inputs "patch/localstatedir")))) | |
943f33a3 | 75 | (inputs |
d6b8cb5c | 76 | `(("expat" ,expat) |
8eaa8a3b LC |
77 | ("pkg-config" ,pkg-config) |
78 | ("patch/localstatedir" | |
80370441 LC |
79 | ,(search-patch "dbus-localstatedir.patch")) |
80 | ||
81 | ;; Add a dependency on libx11 so that 'dbus-launch' has support for | |
82 | ;; '--autolaunch'. | |
83 | ("libx11" ,libx11))) | |
84 | ||
943f33a3 LC |
85 | (home-page "http://dbus.freedesktop.org/") |
86 | (synopsis "Message bus for inter-process communication (IPC)") | |
87 | (description | |
88 | "D-Bus is a message bus system, a simple way for applications to | |
89 | talk to one another. In addition to interprocess communication, D-Bus | |
90 | helps coordinate process lifecycle; it makes it simple and reliable to | |
91 | code a \"single instance\" application or daemon, and to launch | |
92 | applications and daemons on demand when their services are needed. | |
93 | ||
94 | D-Bus supplies both a system daemon (for events such as \"new hardware | |
95 | device added\" or \"printer queue changed\") and a | |
96 | per-user-login-session daemon (for general IPC needs among user | |
97 | applications). Also, the message bus is built on top of a general | |
98 | one-to-one message passing framework, which can be used by any two apps | |
99 | to communicate directly (without going through the message bus | |
100 | daemon). Currently the communicating applications are on one computer, | |
101 | or through unencrypted TCP/IP suitable for use behind a firewall with | |
102 | shared NFS home directories.") | |
d6b8cb5c | 103 | (license license:gpl2+))) ; or Academic Free License 2.1 |
3889a82e | 104 | |
80370441 | 105 | (define glib |
3889a82e NK |
106 | (package |
107 | (name "glib") | |
d274f499 | 108 | (version "2.38.0") |
3889a82e NK |
109 | (source (origin |
110 | (method url-fetch) | |
785db4d8 | 111 | (uri (string-append "mirror://gnome/sources/" |
d274f499 | 112 | name "/" (string-take version 4) "/" |
943f33a3 | 113 | name "-" version ".tar.xz")) |
3889a82e | 114 | (sha256 |
d274f499 | 115 | (base32 "0cpzqadqk6z6bmb79p04pykxc8x57rvshh33414cnk41bvgaf4vm")))) |
3889a82e | 116 | (build-system gnu-build-system) |
943f33a3 LC |
117 | (outputs '("out" ; everything |
118 | "doc")) ; 20 MiB of GTK-Doc reference | |
3889a82e NK |
119 | (inputs |
120 | `(("coreutils" ,coreutils) | |
121 | ("gettext" ,guix:gettext) | |
122 | ("libffi" ,libffi) | |
123 | ("pkg-config" ,pkg-config) | |
ee3e314b | 124 | ("python" ,python-wrapper) |
943f33a3 LC |
125 | ("zlib" ,zlib) |
126 | ("perl" ,perl) ; needed by GIO tests | |
127 | ("dbus" ,dbus) ; for GDBus tests | |
7bc5cc2b LC |
128 | ("bash" ,bash) |
129 | ("tzdata" ,tzdata) ; for tests/gdatetime.c | |
943f33a3 | 130 | |
943f33a3 LC |
131 | ("patch/tests-homedir" |
132 | ,(search-patch "glib-tests-homedir.patch")) | |
133 | ("patch/tests-desktop" | |
785db4d8 LC |
134 | ,(search-patch "glib-tests-desktop.patch")) |
135 | ("patch/tests-prlimit" | |
136 | ,(search-patch "glib-tests-prlimit.patch")))) | |
943f33a3 | 137 | (arguments |
7bc5cc2b | 138 | '(#:patches (list (assoc-ref %build-inputs "patch/tests-homedir") |
785db4d8 LC |
139 | (assoc-ref %build-inputs "patch/tests-desktop") |
140 | (assoc-ref %build-inputs "patch/tests-prlimit")) | |
943f33a3 LC |
141 | #:phases (alist-cons-before |
142 | 'build 'pre-build | |
143 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
7bc5cc2b LC |
144 | ;; For tests/gdatetime.c. |
145 | (setenv "TZDIR" | |
146 | (string-append (assoc-ref inputs "tzdata") | |
147 | "/share/zoneinfo")) | |
148 | ||
149 | ;; Some tests want write access there. | |
150 | (setenv "XDG_CACHE_HOME" (getcwd)) | |
151 | ||
943f33a3 LC |
152 | (substitute* '("glib/gspawn.c" |
153 | "glib/tests/utils.c" | |
154 | "tests/spawn-test.c") | |
7bc5cc2b | 155 | (("/bin/sh") |
d274f499 | 156 | (string-append (assoc-ref inputs "bash") "/bin/sh")))) |
943f33a3 LC |
157 | %standard-phases) |
158 | ||
159 | ;; Note: `--docdir' and `--htmldir' are not honored, so work around it. | |
160 | #:configure-flags (list (string-append "--with-html-dir=" | |
161 | (assoc-ref %outputs "doc") | |
162 | "/share/gtk-doc")))) | |
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 | |
9ceb630c CR |
171 | (define-public gobject-introspection |
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 | |
183 | (base32 "0wvxyvgajmms2bb6k3pf1rdpnd79xdxamykzvxzmcyn1ag9yax9m")))) | |
184 | (build-system gnu-build-system) | |
185 | (inputs | |
186 | `(("bison" ,bison) | |
187 | ("cairo" ,cairo) | |
188 | ("flex" ,flex) | |
189 | ("glib" ,glib) | |
190 | ("libffi" ,libffi) | |
191 | ("pkg-config" ,pkg-config) | |
192 | ("python-2" ,python-2))) | |
193 | (arguments | |
194 | `(#:phases | |
195 | (alist-replace | |
196 | 'configure | |
197 | (lambda* (#:key #:allow-other-keys #:rest args) | |
198 | (let ((configure (assoc-ref %standard-phases 'configure))) | |
199 | ;; giscanner/sourcescanner.py looks for 'CC', let's set it here. | |
200 | (setenv "CC" "gcc") | |
201 | (apply configure args))) | |
202 | %standard-phases))) | |
203 | (home-page "https://wiki.gnome.org/GObjectIntrospection") | |
204 | (synopsis "Generate interface introspection data for GObject libraries") | |
205 | (description | |
206 | "GObject introspection is a middleware layer between C libraries (using | |
207 | GObject) and language bindings. The C library can be scanned at compile time | |
208 | and generate a metadata file, in addition to the actual native C library. Then | |
209 | at runtime, language bindings can read this metadata and automatically provide | |
210 | bindings to call into the C library.") | |
211 | ; Some bits are distributed under the LGPL2+, others under the GPL2+ | |
212 | (license license:gpl2+))) | |
213 | ||
80370441 | 214 | (define intltool |
71eb5c10 LC |
215 | (package |
216 | (name "intltool") | |
d6b8cb5c | 217 | (version "0.50.2") |
71eb5c10 LC |
218 | (source (origin |
219 | (method url-fetch) | |
d6b8cb5c AE |
220 | (uri (string-append "https://launchpad.net/intltool/trunk/" |
221 | version "/+download/intltool-" | |
222 | version ".tar.gz")) | |
71eb5c10 LC |
223 | (sha256 |
224 | (base32 | |
d6b8cb5c | 225 | "01j4yd7i84n9nk4ccs6yifg84pp68nr9by57jdbhj7dpdxf5rwk7")))) |
71eb5c10 | 226 | (build-system gnu-build-system) |
71eb5c10 | 227 | (propagated-inputs |
107b415e LC |
228 | `(;; Propagate gettext because users expect it to be there, and so does |
229 | ;; the `intltool-update' script. | |
230 | ("gettext" ,guix:gettext) | |
231 | ||
5aa601a3 LC |
232 | ;; `file' is used by `intltool-update' too. |
233 | ("file" ,file) | |
234 | ||
e33d9d6f | 235 | ("perl-xml-parser" ,perl-xml-parser) |
107b415e | 236 | ("perl" ,perl))) |
d6b8cb5c AE |
237 | (home-page "https://launchpad.net/intltool/+download") |
238 | (synopsis "Tools to centralise translations of different file formats") | |
71eb5c10 | 239 | (description |
d6b8cb5c | 240 | "intltool is a set of tools to centralise translations of many different |
71eb5c10 LC |
241 | file formats using GNU gettext-compatible PO files. |
242 | ||
243 | The intltool collection can be used to do these things: | |
244 | ||
245 | Extract translatable strings from various source files (.xml.in, | |
246 | glade, .desktop.in, .server.in, .oaf.in). | |
247 | ||
248 | Collect the extracted strings together with messages from traditional | |
249 | source files (.c, .h) in po/$(PACKAGE).pot. | |
250 | ||
251 | Merge back the translations from .po files into .xml, .desktop and | |
252 | oaf files. This merge step will happen at build resp. installation time.") | |
d6b8cb5c | 253 | (license license:gpl2+))) |
24b5c463 | 254 | |
80370441 | 255 | (define itstool |
20a26ff5 CR |
256 | (package |
257 | (name "itstool") | |
258 | (version "1.2.0") | |
259 | (source (origin | |
260 | (method url-fetch) | |
261 | (uri (string-append "http://files.itstool.org/itstool/itstool-" | |
262 | version ".tar.bz2")) | |
263 | (sha256 | |
264 | (base32 | |
265 | "1akq75aflihm3y7js8biy7b5mw2g11vl8yq90gydnwlwp0zxdzj6")))) | |
266 | (build-system gnu-build-system) | |
f922fc42 AE |
267 | (propagated-inputs |
268 | `(("libxml2" ,libxml2) | |
269 | ("python-2" ,python-2))) | |
20a26ff5 CR |
270 | (home-page "http://www.itstool.org") |
271 | (synopsis "Tool to translate XML documents with PO files") | |
272 | (description | |
273 | "ITS Tool allows you to translate your XML documents with PO files, using | |
274 | rules from the W3C Internationalization Tag Set (ITS) to determine what to | |
275 | translate and how to separate it into PO file messages. | |
276 | ||
277 | PO files are the standard translation format for GNU and other Unix-like | |
278 | systems. They present translatable information as discrete messages, allowing | |
279 | each message to be translated independently. In contrast to whole-page | |
280 | translation, translating with a message-based format like PO means you can | |
281 | easily track changes to the source document down to the paragraph. When new | |
282 | strings are added or existing strings are modified, you only need to update the | |
283 | corresponding messages. | |
284 | ||
285 | ITS Tool is designed to make XML documents translatable through PO files by | |
286 | applying standard ITS rules, as well as extension rules specific to ITS Tool. | |
287 | ITS also provides an industry standard way for authors to override translation | |
288 | information in their documents, such as whether a particular element should be | |
289 | translated.") | |
a129e0d8 | 290 | (license license:gpl3+))) |
20a26ff5 | 291 | |
80370441 | 292 | (define dbus-glib |
24b5c463 AE |
293 | (package |
294 | (name "dbus-glib") | |
295 | (version "0.100.2") | |
296 | (source (origin | |
297 | (method url-fetch) | |
298 | (uri | |
299 | (string-append "http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-" | |
300 | version ".tar.gz")) | |
301 | (sha256 | |
302 | (base32 | |
303 | "1ibav91yg70f2l3l18cr0hf4mna1h9d4mrg0c60w4l8zjbd45fx5")))) | |
304 | (build-system gnu-build-system) | |
305 | (inputs | |
306 | `(("dbus" ,dbus) | |
307 | ("expat" ,expat) | |
308 | ("glib" ,glib) | |
309 | ("pkg-config" ,pkg-config))) | |
310 | (home-page "http://dbus.freedesktop.org/doc/dbus-glib/") | |
311 | (synopsis "D-Bus GLib bindings") | |
312 | (description | |
313 | "GLib bindings for D-Bus. The package is obsolete and superseded | |
314 | by GDBus included in Glib.") | |
315 | (license license:gpl2))) ; or Academic Free License 2.1 |