Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 67947 | Differences between
and this patch

Collapse All | Expand All

(-)ffmpeg-0.4.9_pre1.ebuild.orig (-9 / +27 lines)
Lines 15-21 Link Here
15
LICENSE="LGPL-2"
15
LICENSE="LGPL-2"
16
SLOT="0"
16
SLOT="0"
17
KEYWORDS="~x86 ~ppc ~sparc ~alpha ~amd64 ~ia64 ppc64 ~arm ~mips ~hppa"
17
KEYWORDS="~x86 ~ppc ~sparc ~alpha ~amd64 ~ia64 ppc64 ~arm ~mips ~hppa"
18
IUSE="altivec debug doc dvd encode aac imlib mmx oggvorbis sdl static truetype"
18
IUSE="altivec debug doc dvd encode aac imlib mmx oggvorbis pic sdl static truetype"
19
19
20
DEPEND="encode? ( >=media-sound/lame-3.92 )
20
DEPEND="encode? ( >=media-sound/lame-3.92 )
21
	oggvorbis? ( >=media-libs/libvorbis-1.0-r1 )
21
	oggvorbis? ( >=media-libs/libvorbis-1.0-r1 )
Lines 32-38 Link Here
32
	unpack ${A} || die
32
	unpack ${A} || die
33
	cd ${S}
33
	cd ${S}
34
34
35
	# for some reason it tries to #include <X11/Xlib.h>,b ut doesn't use it
35
	# for some reason it tries to #include <X11/Xlib.h>, but doesn't use it
36
	cd ${S}
36
	cd ${S}
37
	sed -i s:\#define\ HAVE_X11:\#define\ HAVE_LINUX: ffplay.c
37
	sed -i s:\#define\ HAVE_X11:\#define\ HAVE_LINUX: ffplay.c
38
38
Lines 42-61 Link Here
42
		einfo "Compiler used: gcc-3.4.x Applying patch conditionally."
42
		einfo "Compiler used: gcc-3.4.x Applying patch conditionally."
43
		epatch ${FILESDIR}/0.4.8-gcc3.4-magicF2W.patch
43
		epatch ${FILESDIR}/0.4.8-gcc3.4-magicF2W.patch
44
	fi
44
	fi
45
46
	# If MMX isn't to be built, make the libraries properly PIC
47
	# Should also cover bug #16281
48
	if use pic || use !mmx; then
49
		# ffmpeg doesn't use libtool, so the condition for PIC code
50
		# is __PIC__, not PIC.
51
		sed -i.orig 's/#if\(\(.*def *\)\|\(.*defined *\)\)PIC/#if\1__PIC__/' \
52
			libavcodec/i386/dsputil_mmx{.c,_rnd.h} \
53
			libavcodec/msmpeg4.c \
54
			|| die "sed failed (__PIC__)"
55
		# Fixup library makefiles to add '-fPIC'.
56
		sed -i.orig 's/CFLAGS=/CFLAGS=-fPIC /' \
57
			libav{codec,format}/Makefile \
58
			|| die "sed failed (-fPIC)"
59
		# Fixup liba52 to respect the --disable-mmx configure option
60
		sed -i.orig 's/#ifdef ARCH_X86/#ifdef HAVE_MMX/' \
61
			libavcodec/liba52/resample.c \
62
			|| die "sed failed (HAVE_MMX)"
63
	fi
45
}
64
}
46
65
47
src_compile() {
66
src_compile() {
48
	filter-flags -fforce-addr -fPIC
67
	# Note; library makefiles don't propogate flags from config.mak so
49
	# fixes bug #16281
68
	# user-specified CFLAGS are only used in the executables.
50
	use alpha && append-flags -fPIC
69
	filter-flags -fforce-addr
51
	use amd64 && append-flags -fPIC
52
	use hppa && append-flags -fPIC
53
	use ppc && append-flags -fPIC
54
70
55
	local myconf
71
	local myconf
56
	#myconf="${myconf} --disable-opts --enable-pp --enable-shared-pp"
72
	#myconf="${myconf} --disable-opts --enable-pp --enable-shared-pp"
57
	myconf="${myconf} --disable-opts --enable-pp --enable-gpl"
73
	myconf="${myconf} --disable-opts --enable-pp --enable-gpl"
58
	use mmx || myconf="${myconf} --disable-mmx"
74
	# Disable mmx accelerated code if not requested, or if PIC is required
75
	# as the provided asm isn't PIC.
76
	( use pic || use !mmx ) && myconf="${myconf} --disable-mmx"
59
	use encode && myconf="${myconf} --enable-mp3lame"
77
	use encode && myconf="${myconf} --enable-mp3lame"
60
	use oggvorbis && myconf="${myconf} --enable-vorbis"
78
	use oggvorbis && myconf="${myconf} --enable-vorbis"
61
	use aac && myconf="${myconf} --enable-faad --enable-faadbin"
79
	use aac && myconf="${myconf} --enable-faad --enable-faadbin"

Return to bug 67947