gnu: guile-1.8: Patch `ice-9/popen.scm'.
[jackhill/guix/guix.git] / gnu / packages / glib.scm
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>
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
20 (define-module (gnu packages glib)
21 #:use-module ((guix licenses) #:select (lgpl2.0+ 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:)))
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
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.
61
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
72
73 (define-public glib
74 (package
75 (name "glib")
76 (version "2.34.3")
77 (source (origin
78 (method url-fetch)
79 (uri (string-append "http://ftp.gnome.org/pub/gnome/sources/"
80 name "/2.34/"
81 name "-" version ".tar.xz"))
82 (sha256
83 (base32 "19sq4rhl2vr8ikjvl8qh51vr38yqfhbkb3imi2s6ac5rgkwcnpw5"))))
84 (build-system gnu-build-system)
85 (outputs '("out" ; everything
86 "doc")) ; 20 MiB of GTK-Doc reference
87 (inputs
88 `(("coreutils" ,coreutils)
89 ("gettext" ,guix:gettext)
90 ("libffi" ,libffi)
91 ("pkg-config" ,pkg-config)
92 ("python" ,python)
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")
121 (description
122 "GLib provides data structure handling for C, portability wrappers,
123 and interfaces for such runtime functionality as an event loop, threads,
124 dynamic loading, and an object system.")
125 (home-page "http://developer.gnome.org/glib/")
126 (license lgpl2.0+))) ; some files are under lgpl2.1+