summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Alfredsen <loki_val@gentoo.org>2009-05-03 13:38:17 +0000
committerPeter Alfredsen <loki_val@gentoo.org>2009-05-03 13:38:17 +0000
commit83688e9499702bf94cb1786282a2895c87195510 (patch)
tree8533849f2935fe2b04d59cccb4a89a8277f392f8 /media-sound/lame
parentstable ppc64, bug 268208 (diff)
downloadhistorical-83688e9499702bf94cb1786282a2895c87195510.tar.gz
historical-83688e9499702bf94cb1786282a2895c87195510.tar.bz2
historical-83688e9499702bf94cb1786282a2895c87195510.zip
Backport fix from upstream so ffmpeg won't choke on libmp3lame. Bug 265830.
Package-Manager: portage-2.2_rc28/cvs/Linux x86_64
Diffstat (limited to 'media-sound/lame')
-rw-r--r--media-sound/lame/ChangeLog9
-rw-r--r--media-sound/lame/Manifest4
-rw-r--r--media-sound/lame/files/lame-3.98.2-ffmpeg-0.5.patch86
-rw-r--r--media-sound/lame/lame-3.98.2-r1.ebuild85
4 files changed, 182 insertions, 2 deletions
diff --git a/media-sound/lame/ChangeLog b/media-sound/lame/ChangeLog
index 00d773a7fa6b..a07fdacc746b 100644
--- a/media-sound/lame/ChangeLog
+++ b/media-sound/lame/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for media-sound/lame
# Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/lame/ChangeLog,v 1.109 2009/03/29 17:14:16 beandog Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/lame/ChangeLog,v 1.110 2009/05/03 13:38:17 loki_val Exp $
+
+*lame-3.98.2-r1 (03 May 2009)
+
+ 03 May 2009; Peter Alfredsen <loki_val@gentoo.org>
+ +files/lame-3.98.2-ffmpeg-0.5.patch, +lame-3.98.2-r1.ebuild:
+ Backport fix from upstream so ffmpeg won't choke on libmp3lame. Bug
+ 265830.
29 Mar 2009; Steve Dibb <beandog@gentoo.org> lame-3.98.ebuild:
amd64 stable
diff --git a/media-sound/lame/Manifest b/media-sound/lame/Manifest
index 8f9a76ff54a6..ce13e2244b41 100644
--- a/media-sound/lame/Manifest
+++ b/media-sound/lame/Manifest
@@ -7,11 +7,13 @@ AUX lame-3.98-gtk-path.patch 8606 RMD160 8bca3b986edf75853bfaee6837f9eb4832b664f
AUX lame-3.98-pic-fix.patch 14804 RMD160 443e4b1fc6a54be4d2c356ea7b4cc857f26b2a1c SHA1 551d364c34c30f6486b034f6e0789247450aae95 SHA256 f77ededd6e067a4d47ad49a0fa939290de5b248ef83a4b8a1aba52dbb0649381
AUX lame-3.98-shared-frontend.patch 1008 RMD160 8e12e752a325926e1376e45ffd3b72cac61ebf4a SHA1 af371fe673e42c4ba2e6e07255d6196d76d8ef79 SHA256 fb40bfb00e47964acbe0de428cc7a3e4b3a0e0ade120bf547891bf78031f6916
AUX lame-3.98-stdint.patch 651 RMD160 84a732f356ac05941d90c2a261f9d624fc38bc5b SHA1 b4ebe2a3e8c343180b7d82e2bd2edb81a7c0d1bd SHA256 2fc25342cf5b5d5fd465c76f7899b0276e6e9f21b948f6005de0724a35dcc567
+AUX lame-3.98.2-ffmpeg-0.5.patch 2950 RMD160 71628a5b2d9ac7365ccbac3dbf3de7cea6006b5d SHA1 1f7c0a6c90bdc133921f999f1ed0855e95d39a5a SHA256 f9de77da233d81485463cf6c51a3b7ff21be78b17f7d91741532f9a9f5577500
DIST lame-3.97.tar.gz 1328058 RMD160 5c4cf02c0f4e10c4cd2ab610d62478b554cd0873 SHA1 acf56065f4e31ce023b0f99002d537adb1ec09df SHA256 0a2334a6d11085298a9a3c46d5d310cca012f2e61d6efae90840a76a364dbe17
DIST lame-398-2.tar.gz 1327643 RMD160 767dd94271eef221170469535db2bf388149715a SHA1 b2db41dbc9c0824caa102e8c932b820c79ccd5ec SHA256 a17a28569d8ed1e514915c1f12bdf4eedac506e5fbdf9a429ba97d5d42c9af32
DIST lame-398.tar.gz 1415983 RMD160 754343791ac80d2403291c63f99eb409bca6b62f SHA1 287979d076834882c99d0cc01ddbd9b3697ceaae SHA256 8396bcb425ddcbfb8027d5712fa8878a2257006ccbe3ac7a772e1652e43d19b1
EBUILD lame-3.97-r1.ebuild 2346 RMD160 640321c290688319b76aa9af77c455663876a0a5 SHA1 324c0c257957ea16a3d0d71d328adc4aaab92194 SHA256 d518c0d5494dcfd88dff9da0111619fc15fc3cc1da99140a06d3fbf83b14ebce
+EBUILD lame-3.98.2-r1.ebuild 2588 RMD160 0e861e03f888d6fff95899366d4301356e0ba3a5 SHA1 2f72d95c1e602e83bf202f49527e7cae27fe04dd SHA256 04b939f5a95abef8c849dc86c76b3bb8845329ebc61303072d0012490b83b8c3
EBUILD lame-3.98.2.ebuild 2487 RMD160 480899b5d010590bffda719c4ec7c87436f5aaef SHA1 5b4d56364722e36a9ed6acd78e9a5471a4e7d49e SHA256 6f1371b7a71f64eda8f77f98422931b73f936ca58ac2bfbe48f299fe9f6a7a5a
EBUILD lame-3.98.ebuild 2900 RMD160 1115408b86138ee84e0ea96013b4d1c07f799ab1 SHA1 864bf23db9e04cd7bfd56d96325c7aaabd20e89e SHA256 5b06c3416d3361cc5403ddf9c5fbc66274b7f09a8b4fb696f5fb74dbf1a21797
-MISC ChangeLog 15067 RMD160 40884844673215cfeabf0255fef7dd564ce39c03 SHA1 86208f264bf43baeb237ce2552fb9bd254054c57 SHA256 6dfe0efe1e10c9e1513ac6a4552f84a77b1b08b7098edf225c861ef5cc0923d5
+MISC ChangeLog 15296 RMD160 746a86b5da97c2da4da758059362dd16d3e89e22 SHA1 9b7c7280c689edae5255514b5034a60b92fa4ded SHA256 8f04cc40458907c3d55be50d086ad0e523b6d66a4d662823e758cae9f08d8c79
MISC metadata.xml 264 RMD160 a6be36fe4dffbf9280e34fafcf40571d0f960580 SHA1 7e6bff4996ab638c7e04e31197d3b45f9752c00f SHA256 69ff3c8176be87b9e058cf261280c392e026742616602914b8ee3e3b6eaa2280
diff --git a/media-sound/lame/files/lame-3.98.2-ffmpeg-0.5.patch b/media-sound/lame/files/lame-3.98.2-ffmpeg-0.5.patch
new file mode 100644
index 000000000000..30528c7db95f
--- /dev/null
+++ b/media-sound/lame/files/lame-3.98.2-ffmpeg-0.5.patch
@@ -0,0 +1,86 @@
+diff -NrU5 lame-398-2.orig/libmp3lame/lame.c lame-398-2/libmp3lame/lame.c
+--- lame-398-2.orig/libmp3lame/lame.c 2009-05-03 15:16:40.000000000 +0200
++++ lame-398-2/libmp3lame/lame.c 2009-05-03 15:24:49.000000000 +0200
+@@ -1600,10 +1600,17 @@
+ in_buffer[1] += n_in;
+
+ /* update mfbuf[] counters */
+ gfc->mf_size += n_out;
+ assert(gfc->mf_size <= MFSIZE);
++
++ /* lame_encode_flush may have set gfc->mf_sample_to_encode to 0
++ * so we have to reinitialize it here when that happened.
++ */
++ if (gfc->mf_samples_to_encode < 1) {
++ gfc->mf_samples_to_encode = ENCDELAY + POSTDELAY;
++ }
+ gfc->mf_samples_to_encode += n_out;
+
+
+ if (gfc->mf_size >= mf_needed) {
+ /* encode the frame. */
+@@ -1929,10 +1936,14 @@
+ int end_padding = POSTDELAY;
+ int pad_out_samples;
+ int frames_left;
+ int samples_to_encode = gfc->mf_samples_to_encode;
+
++ /* Was flush already called? */
++ if (gfc->mf_samples_to_encode < 1) {
++ return 0;
++ }
+ memset(buffer, 0, sizeof(buffer));
+ mp3count = 0;
+
+ if (gfp->in_samplerate != gfp->out_samplerate) {
+ /* delay due to resampling; needs to be fixed, if resampling code gets changed */
+@@ -1940,35 +1951,38 @@
+ }
+ pad_out_samples = gfp->framesize - (samples_to_encode % gfp->framesize);
+ end_padding += pad_out_samples;
+
+ frames_left = (samples_to_encode + pad_out_samples) / gfp->framesize;
+- while (frames_left > 0) {
++
++ /* send in a frame of 0 padding until all internal sample buffers are flushed */
++ while (frames_left > 0 && imp3 >= 0) {
+ int frame_num = gfp->frameNum;
+
+ mp3buffer_size_remaining = mp3buffer_size - mp3count;
+
+ /* if user specifed buffer size = 0, dont check size */
+ if (mp3buffer_size == 0)
+ mp3buffer_size_remaining = 0;
+
+- /* send in a frame of 0 padding until all internal sample buffers
+- * are flushed
+- */
+ imp3 = lame_encode_buffer(gfp, buffer[0], buffer[1], 32,
+ mp3buffer, mp3buffer_size_remaining);
+
+- if (frame_num != gfp->frameNum) {
+- --frames_left;
+- }
+- if (imp3 < 0) {
+- /* some type of fatal error */
+- return imp3;
+- }
+ mp3buffer += imp3;
+ mp3count += imp3;
++ frames_left -= (frame_num != gfp->frameNum) ? 1 : 0;
+ }
++ /* Set gfc->mf_samples_to_encode to 0, so we may detect
++ * and break loops calling it more than once in a row.
++ */
++ gfc->mf_samples_to_encode = 0;
++
++ if (imp3 < 0) {
++ /* some type of fatal error */
++ return imp3;
++ }
++
+ mp3buffer_size_remaining = mp3buffer_size - mp3count;
+ /* if user specifed buffer size = 0, dont check size */
+ if (mp3buffer_size == 0)
+ mp3buffer_size_remaining = 0;
+
diff --git a/media-sound/lame/lame-3.98.2-r1.ebuild b/media-sound/lame/lame-3.98.2-r1.ebuild
new file mode 100644
index 000000000000..5e8148ecb906
--- /dev/null
+++ b/media-sound/lame/lame-3.98.2-r1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/lame/lame-3.98.2-r1.ebuild,v 1.1 2009/05/03 13:38:17 loki_val Exp $
+
+inherit flag-o-matic toolchain-funcs eutils autotools versionator
+
+DESCRIPTION="LAME Ain't an MP3 Encoder"
+HOMEPAGE="http://lame.sourceforge.net"
+
+MY_PV=$(replace_version_separator 1 '')
+[ ${MY_PV/.} = ${MY_PV} ] || MY_PV=$(replace_version_separator 1 '-' ${MY_PV})
+S=${WORKDIR}/${PN}-${MY_PV}
+SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="debug mmx mp3rtp sndfile"
+
+RDEPEND=">=sys-libs/ncurses-5.2
+ sndfile? ( >=media-libs/libsndfile-1.0.2 )"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ mmx? ( dev-lang/nasm )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # The frontened tries to link staticly, but we prefer shared libs
+ epatch "${FILESDIR}"/${PN}-3.98-shared-frontend.patch
+
+ # If ccc (alpha compiler) is installed on the system, the default
+ # configure is broken, fix it to respect CC. This is only
+ # directly broken for ARCH=alpha but would affect anybody with a
+ # ccc binary in their PATH. Bug #41908 (26 Jul 2004 agriffis)
+ epatch "${FILESDIR}"/${PN}-3.96-ccc.patch
+
+ # Patch gtk stuff, otherwise eautoreconf dies
+ epatch "${FILESDIR}"/${PN}-3.98-gtk-path.patch
+
+ # Fix for ffmpeg-0.5, bug 265830
+ epatch "${FILESDIR}"/${PN}-3.98.2-ffmpeg-0.5.patch
+
+ # It fails parallel make otherwise when enabling nasm...
+ mkdir "${S}/libmp3lame/i386/.libs" || die
+
+ AT_M4DIR="${S}" eautoreconf
+ epunt_cxx # embedded bug #74498
+}
+
+src_compile() {
+ use sndfile && myconf="--with-fileio=sndfile"
+ # The user sets compiler optimizations... But if you'd like
+ # lame to choose it's own... uncomment one of these (experiMENTAL)
+ # myconf="${myconf} --enable-expopt=full \
+ # myconf="${myconf} --enable-expopt=norm \
+
+ econf \
+ --enable-shared \
+ $(use_enable debug debug norm) \
+ --disable-mp3x \
+ $(use_enable mmx nasm) \
+ $(use_enable mp3rtp) \
+ ${myconf} || die "econf failed"
+
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" pkghtmldir="/usr/share/doc/${PF}/html" install || die
+
+ dodoc API ChangeLog HACKING README* STYLEGUIDE TODO USAGE || die
+ dohtml misc/lameGUI.html Dll/LameDLLInterface.htm || die
+
+ dobin "${S}"/misc/mlame || die
+}
+
+pkg_postinst(){
+ if use mp3rtp ; then
+ ewarn "Warning, support for the encode-to-RTP program, 'mp3rtp'"
+ ewarn "is broken as of August 2001."
+ ewarn " "
+ fi
+}