gnu: mp3splt: Update to 2.6.2.
[jackhill/guix/guix.git] / gnu / packages / mp3.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
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)
23 #:use-module ((guix licenses) #:prefix license:)
24 #:use-module (gnu packages)
25 #:use-module (gnu packages autotools)
26 #:use-module (gnu packages base)
27 #:use-module (gnu packages gcc)
28 #:use-module (gnu packages boost)
29 #:use-module (gnu packages cdrom)
30 #:use-module (gnu packages compression)
31 #:use-module (gnu packages gettext)
32 #:use-module (gnu packages ghostscript)
33 #:use-module (gnu packages ncurses)
34 #:use-module (gnu packages glib)
35 #:use-module (gnu packages gtk)
36 #:use-module (gnu packages pcre)
37 #:use-module (gnu packages pkg-config)
38 #:use-module (gnu packages python)
39 #:use-module (gnu packages xiph)
40 #:use-module (gnu packages pulseaudio)
41 #:use-module (gnu packages linux) ;alsa-lib
42 #:use-module (gnu packages video) ;ffmpeg
43 #:use-module (guix packages)
44 #:use-module (guix download)
45 #:use-module (guix build-system gnu)
46 #:use-module (guix build-system python)
47 #:use-module (guix build-system cmake))
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
60 "14460zhacxhswnzb36qfpd1f2wbk10qvksvm6wyq5hpvdgnw7ymv"))
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"))))
65 (build-system gnu-build-system)
66 (arguments
67 `(#:phases
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") "")))
73 %standard-phases)))
74 (synopsis "MPEG audio decoder")
75 (description
76 "MAD (MPEG Audio Decoder) supports MPEG-1 and the MPEG-2 extension to
77 lower sampling frequencies, as well as the de facto MPEG 2.5 format.
78 All three audio layers — Layer I, Layer II, and Layer III (i.e. MP3) — are
79 fully implemented.
80
81 This package contains the library.")
82 (license license:gpl2+)
83 (home-page "http://www.underbit.com/products/mad/")))
84
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)))
99 (synopsis "Library for reading ID3 tags")
100 (description
101 "Libid3tag is a library for reading ID3 tags, both ID3v1 and the various
102 versions of ID3v2.")
103 (license license:gpl2+)
104 (home-page "http://www.underbit.com/products/mad/")))
105
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/"
113 version "/id3lib-" version ".tar.gz"))
114 (sha256
115 (base32
116 "0yfhqwk0w8q2hyv1jib1008jvzmwlpsxvc8qjllhna6p1hycqj97"))
117 (patches (search-patches "id3lib-CVE-2007-4460.patch"))))
118 (build-system gnu-build-system)
119 (arguments
120 `(#:phases
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;")))
134 %standard-phases)))
135 (synopsis "Library for reading, writing, and manipulating ID3v1 and ID3v2 tags")
136 (description
137 "Id3lib is a cross-platform software development library for reading,
138 writing, and manipulating ID3v1 and ID3v2 tags. It is an on-going project
139 whose primary goals are full compliance with the ID3v2 standard, portability
140 across several platforms, and providing a powerful and feature-rich API with
141 a highly stable and efficient implementation.")
142 (license license:lgpl2.0+)
143 (home-page "http://id3lib.sourceforge.net/")))
144
145 (define-public taglib
146 (package
147 (name "taglib")
148 (version "1.10")
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
155 "1alv6vp72p0x9i9yscmz2a71anjwqy53y9pbcbqxvc1c0i82vhr4"))))
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
163 popular audio formats. Currently it supports both ID3v1 and ID3v2 for MP3
164 files, Ogg Vorbis comments and ID3 tags and Vorbis comments in FLAC, MPC,
165 Speex, 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
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
177 "http://ibiblio.org"
178 "/pub/linux/apps/sound/mp3-utils/mp3info/mp3info-"
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
225 files. MP3Info can also display various technical aspects of an MP3 file
226 including playing time, bit-rate, sampling frequency and other attributes in a
227 pre-defined or user-specifiable output format.")
228 (license license:gpl2+)))
229
230 (define-public libmp3splt
231 (package
232 (name "libmp3splt")
233 (version "0.9.2")
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
241 "1p1mn2hsmj5cp40fnc8g1yfvk72p8pjxi866gjdkgjsqrr7xdvih"))))
242 (build-system gnu-build-system)
243 (inputs `(("libid3tag" ,libid3tag)
244 ("libmad" ,libmad)
245 ("libogg" ,libogg)
246 ("libltdl" ,libltdl)
247 ("libvorbis" ,libvorbis)
248 ("pcre" ,pcre)))
249 (native-inputs
250 `(("pkg-config" ,pkg-config)))
251 (synopsis "Library for splitting mp3 and ogg vorbis files")
252 (description
253 "Mp3splt is a utility to split mp3 and ogg vorbis files selecting a begin
254 and an end time position, without decoding. For splitting an album, one may
255 select split points and file names manually or obtain them automatically from
256 CDDB (internet or a local file) or from .cue files. The tool also supports
257 automatic silence split, that can be used also to adjust cddb/cue splitpoints.
258
259 This 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")
266 (version "2.6.2")
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
274 "1aiv20gypb6r84qabz8gblk8vi42cg3x333vk2pi3fyqvl82phry"))))
275 (build-system gnu-build-system)
276 (native-inputs `(("pkg-config" ,pkg-config)))
277 (inputs `(("libmp3splt" ,libmp3splt)))
278 (synopsis "Utility for splitting mp3 and ogg vorbis files")
279 (description
280 "Mp3splt is a utility to split mp3 and ogg vorbis files selecting a begin
281 and an end time position, without decoding. For splitting an album, one may
282 select split points and file names manually or obtain them automatically from
283 CDDB (internet or a local file) or from .cue files. The tool also supports
284 automatic silence split, that can be used also to adjust cddb/cue splitpoints.
285
286 This package contains the binary.")
287 (license license:gpl2+)
288 (home-page "http://mp3splt.sourceforge.net/mp3splt_page/home.php")))
289
290 (define-public mpg123
291 (package
292 (name "mpg123")
293 (version "1.23.8")
294 (source (origin
295 (method url-fetch)
296 (uri (string-append "mirror://sourceforge/mpg123/mpg123/" version
297 "/mpg123-" version ".tar.bz2"))
298 (sha256
299 (base32
300 "13ngfzk84k4ks7ymanmq8f6707yrybra5h0mk3ir6mdnxk4068yy"))))
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
309 "Mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers
310 1,2 and 3 (MPEG 1.0 layer 3 aka MP3 most commonly tested). It comes with a
311 command-line tool as well as a C library, libmpg123.")
312 (license license:lgpl2.1)))
313
314 (define-public mpg321
315 (package
316 (name "mpg321")
317 (version "0.3.2")
318 (source (origin
319 (method url-fetch)
320 (uri (string-append "mirror://sourceforge/mpg321/mpg321/"
321 version "/mpg321-" version ".tar.gz"))
322 (sha256
323 (base32
324 "0ki8mh76bbmdh77qsiw682dvi8y468yhbdabqwg05igmwc1wqvq5"))))
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")
334 (description "Mpg321 is a command-line mp3 player. mpg321 is used for
335 frontends, as an mp3 player and as an mp3 to wave file decoder (primarily for
336 use with CD-recording software).")
337 (license license:gpl2)))
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)
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 '()))
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)))
361
362 (define-public ripperx
363 (package
364 (name "ripperx")
365 (version "2.8.0")
366 (source (origin
367 (method url-fetch)
368 (uri (string-append "mirror://sourceforge/ripperx/ripperx/"
369 version "/ripperx-"
370 version ".tar.bz2"))
371 (sha256
372 (base32
373 "1ss3c1a5hx6c99q1cryxg0jhbnbdj6ga9xyz0dzlz9qhzg5qswfs"))
374 (patches (search-patches "ripperx-missing-file.patch"))))
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
383 `(("glib" ,glib)
384 ("gtk+" ,gtk+-2)
385 ("id3lib" ,id3lib)
386 ("taglib" ,taglib)))
387 (native-inputs
388 `(("pkg-config" ,pkg-config)))
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
392 Ogg, MP3, or FLAC formats. Its goal is to be easy to use, requiring only
393 a few mouse clicks to convert an entire album. It supports CDDB lookups
394 for album and track information.")
395 (license license:gpl2)
396 (home-page "https://sourceforge.net/projects/ripperx/")))
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
414 format.")
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)
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")))
428 (sha256
429 (base32
430 "0sf4pns0245009z6mbxpx7kqy4kwl69bc95wz9v23wgappsvxgy1"))
431 (patches (search-patches "mpc123-initialize-ao.patch"))))
432 (build-system gnu-build-system)
433 (arguments
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")))
445 (install-file "mpc123" bin)))))
446 #:tests? #f))
447 (native-inputs
448 `(("gettext" ,gettext-minimal)))
449 (inputs
450 `(("libao" ,ao)
451 ("libmpcdec" ,libmpcdec)))
452 (home-page "https://github.com/bucciarati/mpc123")
453 (synopsis "Audio player for Musepack-formatted files")
454 (description
455 "Mpc123 is a command-line player for files in the Musepack audio
456 compression format (.mpc files).")
457 (license license:gpl2+)))
458
459 (define-public eyed3
460 (package
461 (name "eyed3")
462 (version "0.7.10")
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
470 "0wjicszs64ksj2y5jbk09yjd08znc1qnarlq8ssmx13f2d4x59wq"))))
471 (build-system python-build-system)
472 (arguments
473 `(#:python ,python-2))
474 (native-inputs
475 `(("python2-nose" ,python2-nose)
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,
480 specifically mp3 files containing ID3 metadata (i.e. song info). It provides a
481 command-line tool (eyeD3) and a Python library (import eyed3) that can be used
482 to write your own applications or plugins that are callable from the
483 command-line tool.")
484 (home-page "http://eyed3.nicfit.net/")
485 (license license:gpl2+)))
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
511 fingerprints which are used by the Acoustid service. Its main purpose
512 is to provide an accurate identifier for record tracks.")
513 (license license:lgpl2.1+)))