View | Details | Raw Unified
Collapse All | Expand All

(-) mjpegtools-1.6.2-r3.ebuild.orig (-21 / +30 lines)
 Lines 11-17    Link Here 
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"
IUSE="gtk avi dv quicktime sdl X yv12 3dnow mmx sse pic"
DEPEND="media-libs/jpeg
DEPEND="media-libs/jpeg
	>=sys-apps/sed-4
	>=sys-apps/sed-4
 Lines 30-55    Link Here 
	X? ( virtual/x11 )"
	X? ( virtual/x11 )"
src_unpack() {
src_unpack() {
	unpack ${A} ; cd ${S}
	local autoreconfflags="" autoreconf=""
	unpack ${A}
	cd ${S}
	cp -rf ${S}{,.orig}
	cp -rf ${S}{,.orig}
	epatch ${FILESDIR}/${P}-fPIC.patch
	# Add 'const' to aggregate elements of vectors
	epatch ${FILESDIR}/${P}-gcc34.patch
	epatch ${FILESDIR}/${P}-gcc34-altivec.patch
	epatch ${FILESDIR}/${P}-gcc34-altivec.patch
	# remove checks for gtk in configure in
	if use !gtk; then
	use gtk || epatch ${FILESDIR}/${P}-nogtk.patch
		# Force no gtk; alters configure.in, autoreconf required
		epatch ${FILESDIR}/${P}-nogtk.patch
		autoreconf="yes"
	fi
	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
		# in the compiler
		# in the compiler; alters configure.in, autoreconf required
		epatch "${FILESDIR}/altivec-fix-${PV}.patch"
		epatch "${FILESDIR}/altivec-fix-${PV}.patch"
		sed -i 's:-O3::' configure.in
		sed -i 's:-O3::' configure.in
		autoreconf="yes"
	fi
	fi
	aclocal
	if use pic || use amd64; then
	libtoolize --copy --force
		# Build libmjpegutils as shared library; alters Makefile.am
	autoreconf || die
		# so autoreconf required including libtoolize
		epatch ${FILESDIR}/${P}-fPIC.patch
		epatch ${FILESDIR}/${P}-mmx-fPIC.patch
		autoreconfflags="--install --force"
		autoreconf="yes"
	fi
	if [[ ${autoreconf} = "yes" ]]; then
		einfo Auto-reconfiguring
		autoreconf ${autoreconfflags} || diefunc "$FUNCNAME" "$LINENO" "$?"
	fi
	# Configure patch to remove -mcpu settings; alters configure
	# so must be after any autoreconf.
	epatch ${FILESDIR}/${P}-gcc34.patch
	use X || epatch "${FILESDIR}/no-x11-lib-2.patch"
	use X || epatch "${FILESDIR}/no-x11-lib-2.patch"
}
}
 Lines 78-84    Link Here 
	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
			#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"
 Lines 87-102    Link Here 
	econf ${myconf} || die
	econf ${myconf} || die
	if has_pie ; then
		pie_magic="`test_flag -fno-pic` `test_flag -nopie`"
		for i in `find "${S}" -name "Makefile"` ; do
			sed -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" \
				-i "${i}" || die "sed failed"
		done
	fi
	emake CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" -j1 || die "compile problem"
	emake CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" -j1 || die "compile problem"
	cd docs
	cd docs
	local infofile
	local infofile