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