|
|
LICENSE="as-is" | LICENSE="as-is" |
SLOT="1" | SLOT="1" |
KEYWORDS="x86 ppc amd64 ~sparc ppc64" | KEYWORDS="x86 ppc amd64 ~sparc ppc64" |
IUSE="gtk avi dv quicktime sdl X yv12 3dnow mmx sse v4l dga" |
IUSE="gtk avi dv quicktime sdl X yv12 3dnow mmx sse v4l dga pic" |
| |
RDEPEND="media-libs/jpeg | RDEPEND="media-libs/jpeg |
x86? ( media-libs/libmovtar | x86? ( media-libs/libmovtar |
|
|
epatch ${FILESDIR}/${P}-configure.patch | epatch ${FILESDIR}/${P}-configure.patch |
epatch ${FILESDIR}/${P}-fPIC.patch | epatch ${FILESDIR}/${P}-fPIC.patch |
epatch ${FILESDIR}/${P}-gcc34.patch | epatch ${FILESDIR}/${P}-gcc34.patch |
|
# fixup mmx assembler for PIC compliance |
|
# 1) Clobber esi instead of ebx in yudvdenoise/{deinterlace,motion}.c |
|
# 2) Make data references GOT-relative in mpeg2enc/quant_mmx.s, |
|
# utils/mmxsse/mblock_sumsq_mmx.s |
|
# The latter has a small impact on performance, so the patch |
|
# is applied conditionally. |
|
use pic && epatch ${FILESDIR}/${P}-mmx-fPIC.patch |
| |
if use ppc; then | if use ppc; then |
# Fix an error in the detection of the altivec-support | # Fix an error in the detection of the altivec-support |
|
|
if use x86; then | if use x86; then |
if use mmx || use 3dnow || use sse; then | if use mmx || use 3dnow || use sse; then |
myconf="${myconf} --enable-simd-accel" | myconf="${myconf} --enable-simd-accel" |
strip-flags -fstack-protector |
|
fi | fi |
if use mmx; then | if use mmx; then |
myconf="${myconf} --with-jpeg-mmx=/usr/include/jpeg-mmx" | myconf="${myconf} --with-jpeg-mmx=/usr/include/jpeg-mmx" |
|
|
$(use_with dv dv /usr) \ | $(use_with dv dv /usr) \ |
${myconf} || die | ${myconf} || die |
| |
if has_pie; then |
|
pie_magic="$(test_flag -fno-pic) $(test_flag -nopie)" |
|
|
|
find "${S}" -name Makefile | xargs sed -i \ |
|
-e "s:CC = gcc:CC = gcc ${pie_magic}:g" \ |
|
-e "s:CXX = gcc:CXX = g++ ${pie_magic}:g" \ |
|
-e "s:CXXCPP = gcc -E:CXX = g++ -E ${pie_magic}:g" \ |
|
|| die "sed failed" |
|
fi |
|
|
|
emake CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" -j1 || die "emake failed" | emake CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" -j1 || die "emake failed" |
cd docs | cd docs |
local infofile | local infofile |