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