Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / xiph.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
4 ;;; Copyright © 2013 David Thompson <dthompson2@worcester.edu>
5 ;;; Copyright © 2014 Sree Harsha Totakura <sreeharsha@totakura.in>
6 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
7 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
8 ;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2017, 2018 Marius Bakke <mbakke@fastmail.com>
10 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;;
12 ;;; This file is part of GNU Guix.
13 ;;;
14 ;;; GNU Guix is free software; you can redistribute it and/or modify it
15 ;;; under the terms of the GNU General Public License as published by
16 ;;; the Free Software Foundation; either version 3 of the License, or (at
17 ;;; your option) any later version.
18 ;;;
19 ;;; GNU Guix is distributed in the hope that it will be useful, but
20 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ;;; GNU General Public License for more details.
23 ;;;
24 ;;; You should have received a copy of the GNU General Public License
25 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26
27 (define-module (gnu packages xiph)
28 #:use-module (gnu packages)
29 #:use-module (gnu packages bison)
30 #:use-module (gnu packages compression)
31 #:use-module (gnu packages curl)
32 #:use-module (gnu packages documentation)
33 #:use-module (gnu packages image)
34 #:use-module (gnu packages pkg-config)
35 #:use-module (gnu packages python)
36 #:use-module (gnu packages linux)
37 #:use-module (gnu packages pulseaudio)
38 #:use-module (gnu packages tls)
39 #:use-module (gnu packages xml)
40 #:use-module ((guix licenses) #:prefix license:)
41 #:use-module (guix packages)
42 #:use-module (guix download)
43 #:use-module (guix build-system gnu)
44 #:export (libogg
45 libvorbis
46 libtheora
47 speex
48 speexdsp
49 ao
50 flac
51 libkate
52 vorbis-tools
53 opus
54 opusfile
55 opus-tools))
56
57 (define libogg
58 (package
59 (name "libogg")
60 (version "1.3.3")
61 (source (origin
62 (method url-fetch)
63 (uri (string-append "http://downloads.xiph.org/releases/ogg/libogg-"
64 version ".tar.xz"))
65 (sha256
66 (base32
67 "022wjlzn8fx7mfby4pcgyjwx8zir7jr7cizichh3jgaki8bwcgsg"))))
68 (build-system gnu-build-system)
69 (synopsis "Library for manipulating the ogg multimedia format")
70 (description
71 "The libogg library allows to manipulate the ogg multimedia container
72 format, which encapsulates raw compressed data and allows the interleaving of
73 audio and video data. In addition to encapsulation and interleaving of
74 multiple data streams, ogg provides packet framing, error detection, and
75 periodic timestamps for seeking.")
76 (license (license:non-copyleft "file://COPYING"
77 "See COPYING in the distribution."))
78 (home-page "https://xiph.org/ogg/")))
79
80 (define libvorbis
81 (package
82 (name "libvorbis")
83 (version "1.3.6")
84 (source (origin
85 (method url-fetch)
86 (uri (string-append "http://downloads.xiph.org/releases/vorbis/"
87 "libvorbis-" version ".tar.xz"))
88 (sha256
89 (base32
90 "05dlzjkdpv46zb837wysxqyn8l636x3dw8v8ymlrwz2fg1dbn05g"))))
91 (build-system gnu-build-system)
92 (propagated-inputs `(("libogg" ,libogg)))
93 (arguments `(#:configure-flags '("LDFLAGS=-lm")
94 #:parallel-tests? #f))
95 (synopsis "Library implementing the vorbis audio format")
96 (description
97 "The libvorbis library implements the ogg vorbis audio format,
98 a fully open, non-proprietary, patent-and-royalty-free, general-purpose
99 compressed audio format for mid to high quality (8kHz-48.0kHz, 16+ bit,
100 polyphonic) audio and music at fixed and variable bitrates from 16 to
101 128 kbps/channel.")
102 (license (license:non-copyleft "file://COPYING"
103 "See COPYING in the distribution."))
104 (home-page "https://xiph.org/vorbis/")))
105
106 (define libtheora
107 (package
108 (name "libtheora")
109 (version "1.1.1")
110 (source (origin
111 (method url-fetch)
112 (uri (string-append "http://downloads.xiph.org/releases/theora/"
113 "libtheora-" version ".tar.xz"))
114 (sha256
115 (base32
116 "0q8wark9ribij57dciym5vdikg2464p8q2mgqvfb78ksjh4s8vgk"))
117 (patches (search-patches "libtheora-config-guess.patch"))))
118 (build-system gnu-build-system)
119 (inputs `(("libvorbis" ,libvorbis)))
120 ;; The .pc files refer to libogg.
121 (propagated-inputs `(("libogg" ,libogg)))
122 (synopsis "Library implementing the Theora video format")
123 (description
124 "The libtheora library implements the ogg theora video format,
125 a fully open, non-proprietary, patent-and-royalty-free, general-purpose
126 compressed video format.")
127 (license license:bsd-3)
128 (home-page "https://xiph.org/theora/")))
129
130 (define speex
131 (package
132 (name "speex")
133 (version "1.2.0")
134 (source
135 (origin
136 (method url-fetch)
137 (uri (string-append "http://downloads.xiph.org/releases/speex/speex-"
138 version ".tar.gz"))
139 (sha256
140 (base32
141 "150047wnllz4r94whb9r73l5qf0z5z3rlhy98bawfbblmkq8mbpa"))))
142 (build-system gnu-build-system)
143 (native-inputs
144 `(("pkg-config" ,pkg-config)))
145 (inputs
146 `(("libogg" ,libogg)
147 ("speexdsp" ,speexdsp)))
148 (home-page "https://gnu.org/software/speex")
149 (synopsis "Library for patent-free audio compression format")
150 (description
151 "GNU Speex is a patent-free audio compression codec specially designed
152 for speech. It is well-adapted to internet applications, such as VoIP. It
153 features compression of different bands in the same bitstream, intensity
154 stereo encoding, and voice activity detection.")
155 ;; 'src/getopt.c' is under LGPLv2+
156 (license (license:non-copyleft "file://COPYING"
157 "See COPYING in the distribution."))))
158
159 (define speexdsp
160 (package
161 (name "speexdsp")
162 (version "1.2rc3")
163 (source (origin
164 (method url-fetch)
165 (uri (string-append "http://downloads.xiph.org/releases/speex/"
166 "speexdsp-" version ".tar.gz"))
167 (sha256
168 (base32
169 "1wcjyrnwlkayb20zdhp48y260rfyzg925qpjpljd5x9r01h8irja"))))
170 (build-system gnu-build-system)
171 (arguments
172 `(#:configure-flags '(,@(if (string=? "aarch64-linux"
173 (%current-system))
174 '("--enable-neon=no") ; neon defaults to armv7-a
175 '()))))
176 (home-page "https://speex.org/")
177 (synopsis "Speex processing library")
178 (description
179 "SpeexDSP is a @dfn{DSP} (Digital Signal Processing) library based on
180 work from the @code{speex} codec.")
181 (license (license:non-copyleft "file://COPYING"
182 "See COPYING in the distribution."))))
183
184 (define ao
185 (package
186 (name "ao")
187 (version "1.2.0")
188 (source
189 (origin
190 (method url-fetch)
191 (uri (string-append "http://downloads.xiph.org/releases/ao/libao-"
192 version ".tar.gz"))
193 (sha256
194 (base32
195 "1bwwv1g9lchaq6qmhvj1pp3hnyqr64ydd4j38x94pmprs4d27b83"))))
196 (build-system gnu-build-system)
197 ;; FIXME: Add further backends, see the summary printed after configure.
198 ;; XXX: Should back-ends be pushed to different outputs? For instance,
199 ;; "out" would include only the ALSA back-end, while "pulse" would
200 ;; contain 'lib/ao/plugins-4/libpulse.*'.
201 (inputs
202 `(("alsa-lib" ,alsa-lib)
203 ("pulseaudio" ,pulseaudio)))
204 (native-inputs
205 `(("pkg-config" ,pkg-config)))
206 (synopsis "Cross platform audio library")
207 (description
208 "Libao is a cross-platform audio library that allows programs to
209 output audio using a simple API on a wide variety of platforms.
210 It currently supports:
211 @enumerate
212 @item Null output (handy for testing without a sound device),
213 @item WAV files,
214 @item AU files,
215 @item RAW files,
216 @item OSS (Open Sound System, used on Linux and FreeBSD),
217 @item ALSA (Advanced Linux Sound Architecture),
218 @item aRts (Analog RealTime Synth, used by KDE),
219 @item PulseAudio (next generation GNOME sound server),
220 @item esd (EsounD or Enlightened Sound Daemon),
221 @item Mac OS X,
222 @item Windows (98 and later),
223 @item AIX,
224 @item Sun/NetBSD/OpenBSD,
225 @item IRIX,
226 @item NAS (Network Audio Server),
227 @item RoarAudio (Modern, multi-OS, networked Sound System),
228 @item OpenBSD's sndio.
229 @end enumerate
230 ")
231 (license license:gpl2+)
232 (home-page "https://www.xiph.org/ao/")))
233
234 (define flac
235 (package
236 (name "flac")
237 (version "1.3.2")
238 (source (origin
239 (method url-fetch)
240 (uri (string-append "http://downloads.xiph.org/releases/flac/flac-"
241 version ".tar.xz"))
242 (sha256
243 (base32
244 "0gymm2j3276kr9nz6vmgfwsdfrq6c449n40a0mzz8h6wc7nw7kwi"))))
245 (build-system gnu-build-system)
246 (arguments
247 `(#:parallel-tests? #f))
248 ;; FIXME: configure also looks for xmms, input could be added once it exists
249 (propagated-inputs `(("libogg" ,libogg))) ; required by flac.pc
250 (synopsis "Free lossless audio codec")
251 (description
252 "FLAC stands for Free Lossless Audio Codec, an audio format that is lossless,
253 meaning that audio is compressed in FLAC without any loss in quality.")
254 (license (license:non-copyleft "file://COPYING"
255 "See COPYING in the distribution.")) ; and LGPL and GPL
256 (home-page "https://xiph.org/flac/")))
257
258 (define libkate
259 (package
260 (name "libkate")
261 (version "0.4.1")
262 (source (origin
263 (method url-fetch)
264 (uri (string-append "http://downloads.xiph.org/releases/kate/"
265 "libkate-" version ".tar.gz"))
266 (sha256
267 (base32
268 "0s3vr2nxfxlf1k75iqpp4l78yf4gil3f0v778kvlngbchvaq23n4"))))
269 (build-system gnu-build-system)
270 (native-inputs `(("doxygen" ,doxygen)
271 ("pkg-config" ,pkg-config)))
272 ;; FIXME: Add optional input liboggz
273 (inputs `(("bison" ,bison)
274 ("libogg" ,libogg)
275 ("libpng" ,libpng)
276 ("python" ,python-wrapper)
277 ("zlib" ,zlib)))
278 (synopsis "Karaoke and text codec for embedding in ogg")
279 (description
280 "Kate is an overlay codec, originally designed for karaoke and text,
281 that can be multiplixed in Ogg. Text and images can be carried by a Kate
282 stream, and animated. Most of the time, this would be multiplexed with
283 audio/video to carry subtitles, song lyrics (with or without karaoke data),
284 etc., but doesn't have to be.
285
286 Series of curves (splines, segments, etc.) may be attached to various
287 properties (text position, font size, etc.) to create animated overlays.
288 This allows scrolling or fading text to be defined. This can even be used
289 to draw arbitrary shapes, so hand drawing can also be represented by a
290 Kate stream.")
291 (license license:bsd-3)
292 (home-page "https://wiki.xiph.org/OggKate")))
293
294 (define vorbis-tools
295 (package
296 (name "vorbis-tools")
297 (version "1.4.0")
298 (source (origin
299 (method url-fetch)
300 (uri (string-append "http://downloads.xiph.org/releases/vorbis/"
301 "vorbis-tools-" version ".tar.gz"))
302 (sha256
303 (base32
304 "1g12bnh5ah08v529y72kfdz5lhvy75iaz7f9jskyby23m9dkk2d3"))
305 (patches (search-patches
306 "vorbis-tools-CVE-2014-9638+CVE-2014-9639.patch"
307 "vorbis-tools-CVE-2014-9640.patch"
308 "vorbis-tools-CVE-2015-6749.patch"))))
309 (build-system gnu-build-system)
310 (inputs `(("ao" ,ao)
311 ("curl" ,curl)
312 ("flac" ,flac)
313 ("libkate" ,libkate)
314 ("libogg" ,libogg)
315 ("libvorbis" ,libvorbis)
316 ("speex" ,speex)))
317 (native-inputs `(("pkg-config" ,pkg-config)))
318 (synopsis "Ogg vorbis tools")
319 (description
320 "Ogg vorbis is a non-proprietary, patent-and-royalty-free,
321 general-purpose compressed audio format.
322
323 The package vorbis-tools contains
324 ogg123, an ogg vorbis command line audio player;
325 oggenc, the ogg vorbis encoder;
326 oggdec, a simple, portable command line decoder (to wav and raw);
327 ogginfo, to obtain information (tags, bitrate, length, etc.) about
328 an ogg vorbis file.")
329 (license license:gpl2)
330 (home-page "https://xiph.org/vorbis/")))
331
332 (define opus
333 (package
334 (name "opus")
335 (version "1.2.1")
336 (source (origin
337 (method url-fetch)
338 (uri (string-append "https://archive.mozilla.org/pub/opus/opus-"
339 version ".tar.gz"))
340 (sha256
341 (base32
342 "0ch7yzgg4bn1g36bpjsfrgs4n19c84d7wpdida6yzifrrhwx7byg"))))
343 (build-system gnu-build-system)
344 (synopsis "Versatile audio codec")
345 (description
346 "Opus is a totally open, royalty-free, highly versatile audio codec. Opus
347 is unmatched for interactive speech and music transmission over the Internet,
348 but is also intended for storage and streaming applications. It is
349 standardized by the Internet Engineering Task Force (IETF) as RFC 6716 which
350 incorporated technology from Skype's SILK codec and Xiph.Org's CELT codec.")
351 (license license:bsd-3)
352 (home-page "https://www.opus-codec.org")))
353
354 (define opus-tools
355 (package
356 (name "opus-tools")
357 (version "0.1.10")
358 (source (origin
359 (method url-fetch)
360 (uri (string-append
361 "http://downloads.xiph.org/releases/opus/opus-tools-"
362 version ".tar.gz"))
363 (sha256
364 (base32
365 "135jfb9ny3xvd27idsxj7j5ns90lslbyrq70cq3bfwcls4r7add2"))))
366 (build-system gnu-build-system)
367 (arguments
368 ;; The package developers misuse pkg-config such that it doesn't work
369 ;; when cross compiling. Therefore we avoid it completly and set the
370 ;; necessary flags ourselves.
371 `(#:configure-flags (list (string-append "CFLAGS=-I"
372 (assoc-ref %build-inputs "libogg")
373 "/include -I"
374 (assoc-ref %build-inputs "opus")
375 "/include/opus"))))
376 (inputs `(("libogg" ,libogg)
377 ("opus" ,opus)
378 ("flac" ,flac)))
379 (synopsis
380 "Command line utilities to encode, inspect, and decode .opus files")
381 (description "Opus is a royalty-free, highly versatile audio codec.
382 Opus-tools provide command line utilities for creating, inspecting and
383 decoding .opus files.")
384 (license license:bsd-3)
385 (home-page "https://www.opus-codec.org")))
386
387 (define opusfile
388 (package
389 (name "opusfile")
390 (version "0.10")
391 (source (origin
392 (method url-fetch)
393 (uri (string-append
394 "http://downloads.xiph.org/releases/opus/opusfile-" version
395 ".tar.gz"))
396 (sha256
397 (base32
398 "0bs1376sd131qdh7198jp64vv5d17az5wyy4y7srrvw7p8k3bq28"))))
399 (build-system gnu-build-system)
400 (propagated-inputs
401 `(("opus" ,opus)))
402 (native-inputs
403 `(("pkg-config" ,pkg-config)))
404 (inputs
405 `(("libogg" ,libogg)
406 ("openssl" ,openssl)))
407 (synopsis "Versatile audio codec")
408 (description
409 "The opusfile library provides seeking, decode, and playback of Opus
410 streams in the Ogg container (.opus files) including over http(s) on posix and
411 windows systems.")
412 (license license:bsd-3)
413 (home-page "https://www.opus-codec.org")))
414
415 (define-public icecast
416 (package
417 (name "icecast")
418 (version "2.4.3")
419 (source (origin
420 (method url-fetch)
421 (uri (string-append
422 "http://downloads.xiph.org/releases/icecast/icecast-"
423 version ".tar.gz"))
424 (sha256
425 (base32
426 "14n5vm2xnyn8y7kl46lnnlgv6v5fjykhc57ffdsh0qaxfs6a8p68"))))
427 (build-system gnu-build-system)
428 (native-inputs
429 `(("pkg-config" ,pkg-config)))
430 (inputs
431 `(("libxslt" ,libxslt)
432 ("libxml2" ,libxml2)
433 ("openssl" ,openssl)
434 ("curl" ,curl)
435 ("libogg" ,libogg)
436 ("libvorbis" ,libvorbis)
437 ("libtheora" ,libtheora)
438 ("speex" ,speex)))
439 (synopsis "Streaming media server")
440 (description "Icecast is a streaming media server which currently supports
441 Ogg (Vorbis and Theora), Opus, WebM and MP3 audio streams. It can be used to
442 create an Internet radio station or a privately running jukebox and many
443 things in between.")
444 (home-page "https://icecast.org/")
445 (license license:gpl2)))
446
447 (define-public libshout
448 (package
449 (name "libshout")
450 (version "2.4.1")
451 (source (origin
452 (method url-fetch)
453 (uri (string-append
454 "http://downloads.xiph.org/releases/libshout/"
455 name "-" version ".tar.gz"))
456 (sha256
457 (base32
458 "0kgjpf8jkgyclw11nilxi8vyjk4s8878x23qyxnvybbgqbgbib7k"))))
459 (build-system gnu-build-system)
460 (native-inputs
461 `(("pkg-config" ,pkg-config)))
462 (propagated-inputs
463 ;; shout.pc refers to all these.
464 `(("libtheora" ,libtheora)
465 ("libvorbis" ,libvorbis)
466 ("speex" ,speex)))
467 (home-page "http://www.icecast.org/")
468 (synopsis "Audio streaming library for icecast encoders")
469 (description
470 "Libshout is a library for communicating with and sending data to an
471 icecast server. It handles the socket connection, the timing of the data,
472 and prevents bad data from getting to the icecast server.")
473 (license license:gpl2+)))