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