|
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="aac altivec debug doc dv dvd encode imlib mmx oggvorbis oss truetype v4l" |
18 |
IUSE="aac altivec debug doc dv dvd encode imlib mmx oggvorbis oss pic truetype v4l" |
| 19 |
|
19 |
|
| 20 |
DEPEND="imlib? (media-libs/imlib2) |
20 |
DEPEND="imlib? (media-libs/imlib2) |
| 21 |
truetype? (>=media-libs/freetype-2) |
21 |
truetype? (>=media-libs/freetype-2) |
|
Lines 33-39
Link Here
|
| 33 |
unpack ${A} || die |
33 |
unpack ${A} || die |
| 34 |
cd ${S} |
34 |
cd ${S} |
| 35 |
|
35 |
|
| 36 |
# for some reason it tries to #include <X11/Xlib.h>,b ut doesn't use it |
36 |
# for some reason it tries to #include <X11/Xlib.h>, but doesn't use it |
| 37 |
cd ${S} |
37 |
cd ${S} |
| 38 |
sed -i s:\#define\ HAVE_X11:\#define\ HAVE_LINUX: ffplay.c |
38 |
sed -i s:\#define\ HAVE_X11:\#define\ HAVE_LINUX: ffplay.c |
| 39 |
|
39 |
|
|
Lines 47-65
Link Here
|
| 47 |
# einfo "Compiler used: gcc-3.4.x Applying patch conditionally." |
47 |
# einfo "Compiler used: gcc-3.4.x Applying patch conditionally." |
| 48 |
# epatch ${FILESDIR}/0.4.8-gcc3.4-magicF2W.patch |
48 |
# epatch ${FILESDIR}/0.4.8-gcc3.4-magicF2W.patch |
| 49 |
#fi |
49 |
#fi |
|
|
50 |
|
| 51 |
# If MMX isn't to be built, make the libraries properly PIC |
| 52 |
# Also covers bug #16281 |
| 53 |
if use pic || use !mmx; then |
| 54 |
# ffmpeg doesn't use libtool, so the condition for PIC code |
| 55 |
# is __PIC__, not PIC. |
| 56 |
sed -i.orig 's/#if\(\(.*def *\)\|\(.*defined *\)\)PIC/#if\1__PIC__/' \ |
| 57 |
libavcodec/i386/dsputil_mmx{.c,_rnd.h} \ |
| 58 |
libavcodec/msmpeg4.c \ |
| 59 |
|| die "sed failed (__PIC__)" |
| 60 |
# Fixup library makefiles to add '-fPIC'. |
| 61 |
sed -i.orig 's/CFLAGS=/CFLAGS=-fPIC /' \ |
| 62 |
libav{codec,format}/Makefile \ |
| 63 |
|| die "sed failed (-fPIC)" |
| 64 |
# Fixup liba52 to respect the --disable-mmx configure option |
| 65 |
sed -i.orig 's/#ifdef ARCH_X86/#ifdef HAVE_MMX/' \ |
| 66 |
libavcodec/liba52/resample.c \ |
| 67 |
|| die "sed failed (HAVE_MMX)" |
| 68 |
fi |
| 69 |
|
| 50 |
} |
70 |
} |
| 51 |
|
71 |
|
| 52 |
src_compile() { |
72 |
src_compile() { |
| 53 |
filter-flags -fforce-addr -fPIC -momit-leaf-frame-pointer |
73 |
# Note; library makefiles don't propogate flags from config.mak so |
| 54 |
# fixes bug #16281 |
74 |
# user-specified CFLAGS are only used in executables. |
| 55 |
|
75 |
filter-flags -fforce-addr -momit-leaf-frame-pointer |
| 56 |
use alpha && append-flags -fPIC |
|
|
| 57 |
use amd64 && append-flags -fPIC |
| 58 |
use hppa && append-flags -fPIC |
| 59 |
use ppc && append-flags -fPIC |
| 60 |
|
76 |
|
| 61 |
local myconf="" |
77 |
local myconf="" |
| 62 |
|
78 |
|
|
|
79 |
# Disable mmx accelerated code if not requested, or if PIC is required |
| 80 |
# as the provided asm decidedly isn't PIC. |
| 81 |
( use pic || use !mmx ) && \ |
| 82 |
myconf="${myconf} --disable-mmx" || \ |
| 83 |
myconf="${myconf} --enable-mmx" |
| 84 |
|
| 63 |
use encode && use aac && myconf="${myconf} --enable-faac" |
85 |
use encode && use aac && myconf="${myconf} --enable-faac" |
| 64 |
|
86 |
|
| 65 |
if use oggvorbis ; then |
87 |
if use oggvorbis ; then |
|
Lines 71-77
Link Here
|
| 71 |
use !alpha && myconf="${myconf} $(use_enable aac faad) $(use_enable aac faac) $(use_enable aac faadbin)" |
93 |
use !alpha && myconf="${myconf} $(use_enable aac faad) $(use_enable aac faac) $(use_enable aac faadbin)" |
| 72 |
|
94 |
|
| 73 |
econf \ |
95 |
econf \ |
| 74 |
$(use_enable mmx) \ |
|
|
| 75 |
$(use_enable altivec) \ |
96 |
$(use_enable altivec) \ |
| 76 |
$(use_enable debug) \ |
97 |
$(use_enable debug) \ |
| 77 |
$(use_enable encode mp3lame) \ |
98 |
$(use_enable encode mp3lame) \ |