diff options
author | Kito Danya Dietrich <kito@gentoo.org> | 2004-11-13 07:07:03 +0000 |
---|---|---|
committer | Kito Danya Dietrich <kito@gentoo.org> | 2004-11-13 07:07:03 +0000 |
commit | dd06ef1ceb60f0a056cb7c09279982424fc1a2e3 (patch) | |
tree | 1d5efedf89b34d80c4ac27d4a7dfd1d8126e3fbd | |
parent | sh KEYWORDS (Manifest recommit) (diff) | |
download | gentoo-2-dd06ef1ceb60f0a056cb7c09279982424fc1a2e3.tar.gz gentoo-2-dd06ef1ceb60f0a056cb7c09279982424fc1a2e3.tar.bz2 gentoo-2-dd06ef1ceb60f0a056cb7c09279982424fc1a2e3.zip |
added patch from FreeBSD ports. Fixes mem leaks and minor display bugs. ~ppc-macos
-rw-r--r-- | media-sound/mpg321/ChangeLog | 6 | ||||
-rw-r--r-- | media-sound/mpg321/Manifest | 15 | ||||
-rw-r--r-- | media-sound/mpg321/files/digest-mpg321-0.2.10-r2 | 1 | ||||
-rw-r--r-- | media-sound/mpg321/files/mpg321-0.2.10.diff | 73 | ||||
-rw-r--r-- | media-sound/mpg321/mpg321-0.2.10-r2.ebuild | 53 |
5 files changed, 136 insertions, 12 deletions
diff --git a/media-sound/mpg321/ChangeLog b/media-sound/mpg321/ChangeLog index 582bb3624a71..27671f20041c 100644 --- a/media-sound/mpg321/ChangeLog +++ b/media-sound/mpg321/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-sound/mpg321 # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/mpg321/ChangeLog,v 1.22 2004/10/30 10:41:14 eradicator Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/mpg321/ChangeLog,v 1.23 2004/11/13 07:07:03 kito Exp $ + + 13 Nov 2004; Kito <kito@gentoo.org> : + added patch from FreeBSD ports. Fixes mem leaks and minor display bugs. + ~ppc-macos keyword 30 Oct 2004; Jeremy Huddleston <eradicator@gentoo.org> mpg321-0.2.10-r1.ebuild: diff --git a/media-sound/mpg321/Manifest b/media-sound/mpg321/Manifest index 2805cce7ef01..3882bd716c72 100644 --- a/media-sound/mpg321/Manifest +++ b/media-sound/mpg321/Manifest @@ -1,15 +1,8 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -MD5 76b8485e766a1a57d9b5cc78c5491879 ChangeLog 3054 +MD5 7a74da38b92350fa0121365b5cac3b81 ChangeLog 3190 MD5 a1eaeb2ae801daeb712c90c060e922dc metadata.xml 158 MD5 47d3b727e70d2c122332f0c651321cc5 mpg321-0.2.10-r1.ebuild 1413 +MD5 bc429ec5d281651d59f7525eb7f136bd mpg321-0.2.10-r2.ebuild 1506 MD5 7f4e867ab9a86c4f3618228fdccc48f4 files/digest-mpg321-0.2.10-r1 65 +MD5 7f4e867ab9a86c4f3618228fdccc48f4 files/digest-mpg321-0.2.10-r2 65 MD5 f69e111b891dc01d56fb394621897e0d files/mpg321-0.1.5-ao.diff 7909 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.2.6 (GNU/Linux) - -iD8DBQFBg2/jArHZZzCEUG0RApC4AKCINbgXzSx16igu/zQoO0QB/ehlPgCfVloH -/1ACNyek9qDG9yJEqiUqppU= -=Cuh+ ------END PGP SIGNATURE----- +MD5 330f91ff24a94b674063b6fc2d0e04af files/mpg321-0.2.10.diff 1862 diff --git a/media-sound/mpg321/files/digest-mpg321-0.2.10-r2 b/media-sound/mpg321/files/digest-mpg321-0.2.10-r2 new file mode 100644 index 000000000000..7332a87bdc5f --- /dev/null +++ b/media-sound/mpg321/files/digest-mpg321-0.2.10-r2 @@ -0,0 +1 @@ +MD5 bb403b35c2d25655d55f0f616b8f47bb mpg321-0.2.10.tar.gz 113449 diff --git a/media-sound/mpg321/files/mpg321-0.2.10.diff b/media-sound/mpg321/files/mpg321-0.2.10.diff new file mode 100644 index 000000000000..dace5b33dde9 --- /dev/null +++ b/media-sound/mpg321/files/mpg321-0.2.10.diff @@ -0,0 +1,73 @@ +diff -uNr mpg321-0.2.10/mpg321.c mpg321-0.2.10-new/mpg321.c +--- mpg321-0.2.10/mpg321.c Sat Mar 23 23:49:20 2002 ++++ mpg321-0.2.10-new/mpg321.c Sat Nov 13 00:50:25 2004 +@@ -188,7 +188,7 @@ + + else + { +- printf(names[i]); ++ printf("%s", names[i]); + free(names[i]); + } + } +@@ -203,7 +203,7 @@ + if (!names[i]) { + fprintf (stderr, emptystring); + } else { +- fprintf (stderr, names[i]); ++ fprintf (stderr, "%s", names[i]); + free (names[i]); + } + if (i%2) fprintf (stderr, "\n"); +@@ -410,12 +410,14 @@ + + if(fstat(fd, &stat) == -1) + { ++ close(fd); + mpg321_error(currentfile); + continue; + } + + if (!S_ISREG(stat.st_mode)) + { ++ close(fd); + continue; + } + +@@ -432,6 +434,7 @@ + if((playbuf.buf = mmap(0, playbuf.length, PROT_READ, MAP_SHARED, fd, 0)) + == MAP_FAILED) + { ++ close(fd); + mpg321_error(currentfile); + continue; + } +@@ -509,9 +512,6 @@ + + mad_decoder_finish(&decoder); + +- if (quit_now) +- break; +- + if (playbuf.frames) + free(playbuf.frames); + +@@ -521,6 +521,7 @@ + if (playbuf.fd == -1) + { + munmap(playbuf.buf, playbuf.length); ++ close(fd); + } + + else +@@ -535,10 +536,6 @@ + ao_close(playdevice); + + ao_shutdown(); +- +-#if defined(RAW_SUPPORT) || defined(HTTP_SUPPORT) || defined(FTP_SUPPORT) +- if(fd) close(fd); +-#endif + + return(0); + } diff --git a/media-sound/mpg321/mpg321-0.2.10-r2.ebuild b/media-sound/mpg321/mpg321-0.2.10-r2.ebuild new file mode 100644 index 000000000000..01d44c000567 --- /dev/null +++ b/media-sound/mpg321/mpg321-0.2.10-r2.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/mpg321/mpg321-0.2.10-r2.ebuild,v 1.3 2004/11/13 07:07:03 kito Exp $ + +inherit eutils + +IUSE="" + +DESCRIPTION="Free MP3 player, drop-in replacement for mpg123" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" +HOMEPAGE="http://sourceforge.net/projects/mpg321/" + +DEPEND="media-libs/libmad + media-libs/libid3tag + >=media-libs/libao-0.8.0" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="-amd64 -x86 -ppc -sparc -mips -alpha -ppc64 ~ppc-macos" + +PROVIDE="virtual/mpg123" + +src_unpack() { + unpack ${A} + epatch ${FILESDIR}/${P}.diff +} + +src_compile() { + # disabling the symlink here and doing it in postinst is better for GRP + econf --disable-mpg123-symlink || die + emake || die +} + +src_install () { + make DESTDIR=${D} install || die + dodoc AUTHORS BUGS COPYING ChangeLog HACKING INSTALL NEWS README README.remote THANKS TODO +} + +pkg_postinst() { + # We create a symlink for /usr/bin/mpg123 if it doesn't already exist + if ! [ -f ${ROOT}/usr/bin/mpg123 ]; then + ln -s mpg321 ${ROOT}/usr/bin/mpg123 + fi +} + +pkg_postrm() { + # We delete the symlink if it's nolonger valid. + if [ -L "${ROOT}/usr/bin/mpg123" ] && [ ! -x "${ROOT}/usr/bin/mpg123" ]; then + einfo "We are removing the ${ROOT}/usr/bin/mpg123 symlink since it is no longer valid." + einfo "If you are using another virtual/mpg123 program, you should setup the appropriate symlink." + rm ${ROOT}/usr/bin/mpg123 + fi +}
\ No newline at end of file |