gnu: ruby-pandoc-ruby: Use pandoc instead of ghc-pandoc.
[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, 2019, 2020 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.6")
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 "05dlzjkdpv46zb837wysxqyn8l636x3dw8v8ymlrwz2fg1dbn05g"))))
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.0")
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 "1g12bnh5ah08v529y72kfdz5lhvy75iaz7f9jskyby23m9dkk2d3"))
323 (patches (search-patches
324 "vorbis-tools-CVE-2014-9638+CVE-2014-9639.patch"
325 "vorbis-tools-CVE-2014-9640.patch"
326 "vorbis-tools-CVE-2015-6749.patch"))))
327 (build-system gnu-build-system)
328 (inputs `(("ao" ,ao)
329 ("curl" ,curl)
330 ("flac" ,flac)
331 ("libkate" ,libkate)
332 ("libogg" ,libogg)
333 ("libvorbis" ,libvorbis)
334 ("speex" ,speex)))
335 (native-inputs `(("pkg-config" ,pkg-config)))
336 (synopsis "Ogg vorbis tools")
337 (description
338 "Ogg vorbis is a non-proprietary, patent-and-royalty-free,
339 general-purpose compressed audio format.
340
341 The package vorbis-tools contains
342 ogg123, an ogg vorbis command line audio player;
343 oggenc, the ogg vorbis encoder;
344 oggdec, a simple, portable command line decoder (to wav and raw);
345 ogginfo, to obtain information (tags, bitrate, length, etc.) about
346 an ogg vorbis file.")
347 (license license:gpl2)
348 (home-page "https://xiph.org/vorbis/")))
349
350 (define opus
351 (package
352 (name "opus")
353 (version "1.3.1")
354 (source (origin
355 (method url-fetch)
356 (uri (string-append "https://archive.mozilla.org/pub/opus/opus-"
357 version ".tar.gz"))
358 (sha256
359 (base32
360 "17gz8kxs4i7icsc1gj713gadiapyklynlwqlf0ai98dj4lg8xdb5"))))
361 (build-system gnu-build-system)
362 (arguments
363 '(#:configure-flags '("--disable-static")))
364 (synopsis "Versatile audio codec")
365 (description
366 "Opus is a totally open, royalty-free, highly versatile audio codec. Opus
367 is unmatched for interactive speech and music transmission over the Internet,
368 but is also intended for storage and streaming applications. It is
369 standardized by the Internet Engineering Task Force (IETF) as RFC 6716 which
370 incorporated technology from Skype's SILK codec and Xiph.Org's CELT codec.")
371 (license license:bsd-3)
372 (home-page "https://www.opus-codec.org")))
373
374 (define opus-tools
375 (package
376 (name "opus-tools")
377 (version "0.2")
378 (source (origin
379 (method url-fetch)
380 (uri (string-append
381 "https://downloads.xiph.org/releases/opus/opus-tools-"
382 version ".tar.gz"))
383 (sha256
384 (base32
385 "11pzl27s4vcz4m18ch72nivbhww2zmzn56wspb7rll1y1nq6rrdl"))))
386 (build-system gnu-build-system)
387 (arguments
388 ;; The package developers misuse pkg-config such that it doesn't work
389 ;; when cross compiling. Therefore we avoid it completly and set the
390 ;; necessary flags ourselves.
391 `(#:configure-flags (list (string-append "CFLAGS=-I"
392 (assoc-ref %build-inputs "libogg")
393 "/include -I"
394 (assoc-ref %build-inputs "opus")
395 "/include/opus"))))
396 (native-inputs
397 `(("pkg-config" ,pkg-config)))
398 (inputs
399 `(("libopusenc" ,libopusenc)
400 ("opusfile" ,opusfile)
401 ("flac" ,flac)))
402 (synopsis
403 "Command line utilities to encode, inspect, and decode .opus files")
404 (description "Opus is a royalty-free, highly versatile audio codec.
405 Opus-tools provide command line utilities for creating, inspecting and
406 decoding .opus files.")
407 (license license:bsd-3)
408 (home-page "https://www.opus-codec.org")))
409
410 (define opusfile
411 (package
412 (name "opusfile")
413 (version "0.12")
414 (source (origin
415 (method url-fetch)
416 (uri (string-append
417 "https://downloads.xiph.org/releases/opus/opusfile-" version
418 ".tar.gz"))
419 (sha256
420 (base32
421 "02smwc5ah8nb3a67mnkjzqmrzk43j356hgj2a97s9midq40qd38i"))))
422 (build-system gnu-build-system)
423 (arguments
424 '(#:configure-flags '("--disable-static")))
425 ;; Required by opusfile.pc and opusurl.pc.
426 (propagated-inputs
427 `(("libogg" ,libogg)
428 ("openssl" ,openssl)
429 ("opus" ,opus)))
430 (native-inputs
431 `(("pkg-config" ,pkg-config)))
432 (synopsis "Versatile audio codec")
433 (description
434 "The opusfile library provides seeking, decode, and playback of Opus
435 streams in the Ogg container (.opus files) including over http(s) on posix and
436 windows systems.")
437 (license license:bsd-3)
438 (home-page "https://www.opus-codec.org")))
439
440 (define-public libopusenc
441 (package
442 (name "libopusenc")
443 (version "0.2.1")
444 (source (origin
445 (method url-fetch)
446 (uri (string-append "https://archive.mozilla.org/pub/opus/"
447 "libopusenc-" version ".tar.gz"))
448 (sha256
449 (base32
450 "1ffb0vhlymlsq70pxsjj0ksz77yfm2x0a1x8q50kxmnkm1hxp642"))))
451 (build-system gnu-build-system)
452 (native-inputs
453 `(("pkg-config" ,pkg-config)))
454 (propagated-inputs
455 `(("opus" ,opus)))
456 (synopsis "Library for encoding Opus audio files and streams ")
457 (description "The libopusenc libraries provide a high-level API for
458 encoding Opus files and streams.")
459 (home-page "https://www.opus-codec.org/")
460 (license license:bsd-3)))
461
462 (define-public icecast
463 (package
464 (name "icecast")
465 (version "2.4.4")
466 (source (origin
467 (method url-fetch)
468 (uri (string-append
469 "https://downloads.xiph.org/releases/icecast/icecast-"
470 version ".tar.gz"))
471 (sha256
472 (base32
473 "0i2d9rhav0x6js2qhjf5iy6j2a7f0d11ail0lfv40hb1kygrgda9"))))
474 (build-system gnu-build-system)
475 (native-inputs
476 `(("pkg-config" ,pkg-config)))
477 (inputs
478 `(("libxslt" ,libxslt)
479 ("libxml2" ,libxml2)
480 ("openssl" ,openssl)
481 ("curl" ,curl)
482 ("libogg" ,libogg)
483 ("libvorbis" ,libvorbis)
484 ("libtheora" ,libtheora)
485 ("speex" ,speex)))
486 (synopsis "Streaming media server")
487 (description "Icecast is a streaming media server which currently supports
488 Ogg (Vorbis and Theora), Opus, WebM and MP3 audio streams. It can be used to
489 create an Internet radio station or a privately running jukebox and many
490 things in between.")
491 (home-page "https://icecast.org/")
492 (license license:gpl2)))
493
494 (define-public libshout
495 (package
496 (name "libshout")
497 (version "2.4.3")
498 (source (origin
499 (method url-fetch)
500 (uri (string-append
501 "https://downloads.xiph.org/releases/libshout/"
502 "libshout-" version ".tar.gz"))
503 (sha256
504 (base32
505 "1zhdshas539cs8fsz8022ljxnnncr5lafhfd1dqr1gs125fzb2hd"))))
506 (build-system gnu-build-system)
507 (native-inputs
508 `(("pkg-config" ,pkg-config)))
509 (propagated-inputs
510 ;; shout.pc refers to all these.
511 `(("libtheora" ,libtheora)
512 ("libvorbis" ,libvorbis)
513 ("speex" ,speex)))
514 (home-page "https://icecast.org/")
515 (synopsis "Audio streaming library for icecast encoders")
516 (description
517 "Libshout is a library for communicating with and sending data to an
518 icecast server. It handles the socket connection, the timing of the data,
519 and prevents bad data from getting to the icecast server.")
520 (license license:gpl2+)))