ui: Fix format string in `warning'.
[jackhill/guix/guix.git] / gnu / packages / glib.scm
CommitLineData
3889a82e
NK
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
943f33a3 3;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
3889a82e
NK
4;;;
5;;; This file is part of GNU Guix.
6;;;
7;;; GNU Guix is free software; you can redistribute it and/or modify it
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
12;;; GNU Guix is distributed in the hope that it will be useful, but
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
943f33a3 20(define-module (gnu packages glib)
71eb5c10 21 #:use-module ((guix licenses) #:select (lgpl2.0+ gpl2+ gpl2))
3889a82e
NK
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system gnu)
943f33a3
LC
25 #:use-module (gnu packages)
26 #:use-module (gnu packages base)
27 #:use-module (gnu packages compression)
28 #:use-module ((gnu packages gettext)
3889a82e 29 #:renamer (symbol-prefix-proc 'guix:))
943f33a3
LC
30 #:use-module (gnu packages libffi)
31 #:use-module (gnu packages pkg-config)
32 #:use-module (gnu packages python)
33 #:use-module (gnu packages perl)
34 #:use-module ((gnu packages xml)
35 #:renamer (symbol-prefix-proc 'xml:)))
36
37(define-public dbus
38 (package
39 (name "dbus")
40 (version "1.6.4")
41 (source (origin
42 (method url-fetch)
43 (uri
44 (string-append "http://dbus.freedesktop.org/releases/dbus/dbus-"
45 version ".tar.gz"))
46 (sha256
47 (base32
48 "1wacqyfkcpayg7f8rvx9awqg275n5pksxq5q7y21lxjx85x6pfjz"))))
49 (build-system gnu-build-system)
50 (inputs
51 `(("expat" ,xml:expat)
52 ("pkg-config" ,pkg-config)))
53 (home-page "http://dbus.freedesktop.org/")
54 (synopsis "Message bus for inter-process communication (IPC)")
55 (description
56 "D-Bus is a message bus system, a simple way for applications to
57talk to one another. In addition to interprocess communication, D-Bus
58helps coordinate process lifecycle; it makes it simple and reliable to
59code a \"single instance\" application or daemon, and to launch
60applications and daemons on demand when their services are needed.
61
62D-Bus supplies both a system daemon (for events such as \"new hardware
63device added\" or \"printer queue changed\") and a
64per-user-login-session daemon (for general IPC needs among user
65applications). Also, the message bus is built on top of a general
66one-to-one message passing framework, which can be used by any two apps
67to communicate directly (without going through the message bus
68daemon). Currently the communicating applications are on one computer,
69or through unencrypted TCP/IP suitable for use behind a firewall with
70shared NFS home directories.")
71 (license gpl2+))) ; or Academic Free License 2.1
3889a82e
NK
72
73(define-public glib
74 (package
75 (name "glib")
943f33a3 76 (version "2.34.3")
3889a82e
NK
77 (source (origin
78 (method url-fetch)
785db4d8 79 (uri (string-append "mirror://gnome/sources/"
943f33a3
LC
80 name "/2.34/"
81 name "-" version ".tar.xz"))
3889a82e
NK
82 (sha256
83 (base32 "19sq4rhl2vr8ikjvl8qh51vr38yqfhbkb3imi2s6ac5rgkwcnpw5"))))
84 (build-system gnu-build-system)
943f33a3
LC
85 (outputs '("out" ; everything
86 "doc")) ; 20 MiB of GTK-Doc reference
3889a82e
NK
87 (inputs
88 `(("coreutils" ,coreutils)
89 ("gettext" ,guix:gettext)
90 ("libffi" ,libffi)
91 ("pkg-config" ,pkg-config)
92 ("python" ,python)
943f33a3
LC
93 ("zlib" ,zlib)
94 ("perl" ,perl) ; needed by GIO tests
95 ("dbus" ,dbus) ; for GDBus tests
96
97 ("patch/tests-tzdata"
98 ,(search-patch "glib-tests-timezone.patch"))
99 ("patch/tests-homedir"
100 ,(search-patch "glib-tests-homedir.patch"))
101 ("patch/tests-desktop"
785db4d8
LC
102 ,(search-patch "glib-tests-desktop.patch"))
103 ("patch/tests-prlimit"
104 ,(search-patch "glib-tests-prlimit.patch"))))
943f33a3
LC
105 (arguments
106 '(#:patches (list (assoc-ref %build-inputs "patch/tests-tzdata")
107 (assoc-ref %build-inputs "patch/tests-homedir")
785db4d8
LC
108 (assoc-ref %build-inputs "patch/tests-desktop")
109 (assoc-ref %build-inputs "patch/tests-prlimit"))
943f33a3
LC
110 #:phases (alist-cons-before
111 'build 'pre-build
112 (lambda* (#:key inputs outputs #:allow-other-keys)
113 (substitute* '("glib/gspawn.c"
114 "glib/tests/utils.c"
115 "tests/spawn-test.c")
116 (("/bin/sh") (which "sh"))))
117 %standard-phases)
118
119 ;; Note: `--docdir' and `--htmldir' are not honored, so work around it.
120 #:configure-flags (list (string-append "--with-html-dir="
121 (assoc-ref %outputs "doc")
122 "/share/gtk-doc"))))
123 (synopsis "C library that provides core application building blocks")
3889a82e
NK
124 (description
125 "GLib provides data structure handling for C, portability wrappers,
126and interfaces for such runtime functionality as an event loop, threads,
127dynamic loading, and an object system.")
128 (home-page "http://developer.gnome.org/glib/")
943f33a3 129 (license lgpl2.0+))) ; some files are under lgpl2.1+
71eb5c10
LC
130
131(define-public intltool
132 (package
133 (name "intltool")
134 (version "0.40.6")
135 (source (origin
136 (method url-fetch)
137 (uri (string-append
138 "mirror://gnome/sources/intltool/0.40/intltool-"
139 version
140 ".tar.bz2"))
141 (sha256
142 (base32
143 "0r1vkvy5xzqk01yl6a0xlrry39bra24alkrx6279b77hc62my7jd"))))
144 (build-system gnu-build-system)
145 (arguments
146 '(#:phases (alist-cons-before
147 'configure 'set-perl-path
148 (lambda* (#:key inputs #:allow-other-keys)
149 ;; FIXME: Remove this phase when proper support for search
150 ;; paths is available.
151 (let ((xml-parser (assoc-ref inputs "perl-xml-parser")))
152 (setenv "PERL5LIB"
153 (string-append xml-parser
154 "/lib/perl5/site_perl"))
155 #t))
156 %standard-phases)))
157 (native-inputs `(("pkg-config" ,pkg-config)))
158 (propagated-inputs
159 `(("gettext" ,guix:gettext)
160 ("perl-xml-parser" ,xml:perl-xml-parser)
161 ("perl" ,perl)))
162 (home-page "http://freedesktop.org/wiki/Software/intltool")
163 (synopsis "Tools to centralize translation of many different file formats")
164 (description
165 "intltool is a set of tools to centralize translation of many different
166file formats using GNU gettext-compatible PO files.
167
168The intltool collection can be used to do these things:
169
170 Extract translatable strings from various source files (.xml.in,
171 glade, .desktop.in, .server.in, .oaf.in).
172
173 Collect the extracted strings together with messages from traditional
174 source files (.c, .h) in po/$(PACKAGE).pot.
175
176 Merge back the translations from .po files into .xml, .desktop and
177 oaf files. This merge step will happen at build resp. installation time.")
178 (license gpl2)))