gnu: calibre: Wrap QTWEBENGINEPROCESS_PATH.
[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
fc1adab1 72 (search-patches "libcanberra-sound-theme-freedesktop.patch"))))
90ed6291
AE
73 (build-system gnu-build-system)
74 (inputs
90ed6291
AE
75 `(("alsa-lib" ,alsa-lib)
76 ("gstreamer" ,gstreamer)
77 ("gtk+" ,gtk+)
3246cc91 78 ("libltdl" ,libltdl)
571a0310
LC
79 ("libvorbis" ,libvorbis)
80 ("pulseaudio" ,pulseaudio)
beb8dc00
FB
81 ("udev" ,eudev)
82 ("sound-theme-freedesktop" ,sound-theme-freedesktop)))
c4c4cc05
JD
83 (native-inputs
84 `(("pkg-config" ,pkg-config)))
beb8dc00
FB
85 (arguments
86 `(#:phases
dc1d3cde
KK
87 (modify-phases %standard-phases
88 (add-before 'build 'patch-default-sounds-directory
89 (lambda* (#:key inputs #:allow-other-keys)
90 (substitute* "src/sound-theme-spec.c"
91 (("@SOUND_THEME_DIRECTORY@")
92 (string-append
93 (assoc-ref inputs "sound-theme-freedesktop")
94 "/share")))
95 #t)))))
90ed6291
AE
96 (home-page "http://0pointer.de/lennart/projects/libcanberra/")
97 (synopsis
98 "Implementation of the XDG Sound Theme and Name Specifications")
99 (description
100 "Libcanberra is an implementation of the XDG Sound Theme and Name
101Specifications, for generating event sounds on free desktops, such as
102GNOME. It comes with several backends (ALSA, PulseAudio, OSS, GStreamer,
103null) and is designed to be portable.")
104 (license lgpl2.1+)))
573a3554 105
6366cef3
FH
106(define-public libcanberra/gtk+-2
107 (package (inherit libcanberra)
108 (name "libcanberra-gtk2")
109 (inputs `(,@(alist-delete "gtk+" (package-inputs libcanberra))
110 ("gtk+" ,gtk+-2)))))
111
573a3554
LC
112(define-public sound-theme-freedesktop
113 (package
114 (name "sound-theme-freedesktop")
115 (version "0.8")
116 (source (origin
117 (method url-fetch)
5cc3096c 118 (uri (string-append "https://people.freedesktop.org/~mccann/dist/"
573a3554
LC
119 name "-" version ".tar.bz2"))
120 (sha256
121 (base32
122 "054abv4gmfk9maw93fis0bf605rc56dah7ys5plc4pphxqh8nlfb"))))
123 (build-system gnu-build-system)
124 (native-inputs `(("intltool" ,intltool)))
125 (synopsis "Audio samples for use as a desktop sound theme")
126 (description
127 "This package provides audio samples that can be used by libcanberra as
128sounds for various system events.")
386b0052
LC
129
130 ;; The license of the various sounds is given in the 'CREDITS' file.
131 (license (list cc-by-sa4.0 cc-by3.0 gpl2 gpl2+))
132
57e7d748 133 (home-page "https://www.freedesktop.org/wiki/Specifications/sound-theme-spec/")))
c50fe6c2 134
135(define-public python-pycanberra
136 (package
137 (name "python-pycanberra")
138 (version "0.1.1")
139 (source
140 (origin
141 (method url-fetch)
f5fa1bdc 142 (uri (string-append "http://ftp.n0.is/pub/releases/"
66e47916 143 "pycanberra-" version ".tar.xz"))
c50fe6c2 144 (sha256
145 (base32
146 "16jjf8fcgaprmz6jacsxrh17l1ad891fns38bxv49lg3s3mn1nj2"))))
147 (build-system python-build-system)
148 (arguments
149 `(#:tests? #f)) ;No tests included.
150 (propagated-inputs
151 `(("libcanberra" ,libcanberra)))
152 (synopsis "Ctypes wrapper for the libcanberra API")
153 (description
154 "Pycanberra is a basic Python wrapper for libcanberra.")
f5fa1bdc 155 (home-page "http://c.n0.is/ng0/pycanberra/")
c50fe6c2 156 (license lgpl2.1+)))