doc: Update bootstrap-related info in `HACKING'.
[jackhill/guix/guix.git] / gnu / packages / glib.scm
... / ...
CommitLineData
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
3;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
4;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
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
21(define-module (gnu packages glib)
22 #:use-module ((guix licenses)
23 #:renamer (symbol-prefix-proc 'license:))
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix build-system gnu)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages base)
29 #:use-module (gnu packages compression)
30 #:use-module ((gnu packages gettext)
31 #:renamer (symbol-prefix-proc 'guix:))
32 #:use-module (gnu packages libffi)
33 #:use-module (gnu packages perl)
34 #:use-module (gnu packages pkg-config)
35 #:use-module (gnu packages python)
36 #:use-module (gnu packages xml)
37 #:use-module (gnu packages bash))
38
39(define-public dbus
40 (package
41 (name "dbus")
42 (version "1.6.4")
43 (source (origin
44 (method url-fetch)
45 (uri
46 (string-append "http://dbus.freedesktop.org/releases/dbus/dbus-"
47 version ".tar.gz"))
48 (sha256
49 (base32
50 "1wacqyfkcpayg7f8rvx9awqg275n5pksxq5q7y21lxjx85x6pfjz"))))
51 (build-system gnu-build-system)
52 (inputs
53 `(("expat" ,expat)
54 ("pkg-config" ,pkg-config)))
55 (home-page "http://dbus.freedesktop.org/")
56 (synopsis "Message bus for inter-process communication (IPC)")
57 (description
58 "D-Bus is a message bus system, a simple way for applications to
59talk to one another. In addition to interprocess communication, D-Bus
60helps coordinate process lifecycle; it makes it simple and reliable to
61code a \"single instance\" application or daemon, and to launch
62applications and daemons on demand when their services are needed.
63
64D-Bus supplies both a system daemon (for events such as \"new hardware
65device added\" or \"printer queue changed\") and a
66per-user-login-session daemon (for general IPC needs among user
67applications). Also, the message bus is built on top of a general
68one-to-one message passing framework, which can be used by any two apps
69to communicate directly (without going through the message bus
70daemon). Currently the communicating applications are on one computer,
71or through unencrypted TCP/IP suitable for use behind a firewall with
72shared NFS home directories.")
73 (license license:gpl2+))) ; or Academic Free License 2.1
74
75(define-public glib
76 (package
77 (name "glib")
78 (version "2.37.1")
79 (source (origin
80 (method url-fetch)
81 (uri (string-append "mirror://gnome/sources/"
82 name "/2.34/"
83 name "-" version ".tar.xz"))
84 (sha256
85 (base32 "1lp705q0g9jlfj24x8fpgjh7awmmara5iyj9kz5lhd49sr9s813k"))))
86 (build-system gnu-build-system)
87 (outputs '("out" ; everything
88 "doc")) ; 20 MiB of GTK-Doc reference
89 (inputs
90 `(("coreutils" ,coreutils)
91 ("gettext" ,guix:gettext)
92 ("libffi" ,libffi)
93 ("pkg-config" ,pkg-config)
94 ("python" ,python)
95 ("zlib" ,zlib)
96 ("perl" ,perl) ; needed by GIO tests
97 ("dbus" ,dbus) ; for GDBus tests
98 ("bash" ,bash)
99 ("tzdata" ,tzdata) ; for tests/gdatetime.c
100
101 ("patch/tests-homedir"
102 ,(search-patch "glib-tests-homedir.patch"))
103 ("patch/tests-desktop"
104 ,(search-patch "glib-tests-desktop.patch"))
105 ("patch/tests-prlimit"
106 ,(search-patch "glib-tests-prlimit.patch"))))
107 (arguments
108 '(#:patches (list (assoc-ref %build-inputs "patch/tests-homedir")
109 (assoc-ref %build-inputs "patch/tests-desktop")
110 (assoc-ref %build-inputs "patch/tests-prlimit"))
111 #:phases (alist-cons-before
112 'build 'pre-build
113 (lambda* (#:key inputs outputs #:allow-other-keys)
114 ;; For tests/gdatetime.c.
115 (setenv "TZDIR"
116 (string-append (assoc-ref inputs "tzdata")
117 "/share/zoneinfo"))
118
119 ;; Some tests want write access there.
120 (setenv "XDG_CACHE_HOME" (getcwd))
121
122 (substitute* '("glib/gspawn.c"
123 "glib/tests/utils.c"
124 "tests/spawn-test.c")
125 (("/bin/sh")
126 (string-append (assoc-ref inputs "bash") "/bin/sh")))
127
128 ;; Honor $(TESTS_ENVIRONMENT).
129 (substitute* (find-files "." "^Makefile(\\.in)?$")
130 (("^GTESTER[[:blank:]]*=(.*)$" _ rest)
131 (string-append "GTESTER = $(TESTS_ENVIRONMENT) "
132 rest))))
133 %standard-phases)
134
135 ;; Note: `--docdir' and `--htmldir' are not honored, so work around it.
136 #:configure-flags (list (string-append "--with-html-dir="
137 (assoc-ref %outputs "doc")
138 "/share/gtk-doc"))))
139 (synopsis "Thread-safe general utility library; basis of GTK+ and GNOME")
140 (description
141 "GLib provides data structure handling for C, portability wrappers,
142and interfaces for such runtime functionality as an event loop, threads,
143dynamic loading, and an object system.")
144 (home-page "http://developer.gnome.org/glib/")
145 (license license:lgpl2.0+))) ; some files are under lgpl2.1+
146
147(define-public intltool
148 (package
149 (name "intltool")
150 (version "0.50.2")
151 (source (origin
152 (method url-fetch)
153 (uri (string-append "https://launchpad.net/intltool/trunk/"
154 version "/+download/intltool-"
155 version ".tar.gz"))
156 (sha256
157 (base32
158 "01j4yd7i84n9nk4ccs6yifg84pp68nr9by57jdbhj7dpdxf5rwk7"))))
159 (build-system gnu-build-system)
160 (propagated-inputs
161 `(;; Propagate gettext because users expect it to be there, and so does
162 ;; the `intltool-update' script.
163 ("gettext" ,guix:gettext)
164
165 ("perl-xml-parser" ,perl-xml-parser)
166 ("perl" ,perl)))
167 (home-page "https://launchpad.net/intltool/+download")
168 (synopsis "Tools to centralise translations of different file formats")
169 (description
170 "intltool is a set of tools to centralise translations of many different
171file formats using GNU gettext-compatible PO files.
172
173The intltool collection can be used to do these things:
174
175 Extract translatable strings from various source files (.xml.in,
176 glade, .desktop.in, .server.in, .oaf.in).
177
178 Collect the extracted strings together with messages from traditional
179 source files (.c, .h) in po/$(PACKAGE).pot.
180
181 Merge back the translations from .po files into .xml, .desktop and
182 oaf files. This merge step will happen at build resp. installation time.")
183 (license license:gpl2+)))