diff options
author | Tony Vroon <chainsaw@gentoo.org> | 2006-04-17 21:29:36 +0000 |
---|---|---|
committer | Tony Vroon <chainsaw@gentoo.org> | 2006-04-17 21:29:36 +0000 |
commit | a55fead3a26e0ef684179b3bd8a677981ad315d8 (patch) | |
tree | 72a72d5524a5a52d624c46edc95566cc2eea9a6b /media-sound/mp3gain | |
parent | * bump (diff) | |
download | gentoo-2-a55fead3a26e0ef684179b3bd8a677981ad315d8.tar.gz gentoo-2-a55fead3a26e0ef684179b3bd8a677981ad315d8.tar.bz2 gentoo-2-a55fead3a26e0ef684179b3bd8a677981ad315d8.zip |
Respect user CFLAGS except for any -O flags as that causes segfaults on 48kHz files, closes bug #117266. Much improved option parser by Stephan Sokolow <from_gentoo_bugzilla@ssokolow.com>, closes bug #126104.
(Portage version: 2.1_pre7-r5)
Diffstat (limited to 'media-sound/mp3gain')
-rw-r--r-- | media-sound/mp3gain/ChangeLog | 12 | ||||
-rw-r--r-- | media-sound/mp3gain/Manifest | 35 | ||||
-rw-r--r-- | media-sound/mp3gain/files/1.4.6-option-parser.patch | 348 | ||||
-rw-r--r-- | media-sound/mp3gain/files/digest-mp3gain-1.4.6-r1 | 3 | ||||
-rw-r--r-- | media-sound/mp3gain/mp3gain-1.4.6-r1.ebuild | 39 |
5 files changed, 425 insertions, 12 deletions
diff --git a/media-sound/mp3gain/ChangeLog b/media-sound/mp3gain/ChangeLog index 7e955d285b1a..5239d114f96d 100644 --- a/media-sound/mp3gain/ChangeLog +++ b/media-sound/mp3gain/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for media-sound/mp3gain -# Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/mp3gain/ChangeLog,v 1.15 2005/11/20 21:18:01 chainsaw Exp $ +# Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/mp3gain/ChangeLog,v 1.16 2006/04/17 21:29:36 chainsaw Exp $ + +*mp3gain-1.4.6-r1 (17 Apr 2006) + + 17 Apr 2006; Tony Vroon <chainsaw@gentoo.org> + +files/1.4.6-option-parser.patch, +mp3gain-1.4.6-r1.ebuild: + Respect user CFLAGS except for any -O flags as that causes segfaults on + 48kHz files, closes bug #117266. Much improved option parser by Stephan + Sokolow <from_gentoo_bugzilla@ssokolow.com>, closes bug #126104. 20 Nov 2005; <chainsaw@gentoo.org> mp3gain-1.4.6.ebuild: Respect user CFLAGS & use proper CC, closes bug #113047. diff --git a/media-sound/mp3gain/Manifest b/media-sound/mp3gain/Manifest index 4fae5add2926..5011dd12f631 100644 --- a/media-sound/mp3gain/Manifest +++ b/media-sound/mp3gain/Manifest @@ -1,18 +1,33 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - MD5 23ee3d9d750991c8ef1d621954716d1f ChangeLog 1843 +RMD160 82a3d2c967016b5601e378dd47e15da8f410c8e5 ChangeLog 1843 +SHA256 6b99e49b907a11aee40441754c6c17a016734fce07f3f50d8d437de189dfeaf3 ChangeLog 1843 +MD5 566bad60943738cf9b8b382a631ade40 files/1.4.6-option-parser.patch 12346 +RMD160 a5c73d857a1b5100cce8beeb5f9c5fed9b4f4bd6 files/1.4.6-option-parser.patch 12346 +SHA256 ec572a32847901aae3804b32ae46fe5d0dc25505a9294a3945b96960ff56af97 files/1.4.6-option-parser.patch 12346 MD5 2cb475750ac933f3189041233d1d250e files/digest-mp3gain-1.4.3 66 +RMD160 0a98f80096eeedc9d060a064ba5a58b86e5a093e files/digest-mp3gain-1.4.3 66 +SHA256 4dfcde48f1ca9ca651e301e125ccca31711d38e7066272bff99d57922c84de7b files/digest-mp3gain-1.4.3 66 MD5 71c78a129e96365bed918bc9b5659547 files/digest-mp3gain-1.4.5 66 +RMD160 7956adfa958fca56260acfa3459ae016cfc3ce8c files/digest-mp3gain-1.4.5 66 +SHA256 d135f5ac9e0468fb14a16680673aec7588010702034bc368d49ec8f61d94e1d6 files/digest-mp3gain-1.4.5 66 MD5 e22b92b5f03b1c1ac2b4a33f54df7249 files/digest-mp3gain-1.4.6 66 +RMD160 0e9a63b6bc4087c27e1cb07310ae85238f1fbf95 files/digest-mp3gain-1.4.6 66 +SHA256 17186dd4c2e61d733d87221181a17e36d95ed3bb0e20743d1bea6ed07a281de6 files/digest-mp3gain-1.4.6 66 +MD5 470a7e4ea17b221fa476af29ca763599 files/digest-mp3gain-1.4.6-r1 244 +RMD160 d5467027bf976a62461f50485c21544bb9451aae files/digest-mp3gain-1.4.6-r1 244 +SHA256 64768320ac1d5a561eb399035ec09068a2fcad2f1ea26b60426a422283ee1835 files/digest-mp3gain-1.4.6-r1 244 MD5 319fe8f45b51a2d31f8d4e9a4071ca10 metadata.xml 248 +RMD160 f9de13e16a150195633b055ebe61bb4cea95160d metadata.xml 248 +SHA256 6a8ca116bded5cdd92cb700f92acd22b01ae159ef1b69c60a03fc9859bb9b3d6 metadata.xml 248 MD5 204786aa53423e8583f48da41b915518 mp3gain-1.4.3.ebuild 743 +RMD160 bde18e2c52ca6632294e29071d4e7c954e3ff875 mp3gain-1.4.3.ebuild 743 +SHA256 ef23c17c2b0090e5b3c32226bd69ad4a6bf71f9494788774de7ccea5ba2fe371 mp3gain-1.4.3.ebuild 743 MD5 da1bfaea7b754adcf542e1d9c55c4a9b mp3gain-1.4.5.ebuild 724 +RMD160 4de2a36a5df3b14adc7a5a84977cab82be864e77 mp3gain-1.4.5.ebuild 724 +SHA256 998946306c8b559ebc214475166eff4fc9a26476a1a47f6735d761a1c1fabf92 mp3gain-1.4.5.ebuild 724 +MD5 5cd3fc2d902b9e7f6e31cf6bddd6a5f0 mp3gain-1.4.6-r1.ebuild 802 +RMD160 98255de161d2a831b72c25dde9d8992fa0732c91 mp3gain-1.4.6-r1.ebuild 802 +SHA256 e53910dd5c175d7eaf21dcee346390972c5ee476a0ba6278b3d11bd0050b68dc mp3gain-1.4.6-r1.ebuild 802 MD5 7ae073d9d30800fef1bde46505feb4d6 mp3gain-1.4.6.ebuild 820 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.2-ecc0.1.6 (GNU/Linux) - -iD8DBQFDgOiEp5vW4rUFj5oRAs1oAKCjd00eyFsjzQ7of2Nm9C0XQ9FsfwCeMNp8 -bAC++Enloceb6dWbR8ozRZ8= -=9GnS ------END PGP SIGNATURE----- +RMD160 7d689f3a5105b5b5fe98dd90c12d2ffe4b5e9f4b mp3gain-1.4.6.ebuild 820 +SHA256 fca199995d0362e071f046f5bc82230a3a6b81f18932a816af0313d8d6f176e9 mp3gain-1.4.6.ebuild 820 diff --git a/media-sound/mp3gain/files/1.4.6-option-parser.patch b/media-sound/mp3gain/files/1.4.6-option-parser.patch new file mode 100644 index 000000000000..7b4085e9abda --- /dev/null +++ b/media-sound/mp3gain/files/1.4.6-option-parser.patch @@ -0,0 +1,348 @@ +--- mp3gain.c.old 2004-12-23 15:47:04.000000000 -0500 ++++ mp3gain.c 2006-03-13 22:15:28.000000000 -0500 +@@ -46,7 +46,8 @@ +
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include <math.h>
++#include <math.h> ++#include <ctype.h>
+ #include "apetag.h"
+
+ #ifndef WIN32
+@@ -1181,10 +1182,11 @@ + static
+ void errUsage(char *progname) {
+ showVersion(progname);
+- fprintf(stderr,"copyright(c) 2001-2004 by Glen Sawyer\n");
++ fprintf(stderr,"copyright(c) 2001-2004 by Glen Sawyer\n"); ++ fprintf(stderr,"portions copyright(c) 2006 by Stephan Sokolow\n");
+ fprintf(stderr,"uses mpglib, which can be found at http://www.mpg123.de\n");
+ fprintf(stderr,"Usage: %s [options] <infile> [<infile 2> ...]\n",progname);
+- fprintf(stderr," --use %c? or %ch for a full list of options\n",SWITCH_CHAR,SWITCH_CHAR);
++ fprintf(stderr," --use %c?, %ch, or --help for a full list of options\n",SWITCH_CHAR,SWITCH_CHAR);
+ fclose(stdout);
+ fclose(stderr);
+ exit(1);
+@@ -1195,7 +1197,8 @@ + static
+ void fullUsage(char *progname) {
+ showVersion(progname);
+- fprintf(stderr,"copyright(c) 2001-2004 by Glen Sawyer\n");
++ fprintf(stderr,"copyright(c) 2001-2004 by Glen Sawyer\n"); ++ fprintf(stderr,"portions copyright(c) 2006 by Stephan Sokolow\n");
+ fprintf(stderr,"uses mpglib, which can be found at http://www.mpg123.de\n");
+ fprintf(stderr,"Usage: %s [options] <infile> [<infile 2> ...]\n",progname);
+ fprintf(stderr,"options:\n");
+@@ -1227,9 +1230,14 @@ + fprintf(stderr,"\t%cs d - delete stored tag info (no other processing)\n",SWITCH_CHAR);
+ fprintf(stderr,"\t%cs s - skip (ignore) stored tag info (do not read or write tags)\n",SWITCH_CHAR);
+ fprintf(stderr,"\t%cs r - force re-calculation (do not read tag info)\n",SWITCH_CHAR);
+- fprintf(stderr,"\t%cu - undo changes made by mp3gain (based on stored tag info)\n",SWITCH_CHAR);
+- fprintf(stderr,"\t%cw - \"wrap\" gain change if gain+change > 255 or gain+change < 0\n",SWITCH_CHAR);
+- fprintf(stderr,"\t (use \"%c? wrap\" switch for a complete explanation)\n",SWITCH_CHAR);
++ fprintf(stderr,"\t%cu - undo changes made by mp3gain (based on stored tag info)\n",SWITCH_CHAR); ++ fprintf(stderr,"\t%cw - \"wrap\" gain change if gain+change > 255 or gain+change < 0\n",SWITCH_CHAR); ++ fprintf(stderr,"\t (use \"%c? wrap\" switch for a complete explanation)\n",SWITCH_CHAR); ++ fprintf(stderr,"\t-- - force everything beyond this point to be treated as arguments.\n"); ++ fprintf(stderr,"long options:\n"); ++ fprintf(stderr,"\t--auto - same as %cr %ck %cp\n", SWITCH_CHAR, SWITCH_CHAR, SWITCH_CHAR); ++ fprintf(stderr,"\t--help - show this message\n"); ++ fprintf(stderr,"\t--recursive - TODO\n");
+ fprintf(stderr,"If you specify %cr and %ca, only the second one will work\n",SWITCH_CHAR,SWITCH_CHAR);
+ fprintf(stderr,"If you do not specify %cc, the program will stop and ask before\n applying gain change to a file that might clip\n",SWITCH_CHAR);
+ fclose(stdout);
+@@ -1245,7 +1253,20 @@ + fprintf(stderr, "haveTrackPeak %d trackPeak %f\n",info->haveTrackPeak, info->trackPeak);
+ fprintf(stderr, "haveMinMaxGain %d min %d max %d\n",info->haveMinMaxGain, info->minGain, info->maxGain);
+ }
+-
++ ++void showHelp(int argc, char **argv, int i) { ++ if ((argv[i][2] == 'w')||(argv[i][2] == 'W')) { ++ wrapExplanation(); ++ } else { ++ if (i+1 < argc) { ++ if ((argv[i+1][0] == 'w')||(argv[i+1][0] =='W')) ++ wrapExplanation(); ++ } else { ++ fullUsage(argv[0]); ++ } ++ } ++ fullUsage(argv[0]); ++} +
+ #ifdef WIN32
+ int __cdecl main(int argc, char **argv) { /*make sure this one is standard C declaration*/
+@@ -1282,7 +1303,7 @@ + int fileStart;
+ int numFiles;
+ int databaseFormat = 0;
+- int i;
++ int i, j;
+ int *fileok;
+ int goAhead;
+ int directGain = 0;
+@@ -1303,7 +1324,10 @@ + double curAlbumPeak = 0;
+ unsigned char curAlbumMinGain = 0;
+ unsigned char curAlbumMaxGain = 0;
+- char chtmp;
++ char chtmp; ++ ++ /* Variables used in the improved option parser */ ++ int parseOptions = !0;
+
+ gSuccess = 1;
+
+@@ -1316,28 +1340,28 @@ + fileStart = 1;
+ numFiles = 0;
+
+- for (i = 1; i < argc; i++) {
+-#ifdef WIN32
+- if ((argv[i][0] == '/')||((argv[i][0] == '-') && (strlen(argv[i])==2))) { /* don't need to force single-character command parameters */
+-#else
+- if (((argv[i][0] == '/')||(argv[i][0] == '-'))&&
+- (strlen(argv[i])==2)) {
+-#endif
+- fileStart++;
+- switch(argv[i][1]) {
+- case 'a':
+- case 'A':
++ for (i = 1; i < argc; i++) { ++ /* ++ TODO: Implement support for: ++ - consider including the glob-parsing support from vorbisgain's so-called recursive support. ++ */ ++ if ((parseOptions) && (argv[i][0] == SWITCH_CHAR) && (strlen(argv[i]) >= 2) ) {
++ fileStart++; ++ ++ if (!strcmp(argv[i],"--")) { /* Support for the standard "--" option to force the end of the option parsing. */ ++ parseOptions = 0; ++ continue; ++ } else if (argv[i][1] != '-') { /* Ensure that this isn't a long option. */ ++ for (j = 1; j < strlen(argv[i]); j++) { ++ switch(tolower(argv[i][j])) {
++ case 'a':
+ applyTrack = 0;
+ applyAlbum = !0;
+ break;
+-
+- case 'c':
+- case 'C':
++ case 'c':
+ ignoreClipWarning = !0;
+ break;
+-
+- case 'd':
+- case 'D':
++ case 'd':
+ if (argv[i][2] != '\0') {
+ dBGainMod = atof(argv[i]+2);
+ }
+@@ -1352,14 +1376,10 @@ + }
+ }
+ break;
+-
+- case 'f':
+- case 'F':
++ case 'f':
+ Reckless = 1;
+ break;
+-
+- case 'g':
+- case 'G':
++ case 'g':
+ directGain = !0;
+ directSingleChannelGain = 0;
+ if (argv[i][2] != '\0') {
+@@ -1376,32 +1396,14 @@ + }
+ }
+ break;
+-
+- case 'h':
+- case 'H':
+- case '?':
+- if ((argv[i][2] == 'w')||(argv[i][2] == 'W')) {
+- wrapExplanation();
+- }
+- else {
+- if (i+1 < argc) {
+- if ((argv[i+1][0] == 'w')||(argv[i+1][0] =='W'))
+- wrapExplanation();
+- }
+- else {
+- fullUsage(argv[0]);
+- }
+- }
+- fullUsage(argv[0]);
+- break;
+-
+- case 'k':
+- case 'K':
+- autoClip = !0;
+- break;
+-
+- case 'l':
+- case 'L':
++ case 'h':
++ case '?':
++ showHelp(argc, argv, i); ++ break;
++ case 'k':
++ autoClip = !0;
++ break;
++ case 'l':
+ directSingleChannelGain = !0;
+ directGain = 0;
+ if (argv[i][2] != '\0') {
+@@ -1429,9 +1431,7 @@ + }
+ }
+ break;
+-
+- case 'm':
+- case 'M':
++ case 'm':
+ if (argv[i][2] != '\0') {
+ mp3GainMod = atoi(argv[i]+2);
+ }
+@@ -1446,30 +1446,20 @@ + }
+ }
+ break;
+-
+- case 'o':
+- case 'O':
++ case 'o':
+ databaseFormat = !0;
+ break;
+-
+- case 'p':
+- case 'P':
++ case 'p':
+ saveTime = !0;
+ break;
+-
+- case 'q':
+- case 'Q':
++ case 'q':
+ QuietMode = !0;
+ break;
+-
+- case 'r':
+- case 'R':
++ case 'r':
+ applyTrack = !0;
+ applyAlbum = 0;
+ break;
+-
+- case 's':
+- case 'S':
++ case 's':
+ chtmp = 0;
+ if (argv[i][2] == '\0') {
+ if (i+1 < argc) {
+@@ -1482,59 +1472,56 @@ + } else {
+ chtmp = argv[i][2];
+ }
+- switch (chtmp) {
+- case 'c':
+- case 'C':
+- checkTagOnly = !0;
+- break;
+- case 'd':
+- case 'D':
+- deleteTag = !0;
+- break;
+- case 's':
+- case 'S':
+- skipTag = !0;
+- break;
+- case 'r':
+- case 'R':
+- forceRecalculateTag = !0;
+- break;
+- default:
+- errUsage(argv[0]);
+- }
+-
+- break;
+-
+- case 't':
+- case 'T':
++ switch (tolower(chtmp)) {
++ case 'c':
++ checkTagOnly = !0;
++ break;
++ case 'd':
++ deleteTag = !0;
++ break;
++ case 's':
++ skipTag = !0;
++ break;
++ case 'r':
++ forceRecalculateTag = !0;
++ break;
++ default:
++ errUsage(argv[0]);
++ }
++ break;
++ case 't':
+ UsingTemp = !0;
+ break;
+-
+- case 'u':
+- case 'U':
++ case 'u':
+ undoChanges = !0;
+ break;
+-
+- case 'v':
+- case 'V':
++ case 'v':
+ showVersion(argv[0]);
+- fclose(stdout);
+- fclose(stderr);
++ fclose(stdout);
++ fclose(stderr);
+ exit(0);
+-
+- case 'w':
+- case 'W':
++ case 'w':
+ wrapGain = !0;
+ break;
+-
+- case 'x':
+- case 'X':
++ case 'x':
+ maxAmpOnly = !0;
+ break;
+-
+- default:
+- fprintf(stderr,"I don't recognize option %s\n",argv[i]);
+- }
++ default:
++ fprintf(stderr,"I don't recognize option %s\n",argv[i]); ++ } ++ }
++ } else if (!strncmp(argv[i],"--",2)) { /* This is a long option and must be parsed as such */ ++ if (!strcasecmp(argv[i],"--auto")) { ++ autoClip = !0; /* -k */ ++ saveTime = !0; /* -p */ ++ applyTrack = !0; /* -r */ ++ applyAlbum = 0; /* -r */ ++ } else if (!strcasecmp(argv[i],"--help")) { ++ showHelp(argc, argv, i); ++ } else if (!strcasecmp(argv[i],"--recursive")) { ++ fprintf(stderr,"Sorry, --recursive has not been implemented yet.\n\t However, the following command seems to be equivalent:\n\t`find /path/to/mp3s -iname \"*.mp3\" -exec mp3gain -r {} \\;`\n\tThe use of --auto in place of -r is recommended.\n"); ++ } ++ }
+ }
+ }
+ /* now stored in tagInfo--- maxsample = malloc(sizeof(Float_t) * argc); */
diff --git a/media-sound/mp3gain/files/digest-mp3gain-1.4.6-r1 b/media-sound/mp3gain/files/digest-mp3gain-1.4.6-r1 new file mode 100644 index 000000000000..9f76a9a0781b --- /dev/null +++ b/media-sound/mp3gain/files/digest-mp3gain-1.4.6-r1 @@ -0,0 +1,3 @@ +MD5 4327167375dce5bce97625729a95fdb9 mp3gain-1_4_6-src.zip 111408 +RMD160 e9e340afee84706f434b24be2299c11e641666e3 mp3gain-1_4_6-src.zip 111408 +SHA256 e1ad9aeb18403cf9ea54af830e1371523d6d5373bfef01a8964e3735deaf7d4f mp3gain-1_4_6-src.zip 111408 diff --git a/media-sound/mp3gain/mp3gain-1.4.6-r1.ebuild b/media-sound/mp3gain/mp3gain-1.4.6-r1.ebuild new file mode 100644 index 000000000000..2af235b9e6b3 --- /dev/null +++ b/media-sound/mp3gain/mp3gain-1.4.6-r1.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/mp3gain/mp3gain-1.4.6-r1.ebuild,v 1.1 2006/04/17 21:29:36 chainsaw Exp $ + +inherit eutils flag-o-matic toolchain-funcs + +IUSE="" + +MY_P=${P//./_} +S=${WORKDIR} + +DESCRIPTION="MP3Gain automatically adjusts mp3s so that they all have the same volume" +HOMEPAGE="http://mp3gain.sourceforge.net" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}-src.zip" + +SLOT="0" +LICENSE="LGPL-2.1" +KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86" + +RDEPEND="virtual/libc" +DEPEND="${RDEPEND} + app-arch/unzip" + +src_unpack() { + unpack ${A} + cd ${S} + + filter-flags -O* + sed -i -e "s:-Wall -O3 -DHAVE_MEMCPY:-Wall ${CFLAGS} -DHAVE_MEMCPY:" ${S}/Makefile + epatch ${FILESDIR}/${PV}-option-parser.patch +} + +src_compile() { + emake CC="$(tc-getCC)" || die "Compile failed" +} + +src_install () { + dobin mp3gain +} |