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>
14 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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)
67 (uri (string-append "https://downloads.xiph.org/releases/ogg/libogg-"
71 "1zlk33vxvxr0l9lhkbhkdwvylw96d2n0fnd3d8dl031hph9bqqy1"))))
72 (build-system gnu-build-system)
74 '(#:configure-flags '("--disable-static")))
75 (synopsis "Library for manipulating the ogg multimedia format")
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/")))
92 (uri (string-append "https://downloads.xiph.org/releases/vorbis/"
93 "libvorbis-" version ".tar.xz"))
96 "05dlzjkdpv46zb837wysxqyn8l636x3dw8v8ymlrwz2fg1dbn05g"))))
97 (build-system gnu-build-system)
98 (propagated-inputs `(("libogg" ,libogg)))
99 (arguments `(#:configure-flags '("LDFLAGS=-lm"
101 #:parallel-tests? #f))
102 (synopsis "Library implementing the vorbis audio format")
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
109 (license (license:non-copyleft "file://COPYING"
110 "See COPYING in the distribution."))
111 (home-page "https://xiph.org/vorbis/")))
119 (uri (string-append "https://downloads.xiph.org/releases/theora/"
120 "libtheora-" version ".tar.xz"))
123 "0q8wark9ribij57dciym5vdikg2464p8q2mgqvfb78ksjh4s8vgk"))
124 (patches (search-patches "libtheora-config-guess.patch"))))
125 (build-system gnu-build-system)
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")
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/")))
146 (uri (string-append "https://downloads.xiph.org/releases/speex/speex-"
150 "150047wnllz4r94whb9r73l5qf0z5z3rlhy98bawfbblmkq8mbpa"))))
151 (build-system gnu-build-system)
153 '(#:configure-flags '("--disable-static")))
155 `(("pkg-config" ,pkg-config)))
158 ("speexdsp" ,speexdsp)))
159 (home-page "https://gnu.org/software/speex")
160 (synopsis "Library for patent-free audio compression format")
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."))))
176 (uri (string-append "https://downloads.xiph.org/releases/speex/"
177 "speexdsp-" version ".tar.gz"))
180 "0wa7sqpk3x61zz99m7lwkgr6yv62ml6lfgs5xja65vlvdzy44838"))))
181 (build-system gnu-build-system)
183 `(#:configure-flags '("--disable-static"
184 ,@(if (string=? "aarch64-linux"
186 '("--enable-neon=no") ; neon defaults to armv7-a
188 (home-page "https://speex.org/")
189 (synopsis "Speex processing library")
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."))))
199 ;; We need a few commits on top of 1.2.2 to fix CVE-2017-11548.
200 (version "1.2.2-5-g20dc8ed")
204 (url "https://gitlab.xiph.org/xiph/libao")
206 (file-name (git-file-name name version))
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.*'.
216 `(("alsa-lib" ,alsa-lib)
217 ("pulseaudio" ,pulseaudio)))
219 `(("pkg-config" ,pkg-config)
220 ("autoconf" ,autoconf)
221 ("automake" ,automake)
222 ("libtool" ,libtool)))
223 (synopsis "Cross platform audio library")
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:
229 @item Null output (handy for testing without a sound device),
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),
239 @item Windows (98 and later),
241 @item Sun/NetBSD/OpenBSD,
243 @item NAS (Network Audio Server),
244 @item RoarAudio (Modern, multi-OS, networked Sound System),
245 @item OpenBSD's sndio.
248 (license license:gpl2+)
249 (properties '((cpe-name . "libao")))
250 (home-page "https://www.xiph.org/ao/")))
258 (uri (string-append "https://downloads.xiph.org/releases/flac/flac-"
262 "0j0p9sf56a2fm2hkjnf7x3py5ir49jyavg4q5zdyd7bcf6yq4gi1"))))
263 (build-system gnu-build-system)
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")
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/")))
282 (uri (string-append "https://downloads.xiph.org/releases/kate/"
283 "libkate-" version ".tar.gz"))
286 "0s3vr2nxfxlf1k75iqpp4l78yf4gil3f0v778kvlngbchvaq23n4"))))
287 (build-system gnu-build-system)
288 (native-inputs `(("doxygen" ,doxygen)
290 ("pkg-config" ,pkg-config)))
291 ;; FIXME: Add optional input liboggz
292 (inputs `(("libogg" ,libogg)
294 ("python" ,python-wrapper)
296 (synopsis "Karaoke and text codec for embedding in ogg")
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.
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
309 (license license:bsd-3)
310 (home-page "https://wiki.xiph.org/OggKate")))
314 (name "vorbis-tools")
318 (uri (string-append "https://downloads.xiph.org/releases/vorbis/"
319 "vorbis-tools-" version ".tar.gz"))
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)
333 ("libvorbis" ,libvorbis)
335 (native-inputs `(("pkg-config" ,pkg-config)))
336 (synopsis "Ogg vorbis tools")
338 "Ogg vorbis is a non-proprietary, patent-and-royalty-free,
339 general-purpose compressed audio format.
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/")))
356 (uri (string-append "https://archive.mozilla.org/pub/opus/opus-"
360 "17gz8kxs4i7icsc1gj713gadiapyklynlwqlf0ai98dj4lg8xdb5"))))
361 (build-system gnu-build-system)
363 '(#:configure-flags '("--disable-static")))
364 (synopsis "Versatile audio codec")
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")))
381 "https://downloads.xiph.org/releases/opus/opus-tools-"
385 "11pzl27s4vcz4m18ch72nivbhww2zmzn56wspb7rll1y1nq6rrdl"))))
386 (build-system gnu-build-system)
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")
394 (assoc-ref %build-inputs "opus")
397 `(("pkg-config" ,pkg-config)))
399 `(("libopusenc" ,libopusenc)
400 ("opusfile" ,opusfile)
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")))
417 "https://downloads.xiph.org/releases/opus/opusfile-" version
421 "02smwc5ah8nb3a67mnkjzqmrzk43j356hgj2a97s9midq40qd38i"))))
422 (build-system gnu-build-system)
424 '(#:configure-flags '("--disable-static")))
425 ;; Required by opusfile.pc and opusurl.pc.
431 `(("pkg-config" ,pkg-config)))
432 (synopsis "Versatile audio codec")
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
437 (license license:bsd-3)
438 (home-page "https://www.opus-codec.org")))
440 (define-public libopusenc
446 (uri (string-append "https://archive.mozilla.org/pub/opus/"
447 "libopusenc-" version ".tar.gz"))
450 "1ffb0vhlymlsq70pxsjj0ksz77yfm2x0a1x8q50kxmnkm1hxp642"))))
451 (build-system gnu-build-system)
453 `(("pkg-config" ,pkg-config)))
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)))
462 (define-public icecast
469 "https://downloads.xiph.org/releases/icecast/icecast-"
473 "0i2d9rhav0x6js2qhjf5iy6j2a7f0d11ail0lfv40hb1kygrgda9"))))
474 (build-system gnu-build-system)
476 `(("pkg-config" ,pkg-config)))
478 `(("libxslt" ,libxslt)
483 ("libvorbis" ,libvorbis)
484 ("libtheora" ,libtheora)
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
491 (home-page "https://icecast.org/")
492 (license license:gpl2)))
494 (define-public libshout
501 "https://downloads.xiph.org/releases/libshout/"
502 "libshout-" version ".tar.gz"))
505 "1zhdshas539cs8fsz8022ljxnnncr5lafhfd1dqr1gs125fzb2hd"))))
506 (build-system gnu-build-system)
508 `(("pkg-config" ,pkg-config)))
510 ;; shout.pc refers to all these.
511 `(("libtheora" ,libtheora)
512 ("libvorbis" ,libvorbis)
514 (home-page "https://icecast.org/")
515 (synopsis "Audio streaming library for icecast encoders")
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+)))