gnu: cvs-fast-export: Update to 1.56.
[jackhill/guix/guix.git] / gnu / packages / libcanberra.scm
CommitLineData
90ed6291
AE
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
6fd5a80d 3;;; Copyright © 2014, 2015, 2019 Ludovic Courtès <ludo@gnu.org>
6366cef3 4;;; Copyright © 2016 Fabian Harfert <fhmgufs@web.de>
3c986a7d 5;;; Copyright © 2017, 2018 Nikita <nikita@n0.is>
90ed6291
AE
6;;;
7;;; This file is part of GNU Guix.
8;;;
9;;; GNU Guix is free software; you can redistribute it and/or modify it
10;;; under the terms of the GNU General Public License as published by
11;;; the Free Software Foundation; either version 3 of the License, or (at
12;;; your option) any later version.
13;;;
14;;; GNU Guix is distributed in the hope that it will be useful, but
15;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;;; GNU General Public License for more details.
18;;;
19;;; You should have received a copy of the GNU General Public License
20;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22(define-module (gnu packages libcanberra)
386b0052
LC
23 #:use-module ((guix licenses)
24 #:select (lgpl2.1+ gpl2 gpl2+ cc-by-sa4.0 cc-by3.0))
beb8dc00 25 #:use-module (gnu packages)
90ed6291
AE
26 #:use-module (guix packages)
27 #:use-module (guix download)
c50fe6c2 28 #:use-module (guix git-download)
90ed6291 29 #:use-module (guix build-system gnu)
c50fe6c2 30 #:use-module (guix build-system python)
c50fe6c2 31 #:use-module (guix utils)
90ed6291
AE
32 #:use-module (gnu packages autotools)
33 #:use-module (gnu packages gstreamer)
34 #:use-module (gnu packages gtk)
573a3554 35 #:use-module (gnu packages glib)
90ed6291 36 #:use-module (gnu packages linux)
571a0310 37 #:use-module (gnu packages pulseaudio)
54ff0b7d 38 #:use-module (gnu packages pkg-config)
c50fe6c2 39 #:use-module (gnu packages python)
6fd5a80d
LC
40 #:use-module (gnu packages xiph)
41 #:use-module ((srfi srfi-1) #:select (alist-delete)))
90ed6291
AE
42
43(define-public libcanberra
44 (package
45 (name "libcanberra")
46 (version "0.30")
47 (source
48 (origin
49 (method url-fetch)
c8bf8b2f
LC
50
51 ;; This used to be at 0pointer.de but it vanished.
52 (uri (string-append
53 "http://pkgs.fedoraproject.org/repo/pkgs/libcanberra/libcanberra-"
54 version ".tar.xz/34cb7e4430afaf6f447c4ebdb9b42072/libcanberra-"
55 version ".tar.xz"))
90ed6291
AE
56 (sha256
57 (base32
beb8dc00
FB
58 "0wps39h8rx2b00vyvkia5j40fkak3dpipp1kzilqla0cgvk73dn2"))
59 ;; "sound-theme-freedesktop" is the default and fall-back sound theme for
60 ;; XDG desktops and should always be present.
61 ;; http://www.freedesktop.org/wiki/Specifications/sound-theme-spec/
62 ;; We make sure libcanberra will find it.
63 ;;
64 ;; We add the default sounds store directory to the code dealing with
65 ;; XDG_DATA_DIRS and not XDG_DATA_HOME. This is because XDG_DATA_HOME
66 ;; can only be a single directory and is inspected first. XDG_DATA_DIRS
67 ;; can list an arbitrary number of directories and is only inspected
68 ;; later. This is designed to allows the user to modify any theme at
69 ;; his pleasure.
70 (patch-flags '("-p0"))
71 (patches
ec82d585
JL
72 (search-patches "libcanberra-sound-theme-freedesktop.patch"
73 "libcanberra-wayland-crash.patch"))))
90ed6291
AE
74 (build-system gnu-build-system)
75 (inputs
90ed6291
AE
76 `(("alsa-lib" ,alsa-lib)
77 ("gstreamer" ,gstreamer)
78 ("gtk+" ,gtk+)
3246cc91 79 ("libltdl" ,libltdl)
571a0310
LC
80 ("libvorbis" ,libvorbis)
81 ("pulseaudio" ,pulseaudio)
beb8dc00
FB
82 ("udev" ,eudev)
83 ("sound-theme-freedesktop" ,sound-theme-freedesktop)))
c4c4cc05
JD
84 (native-inputs
85 `(("pkg-config" ,pkg-config)))
beb8dc00
FB
86 (arguments
87 `(#:phases
dc1d3cde
KK
88 (modify-phases %standard-phases
89 (add-before 'build 'patch-default-sounds-directory
90 (lambda* (#:key inputs #:allow-other-keys)
91 (substitute* "src/sound-theme-spec.c"
92 (("@SOUND_THEME_DIRECTORY@")
93 (string-append
94 (assoc-ref inputs "sound-theme-freedesktop")
95 "/share")))
96 #t)))))
90ed6291
AE
97 (home-page "http://0pointer.de/lennart/projects/libcanberra/")
98 (synopsis
99 "Implementation of the XDG Sound Theme and Name Specifications")
100 (description
101 "Libcanberra is an implementation of the XDG Sound Theme and Name
102Specifications, for generating event sounds on free desktops, such as
103GNOME. It comes with several backends (ALSA, PulseAudio, OSS, GStreamer,
104null) and is designed to be portable.")
105 (license lgpl2.1+)))
573a3554 106
6366cef3 107(define-public libcanberra/gtk+-2
1a265842 108 (package/inherit libcanberra
6366cef3
FH
109 (name "libcanberra-gtk2")
110 (inputs `(,@(alist-delete "gtk+" (package-inputs libcanberra))
111 ("gtk+" ,gtk+-2)))))
112
573a3554
LC
113(define-public sound-theme-freedesktop
114 (package
115 (name "sound-theme-freedesktop")
116 (version "0.8")
117 (source (origin
118 (method url-fetch)
5cc3096c 119 (uri (string-append "https://people.freedesktop.org/~mccann/dist/"
573a3554
LC
120 name "-" version ".tar.bz2"))
121 (sha256
122 (base32
123 "054abv4gmfk9maw93fis0bf605rc56dah7ys5plc4pphxqh8nlfb"))))
124 (build-system gnu-build-system)
125 (native-inputs `(("intltool" ,intltool)))
126 (synopsis "Audio samples for use as a desktop sound theme")
127 (description
128 "This package provides audio samples that can be used by libcanberra as
129sounds for various system events.")
386b0052
LC
130
131 ;; The license of the various sounds is given in the 'CREDITS' file.
132 (license (list cc-by-sa4.0 cc-by3.0 gpl2 gpl2+))
133
57e7d748 134 (home-page "https://www.freedesktop.org/wiki/Specifications/sound-theme-spec/")))
c50fe6c2 135
136(define-public python-pycanberra
137 (package
138 (name "python-pycanberra")
139 (version "0.1.1")
140 (source
141 (origin
142 (method url-fetch)
f5fa1bdc 143 (uri (string-append "http://ftp.n0.is/pub/releases/"
66e47916 144 "pycanberra-" version ".tar.xz"))
c50fe6c2 145 (sha256
146 (base32
147 "16jjf8fcgaprmz6jacsxrh17l1ad891fns38bxv49lg3s3mn1nj2"))))
148 (build-system python-build-system)
149 (arguments
150 `(#:tests? #f)) ;No tests included.
151 (propagated-inputs
152 `(("libcanberra" ,libcanberra)))
153 (synopsis "Ctypes wrapper for the libcanberra API")
154 (description
155 "Pycanberra is a basic Python wrapper for libcanberra.")
f5fa1bdc 156 (home-page "http://c.n0.is/ng0/pycanberra/")
c50fe6c2 157 (license lgpl2.1+)))