View | Details | Raw Unified
Collapse All | Expand All

(-) mjpegtools-1.6.2-r3.ebuild.orig (-24 / +33 lines)
 Lines 1-6    Link Here 
# Copyright 1999-2005 Gentoo Foundation
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-video/mjpegtools/mjpegtools-1.6.2-r3.ebuild,v 1.14 2005/02/06 17:27:56 corsair Exp $
# $Header: /var/cvsroot/gentoo-x86/media-video/mjpegtools/mjpegtools-1.6.2-r3.ebuild,v 1.13 2005/01/11 12:16:52 lu_zero Exp $
inherit flag-o-matic gcc eutils
inherit flag-o-matic gcc eutils
 Lines 10-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-60    Link Here 
	X? ( virtual/x11 )"
	X? ( virtual/x11 )"
src_unpack() {
src_unpack() {
	local autoreconfflags="" autoreconf=""
	unpack ${A} ; cd ${S}
	unpack ${A} ; cd ${S}
	cp -rf ${S}{,.orig}
	cp -rf ${S}{,.orig}
	epatch ${FILESDIR}/${P}-fPIC.patch
	# Patch const altivec tables to const in aggregates
	epatch ${FILESDIR}/${P}-gcc34.patch
	epatch ${FILESDIR}/${P}-gcc34-altivec.patch
	epatch ${FILESDIR}/${P}-gcc34-altivec.patch
	# remove checks for gtk in configure in
	# remove checks for gtk in configure.in - reconf required
	use gtk || epatch ${FILESDIR}/${P}-nogtk.patch
	if use gtk; then
		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 - reconf 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 || die
		autoreconf="yes"
	fi
	fi
	if use amd64; then
	if use pic || use amd64; then
		aclocal
		# Patch Makefile.am files to make mjpegutils library shared; libtoolize
		libtoolize --copy --force
		# required.
		autoreconf || die
		epatch ${FILESDIR}/${P}-fPIC.patch
		# Patch MMX assembler files to be PIC-compliant, where not already.
		epatch ${FILESDIR}/${P}-mmx-fPIC.patch
		# Cause autoreconf below to re-libtoolize, and force libtoolize
		# to rebuild files that aren't old w.r.t. their respective source.
		autoreconfflags="--install --force"
		autoreconf="yes"
	fi
	fi
	if [[ ${autoreconf} = "yes" ]]; then
		# Autoreconf, to make configure.in/Makefile.am etc patches effective
		einfo Auto-reconfiguring
		autoreconf ${autoreconfflags} || die
	fi
	# Patch configure, amongst other things - do after autoreconf
	epatch ${FILESDIR}/${P}-gcc34.patch
	use X || epatch "${FILESDIR}/no-x11-lib-2.patch"
	use X || epatch "${FILESDIR}/no-x11-lib-2.patch"
}
}
src_compile() {
src_compile() {
 Lines 81-87    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 90-105    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