gnu: python-pandas: Fix build on 32-bit.
[jackhill/guix/guix.git] / gnu / packages / mp3.scm
CommitLineData
d464e725
AE
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
3246cc91 3;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
c0eac5a8 4;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
d1cd67af 5;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
d464e725
AE
6;;;
7;;; This file is part of GNU Guix.
8;;;
9;;; GNU Guix is free software; you can redistribute it and/or modify it
10;;; under the terms of the GNU General Public License as published by
11;;; the Free Software Foundation; either version 3 of the License, or (at
12;;; your option) any later version.
13;;;
14;;; GNU Guix is distributed in the hope that it will be useful, but
15;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;;; GNU General Public License for more details.
18;;;
19;;; You should have received a copy of the GNU General Public License
20;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22(define-module (gnu packages mp3)
b5b73a82 23 #:use-module ((guix licenses) #:prefix license:)
25352fe1 24 #:use-module (gnu packages)
d464e725 25 #:use-module (gnu packages autotools)
194782a8
MW
26 #:use-module (gnu packages base)
27 #:use-module (gnu packages gcc)
9518fde1 28 #:use-module (gnu packages boost)
25352fe1 29 #:use-module (gnu packages cdrom)
8cc9c0da 30 #:use-module (gnu packages compression)
54ff0b7d 31 #:use-module (gnu packages gettext)
25352fe1 32 #:use-module (gnu packages ghostscript)
68ff528c 33 #:use-module (gnu packages ncurses)
25352fe1
AE
34 #:use-module (gnu packages glib)
35 #:use-module (gnu packages gtk)
c23e9e48
AE
36 #:use-module (gnu packages pcre)
37 #:use-module (gnu packages pkg-config)
13ef3e99 38 #:use-module (gnu packages python)
54ff0b7d 39 #:use-module (gnu packages xiph)
1bdb591b 40 #:use-module (gnu packages pulseaudio)
a82bec4e 41 #:use-module (gnu packages linux) ;alsa-lib
9518fde1 42 #:use-module (gnu packages video) ;ffmpeg
d464e725
AE
43 #:use-module (guix packages)
44 #:use-module (guix download)
086518dd 45 #:use-module (guix build-system gnu)
13ef3e99 46 #:use-module (guix build-system python)
086518dd 47 #:use-module (guix build-system cmake))
d464e725
AE
48
49(define-public libmad
50 (package
51 (name "libmad")
52 (version "0.15.1b")
53 (source (origin
54 (method url-fetch)
55 (uri (string-append "mirror://sourceforge/mad/libmad/"
56 version "/libmad-"
57 version ".tar.gz"))
58 (sha256
59 (base32
dd863f1f 60 "14460zhacxhswnzb36qfpd1f2wbk10qvksvm6wyq5hpvdgnw7ymv"))
fc1adab1
AK
61 (patches (search-patches "libmad-armv7-thumb-pt1.patch"
62 "libmad-armv7-thumb-pt2.patch"
63 "libmad-frame-length.patch"
64 "libmad-mips-newgcc.patch"))))
d464e725
AE
65 (build-system gnu-build-system)
66 (arguments
67 `(#:phases
d4bf49b1
EB
68 (alist-cons-before
69 'configure 'remove-unsupported-gcc-flags
70 (lambda _
71 ;; remove option that is not supported by gcc any more
72 (substitute* "configure" ((" -fforce-mem") "")))
d464e725 73 %standard-phases)))
35b9e423 74 (synopsis "MPEG audio decoder")
d464e725
AE
75 (description
76 "MAD (MPEG Audio Decoder) supports MPEG-1 and the MPEG-2 extension to
77lower sampling frequencies, as well as the de facto MPEG 2.5 format.
78All three audio layers — Layer I, Layer II, and Layer III (i.e. MP3) — are
79fully implemented.
80
81This package contains the library.")
82 (license license:gpl2+)
83 (home-page "http://www.underbit.com/products/mad/")))
84
8cc9c0da
AE
85(define-public libid3tag
86 (package
87 (name "libid3tag")
88 (version "0.15.1b")
89 (source (origin
90 (method url-fetch)
91 (uri (string-append "mirror://sourceforge/mad/libid3tag/"
92 version "/libid3tag-"
93 version ".tar.gz"))
94 (sha256
95 (base32
96 "0lb1w883dc46dajbdvnia5870brl5lvnlk7g7y58y9wpg5p4znk3"))))
97 (build-system gnu-build-system)
98 (inputs `(("zlib" ,zlib)))
35b9e423 99 (synopsis "Library for reading ID3 tags")
8cc9c0da 100 (description
35b9e423 101 "Libid3tag is a library for reading ID3 tags, both ID3v1 and the various
e881752c 102versions of ID3v2.")
8cc9c0da
AE
103 (license license:gpl2+)
104 (home-page "http://www.underbit.com/products/mad/")))
105
fbd84457
AE
106(define-public id3lib
107 (package
108 (name "id3lib")
109 (version "3.8.3")
110 (source (origin
111 (method url-fetch)
112 (uri (string-append "mirror://sourceforge/id3lib/id3lib/"
1f521b70 113 version "/id3lib-" version ".tar.gz"))
fbd84457
AE
114 (sha256
115 (base32
1f521b70
EF
116 "0yfhqwk0w8q2hyv1jib1008jvzmwlpsxvc8qjllhna6p1hycqj97"))
117 (patches (search-patches "id3lib-CVE-2007-4460.patch"))))
fbd84457
AE
118 (build-system gnu-build-system)
119 (arguments
120 `(#:phases
d4bf49b1
EB
121 (alist-cons-before
122 'configure 'apply-patches
123 ;; TODO: create a patch for origin instead?
124 (lambda _
125 (substitute* "configure"
126 (("iomanip.h") "")) ; drop check for unused header
127 ;; see http://www.linuxfromscratch.org/patches/downloads/id3lib/
128 (substitute* "include/id3/id3lib_strings.h"
129 (("include <string>") "include <cstring>\n#include <string>"))
130 (substitute* "include/id3/writers.h"
131 (("//\\#include <string.h>") "#include <cstring>"))
132 (substitute* "examples/test_io.cpp"
133 (("dami;") "dami;\nusing namespace std;")))
fbd84457 134 %standard-phases)))
35b9e423 135 (synopsis "Library for reading, writing, and manipulating ID3v1 and ID3v2 tags")
fbd84457 136 (description
35b9e423
EB
137 "Id3lib is a cross-platform software development library for reading,
138writing, and manipulating ID3v1 and ID3v2 tags. It is an on-going project
fbd84457
AE
139whose primary goals are full compliance with the ID3v2 standard, portability
140across several platforms, and providing a powerful and feature-rich API with
141a highly stable and efficient implementation.")
142 (license license:lgpl2.0+)
143 (home-page "http://id3lib.sourceforge.net/")))
144
086518dd
LC
145(define-public taglib
146 (package
147 (name "taglib")
b1721969 148 (version "1.10")
086518dd
LC
149 (source (origin
150 (method url-fetch)
151 (uri (string-append "http://taglib.github.io/releases/taglib-"
152 version ".tar.gz"))
153 (sha256
154 (base32
b1721969 155 "1alv6vp72p0x9i9yscmz2a71anjwqy53y9pbcbqxvc1c0i82vhr4"))))
086518dd
LC
156 (build-system cmake-build-system)
157 (arguments '(#:tests? #f)) ;no 'test' target
158 (inputs `(("zlib" ,zlib)))
159 (home-page "http://developer.kde.org/~wheeler/taglib.html")
160 (synopsis "Library to access audio file meta-data")
161 (description
162 "TagLib is a C++ library for reading and editing the meta-data of several
163popular audio formats. Currently it supports both ID3v1 and ID3v2 for MP3
164files, Ogg Vorbis comments and ID3 tags and Vorbis comments in FLAC, MPC,
165Speex, WavPack TrueAudio, WAV, AIFF, MP4 and ASF files.")
166
167 ;; Dual-licensed: user may choose between LGPLv2.1 or MPLv1.1.
168 (license (list license:lgpl2.1 license:mpl1.1))))
169
68ff528c
LC
170(define-public mp3info
171 (package
172 (name "mp3info")
173 (version "0.8.5a")
174 (source (origin
175 (method url-fetch)
176 (uri (string-append
f8f8897f
AV
177 "http://ibiblio.org"
178 "/pub/linux/apps/sound/mp3-utils/mp3info/mp3info-"
68ff528c
LC
179 version ".tgz"))
180 (sha256
181 (base32
182 "042f1czcs9n2sbqvg4rsvfwlqib2gk976mfa2kxlfjghx5laqf04"))
183 (modules '((guix build utils)))
184 (snippet
185 '(substitute* "Makefile"
186 (("/bin/rm") "rm")
187 (("/usr/bin/install") "install")
188 (("man/man1") "share/man/man1")))))
189 (build-system gnu-build-system)
190 (outputs '("out" "gui")) ;GTK+ interface in "gui"
191 (arguments
192 '(#:phases (alist-replace
193 'configure
194 (lambda* (#:key outputs #:allow-other-keys)
195 (let ((out (assoc-ref outputs "out")))
196 (substitute* "Makefile"
197 (("prefix=.*")
198 (string-append "prefix := " out "\n")))))
199 (alist-cons-before
200 'install 'pre-install
201 (lambda* (#:key outputs #:allow-other-keys)
202 (let ((out (assoc-ref outputs "out")))
203 (mkdir-p (string-append out "/bin"))
204 (mkdir-p (string-append out "/share/man/man1"))))
205 (alist-cons-after
206 'install 'post-install
207 (lambda* (#:key outputs #:allow-other-keys)
208 ;; Move the GTK+ interface to "gui".
209 (let ((out (assoc-ref outputs "out"))
210 (gui (assoc-ref outputs "gui")))
211 (mkdir-p (string-append gui "/bin"))
212 (rename-file (string-append out "/bin/gmp3info")
213 (string-append gui "/bin/gmp3info"))))
214 %standard-phases)))
215 #:tests? #f))
216 (native-inputs
217 `(("pkg-config" ,pkg-config)))
218 (inputs
219 `(("gtk+" ,gtk+-2)
220 ("ncurses" ,ncurses)))
221 (home-page "http://www.ibiblio.org/mp3info/")
222 (synopsis "MP3 technical info viewer and ID3 1.x tag editor")
223 (description
224 "MP3Info is a little utility used to read and modify the ID3 tags of MP3
e881752c 225files. MP3Info can also display various technical aspects of an MP3 file
68ff528c
LC
226including playing time, bit-rate, sampling frequency and other attributes in a
227pre-defined or user-specifiable output format.")
228 (license license:gpl2+)))
229
c23e9e48
AE
230(define-public libmp3splt
231 (package
232 (name "libmp3splt")
67a8298c 233 (version "0.9.2")
c23e9e48
AE
234 (source (origin
235 (method url-fetch)
236 (uri (string-append "mirror://sourceforge/mp3splt/libmp3splt/"
237 version "/libmp3splt-"
238 version ".tar.gz"))
239 (sha256
240 (base32
67a8298c 241 "1p1mn2hsmj5cp40fnc8g1yfvk72p8pjxi866gjdkgjsqrr7xdvih"))))
c23e9e48
AE
242 (build-system gnu-build-system)
243 (inputs `(("libid3tag" ,libid3tag)
244 ("libmad" ,libmad)
245 ("libogg" ,libogg)
3246cc91 246 ("libltdl" ,libltdl)
e881752c 247 ("libvorbis" ,libvorbis)
c23e9e48 248 ("pcre" ,pcre)))
c4c4cc05
JD
249 (native-inputs
250 `(("pkg-config" ,pkg-config)))
35b9e423 251 (synopsis "Library for splitting mp3 and ogg vorbis files")
c23e9e48
AE
252 (description
253 "Mp3splt is a utility to split mp3 and ogg vorbis files selecting a begin
35b9e423 254and an end time position, without decoding. For splitting an album, one may
e881752c 255select split points and file names manually or obtain them automatically from
35b9e423 256CDDB (internet or a local file) or from .cue files. The tool also supports
c23e9e48
AE
257automatic silence split, that can be used also to adjust cddb/cue splitpoints.
258
259This package contains the library.")
260 (license license:gpl2+)
261 (home-page "http://mp3splt.sourceforge.net/mp3splt_page/home.php")))
262
263(define-public mp3splt
264 (package
265 (name "mp3splt")
2041f901 266 (version "2.6.2")
c23e9e48
AE
267 (source (origin
268 (method url-fetch)
269 (uri (string-append "mirror://sourceforge/mp3splt/mp3splt/"
270 version "/mp3splt-"
271 version ".tar.gz"))
272 (sha256
273 (base32
2041f901 274 "1aiv20gypb6r84qabz8gblk8vi42cg3x333vk2pi3fyqvl82phry"))))
c23e9e48 275 (build-system gnu-build-system)
2041f901 276 (native-inputs `(("pkg-config" ,pkg-config)))
c23e9e48 277 (inputs `(("libmp3splt" ,libmp3splt)))
e881752c 278 (synopsis "Utility for splitting mp3 and ogg vorbis files")
c23e9e48
AE
279 (description
280 "Mp3splt is a utility to split mp3 and ogg vorbis files selecting a begin
35b9e423 281and an end time position, without decoding. For splitting an album, one may
e881752c 282select split points and file names manually or obtain them automatically from
35b9e423 283CDDB (internet or a local file) or from .cue files. The tool also supports
c23e9e48
AE
284automatic silence split, that can be used also to adjust cddb/cue splitpoints.
285
286This package contains the binary.")
287 (license license:gpl2+)
288 (home-page "http://mp3splt.sourceforge.net/mp3splt_page/home.php")))
289
1bdb591b
LC
290(define-public mpg123
291 (package
292 (name "mpg123")
d78b652c 293 (version "1.23.8")
1bdb591b
LC
294 (source (origin
295 (method url-fetch)
de67e922
LF
296 (uri (string-append "mirror://sourceforge/mpg123/mpg123/" version
297 "/mpg123-" version ".tar.bz2"))
1bdb591b
LC
298 (sha256
299 (base32
d78b652c 300 "13ngfzk84k4ks7ymanmq8f6707yrybra5h0mk3ir6mdnxk4068yy"))))
1bdb591b
LC
301 (build-system gnu-build-system)
302 (arguments '(#:configure-flags '("--with-default-audio=pulse")))
303 (native-inputs `(("pkg-config" ,pkg-config)))
304 (inputs `(("pulseaudio" ,pulseaudio)
305 ("alsa-lib" ,alsa-lib)))
306 (home-page "http://www.mpg123.org/")
307 (synopsis "Console MP3 player and decoder library")
308 (description
35b9e423 309 "Mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers
1bdb591b
LC
3101,2 and 3 (MPEG 1.0 layer 3 aka MP3 most commonly tested). It comes with a
311command-line tool as well as a C library, libmpg123.")
312 (license license:lgpl2.1)))
313
0a56fadb
LC
314(define-public mpg321
315 (package
316 (name "mpg321")
5ed7f28d 317 (version "0.3.2")
0a56fadb
LC
318 (source (origin
319 (method url-fetch)
de67e922 320 (uri (string-append "mirror://sourceforge/mpg321/mpg321/"
0a56fadb
LC
321 version "/mpg321-" version ".tar.gz"))
322 (sha256
323 (base32
5ed7f28d 324 "0ki8mh76bbmdh77qsiw682dvi8y468yhbdabqwg05igmwc1wqvq5"))))
0a56fadb
LC
325 (build-system gnu-build-system)
326 (arguments '(#:configure-flags '("--disable-alsa")))
327 (inputs
328 `(("zlib" ,zlib)
329 ("libmad" ,libmad)
330 ("libid3tag" ,libid3tag)
331 ("libao" ,ao)))
332 (home-page "http://mpg321.sourceforge.net/")
333 (synopsis "Command-line MP3 player")
35b9e423 334 (description "Mpg321 is a command-line mp3 player. mpg321 is used for
0a56fadb
LC
335frontends, as an mp3 player and as an mp3 to wave file decoder (primarily for
336use with CD-recording software).")
337 (license license:gpl2)))
2ae92cbc
AE
338
339(define-public lame
340 (package
341 (name "lame")
342 (version "3.99.5")
343 (source (origin
344 (method url-fetch)
345 (uri (string-append "mirror://sourceforge/lame/lame/3.99/lame-"
346 version ".tar.gz"))
347 (sha256
348 (base32
349 "1zr3kadv35ii6liia0bpfgxpag27xcivp571ybckpbz4b10nnd14"))))
350 (build-system gnu-build-system)
194782a8
MW
351 ;; XXX FIXME: Use gcc-4.8 on i686 to work around
352 ;; <http://bugs.gnu.org/20856>.
353 (native-inputs (if (and (not (%current-target-system))
354 (string-prefix? "i686-" (%current-system)))
355 `(("gcc" ,(canonical-package gcc-4.8)))
356 '()))
2ae92cbc
AE
357 (home-page "http://lame.sourceforge.net/")
358 (synopsis "MPEG Audio Layer III (MP3) encoder")
359 (description "LAME is a high quality MPEG Audio Layer III (MP3) encoder.")
360 (license license:lgpl2.0)))
25352fe1
AE
361
362(define-public ripperx
363 (package
364 (name "ripperx")
d0dfc066 365 (version "2.8.0")
25352fe1
AE
366 (source (origin
367 (method url-fetch)
368 (uri (string-append "mirror://sourceforge/ripperx/ripperx/"
d0dfc066
AE
369 version "/ripperx-"
370 version ".tar.bz2"))
25352fe1
AE
371 (sha256
372 (base32
d0dfc066 373 "1ss3c1a5hx6c99q1cryxg0jhbnbdj6ga9xyz0dzlz9qhzg5qswfs"))
fc1adab1 374 (patches (search-patches "ripperx-missing-file.patch"))))
25352fe1
AE
375 (build-system gnu-build-system)
376 (propagated-inputs
377 `(("gs-fonts" ,gs-fonts)
378 ("cdparanoia" ,cdparanoia)
379 ("flac" ,flac)
380 ("lame" ,lame)
381 ("vorbis-tools" ,vorbis-tools)))
382 (inputs
01eafd38 383 `(("glib" ,glib)
8b0275b6 384 ("gtk+" ,gtk+-2)
d0dfc066
AE
385 ("id3lib" ,id3lib)
386 ("taglib" ,taglib)))
c4c4cc05
JD
387 (native-inputs
388 `(("pkg-config" ,pkg-config)))
25352fe1
AE
389 (synopsis "GTK program to rip and encode CD audio tracks")
390 (description
391 "RipperX is a GTK program to rip CD audio tracks and encode them to the
35b9e423
EB
392Ogg, MP3, or FLAC formats. Its goal is to be easy to use, requiring only
393a few mouse clicks to convert an entire album. It supports CDDB lookups
25352fe1
AE
394for album and track information.")
395 (license license:gpl2)
3b3b60d0 396 (home-page "https://sourceforge.net/projects/ripperx/")))
8f0fd238
LC
397
398(define-public libmpcdec
399 (package
400 (name "libmpcdec")
401 (version "1.2.6")
402 (source (origin
403 (method url-fetch)
404 (uri (string-append
405 "http://files.musepack.net/source/libmpcdec-"
406 version ".tar.bz2"))
407 (sha256
408 (base32
409 "1a0jdyga1zfi4wgkg3905y6inghy3s4xfs5m4x7pal08m0llkmab"))))
410 (build-system gnu-build-system)
411 (synopsis "Decoding library for the Musepack audio format")
412 (description
413 "This library supports decoding of the Musepack (MPC) audio compression
414format.")
415 (license license:bsd-3)
416 (home-page "http://musepack.net")))
417
418(define-public mpc123
419 (package
420 (name "mpc123")
421 (version "0.2.4")
422 (source (origin
423 (method url-fetch)
d1cd67af
EF
424 (uri (list (string-append "mirror://sourceforge/mpc123/version%20"
425 version "/mpc123-" version ".tar.gz")
426 (string-append "mirror://debian/pool/main/m/" name
427 "/" name "_" version ".orig.tar.gz")))
8f0fd238
LC
428 (sha256
429 (base32
86d07a55 430 "0sf4pns0245009z6mbxpx7kqy4kwl69bc95wz9v23wgappsvxgy1"))
fc1adab1 431 (patches (search-patches "mpc123-initialize-ao.patch"))))
8f0fd238
LC
432 (build-system gnu-build-system)
433 (arguments
1a847b70
EF
434 '(#:phases
435 (modify-phases %standard-phases
436 (replace 'configure
437 (lambda _
438 (substitute* "Makefile"
439 (("CC[[:blank:]]*:=.*")
440 "CC := gcc\n"))))
441 (replace 'install
442 (lambda* (#:key outputs #:allow-other-keys)
443 (let* ((out (assoc-ref outputs "out"))
444 (bin (string-append out "/bin")))
1a847b70 445 (install-file "mpc123" bin)))))
8f0fd238 446 #:tests? #f))
8f0fd238 447 (native-inputs
b94a6ca0 448 `(("gettext" ,gettext-minimal)))
8f0fd238
LC
449 (inputs
450 `(("libao" ,ao)
451 ("libmpcdec" ,libmpcdec)))
d1cd67af 452 (home-page "https://github.com/bucciarati/mpc123")
8f0fd238
LC
453 (synopsis "Audio player for Musepack-formatted files")
454 (description
35b9e423 455 "Mpc123 is a command-line player for files in the Musepack audio
e881752c 456compression format (.mpc files).")
8f0fd238 457 (license license:gpl2+)))
13ef3e99
LF
458
459(define-public eyed3
460 (package
461 (name "eyed3")
7b903a92 462 (version "0.7.10")
13ef3e99
LF
463 (source (origin
464 (method url-fetch)
465 (uri (string-append
466 "http://eyed3.nicfit.net/releases/eyeD3-"
467 version ".tar.gz"))
468 (sha256
469 (base32
7b903a92 470 "0wjicszs64ksj2y5jbk09yjd08znc1qnarlq8ssmx13f2d4x59wq"))))
13ef3e99
LF
471 (build-system python-build-system)
472 (arguments
473 `(#:python ,python-2))
474 (native-inputs
f3b98f4f 475 `(("python2-nose" ,python2-nose)
13ef3e99
LF
476 ("python2-sphinx" ,python2-sphinx)
477 ("python2-coverage" ,python2-coverage)))
478 (synopsis "MP3 tag ID3 metadata editor")
479 (description "eyeD3 is a Python tool for working with audio files,
480specifically mp3 files containing ID3 metadata (i.e. song info). It provides a
481command-line tool (eyeD3) and a Python library (import eyed3) that can be used
482to write your own applications or plugins that are callable from the
483command-line tool.")
484 (home-page "http://eyed3.nicfit.net/")
485 (license license:gpl2+)))
9518fde1
HG
486
487(define-public chromaprint
488 (package
489 (name "chromaprint")
490 (version "1.3.2")
491 (source (origin
492 (method url-fetch)
493 (uri (string-append
494 "https://bitbucket.org/acoustid/chromaprint/downloads/"
495 "chromaprint-" version ".tar.gz"))
496 (sha256
497 (base32 "0lln8dh33gslb9cbmd1hcv33pr6jxdwipd8m8gbsyhksiq6r1by3"))))
498 (build-system cmake-build-system)
499 (arguments
500 `(#:tests? #f ; tests require googletest *sources*
501 ;;#:configure-flags '("-DBUILD_TESTS=ON") ; for building the tests
502 #:test-target "check"))
503 (inputs
504 ;; requires one of FFmpeg (prefered), FFTW3 or vDSP
505 ;; use the same ffmpeg version as for acoustid-fingerprinter
506 `(("ffmpeg" ,ffmpeg)
507 ("boots" ,boost)))
508 (home-page "https://acoustid.org/chromaprint")
509 (synopsis "Audio fingerprinting library")
510 (description "Chromaprint is a library for calculating audio
511fingerprints which are used by the Acoustid service. Its main purpose
512is to provide an accurate identifier for record tracks.")
513 (license license:lgpl2.1+)))