Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 78404 | Differences between
and this patch

Collapse All | Expand All

(-)mjpegtools-1.6.2-r3.ebuild.orig (-24 / +33 lines)
Lines 1-6 Link Here
1
# Copyright 1999-2005 Gentoo Foundation
1
# Copyright 1999-2005 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $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 $
3
# $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 $
4
4
5
inherit flag-o-matic gcc eutils
5
inherit flag-o-matic gcc eutils
6
6
Lines 10-17 Link Here
10
10
11
LICENSE="as-is"
11
LICENSE="as-is"
12
SLOT="1"
12
SLOT="1"
13
KEYWORDS="x86 ppc amd64 ~sparc ppc64"
13
KEYWORDS="x86 ppc amd64 ~sparc ~ppc64"
14
IUSE="gtk avi dv quicktime sdl X yv12 3dnow mmx sse"
14
IUSE="gtk avi dv quicktime sdl X yv12 3dnow mmx sse pic"
15
15
16
DEPEND="media-libs/jpeg
16
DEPEND="media-libs/jpeg
17
	>=sys-apps/sed-4
17
	>=sys-apps/sed-4
Lines 30-60 Link Here
30
	X? ( virtual/x11 )"
30
	X? ( virtual/x11 )"
31
31
32
src_unpack() {
32
src_unpack() {
33
	local autoreconfflags="" autoreconf=""
33
	unpack ${A} ; cd ${S}
34
	unpack ${A} ; cd ${S}
34
	cp -rf ${S}{,.orig}
35
	cp -rf ${S}{,.orig}
35
36
36
	epatch ${FILESDIR}/${P}-fPIC.patch
37
	# Patch const altivec tables to const in aggregates
37
	epatch ${FILESDIR}/${P}-gcc34.patch
38
	epatch ${FILESDIR}/${P}-gcc34-altivec.patch
38
	epatch ${FILESDIR}/${P}-gcc34-altivec.patch
39
39
40
	# remove checks for gtk in configure in
40
	# remove checks for gtk in configure.in - reconf required
41
	use gtk || epatch ${FILESDIR}/${P}-nogtk.patch
41
	if use gtk; then
42
		epatch ${FILESDIR}/${P}-nogtk.patch
43
		autoreconf="yes"
44
	fi
42
45
43
	if use ppc; then
46
	if use ppc; then
44
		# Fix an error in the detection of the altivec-support
47
		# Fix an error in the detection of the altivec-support
45
		# in the compiler
48
		# in the compiler; alters configure.in - reconf required
46
		epatch "${FILESDIR}/altivec-fix-${PV}.patch"
49
		epatch "${FILESDIR}/altivec-fix-${PV}.patch"
47
		sed -i 's:-O3::' configure.in
50
		sed -i 's:-O3::' configure.in
48
		autoreconf || die
51
		autoreconf="yes"
49
	fi
52
	fi
50
53
51
	if use amd64; then
54
	if use pic || use amd64; then
52
		aclocal
55
		# Patch Makefile.am files to make mjpegutils library shared; libtoolize
53
		libtoolize --copy --force
56
		# required.
54
		autoreconf || die
57
		epatch ${FILESDIR}/${P}-fPIC.patch
58
		# Patch MMX assembler files to be PIC-compliant, where not already.
59
		epatch ${FILESDIR}/${P}-mmx-fPIC.patch
60
		# Cause autoreconf below to re-libtoolize, and force libtoolize
61
		# to rebuild files that aren't old w.r.t. their respective source.
62
		autoreconfflags="--install --force"
63
		autoreconf="yes"
55
	fi
64
	fi
56
65
66
	if [[ ${autoreconf} = "yes" ]]; then
67
		# Autoreconf, to make configure.in/Makefile.am etc patches effective
68
		einfo Auto-reconfiguring
69
		autoreconf ${autoreconfflags} || die
70
	fi
71
72
	# Patch configure, amongst other things - do after autoreconf
73
	epatch ${FILESDIR}/${P}-gcc34.patch
74
57
	use X || epatch "${FILESDIR}/no-x11-lib-2.patch"
75
	use X || epatch "${FILESDIR}/no-x11-lib-2.patch"
76
58
}
77
}
59
78
60
src_compile() {
79
src_compile() {
Lines 81-87 Link Here
81
	if use x86; then
100
	if use x86; then
82
		if use mmx || use 3dnow || use sse; then
101
		if use mmx || use 3dnow || use sse; then
83
			myconf="${myconf} --enable-simd-accel"
102
			myconf="${myconf} --enable-simd-accel"
84
			strip-flags -fstack-protector
103
			#strip-flags -fstack-protector
85
		fi
104
		fi
86
		if use mmx; then
105
		if use mmx; then
87
			myconf="${myconf} --with-jpeg-mmx=/usr/include/jpeg-mmx"
106
			myconf="${myconf} --with-jpeg-mmx=/usr/include/jpeg-mmx"
Lines 90-105 Link Here
90
109
91
	econf ${myconf} || die
110
	econf ${myconf} || die
92
111
93
	if has_pie ; then
94
		pie_magic="`test_flag -fno-pic` `test_flag -nopie`"
95
		for i in `find "${S}" -name "Makefile"` ; do
96
			sed -e "s:CC = gcc:CC = gcc ${pie_magic}:g" \
97
				-e "s:CXX = gcc:CXX = g++ ${pie_magic}:g" \
98
				-e "s:CXXCPP = gcc -E:CXX = g++ -E ${pie_magic}:g" \
99
				-i "${i}" || die "sed failed"
100
		done
101
	fi
102
103
	emake CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" -j1 || die "compile problem"
112
	emake CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" -j1 || die "compile problem"
104
	cd docs
113
	cd docs
105
	local infofile
114
	local infofile

Return to bug 78404