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