gnu: git: Add graphical tools to the "gui" output.
[jackhill/guix/guix.git] / gnu / packages / glib.scm
CommitLineData
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)
29 #:use-module (gnu packages compression)
30 #:use-module ((gnu packages gettext)
3889a82e 31 #:renamer (symbol-prefix-proc 'guix:))
943f33a3 32 #:use-module (gnu packages libffi)
d6b8cb5c 33 #:use-module (gnu packages perl)
943f33a3
LC
34 #:use-module (gnu packages pkg-config)
35 #:use-module (gnu packages python)
7bc5cc2b 36 #:use-module (gnu packages xml)
5aa601a3 37 #:use-module (gnu packages bash)
80370441
LC
38 #:use-module (gnu packages file)
39 #:use-module (gnu packages xorg)
943f33a3 40
80370441
LC
41 ;; Export variables up-front to allow circular dependency with the 'xorg'
42 ;; module.
43 #:export (dbus
44 glib
45 dbus-glib
46 intltool
47 itstool))
48
49(define dbus
943f33a3
LC
50 (package
51 (name "dbus")
52 (version "1.6.4")
53 (source (origin
54 (method url-fetch)
55 (uri
56 (string-append "http://dbus.freedesktop.org/releases/dbus/dbus-"
57 version ".tar.gz"))
58 (sha256
59 (base32
60 "1wacqyfkcpayg7f8rvx9awqg275n5pksxq5q7y21lxjx85x6pfjz"))))
61 (build-system gnu-build-system)
8eaa8a3b
LC
62 (arguments
63 '(#:configure-flags (list ;; Install the system bus socket under /var.
64 "--localstatedir=/var"
65
66 ;; XXX: Fix the following to allow system-wide
67 ;; config.
68 ;; "--sysconfdir=/etc"
69
70 "--with-session-socket-dir=/tmp")
71 #:patches (list (assoc-ref %build-inputs "patch/localstatedir"))))
943f33a3 72 (inputs
d6b8cb5c 73 `(("expat" ,expat)
8eaa8a3b
LC
74 ("pkg-config" ,pkg-config)
75 ("patch/localstatedir"
80370441
LC
76 ,(search-patch "dbus-localstatedir.patch"))
77
78 ;; Add a dependency on libx11 so that 'dbus-launch' has support for
79 ;; '--autolaunch'.
80 ("libx11" ,libx11)))
81
943f33a3
LC
82 (home-page "http://dbus.freedesktop.org/")
83 (synopsis "Message bus for inter-process communication (IPC)")
84 (description
85 "D-Bus is a message bus system, a simple way for applications to
86talk to one another. In addition to interprocess communication, D-Bus
87helps coordinate process lifecycle; it makes it simple and reliable to
88code a \"single instance\" application or daemon, and to launch
89applications and daemons on demand when their services are needed.
90
91D-Bus supplies both a system daemon (for events such as \"new hardware
92device added\" or \"printer queue changed\") and a
93per-user-login-session daemon (for general IPC needs among user
94applications). Also, the message bus is built on top of a general
95one-to-one message passing framework, which can be used by any two apps
96to communicate directly (without going through the message bus
97daemon). Currently the communicating applications are on one computer,
98or through unencrypted TCP/IP suitable for use behind a firewall with
99shared NFS home directories.")
d6b8cb5c 100 (license license:gpl2+))) ; or Academic Free License 2.1
3889a82e 101
80370441 102(define glib
3889a82e
NK
103 (package
104 (name "glib")
7bc5cc2b 105 (version "2.37.1")
3889a82e
NK
106 (source (origin
107 (method url-fetch)
785db4d8 108 (uri (string-append "mirror://gnome/sources/"
f88aeb6a 109 name "/2.37/"
943f33a3 110 name "-" version ".tar.xz"))
3889a82e 111 (sha256
7bc5cc2b 112 (base32 "1lp705q0g9jlfj24x8fpgjh7awmmara5iyj9kz5lhd49sr9s813k"))))
3889a82e 113 (build-system gnu-build-system)
943f33a3
LC
114 (outputs '("out" ; everything
115 "doc")) ; 20 MiB of GTK-Doc reference
3889a82e
NK
116 (inputs
117 `(("coreutils" ,coreutils)
118 ("gettext" ,guix:gettext)
119 ("libffi" ,libffi)
120 ("pkg-config" ,pkg-config)
ee3e314b 121 ("python" ,python-wrapper)
943f33a3
LC
122 ("zlib" ,zlib)
123 ("perl" ,perl) ; needed by GIO tests
124 ("dbus" ,dbus) ; for GDBus tests
7bc5cc2b
LC
125 ("bash" ,bash)
126 ("tzdata" ,tzdata) ; for tests/gdatetime.c
943f33a3 127
943f33a3
LC
128 ("patch/tests-homedir"
129 ,(search-patch "glib-tests-homedir.patch"))
130 ("patch/tests-desktop"
785db4d8
LC
131 ,(search-patch "glib-tests-desktop.patch"))
132 ("patch/tests-prlimit"
133 ,(search-patch "glib-tests-prlimit.patch"))))
943f33a3 134 (arguments
7bc5cc2b 135 '(#:patches (list (assoc-ref %build-inputs "patch/tests-homedir")
785db4d8
LC
136 (assoc-ref %build-inputs "patch/tests-desktop")
137 (assoc-ref %build-inputs "patch/tests-prlimit"))
943f33a3
LC
138 #:phases (alist-cons-before
139 'build 'pre-build
140 (lambda* (#:key inputs outputs #:allow-other-keys)
7bc5cc2b
LC
141 ;; For tests/gdatetime.c.
142 (setenv "TZDIR"
143 (string-append (assoc-ref inputs "tzdata")
144 "/share/zoneinfo"))
145
146 ;; Some tests want write access there.
147 (setenv "XDG_CACHE_HOME" (getcwd))
148
943f33a3
LC
149 (substitute* '("glib/gspawn.c"
150 "glib/tests/utils.c"
151 "tests/spawn-test.c")
7bc5cc2b
LC
152 (("/bin/sh")
153 (string-append (assoc-ref inputs "bash") "/bin/sh")))
154
155 ;; Honor $(TESTS_ENVIRONMENT).
156 (substitute* (find-files "." "^Makefile(\\.in)?$")
157 (("^GTESTER[[:blank:]]*=(.*)$" _ rest)
158 (string-append "GTESTER = $(TESTS_ENVIRONMENT) "
159 rest))))
943f33a3
LC
160 %standard-phases)
161
162 ;; Note: `--docdir' and `--htmldir' are not honored, so work around it.
163 #:configure-flags (list (string-append "--with-html-dir="
164 (assoc-ref %outputs "doc")
165 "/share/gtk-doc"))))
f50d2669 166 (synopsis "Thread-safe general utility library; basis of GTK+ and GNOME")
3889a82e
NK
167 (description
168 "GLib provides data structure handling for C, portability wrappers,
169and interfaces for such runtime functionality as an event loop, threads,
170dynamic loading, and an object system.")
171 (home-page "http://developer.gnome.org/glib/")
d6b8cb5c 172 (license license:lgpl2.0+))) ; some files are under lgpl2.1+
71eb5c10 173
80370441 174(define intltool
71eb5c10
LC
175 (package
176 (name "intltool")
d6b8cb5c 177 (version "0.50.2")
71eb5c10
LC
178 (source (origin
179 (method url-fetch)
d6b8cb5c
AE
180 (uri (string-append "https://launchpad.net/intltool/trunk/"
181 version "/+download/intltool-"
182 version ".tar.gz"))
71eb5c10
LC
183 (sha256
184 (base32
d6b8cb5c 185 "01j4yd7i84n9nk4ccs6yifg84pp68nr9by57jdbhj7dpdxf5rwk7"))))
71eb5c10 186 (build-system gnu-build-system)
71eb5c10 187 (propagated-inputs
107b415e
LC
188 `(;; Propagate gettext because users expect it to be there, and so does
189 ;; the `intltool-update' script.
190 ("gettext" ,guix:gettext)
191
5aa601a3
LC
192 ;; `file' is used by `intltool-update' too.
193 ("file" ,file)
194
e33d9d6f 195 ("perl-xml-parser" ,perl-xml-parser)
107b415e 196 ("perl" ,perl)))
d6b8cb5c
AE
197 (home-page "https://launchpad.net/intltool/+download")
198 (synopsis "Tools to centralise translations of different file formats")
71eb5c10 199 (description
d6b8cb5c 200 "intltool is a set of tools to centralise translations of many different
71eb5c10
LC
201file formats using GNU gettext-compatible PO files.
202
203The intltool collection can be used to do these things:
204
205 Extract translatable strings from various source files (.xml.in,
206 glade, .desktop.in, .server.in, .oaf.in).
207
208 Collect the extracted strings together with messages from traditional
209 source files (.c, .h) in po/$(PACKAGE).pot.
210
211 Merge back the translations from .po files into .xml, .desktop and
212 oaf files. This merge step will happen at build resp. installation time.")
d6b8cb5c 213 (license license:gpl2+)))
24b5c463 214
80370441 215(define itstool
20a26ff5
CR
216 (package
217 (name "itstool")
218 (version "1.2.0")
219 (source (origin
220 (method url-fetch)
221 (uri (string-append "http://files.itstool.org/itstool/itstool-"
222 version ".tar.bz2"))
223 (sha256
224 (base32
225 "1akq75aflihm3y7js8biy7b5mw2g11vl8yq90gydnwlwp0zxdzj6"))))
226 (build-system gnu-build-system)
227 (home-page "http://www.itstool.org")
228 (synopsis "Tool to translate XML documents with PO files")
229 (description
230 "ITS Tool allows you to translate your XML documents with PO files, using
231rules from the W3C Internationalization Tag Set (ITS) to determine what to
232translate and how to separate it into PO file messages.
233
234PO files are the standard translation format for GNU and other Unix-like
235systems. They present translatable information as discrete messages, allowing
236each message to be translated independently. In contrast to whole-page
237translation, translating with a message-based format like PO means you can
238easily track changes to the source document down to the paragraph. When new
239strings are added or existing strings are modified, you only need to update the
240corresponding messages.
241
242ITS Tool is designed to make XML documents translatable through PO files by
243applying standard ITS rules, as well as extension rules specific to ITS Tool.
244ITS also provides an industry standard way for authors to override translation
245information in their documents, such as whether a particular element should be
246translated.")
a129e0d8 247 (license license:gpl3+)))
20a26ff5 248
80370441 249(define dbus-glib
24b5c463
AE
250 (package
251 (name "dbus-glib")
252 (version "0.100.2")
253 (source (origin
254 (method url-fetch)
255 (uri
256 (string-append "http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-"
257 version ".tar.gz"))
258 (sha256
259 (base32
260 "1ibav91yg70f2l3l18cr0hf4mna1h9d4mrg0c60w4l8zjbd45fx5"))))
261 (build-system gnu-build-system)
262 (inputs
263 `(("dbus" ,dbus)
264 ("expat" ,expat)
265 ("glib" ,glib)
266 ("pkg-config" ,pkg-config)))
267 (home-page "http://dbus.freedesktop.org/doc/dbus-glib/")
268 (synopsis "D-Bus GLib bindings")
269 (description
270 "GLib bindings for D-Bus. The package is obsolete and superseded
271by GDBus included in Glib.")
272 (license license:gpl2))) ; or Academic Free License 2.1