1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
5 ;;; This file is part of GNU Guix.
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.
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.
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/>.
20 (define-module (gnu packages glib)
21 #:use-module ((guix licenses) #:select (lgpl2.0+ gpl2+ gpl2))
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system gnu)
25 #:use-module (gnu packages)
26 #:use-module (gnu packages base)
27 #:use-module (gnu packages compression)
28 #:use-module ((gnu packages gettext)
29 #:renamer (symbol-prefix-proc 'guix:))
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:)))
44 (string-append "http://dbus.freedesktop.org/releases/dbus/dbus-"
48 "1wacqyfkcpayg7f8rvx9awqg275n5pksxq5q7y21lxjx85x6pfjz"))))
49 (build-system gnu-build-system)
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)")
56 "D-Bus is a message bus system, a simple way for applications to
57 talk to one another. In addition to interprocess communication, D-Bus
58 helps coordinate process lifecycle; it makes it simple and reliable to
59 code a \"single instance\" application or daemon, and to launch
60 applications and daemons on demand when their services are needed.
62 D-Bus supplies both a system daemon (for events such as \"new hardware
63 device added\" or \"printer queue changed\") and a
64 per-user-login-session daemon (for general IPC needs among user
65 applications). Also, the message bus is built on top of a general
66 one-to-one message passing framework, which can be used by any two apps
67 to communicate directly (without going through the message bus
68 daemon). Currently the communicating applications are on one computer,
69 or through unencrypted TCP/IP suitable for use behind a firewall with
70 shared NFS home directories.")
71 (license gpl2+))) ; or Academic Free License 2.1
79 (uri (string-append "mirror://gnome/sources/"
81 name "-" version ".tar.xz"))
83 (base32 "19sq4rhl2vr8ikjvl8qh51vr38yqfhbkb3imi2s6ac5rgkwcnpw5"))))
84 (build-system gnu-build-system)
85 (outputs '("out" ; everything
86 "doc")) ; 20 MiB of GTK-Doc reference
88 `(("coreutils" ,coreutils)
89 ("gettext" ,guix:gettext)
91 ("pkg-config" ,pkg-config)
94 ("perl" ,perl) ; needed by GIO tests
95 ("dbus" ,dbus) ; for GDBus tests
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 ("patch/tests-prlimit"
104 ,(search-patch "glib-tests-prlimit.patch"))))
106 '(#:patches (list (assoc-ref %build-inputs "patch/tests-tzdata")
107 (assoc-ref %build-inputs "patch/tests-homedir")
108 (assoc-ref %build-inputs "patch/tests-desktop")
109 (assoc-ref %build-inputs "patch/tests-prlimit"))
110 #:phases (alist-cons-before
112 (lambda* (#:key inputs outputs #:allow-other-keys)
113 (substitute* '("glib/gspawn.c"
115 "tests/spawn-test.c")
116 (("/bin/sh") (which "sh"))))
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")
123 (synopsis "Thread-safe general utility library; basis of GTK+ and GNOME")
125 "GLib provides data structure handling for C, portability wrappers,
126 and interfaces for such runtime functionality as an event loop, threads,
127 dynamic loading, and an object system.")
128 (home-page "http://developer.gnome.org/glib/")
129 (license lgpl2.0+))) ; some files are under lgpl2.1+
131 (define-public intltool
138 "mirror://gnome/sources/intltool/0.40/intltool-"
143 "0r1vkvy5xzqk01yl6a0xlrry39bra24alkrx6279b77hc62my7jd"))))
144 (build-system gnu-build-system)
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")))
153 (string-append xml-parser
154 "/lib/perl5/site_perl"))
157 (native-inputs `(("pkg-config" ,pkg-config)))
159 `(("gettext" ,guix:gettext)
160 ("perl-xml-parser" ,xml:perl-xml-parser)
162 (home-page "http://freedesktop.org/wiki/Software/intltool")
163 (synopsis "Tools to centralize translation of many different file formats")
165 "intltool is a set of tools to centralize translation of many different
166 file formats using GNU gettext-compatible PO files.
168 The intltool collection can be used to do these things:
170 Extract translatable strings from various source files (.xml.in,
171 glade, .desktop.in, .server.in, .oaf.in).
173 Collect the extracted strings together with messages from traditional
174 source files (.c, .h) in po/$(PACKAGE).pot.
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.")