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