gnu: mpc123: Add new source location.
[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)
25352fe1 28 #:use-module (gnu packages cdrom)
8cc9c0da 29 #:use-module (gnu packages compression)
54ff0b7d 30 #:use-module (gnu packages gettext)
25352fe1 31 #:use-module (gnu packages ghostscript)
68ff528c 32 #:use-module (gnu packages ncurses)
25352fe1
AE
33 #:use-module (gnu packages glib)
34 #:use-module (gnu packages gtk)
c23e9e48
AE
35 #:use-module (gnu packages pcre)
36 #:use-module (gnu packages pkg-config)
13ef3e99 37 #:use-module (gnu packages python)
54ff0b7d 38 #:use-module (gnu packages xiph)
1bdb591b 39 #:use-module (gnu packages pulseaudio)
a82bec4e 40 #:use-module (gnu packages linux) ;alsa-lib
d464e725
AE
41 #:use-module (guix packages)
42 #:use-module (guix download)
086518dd 43 #:use-module (guix build-system gnu)
13ef3e99 44 #:use-module (guix build-system python)
086518dd 45 #:use-module (guix build-system cmake))
d464e725
AE
46
47(define-public libmad
48 (package
49 (name "libmad")
50 (version "0.15.1b")
51 (source (origin
52 (method url-fetch)
53 (uri (string-append "mirror://sourceforge/mad/libmad/"
54 version "/libmad-"
55 version ".tar.gz"))
56 (sha256
57 (base32
dd863f1f 58 "14460zhacxhswnzb36qfpd1f2wbk10qvksvm6wyq5hpvdgnw7ymv"))
fc1adab1
AK
59 (patches (search-patches "libmad-armv7-thumb-pt1.patch"
60 "libmad-armv7-thumb-pt2.patch"
61 "libmad-frame-length.patch"
62 "libmad-mips-newgcc.patch"))))
d464e725
AE
63 (build-system gnu-build-system)
64 (arguments
65 `(#:phases
d4bf49b1
EB
66 (alist-cons-before
67 'configure 'remove-unsupported-gcc-flags
68 (lambda _
69 ;; remove option that is not supported by gcc any more
70 (substitute* "configure" ((" -fforce-mem") "")))
d464e725 71 %standard-phases)))
35b9e423 72 (synopsis "MPEG audio decoder")
d464e725
AE
73 (description
74 "MAD (MPEG Audio Decoder) supports MPEG-1 and the MPEG-2 extension to
75lower sampling frequencies, as well as the de facto MPEG 2.5 format.
76All three audio layers — Layer I, Layer II, and Layer III (i.e. MP3) — are
77fully implemented.
78
79This package contains the library.")
80 (license license:gpl2+)
81 (home-page "http://www.underbit.com/products/mad/")))
82
8cc9c0da
AE
83(define-public libid3tag
84 (package
85 (name "libid3tag")
86 (version "0.15.1b")
87 (source (origin
88 (method url-fetch)
89 (uri (string-append "mirror://sourceforge/mad/libid3tag/"
90 version "/libid3tag-"
91 version ".tar.gz"))
92 (sha256
93 (base32
94 "0lb1w883dc46dajbdvnia5870brl5lvnlk7g7y58y9wpg5p4znk3"))))
95 (build-system gnu-build-system)
96 (inputs `(("zlib" ,zlib)))
35b9e423 97 (synopsis "Library for reading ID3 tags")
8cc9c0da 98 (description
35b9e423 99 "Libid3tag is a library for reading ID3 tags, both ID3v1 and the various
e881752c 100versions of ID3v2.")
8cc9c0da
AE
101 (license license:gpl2+)
102 (home-page "http://www.underbit.com/products/mad/")))
103
fbd84457
AE
104(define-public id3lib
105 (package
106 (name "id3lib")
107 (version "3.8.3")
108 (source (origin
109 (method url-fetch)
110 (uri (string-append "mirror://sourceforge/id3lib/id3lib/"
111 version "/id3lib-"
112 version ".tar.gz"))
113 (sha256
114 (base32
115 "0yfhqwk0w8q2hyv1jib1008jvzmwlpsxvc8qjllhna6p1hycqj97"))))
116 (build-system gnu-build-system)
117 (arguments
118 `(#:phases
d4bf49b1
EB
119 (alist-cons-before
120 'configure 'apply-patches
121 ;; TODO: create a patch for origin instead?
122 (lambda _
123 (substitute* "configure"
124 (("iomanip.h") "")) ; drop check for unused header
125 ;; see http://www.linuxfromscratch.org/patches/downloads/id3lib/
126 (substitute* "include/id3/id3lib_strings.h"
127 (("include <string>") "include <cstring>\n#include <string>"))
128 (substitute* "include/id3/writers.h"
129 (("//\\#include <string.h>") "#include <cstring>"))
130 (substitute* "examples/test_io.cpp"
131 (("dami;") "dami;\nusing namespace std;")))
fbd84457 132 %standard-phases)))
35b9e423 133 (synopsis "Library for reading, writing, and manipulating ID3v1 and ID3v2 tags")
fbd84457 134 (description
35b9e423
EB
135 "Id3lib is a cross-platform software development library for reading,
136writing, and manipulating ID3v1 and ID3v2 tags. It is an on-going project
fbd84457
AE
137whose primary goals are full compliance with the ID3v2 standard, portability
138across several platforms, and providing a powerful and feature-rich API with
139a highly stable and efficient implementation.")
140 (license license:lgpl2.0+)
141 (home-page "http://id3lib.sourceforge.net/")))
142
086518dd
LC
143(define-public taglib
144 (package
145 (name "taglib")
146 (version "1.9.1")
147 (source (origin
148 (method url-fetch)
149 (uri (string-append "http://taglib.github.io/releases/taglib-"
150 version ".tar.gz"))
151 (sha256
152 (base32
153 "06n7gnbcqa3r6c9gv00y0y1r48dyyazm6yj403i7ma0r2k6p3lvj"))))
154 (build-system cmake-build-system)
155 (arguments '(#:tests? #f)) ;no 'test' target
156 (inputs `(("zlib" ,zlib)))
157 (home-page "http://developer.kde.org/~wheeler/taglib.html")
158 (synopsis "Library to access audio file meta-data")
159 (description
160 "TagLib is a C++ library for reading and editing the meta-data of several
161popular audio formats. Currently it supports both ID3v1 and ID3v2 for MP3
162files, Ogg Vorbis comments and ID3 tags and Vorbis comments in FLAC, MPC,
163Speex, WavPack TrueAudio, WAV, AIFF, MP4 and ASF files.")
164
165 ;; Dual-licensed: user may choose between LGPLv2.1 or MPLv1.1.
166 (license (list license:lgpl2.1 license:mpl1.1))))
167
68ff528c
LC
168(define-public mp3info
169 (package
170 (name "mp3info")
171 (version "0.8.5a")
172 (source (origin
173 (method url-fetch)
174 (uri (string-append
f8f8897f
AV
175 "http://ibiblio.org"
176 "/pub/linux/apps/sound/mp3-utils/mp3info/mp3info-"
68ff528c
LC
177 version ".tgz"))
178 (sha256
179 (base32
180 "042f1czcs9n2sbqvg4rsvfwlqib2gk976mfa2kxlfjghx5laqf04"))
181 (modules '((guix build utils)))
182 (snippet
183 '(substitute* "Makefile"
184 (("/bin/rm") "rm")
185 (("/usr/bin/install") "install")
186 (("man/man1") "share/man/man1")))))
187 (build-system gnu-build-system)
188 (outputs '("out" "gui")) ;GTK+ interface in "gui"
189 (arguments
190 '(#:phases (alist-replace
191 'configure
192 (lambda* (#:key outputs #:allow-other-keys)
193 (let ((out (assoc-ref outputs "out")))
194 (substitute* "Makefile"
195 (("prefix=.*")
196 (string-append "prefix := " out "\n")))))
197 (alist-cons-before
198 'install 'pre-install
199 (lambda* (#:key outputs #:allow-other-keys)
200 (let ((out (assoc-ref outputs "out")))
201 (mkdir-p (string-append out "/bin"))
202 (mkdir-p (string-append out "/share/man/man1"))))
203 (alist-cons-after
204 'install 'post-install
205 (lambda* (#:key outputs #:allow-other-keys)
206 ;; Move the GTK+ interface to "gui".
207 (let ((out (assoc-ref outputs "out"))
208 (gui (assoc-ref outputs "gui")))
209 (mkdir-p (string-append gui "/bin"))
210 (rename-file (string-append out "/bin/gmp3info")
211 (string-append gui "/bin/gmp3info"))))
212 %standard-phases)))
213 #:tests? #f))
214 (native-inputs
215 `(("pkg-config" ,pkg-config)))
216 (inputs
217 `(("gtk+" ,gtk+-2)
218 ("ncurses" ,ncurses)))
219 (home-page "http://www.ibiblio.org/mp3info/")
220 (synopsis "MP3 technical info viewer and ID3 1.x tag editor")
221 (description
222 "MP3Info is a little utility used to read and modify the ID3 tags of MP3
e881752c 223files. MP3Info can also display various technical aspects of an MP3 file
68ff528c
LC
224including playing time, bit-rate, sampling frequency and other attributes in a
225pre-defined or user-specifiable output format.")
226 (license license:gpl2+)))
227
c23e9e48
AE
228(define-public libmp3splt
229 (package
230 (name "libmp3splt")
231 (version "0.8.1a")
232 (source (origin
233 (method url-fetch)
234 (uri (string-append "mirror://sourceforge/mp3splt/libmp3splt/"
235 version "/libmp3splt-"
236 version ".tar.gz"))
237 (sha256
238 (base32
239 "0d20r1bd4fgp9kp7w3qixjgll34czck9dgw59mx2kbhb0mhh00d8"))))
240 (build-system gnu-build-system)
241 (inputs `(("libid3tag" ,libid3tag)
242 ("libmad" ,libmad)
243 ("libogg" ,libogg)
3246cc91 244 ("libltdl" ,libltdl)
e881752c 245 ("libvorbis" ,libvorbis)
c23e9e48 246 ("pcre" ,pcre)))
c4c4cc05
JD
247 (native-inputs
248 `(("pkg-config" ,pkg-config)))
35b9e423 249 (synopsis "Library for splitting mp3 and ogg vorbis files")
c23e9e48
AE
250 (description
251 "Mp3splt is a utility to split mp3 and ogg vorbis files selecting a begin
35b9e423 252and an end time position, without decoding. For splitting an album, one may
e881752c 253select split points and file names manually or obtain them automatically from
35b9e423 254CDDB (internet or a local file) or from .cue files. The tool also supports
c23e9e48
AE
255automatic silence split, that can be used also to adjust cddb/cue splitpoints.
256
257This package contains the library.")
258 (license license:gpl2+)
259 (home-page "http://mp3splt.sourceforge.net/mp3splt_page/home.php")))
260
261(define-public mp3splt
262 (package
263 (name "mp3splt")
264 (version "2.5.1")
265 (source (origin
266 (method url-fetch)
267 (uri (string-append "mirror://sourceforge/mp3splt/mp3splt/"
268 version "/mp3splt-"
269 version ".tar.gz"))
270 (sha256
271 (base32
272 "106dnka56prlc9nsfh300f8841am2lmkwlzgl9lkr25mgnc35wwh"))))
273 (build-system gnu-build-system)
274 (inputs `(("libmp3splt" ,libmp3splt)))
e881752c 275 (synopsis "Utility for splitting mp3 and ogg vorbis files")
c23e9e48
AE
276 (description
277 "Mp3splt is a utility to split mp3 and ogg vorbis files selecting a begin
35b9e423 278and an end time position, without decoding. For splitting an album, one may
e881752c 279select split points and file names manually or obtain them automatically from
35b9e423 280CDDB (internet or a local file) or from .cue files. The tool also supports
c23e9e48
AE
281automatic silence split, that can be used also to adjust cddb/cue splitpoints.
282
283This package contains the binary.")
284 (license license:gpl2+)
285 (home-page "http://mp3splt.sourceforge.net/mp3splt_page/home.php")))
286
1bdb591b
LC
287(define-public mpg123
288 (package
289 (name "mpg123")
9e125175 290 (version "1.22.4")
1bdb591b
LC
291 (source (origin
292 (method url-fetch)
293 (uri (string-append "mirror://sourceforge/mpg123/mpg123-"
294 version ".tar.bz2"))
295 (sha256
296 (base32
9e125175 297 "1lj0xv0b6sgqsbhx10dg60cnzgz98i76gxy51kqh11hka0pf0sah"))))
1bdb591b
LC
298 (build-system gnu-build-system)
299 (arguments '(#:configure-flags '("--with-default-audio=pulse")))
300 (native-inputs `(("pkg-config" ,pkg-config)))
301 (inputs `(("pulseaudio" ,pulseaudio)
302 ("alsa-lib" ,alsa-lib)))
303 (home-page "http://www.mpg123.org/")
304 (synopsis "Console MP3 player and decoder library")
305 (description
35b9e423 306 "Mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers
1bdb591b
LC
3071,2 and 3 (MPEG 1.0 layer 3 aka MP3 most commonly tested). It comes with a
308command-line tool as well as a C library, libmpg123.")
309 (license license:lgpl2.1)))
310
0a56fadb
LC
311(define-public mpg321
312 (package
313 (name "mpg321")
314 (version "0.3.1")
315 (source (origin
316 (method url-fetch)
317 (uri (string-append "mirror://sourceforge/mpg321/"
318 version "/mpg321-" version ".tar.gz"))
319 (sha256
320 (base32
321 "0yamsqvj15nsxxnjs9mgyslzx7krgsfk3q1hk3g6l8w9bbbj770b"))))
322 (build-system gnu-build-system)
323 (arguments '(#:configure-flags '("--disable-alsa")))
324 (inputs
325 `(("zlib" ,zlib)
326 ("libmad" ,libmad)
327 ("libid3tag" ,libid3tag)
328 ("libao" ,ao)))
329 (home-page "http://mpg321.sourceforge.net/")
330 (synopsis "Command-line MP3 player")
35b9e423 331 (description "Mpg321 is a command-line mp3 player. mpg321 is used for
0a56fadb
LC
332frontends, as an mp3 player and as an mp3 to wave file decoder (primarily for
333use with CD-recording software).")
334 (license license:gpl2)))
2ae92cbc
AE
335
336(define-public lame
337 (package
338 (name "lame")
339 (version "3.99.5")
340 (source (origin
341 (method url-fetch)
342 (uri (string-append "mirror://sourceforge/lame/lame/3.99/lame-"
343 version ".tar.gz"))
344 (sha256
345 (base32
346 "1zr3kadv35ii6liia0bpfgxpag27xcivp571ybckpbz4b10nnd14"))))
347 (build-system gnu-build-system)
194782a8
MW
348 ;; XXX FIXME: Use gcc-4.8 on i686 to work around
349 ;; <http://bugs.gnu.org/20856>.
350 (native-inputs (if (and (not (%current-target-system))
351 (string-prefix? "i686-" (%current-system)))
352 `(("gcc" ,(canonical-package gcc-4.8)))
353 '()))
2ae92cbc
AE
354 (home-page "http://lame.sourceforge.net/")
355 (synopsis "MPEG Audio Layer III (MP3) encoder")
356 (description "LAME is a high quality MPEG Audio Layer III (MP3) encoder.")
357 (license license:lgpl2.0)))
25352fe1
AE
358
359(define-public ripperx
360 (package
361 (name "ripperx")
d0dfc066 362 (version "2.8.0")
25352fe1
AE
363 (source (origin
364 (method url-fetch)
365 (uri (string-append "mirror://sourceforge/ripperx/ripperx/"
d0dfc066
AE
366 version "/ripperx-"
367 version ".tar.bz2"))
25352fe1
AE
368 (sha256
369 (base32
d0dfc066 370 "1ss3c1a5hx6c99q1cryxg0jhbnbdj6ga9xyz0dzlz9qhzg5qswfs"))
fc1adab1 371 (patches (search-patches "ripperx-missing-file.patch"))))
25352fe1
AE
372 (build-system gnu-build-system)
373 (propagated-inputs
374 `(("gs-fonts" ,gs-fonts)
375 ("cdparanoia" ,cdparanoia)
376 ("flac" ,flac)
377 ("lame" ,lame)
378 ("vorbis-tools" ,vorbis-tools)))
379 (inputs
01eafd38 380 `(("glib" ,glib)
8b0275b6 381 ("gtk+" ,gtk+-2)
d0dfc066
AE
382 ("id3lib" ,id3lib)
383 ("taglib" ,taglib)))
c4c4cc05
JD
384 (native-inputs
385 `(("pkg-config" ,pkg-config)))
25352fe1
AE
386 (synopsis "GTK program to rip and encode CD audio tracks")
387 (description
388 "RipperX is a GTK program to rip CD audio tracks and encode them to the
35b9e423
EB
389Ogg, MP3, or FLAC formats. Its goal is to be easy to use, requiring only
390a few mouse clicks to convert an entire album. It supports CDDB lookups
25352fe1
AE
391for album and track information.")
392 (license license:gpl2)
393 (home-page "http://sourceforge.net/projects/ripperx/")))
8f0fd238
LC
394
395(define-public libmpcdec
396 (package
397 (name "libmpcdec")
398 (version "1.2.6")
399 (source (origin
400 (method url-fetch)
401 (uri (string-append
402 "http://files.musepack.net/source/libmpcdec-"
403 version ".tar.bz2"))
404 (sha256
405 (base32
406 "1a0jdyga1zfi4wgkg3905y6inghy3s4xfs5m4x7pal08m0llkmab"))))
407 (build-system gnu-build-system)
408 (synopsis "Decoding library for the Musepack audio format")
409 (description
410 "This library supports decoding of the Musepack (MPC) audio compression
411format.")
412 (license license:bsd-3)
413 (home-page "http://musepack.net")))
414
415(define-public mpc123
416 (package
417 (name "mpc123")
418 (version "0.2.4")
419 (source (origin
420 (method url-fetch)
d1cd67af
EF
421 (uri (list (string-append "mirror://sourceforge/mpc123/version%20"
422 version "/mpc123-" version ".tar.gz")
423 (string-append "mirror://debian/pool/main/m/" name
424 "/" name "_" version ".orig.tar.gz")))
8f0fd238
LC
425 (sha256
426 (base32
86d07a55 427 "0sf4pns0245009z6mbxpx7kqy4kwl69bc95wz9v23wgappsvxgy1"))
fc1adab1 428 (patches (search-patches "mpc123-initialize-ao.patch"))))
8f0fd238
LC
429 (build-system gnu-build-system)
430 (arguments
431 '(#:phases (alist-replace
432 'configure
433 (lambda _
434 (substitute* "Makefile"
435 (("CC[[:blank:]]*:=.*")
436 "CC := gcc\n")))
437 (alist-replace
438 'install
439 (lambda* (#:key outputs #:allow-other-keys)
440 (let* ((out (assoc-ref outputs "out"))
441 (bin (string-append out "/bin")))
442 (mkdir-p bin)
96c46210 443 (install-file "mpc123" bin)))
8f0fd238
LC
444 %standard-phases))
445 #:tests? #f))
446
447 (native-inputs
448 `(("gettext" ,gnu-gettext)))
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")
462 (version "0.7.8")
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 "1nv7nhfn1d0qm7rgkzksbccgqisng8klf97np0nwaqwd5dbmdf86"))))
471 (build-system python-build-system)
472 (arguments
473 `(#:python ,python-2))
474 (native-inputs
475 `(("python2-setuptools" ,python2-setuptools)
476 ("python2-nose" ,python2-nose)
477 ("python2-sphinx" ,python2-sphinx)
478 ("python2-coverage" ,python2-coverage)))
479 (synopsis "MP3 tag ID3 metadata editor")
480 (description "eyeD3 is a Python tool for working with audio files,
481specifically mp3 files containing ID3 metadata (i.e. song info). It provides a
482command-line tool (eyeD3) and a Python library (import eyed3) that can be used
483to write your own applications or plugins that are callable from the
484command-line tool.")
485 (home-page "http://eyed3.nicfit.net/")
486 (license license:gpl2+)))