--- /usr/portage/media-video/mjpegtools/mjpegtools-1.6.2-r3.ebuild 2005-03-29 04:35:43.000000000 +0200 +++ mjpegtools-1.6.2-r3.ebuild 2005-04-14 14:25:38.000000000 +0200 @@ -14,7 +14,7 @@ LICENSE="as-is" SLOT="1" 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 x86? ( media-libs/libmovtar @@ -43,6 +43,13 @@ epatch ${FILESDIR}/${P}-configure.patch epatch ${FILESDIR}/${P}-fPIC.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 # Fix an error in the detection of the altivec-support @@ -73,7 +80,6 @@ if use x86; then if use mmx || use 3dnow || use sse; then myconf="${myconf} --enable-simd-accel" - strip-flags -fstack-protector fi if use mmx; then myconf="${myconf} --with-jpeg-mmx=/usr/include/jpeg-mmx" @@ -96,16 +102,6 @@ $(use_with dv dv /usr) \ ${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" cd docs local infofile