build: `hydra.scm' changes %load-path to refer to itself.
[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)
79 (uri (string-append "http://ftp.gnome.org/pub/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"
102 ,(search-patch "glib-tests-desktop.patch"))))
103 (arguments
104 '(#:patches (list (assoc-ref %build-inputs "patch/tests-tzdata")
105 (assoc-ref %build-inputs "patch/tests-homedir")
106 (assoc-ref %build-inputs "patch/tests-desktop"))
107 #:phases (alist-cons-before
108 'build 'pre-build
109 (lambda* (#:key inputs outputs #:allow-other-keys)
110 (substitute* '("glib/gspawn.c"
111 "glib/tests/utils.c"
112 "tests/spawn-test.c")
113 (("/bin/sh") (which "sh"))))
114 %standard-phases)
115
116 ;; Note: `--docdir' and `--htmldir' are not honored, so work around it.
117 #:configure-flags (list (string-append "--with-html-dir="
118 (assoc-ref %outputs "doc")
119 "/share/gtk-doc"))))
120 (synopsis "C library that provides core application building blocks")
3889a82e
NK
121 (description
122 "GLib provides data structure handling for C, portability wrappers,
123and interfaces for such runtime functionality as an event loop, threads,
124dynamic loading, and an object system.")
125 (home-page "http://developer.gnome.org/glib/")
943f33a3 126 (license lgpl2.0+))) ; some files are under lgpl2.1+
71eb5c10
LC
127
128(define-public intltool
129 (package
130 (name "intltool")
131 (version "0.40.6")
132 (source (origin
133 (method url-fetch)
134 (uri (string-append
135 "mirror://gnome/sources/intltool/0.40/intltool-"
136 version
137 ".tar.bz2"))
138 (sha256
139 (base32
140 "0r1vkvy5xzqk01yl6a0xlrry39bra24alkrx6279b77hc62my7jd"))))
141 (build-system gnu-build-system)
142 (arguments
143 '(#:phases (alist-cons-before
144 'configure 'set-perl-path
145 (lambda* (#:key inputs #:allow-other-keys)
146 ;; FIXME: Remove this phase when proper support for search
147 ;; paths is available.
148 (let ((xml-parser (assoc-ref inputs "perl-xml-parser")))
149 (setenv "PERL5LIB"
150 (string-append xml-parser
151 "/lib/perl5/site_perl"))
152 #t))
153 %standard-phases)))
154 (native-inputs `(("pkg-config" ,pkg-config)))
155 (propagated-inputs
156 `(("gettext" ,guix:gettext)
157 ("perl-xml-parser" ,xml:perl-xml-parser)
158 ("perl" ,perl)))
159 (home-page "http://freedesktop.org/wiki/Software/intltool")
160 (synopsis "Tools to centralize translation of many different file formats")
161 (description
162 "intltool is a set of tools to centralize translation of many different
163file formats using GNU gettext-compatible PO files.
164
165The intltool collection can be used to do these things:
166
167 Extract translatable strings from various source files (.xml.in,
168 glade, .desktop.in, .server.in, .oaf.in).
169
170 Collect the extracted strings together with messages from traditional
171 source files (.c, .h) in po/$(PACKAGE).pot.
172
173 Merge back the translations from .po files into .xml, .desktop and
174 oaf files. This merge step will happen at build resp. installation time.")
175 (license gpl2)))