summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-video')
-rw-r--r--media-video/ffmpeg/ChangeLog7
-rw-r--r--media-video/ffmpeg/ffmpeg-0.4.9_p20051216.ebuild21
-rw-r--r--media-video/ffmpeg/files/ffmpeg-shared-gcc4.patch40
3 files changed, 64 insertions, 4 deletions
diff --git a/media-video/ffmpeg/ChangeLog b/media-video/ffmpeg/ChangeLog
index 07f6978eeb6b..97a418e5eaa5 100644
--- a/media-video/ffmpeg/ChangeLog
+++ b/media-video/ffmpeg/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for media-video/ffmpeg
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ChangeLog,v 1.123 2006/01/09 22:47:11 kloeri Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ChangeLog,v 1.124 2006/01/30 06:07:35 lu_zero Exp $
+
+ 30 Jan 2006; Luca Barbato <lu_zero@gentoo.org>
+ +files/ffmpeg-shared-gcc4.patch, ffmpeg-0.4.9_p20051216.ebuild:
+ x86 workaround from Kevin F. Quinn <kevquinn@gentoo.org>, I'll share the
+ blame if breaks something
09 Jan 2006; Bryan Østergaard <kloeri@gentoo.org
ffmpeg-0.4.9_p20051216.ebuild:
diff --git a/media-video/ffmpeg/ffmpeg-0.4.9_p20051216.ebuild b/media-video/ffmpeg/ffmpeg-0.4.9_p20051216.ebuild
index 62cba0ce4ada..3f32f690fffb 100644
--- a/media-video/ffmpeg/ffmpeg-0.4.9_p20051216.ebuild
+++ b/media-video/ffmpeg/ffmpeg-0.4.9_p20051216.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ffmpeg-0.4.9_p20051216.ebuild,v 1.18 2006/01/13 12:11:26 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/ffmpeg/ffmpeg-0.4.9_p20051216.ebuild,v 1.19 2006/01/30 06:07:35 lu_zero Exp $
inherit eutils flag-o-matic multilib toolchain-funcs
@@ -68,18 +68,21 @@ src_unpack() {
cd ${S}
cp -R ${S_BASE} ${S_STATIC}
mv ${S_BASE} ${S_SHARED}
+
+ # Patch for gcc-4 shared build only
+ cd ${S_SHARED}
+ epatch ${FILESDIR}/ffmpeg-shared-gcc4.patch
}
src_compile() {
#Note; library makefiles don't propogate flags from config.mak so
#use specified CFLAGS are only used in executables
- filter-flags -fforce-addr -momit-leaf-frame-pointer
replace-flags -O0 -O2
local myconf=""
#disable mmx accelerated code if not requirested, or if PIC is required
- # as the provided asm decidedly isn't PIC.
+ # as the provided asm decidedly is not PIC.
if ( ! has_pic && use mmx ) || use amd64; then
myconf="${myconf} --enable-mmx"
else
@@ -116,6 +119,18 @@ src_compile() {
econf --disable-shared-pp --disable-shared --enable-static ${myconf} || die "Configure failed"
emake CC="$(tc-getCC)" || die "static failed"
+ # Specific workarounds for too-few-registers arch...
+ if [[ $(tc-arch) == "x86" ]]; then
+ filter-flags -fforce-addr -momit-leaf-frame-pointer
+ append-flags -fomit-frame-pointer
+ is-flag -O? || append-flags -O2
+ ewarn ""
+ ewarn "Debug information will be almost useless as the frame pointer is omitted."
+ ewarn "This makes debugging harder, so crashes that has no fixed behavior are"
+ ewarn "difficult to fix. Please have that in mind."
+ ewarn ""
+ fi
+
cd ${S_SHARED}
econf --enable-shared-pp --enable-shared --disable-static ${myconf} || die "Configure failed"
emake CC="$(tc-getCC)" || die "shared failed"
diff --git a/media-video/ffmpeg/files/ffmpeg-shared-gcc4.patch b/media-video/ffmpeg/files/ffmpeg-shared-gcc4.patch
new file mode 100644
index 000000000000..d8ad85de367f
--- /dev/null
+++ b/media-video/ffmpeg/files/ffmpeg-shared-gcc4.patch
@@ -0,0 +1,40 @@
+--- ffmpeg-0.4.9-p20051216-shared/libavcodec/i386/dsputil_mmx.c.orig 2006-01-14 13:13:04.000000000 +0100
++++ ffmpeg-0.4.9-p20051216-shared/libavcodec/i386/dsputil_mmx.c 2006-01-14 13:06:59.000000000 +0100
+@@ -619,10 +619,22 @@
+
+ static inline void transpose4x4(uint8_t *dst, uint8_t *src, int dst_stride, int src_stride){
+ asm volatile( //FIXME could save 1 instruction if done as 8x4 ...
+- "movd %4, %%mm0 \n\t"
+- "movd %5, %%mm1 \n\t"
+- "movd %6, %%mm2 \n\t"
+- "movd %7, %%mm3 \n\t"
++ "movd %0, %%mm0 \n\t"
++ "movd %1, %%mm1 \n\t"
++ "movd %2, %%mm2 \n\t"
++
++ :
++ : "m" (*(uint32_t*)(src + 0*src_stride)),
++ "m" (*(uint32_t*)(src + 1*src_stride)),
++ "m" (*(uint32_t*)(src + 2*src_stride))
++ );
++ asm volatile( //FIXME could save 1 instruction if done as 8x4 ...
++ "movd %0, %%mm3 \n\t"
++
++ :
++ : "m" (*(uint32_t*)(src + 3*src_stride))
++ );
++ asm volatile( //FIXME could save 1 instruction if done as 8x4 ...
+ "punpcklbw %%mm1, %%mm0 \n\t"
+ "punpcklbw %%mm3, %%mm2 \n\t"
+ "movq %%mm0, %%mm1 \n\t"
+@@ -639,10 +651,6 @@
+ "=m" (*(uint32_t*)(dst + 1*dst_stride)),
+ "=m" (*(uint32_t*)(dst + 2*dst_stride)),
+ "=m" (*(uint32_t*)(dst + 3*dst_stride))
+- : "m" (*(uint32_t*)(src + 0*src_stride)),
+- "m" (*(uint32_t*)(src + 1*src_stride)),
+- "m" (*(uint32_t*)(src + 2*src_stride)),
+- "m" (*(uint32_t*)(src + 3*src_stride))
+ );
+ }
+