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>
6 ;;; This file is part of GNU Guix.
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21 (define-module (gnu packages mp3)
22 #:use-module ((guix licenses) #:prefix license:)
23 #:use-module (gnu packages)
24 #:use-module (gnu packages autotools)
25 #:use-module (gnu packages base)
26 #:use-module (gnu packages gcc)
27 #:use-module (gnu packages cdrom)
28 #:use-module (gnu packages compression)
29 #:use-module (gnu packages gettext)
30 #:use-module (gnu packages ghostscript)
31 #:use-module (gnu packages ncurses)
32 #:use-module (gnu packages glib)
33 #:use-module (gnu packages gtk)
34 #:use-module (gnu packages pcre)
35 #:use-module (gnu packages pkg-config)
36 #:use-module (gnu packages python)
37 #:use-module (gnu packages xiph)
38 #:use-module (gnu packages pulseaudio)
39 #:use-module (gnu packages linux) ;alsa-lib
40 #:use-module (guix packages)
41 #:use-module (guix download)
42 #:use-module (guix build-system gnu)
43 #:use-module (guix build-system python)
44 #:use-module (guix build-system cmake))
52 (uri (string-append "mirror://sourceforge/mad/libmad/"
57 "14460zhacxhswnzb36qfpd1f2wbk10qvksvm6wyq5hpvdgnw7ymv"))
58 (patches (search-patches "libmad-armv7-thumb-pt1.patch"
59 "libmad-armv7-thumb-pt2.patch"
60 "libmad-frame-length.patch"
61 "libmad-mips-newgcc.patch"))))
62 (build-system gnu-build-system)
66 'configure 'remove-unsupported-gcc-flags
68 ;; remove option that is not supported by gcc any more
69 (substitute* "configure" ((" -fforce-mem") "")))
71 (synopsis "MPEG audio decoder")
73 "MAD (MPEG Audio Decoder) supports MPEG-1 and the MPEG-2 extension to
74 lower sampling frequencies, as well as the de facto MPEG 2.5 format.
75 All three audio layers — Layer I, Layer II, and Layer III (i.e. MP3) — are
78 This package contains the library.")
79 (license license:gpl2+)
80 (home-page "http://www.underbit.com/products/mad/")))
82 (define-public libid3tag
88 (uri (string-append "mirror://sourceforge/mad/libid3tag/"
93 "0lb1w883dc46dajbdvnia5870brl5lvnlk7g7y58y9wpg5p4znk3"))))
94 (build-system gnu-build-system)
95 (inputs `(("zlib" ,zlib)))
96 (synopsis "Library for reading ID3 tags")
98 "Libid3tag is a library for reading ID3 tags, both ID3v1 and the various
100 (license license:gpl2+)
101 (home-page "http://www.underbit.com/products/mad/")))
103 (define-public id3lib
109 (uri (string-append "mirror://sourceforge/id3lib/id3lib/"
114 "0yfhqwk0w8q2hyv1jib1008jvzmwlpsxvc8qjllhna6p1hycqj97"))))
115 (build-system gnu-build-system)
119 'configure 'apply-patches
120 ;; TODO: create a patch for origin instead?
122 (substitute* "configure"
123 (("iomanip.h") "")) ; drop check for unused header
124 ;; see http://www.linuxfromscratch.org/patches/downloads/id3lib/
125 (substitute* "include/id3/id3lib_strings.h"
126 (("include <string>") "include <cstring>\n#include <string>"))
127 (substitute* "include/id3/writers.h"
128 (("//\\#include <string.h>") "#include <cstring>"))
129 (substitute* "examples/test_io.cpp"
130 (("dami;") "dami;\nusing namespace std;")))
132 (synopsis "Library for reading, writing, and manipulating ID3v1 and ID3v2 tags")
134 "Id3lib is a cross-platform software development library for reading,
135 writing, and manipulating ID3v1 and ID3v2 tags. It is an on-going project
136 whose primary goals are full compliance with the ID3v2 standard, portability
137 across several platforms, and providing a powerful and feature-rich API with
138 a highly stable and efficient implementation.")
139 (license license:lgpl2.0+)
140 (home-page "http://id3lib.sourceforge.net/")))
142 (define-public taglib
148 (uri (string-append "http://taglib.github.io/releases/taglib-"
152 "06n7gnbcqa3r6c9gv00y0y1r48dyyazm6yj403i7ma0r2k6p3lvj"))))
153 (build-system cmake-build-system)
154 (arguments '(#:tests? #f)) ;no 'test' target
155 (inputs `(("zlib" ,zlib)))
156 (home-page "http://developer.kde.org/~wheeler/taglib.html")
157 (synopsis "Library to access audio file meta-data")
159 "TagLib is a C++ library for reading and editing the meta-data of several
160 popular audio formats. Currently it supports both ID3v1 and ID3v2 for MP3
161 files, Ogg Vorbis comments and ID3 tags and Vorbis comments in FLAC, MPC,
162 Speex, WavPack TrueAudio, WAV, AIFF, MP4 and ASF files.")
164 ;; Dual-licensed: user may choose between LGPLv2.1 or MPLv1.1.
165 (license (list license:lgpl2.1 license:mpl1.1))))
167 (define-public mp3info
175 "/pub/linux/apps/sound/mp3-utils/mp3info/mp3info-"
179 "042f1czcs9n2sbqvg4rsvfwlqib2gk976mfa2kxlfjghx5laqf04"))
180 (modules '((guix build utils)))
182 '(substitute* "Makefile"
184 (("/usr/bin/install") "install")
185 (("man/man1") "share/man/man1")))))
186 (build-system gnu-build-system)
187 (outputs '("out" "gui")) ;GTK+ interface in "gui"
189 '(#:phases (alist-replace
191 (lambda* (#:key outputs #:allow-other-keys)
192 (let ((out (assoc-ref outputs "out")))
193 (substitute* "Makefile"
195 (string-append "prefix := " out "\n")))))
197 'install 'pre-install
198 (lambda* (#:key outputs #:allow-other-keys)
199 (let ((out (assoc-ref outputs "out")))
200 (mkdir-p (string-append out "/bin"))
201 (mkdir-p (string-append out "/share/man/man1"))))
203 'install 'post-install
204 (lambda* (#:key outputs #:allow-other-keys)
205 ;; Move the GTK+ interface to "gui".
206 (let ((out (assoc-ref outputs "out"))
207 (gui (assoc-ref outputs "gui")))
208 (mkdir-p (string-append gui "/bin"))
209 (rename-file (string-append out "/bin/gmp3info")
210 (string-append gui "/bin/gmp3info"))))
214 `(("pkg-config" ,pkg-config)))
217 ("ncurses" ,ncurses)))
218 (home-page "http://www.ibiblio.org/mp3info/")
219 (synopsis "MP3 technical info viewer and ID3 1.x tag editor")
221 "MP3Info is a little utility used to read and modify the ID3 tags of MP3
222 files. MP3Info can also display various technical aspects of an MP3 file
223 including playing time, bit-rate, sampling frequency and other attributes in a
224 pre-defined or user-specifiable output format.")
225 (license license:gpl2+)))
227 (define-public libmp3splt
233 (uri (string-append "mirror://sourceforge/mp3splt/libmp3splt/"
234 version "/libmp3splt-"
238 "0d20r1bd4fgp9kp7w3qixjgll34czck9dgw59mx2kbhb0mhh00d8"))))
239 (build-system gnu-build-system)
240 (inputs `(("libid3tag" ,libid3tag)
244 ("libvorbis" ,libvorbis)
247 `(("pkg-config" ,pkg-config)))
248 (synopsis "Library for splitting mp3 and ogg vorbis files")
250 "Mp3splt is a utility to split mp3 and ogg vorbis files selecting a begin
251 and an end time position, without decoding. For splitting an album, one may
252 select split points and file names manually or obtain them automatically from
253 CDDB (internet or a local file) or from .cue files. The tool also supports
254 automatic silence split, that can be used also to adjust cddb/cue splitpoints.
256 This package contains the library.")
257 (license license:gpl2+)
258 (home-page "http://mp3splt.sourceforge.net/mp3splt_page/home.php")))
260 (define-public mp3splt
266 (uri (string-append "mirror://sourceforge/mp3splt/mp3splt/"
271 "106dnka56prlc9nsfh300f8841am2lmkwlzgl9lkr25mgnc35wwh"))))
272 (build-system gnu-build-system)
273 (inputs `(("libmp3splt" ,libmp3splt)))
274 (synopsis "Utility for splitting mp3 and ogg vorbis files")
276 "Mp3splt is a utility to split mp3 and ogg vorbis files selecting a begin
277 and an end time position, without decoding. For splitting an album, one may
278 select split points and file names manually or obtain them automatically from
279 CDDB (internet or a local file) or from .cue files. The tool also supports
280 automatic silence split, that can be used also to adjust cddb/cue splitpoints.
282 This package contains the binary.")
283 (license license:gpl2+)
284 (home-page "http://mp3splt.sourceforge.net/mp3splt_page/home.php")))
286 (define-public mpg123
292 (uri (string-append "mirror://sourceforge/mpg123/mpg123-"
296 "1lj0xv0b6sgqsbhx10dg60cnzgz98i76gxy51kqh11hka0pf0sah"))))
297 (build-system gnu-build-system)
298 (arguments '(#:configure-flags '("--with-default-audio=pulse")))
299 (native-inputs `(("pkg-config" ,pkg-config)))
300 (inputs `(("pulseaudio" ,pulseaudio)
301 ("alsa-lib" ,alsa-lib)))
302 (home-page "http://www.mpg123.org/")
303 (synopsis "Console MP3 player and decoder library")
305 "Mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers
306 1,2 and 3 (MPEG 1.0 layer 3 aka MP3 most commonly tested). It comes with a
307 command-line tool as well as a C library, libmpg123.")
308 (license license:lgpl2.1)))
310 (define-public mpg321
316 (uri (string-append "mirror://sourceforge/mpg321/"
317 version "/mpg321-" version ".tar.gz"))
320 "0yamsqvj15nsxxnjs9mgyslzx7krgsfk3q1hk3g6l8w9bbbj770b"))))
321 (build-system gnu-build-system)
322 (arguments '(#:configure-flags '("--disable-alsa")))
326 ("libid3tag" ,libid3tag)
328 (home-page "http://mpg321.sourceforge.net/")
329 (synopsis "Command-line MP3 player")
330 (description "Mpg321 is a command-line mp3 player. mpg321 is used for
331 frontends, as an mp3 player and as an mp3 to wave file decoder (primarily for
332 use with CD-recording software).")
333 (license license:gpl2)))
341 (uri (string-append "mirror://sourceforge/lame/lame/3.99/lame-"
345 "1zr3kadv35ii6liia0bpfgxpag27xcivp571ybckpbz4b10nnd14"))))
346 (build-system gnu-build-system)
347 ;; XXX FIXME: Use gcc-4.8 on i686 to work around
348 ;; <http://bugs.gnu.org/20856>.
349 (native-inputs (if (and (not (%current-target-system))
350 (string-prefix? "i686-" (%current-system)))
351 `(("gcc" ,(canonical-package gcc-4.8)))
353 (home-page "http://lame.sourceforge.net/")
354 (synopsis "MPEG Audio Layer III (MP3) encoder")
355 (description "LAME is a high quality MPEG Audio Layer III (MP3) encoder.")
356 (license license:lgpl2.0)))
358 (define-public ripperx
364 (uri (string-append "mirror://sourceforge/ripperx/ripperx/"
369 "1ss3c1a5hx6c99q1cryxg0jhbnbdj6ga9xyz0dzlz9qhzg5qswfs"))
370 (patches (search-patches "ripperx-missing-file.patch"))))
371 (build-system gnu-build-system)
373 `(("gs-fonts" ,gs-fonts)
374 ("cdparanoia" ,cdparanoia)
377 ("vorbis-tools" ,vorbis-tools)))
384 `(("pkg-config" ,pkg-config)))
385 (synopsis "GTK program to rip and encode CD audio tracks")
387 "RipperX is a GTK program to rip CD audio tracks and encode them to the
388 Ogg, MP3, or FLAC formats. Its goal is to be easy to use, requiring only
389 a few mouse clicks to convert an entire album. It supports CDDB lookups
390 for album and track information.")
391 (license license:gpl2)
392 (home-page "http://sourceforge.net/projects/ripperx/")))
394 (define-public libmpcdec
401 "http://files.musepack.net/source/libmpcdec-"
405 "1a0jdyga1zfi4wgkg3905y6inghy3s4xfs5m4x7pal08m0llkmab"))))
406 (build-system gnu-build-system)
407 (synopsis "Decoding library for the Musepack audio format")
409 "This library supports decoding of the Musepack (MPC) audio compression
411 (license license:bsd-3)
412 (home-page "http://musepack.net")))
414 (define-public mpc123
420 (uri (string-append "mirror://sourceforge/mpc123/version%20"
421 version "/mpc123-" version ".tar.gz"))
424 "0sf4pns0245009z6mbxpx7kqy4kwl69bc95wz9v23wgappsvxgy1"))
425 (patches (search-patches "mpc123-initialize-ao.patch"))))
426 (build-system gnu-build-system)
428 '(#:phases (alist-replace
431 (substitute* "Makefile"
432 (("CC[[:blank:]]*:=.*")
436 (lambda* (#:key outputs #:allow-other-keys)
437 (let* ((out (assoc-ref outputs "out"))
438 (bin (string-append out "/bin")))
440 (install-file "mpc123" bin)))
445 `(("gettext" ,gnu-gettext)))
448 ("libmpcdec" ,libmpcdec)))
449 (home-page "http://mpc123.sourceforge.net/")
450 (synopsis "Audio player for Musepack-formatted files")
452 "Mpc123 is a command-line player for files in the Musepack audio
453 compression format (.mpc files).")
454 (license license:gpl2+)))
463 "http://eyed3.nicfit.net/releases/eyeD3-"
467 "1nv7nhfn1d0qm7rgkzksbccgqisng8klf97np0nwaqwd5dbmdf86"))))
468 (build-system python-build-system)
470 `(#:python ,python-2))
472 `(("python2-setuptools" ,python2-setuptools)
473 ("python2-nose" ,python2-nose)
474 ("python2-sphinx" ,python2-sphinx)
475 ("python2-coverage" ,python2-coverage)))
476 (synopsis "MP3 tag ID3 metadata editor")
477 (description "eyeD3 is a Python tool for working with audio files,
478 specifically mp3 files containing ID3 metadata (i.e. song info). It provides a
479 command-line tool (eyeD3) and a Python library (import eyed3) that can be used
480 to write your own applications or plugins that are callable from the
482 (home-page "http://eyed3.nicfit.net/")
483 (license license:gpl2+)))