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 Marius Bakke <mbakke@fastmail.com>
10 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2018 Leo Famulari <leo@famulari.name>
13 ;;; This file is part of GNU Guix.
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.
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.
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/>.
28 (define-module (gnu packages xiph)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages autotools)
31 #:use-module (gnu packages bison)
32 #:use-module (gnu packages compression)
33 #:use-module (gnu packages curl)
34 #:use-module (gnu packages documentation)
35 #:use-module (gnu packages image)
36 #:use-module (gnu packages pkg-config)
37 #:use-module (gnu packages python)
38 #:use-module (gnu packages linux)
39 #:use-module (gnu packages pulseaudio)
40 #:use-module (gnu packages tls)
41 #:use-module (gnu packages xml)
42 #:use-module ((guix licenses) #:prefix license:)
43 #:use-module (guix packages)
44 #:use-module (guix download)
45 #:use-module (guix git-download)
46 #:use-module (guix build-system gnu)
66 (uri (string-append "https://downloads.xiph.org/releases/ogg/libogg-"
70 "1zlk33vxvxr0l9lhkbhkdwvylw96d2n0fnd3d8dl031hph9bqqy1"))))
71 (build-system gnu-build-system)
72 (synopsis "Library for manipulating the ogg multimedia format")
74 "The libogg library allows to manipulate the ogg multimedia container
75 format, which encapsulates raw compressed data and allows the interleaving of
76 audio and video data. In addition to encapsulation and interleaving of
77 multiple data streams, ogg provides packet framing, error detection, and
78 periodic timestamps for seeking.")
79 (license (license:non-copyleft "file://COPYING"
80 "See COPYING in the distribution."))
81 (home-page "https://xiph.org/ogg/")))
89 (uri (string-append "https://downloads.xiph.org/releases/vorbis/"
90 "libvorbis-" version ".tar.xz"))
93 "05dlzjkdpv46zb837wysxqyn8l636x3dw8v8ymlrwz2fg1dbn05g"))))
94 (build-system gnu-build-system)
95 (propagated-inputs `(("libogg" ,libogg)))
96 (arguments `(#:configure-flags '("LDFLAGS=-lm")
97 #:parallel-tests? #f))
98 (synopsis "Library implementing the vorbis audio format")
100 "The libvorbis library implements the ogg vorbis audio format,
101 a fully open, non-proprietary, patent-and-royalty-free, general-purpose
102 compressed audio format for mid to high quality (8kHz-48.0kHz, 16+ bit,
103 polyphonic) audio and music at fixed and variable bitrates from 16 to
105 (license (license:non-copyleft "file://COPYING"
106 "See COPYING in the distribution."))
107 (home-page "https://xiph.org/vorbis/")))
115 (uri (string-append "https://downloads.xiph.org/releases/theora/"
116 "libtheora-" version ".tar.xz"))
119 "0q8wark9ribij57dciym5vdikg2464p8q2mgqvfb78ksjh4s8vgk"))
120 (patches (search-patches "libtheora-config-guess.patch"))))
121 (build-system gnu-build-system)
122 (inputs `(("libvorbis" ,libvorbis)))
123 ;; The .pc files refer to libogg.
124 (propagated-inputs `(("libogg" ,libogg)))
125 (synopsis "Library implementing the Theora video format")
127 "The libtheora library implements the ogg theora video format,
128 a fully open, non-proprietary, patent-and-royalty-free, general-purpose
129 compressed video format.")
130 (license license:bsd-3)
131 (home-page "https://xiph.org/theora/")))
140 (uri (string-append "https://downloads.xiph.org/releases/speex/speex-"
144 "150047wnllz4r94whb9r73l5qf0z5z3rlhy98bawfbblmkq8mbpa"))))
145 (build-system gnu-build-system)
147 '(#:configure-flags '("--disable-static")))
149 `(("pkg-config" ,pkg-config)))
152 ("speexdsp" ,speexdsp)))
153 (home-page "https://gnu.org/software/speex")
154 (synopsis "Library for patent-free audio compression format")
156 "GNU Speex is a patent-free audio compression codec specially designed
157 for speech. It is well-adapted to internet applications, such as VoIP. It
158 features compression of different bands in the same bitstream, intensity
159 stereo encoding, and voice activity detection.")
160 ;; 'src/getopt.c' is under LGPLv2+
161 (license (license:non-copyleft "file://COPYING"
162 "See COPYING in the distribution."))))
170 (uri (string-append "https://downloads.xiph.org/releases/speex/"
171 "speexdsp-" version ".tar.gz"))
174 "0wa7sqpk3x61zz99m7lwkgr6yv62ml6lfgs5xja65vlvdzy44838"))))
175 (build-system gnu-build-system)
177 `(#:configure-flags '(,@(if (string=? "aarch64-linux"
179 '("--enable-neon=no") ; neon defaults to armv7-a
181 (home-page "https://speex.org/")
182 (synopsis "Speex processing library")
184 "SpeexDSP is a @dfn{DSP} (Digital Signal Processing) library based on
185 work from the @code{speex} codec.")
186 (license (license:non-copyleft "file://COPYING"
187 "See COPYING in the distribution."))))
192 ;; We need a few commits on top of 1.2.2 to fix CVE-2017-11548.
193 (version "1.2.2-5-g20dc8ed")
197 (url "https://git.xiph.org/libao.git")
199 (file-name (git-file-name name version))
202 "1d1b3g2a7jd43c32242yq6nfysqsmp7rjslhvbrmpgk119l5fnbj"))))
203 (build-system gnu-build-system)
204 ;; FIXME: Add further backends, see the summary printed after configure.
205 ;; XXX: Should back-ends be pushed to different outputs? For instance,
206 ;; "out" would include only the ALSA back-end, while "pulse" would
207 ;; contain 'lib/ao/plugins-4/libpulse.*'.
209 `(("alsa-lib" ,alsa-lib)
210 ("pulseaudio" ,pulseaudio)))
212 `(("pkg-config" ,pkg-config)
213 ("autoconf" ,autoconf)
214 ("automake" ,automake)
215 ("libtool" ,libtool)))
216 (synopsis "Cross platform audio library")
218 "Libao is a cross-platform audio library that allows programs to
219 output audio using a simple API on a wide variety of platforms.
220 It currently supports:
222 @item Null output (handy for testing without a sound device),
226 @item OSS (Open Sound System, used on Linux and FreeBSD),
227 @item ALSA (Advanced Linux Sound Architecture),
228 @item aRts (Analog RealTime Synth, used by KDE),
229 @item PulseAudio (next generation GNOME sound server),
230 @item esd (EsounD or Enlightened Sound Daemon),
232 @item Windows (98 and later),
234 @item Sun/NetBSD/OpenBSD,
236 @item NAS (Network Audio Server),
237 @item RoarAudio (Modern, multi-OS, networked Sound System),
238 @item OpenBSD's sndio.
241 (license license:gpl2+)
242 (properties '((cpe-name . "libao")))
243 (home-page "https://www.xiph.org/ao/")))
251 (uri (string-append "https://downloads.xiph.org/releases/flac/flac-"
255 "0j0p9sf56a2fm2hkjnf7x3py5ir49jyavg4q5zdyd7bcf6yq4gi1"))))
256 (build-system gnu-build-system)
258 `(#:parallel-tests? #f))
259 ;; FIXME: configure also looks for xmms, input could be added once it exists
260 (propagated-inputs `(("libogg" ,libogg))) ; required by flac.pc
261 (synopsis "Free lossless audio codec")
263 "FLAC stands for Free Lossless Audio Codec, an audio format that is lossless,
264 meaning that audio is compressed in FLAC without any loss in quality.")
265 (license (license:non-copyleft "file://COPYING"
266 "See COPYING in the distribution.")) ; and LGPL and GPL
267 (home-page "https://xiph.org/flac/")))
275 (uri (string-append "https://downloads.xiph.org/releases/kate/"
276 "libkate-" version ".tar.gz"))
279 "0s3vr2nxfxlf1k75iqpp4l78yf4gil3f0v778kvlngbchvaq23n4"))))
280 (build-system gnu-build-system)
281 (native-inputs `(("doxygen" ,doxygen)
282 ("pkg-config" ,pkg-config)))
283 ;; FIXME: Add optional input liboggz
284 (inputs `(("bison" ,bison)
287 ("python" ,python-wrapper)
289 (synopsis "Karaoke and text codec for embedding in ogg")
291 "Kate is an overlay codec, originally designed for karaoke and text,
292 that can be multiplixed in Ogg. Text and images can be carried by a Kate
293 stream, and animated. Most of the time, this would be multiplexed with
294 audio/video to carry subtitles, song lyrics (with or without karaoke data),
295 etc., but doesn't have to be.
297 Series of curves (splines, segments, etc.) may be attached to various
298 properties (text position, font size, etc.) to create animated overlays.
299 This allows scrolling or fading text to be defined. This can even be used
300 to draw arbitrary shapes, so hand drawing can also be represented by a
302 (license license:bsd-3)
303 (home-page "https://wiki.xiph.org/OggKate")))
307 (name "vorbis-tools")
311 (uri (string-append "https://downloads.xiph.org/releases/vorbis/"
312 "vorbis-tools-" version ".tar.gz"))
315 "1g12bnh5ah08v529y72kfdz5lhvy75iaz7f9jskyby23m9dkk2d3"))
316 (patches (search-patches
317 "vorbis-tools-CVE-2014-9638+CVE-2014-9639.patch"
318 "vorbis-tools-CVE-2014-9640.patch"
319 "vorbis-tools-CVE-2015-6749.patch"))))
320 (build-system gnu-build-system)
326 ("libvorbis" ,libvorbis)
328 (native-inputs `(("pkg-config" ,pkg-config)))
329 (synopsis "Ogg vorbis tools")
331 "Ogg vorbis is a non-proprietary, patent-and-royalty-free,
332 general-purpose compressed audio format.
334 The package vorbis-tools contains
335 ogg123, an ogg vorbis command line audio player;
336 oggenc, the ogg vorbis encoder;
337 oggdec, a simple, portable command line decoder (to wav and raw);
338 ogginfo, to obtain information (tags, bitrate, length, etc.) about
339 an ogg vorbis file.")
340 (license license:gpl2)
341 (home-page "https://xiph.org/vorbis/")))
349 (uri (string-append "https://archive.mozilla.org/pub/opus/opus-"
353 "17gz8kxs4i7icsc1gj713gadiapyklynlwqlf0ai98dj4lg8xdb5"))))
354 (build-system gnu-build-system)
355 (synopsis "Versatile audio codec")
357 "Opus is a totally open, royalty-free, highly versatile audio codec. Opus
358 is unmatched for interactive speech and music transmission over the Internet,
359 but is also intended for storage and streaming applications. It is
360 standardized by the Internet Engineering Task Force (IETF) as RFC 6716 which
361 incorporated technology from Skype's SILK codec and Xiph.Org's CELT codec.")
362 (license license:bsd-3)
363 (home-page "https://www.opus-codec.org")))
372 "https://downloads.xiph.org/releases/opus/opus-tools-"
376 "11pzl27s4vcz4m18ch72nivbhww2zmzn56wspb7rll1y1nq6rrdl"))))
377 (build-system gnu-build-system)
379 ;; The package developers misuse pkg-config such that it doesn't work
380 ;; when cross compiling. Therefore we avoid it completly and set the
381 ;; necessary flags ourselves.
382 `(#:configure-flags (list (string-append "CFLAGS=-I"
383 (assoc-ref %build-inputs "libogg")
385 (assoc-ref %build-inputs "opus")
388 `(("pkg-config" ,pkg-config)))
390 `(("libopusenc" ,libopusenc)
391 ("opusfile" ,opusfile)
394 "Command line utilities to encode, inspect, and decode .opus files")
395 (description "Opus is a royalty-free, highly versatile audio codec.
396 Opus-tools provide command line utilities for creating, inspecting and
397 decoding .opus files.")
398 (license license:bsd-3)
399 (home-page "https://www.opus-codec.org")))
408 "https://downloads.xiph.org/releases/opus/opusfile-" version
412 "1gq3aszzl5glgbajw5p1f5a1kdyf23w5vjdmwwrk246syin9pkkl"))))
413 (build-system gnu-build-system)
414 ;; Required by opusfile.pc and opusurl.pc.
420 `(("pkg-config" ,pkg-config)))
421 (synopsis "Versatile audio codec")
423 "The opusfile library provides seeking, decode, and playback of Opus
424 streams in the Ogg container (.opus files) including over http(s) on posix and
426 (license license:bsd-3)
427 (home-page "https://www.opus-codec.org")))
429 (define-public libopusenc
435 (uri (string-append "https://archive.mozilla.org/pub/opus/"
436 "libopusenc-" version ".tar.gz"))
439 "1ffb0vhlymlsq70pxsjj0ksz77yfm2x0a1x8q50kxmnkm1hxp642"))))
440 (build-system gnu-build-system)
442 `(("pkg-config" ,pkg-config)))
445 (synopsis "Library for encoding Opus audio files and streams ")
446 (description "The libopusenc libraries provide a high-level API for
447 encoding Opus files and streams.")
448 (home-page "https://www.opus-codec.org/")
449 (license license:bsd-3)))
451 (define-public icecast
458 "https://downloads.xiph.org/releases/icecast/icecast-"
462 "0i2d9rhav0x6js2qhjf5iy6j2a7f0d11ail0lfv40hb1kygrgda9"))))
463 (build-system gnu-build-system)
465 `(("pkg-config" ,pkg-config)))
467 `(("libxslt" ,libxslt)
472 ("libvorbis" ,libvorbis)
473 ("libtheora" ,libtheora)
475 (synopsis "Streaming media server")
476 (description "Icecast is a streaming media server which currently supports
477 Ogg (Vorbis and Theora), Opus, WebM and MP3 audio streams. It can be used to
478 create an Internet radio station or a privately running jukebox and many
480 (home-page "https://icecast.org/")
481 (license license:gpl2)))
483 (define-public libshout
490 "https://downloads.xiph.org/releases/libshout/"
491 "libshout-" version ".tar.gz"))
494 "0qgwarqp2p6jy3zadds6dzj8z1jfb2mbwc3lsdlidf527h0a86ym"))))
495 (build-system gnu-build-system)
497 `(("pkg-config" ,pkg-config)))
499 ;; shout.pc refers to all these.
500 `(("libtheora" ,libtheora)
501 ("libvorbis" ,libvorbis)
503 (home-page "https://icecast.org/")
504 (synopsis "Audio streaming library for icecast encoders")
506 "Libshout is a library for communicating with and sending data to an
507 icecast server. It handles the socket connection, the timing of the data,
508 and prevents bad data from getting to the icecast server.")
509 (license license:gpl2+)))