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

Collapse All | Expand All

(-)/usr/portage/media-video/mjpegtools/mjpegtools-1.6.2-r3.ebuild (-40 / +48 lines)
Lines 4-20 Link Here
4
4
5
inherit flag-o-matic gcc eutils
5
inherit flag-o-matic gcc eutils
6
6
7
M4V="1"
8
7
DESCRIPTION="Tools for MJPEG video"
9
DESCRIPTION="Tools for MJPEG video"
8
HOMEPAGE="http://mjpeg.sourceforge.net/"
10
HOMEPAGE="http://mjpeg.sourceforge.net/"
9
SRC_URI="mirror://sourceforge/mjpeg/${P}.tar.gz"
11
SRC_URI="mirror://sourceforge/mjpeg/${P}.tar.gz
12
	mirror://gentoo/${PN}-m4-${M4V}.tar.bz2"
10
13
11
LICENSE="as-is"
14
LICENSE="as-is"
12
SLOT="1"
15
SLOT="1"
13
KEYWORDS="x86 ppc amd64 ~sparc ppc64"
16
KEYWORDS="x86 ppc amd64 ~sparc ppc64"
14
IUSE="gtk avi dv quicktime sdl X yv12 3dnow mmx sse"
17
IUSE="gtk avi dv quicktime sdl X yv12 3dnow mmx sse v4l dga"
15
18
16
DEPEND="media-libs/jpeg
19
RDEPEND="media-libs/jpeg
17
	>=sys-apps/sed-4
18
	x86? ( media-libs/libmovtar
20
	x86? ( media-libs/libmovtar
19
		mmx? ( >=media-libs/jpeg-mmx-1.1.2-r1
21
		mmx? ( >=media-libs/jpeg-mmx-1.1.2-r1
20
				dev-lang/nasm )
22
				dev-lang/nasm )
Lines 22-44 Link Here
22
		sse? ( dev-lang/nasm )
24
		sse? ( dev-lang/nasm )
23
	)
25
	)
24
	gtk? ( =x11-libs/gtk+-1.2*
26
	gtk? ( =x11-libs/gtk+-1.2*
25
			=dev-libs/glib-1.2* )
27
		=dev-libs/glib-1.2* )
26
	avi? ( >=media-video/avifile-0.7.38 )
28
	avi? ( >=media-video/avifile-0.7.38 )
27
	dv? ( >=media-libs/libdv-0.99 )
29
	dv? ( >=media-libs/libdv-0.99 )
28
	quicktime? ( virtual/quicktime )
30
	quicktime? ( virtual/quicktime )
29
	sdl? ( >=media-libs/libsdl-1.2.7-r3 )
31
	sdl? ( >=media-libs/libsdl-1.2.7-r3 )
30
	X? ( virtual/x11 )"
32
	X? ( virtual/x11 )"
31
33
34
DEPEND="${RDEPEND}
35
	>=sys-apps/sed-4
36
	sys-devel/autoconf
37
	=sys-devel/automake-1.5*"
38
32
src_unpack() {
39
src_unpack() {
33
	unpack ${A} ; cd ${S}
40
	unpack ${A} ; cd ${S}
34
	cp -rf ${S}{,.orig}
35
41
42
	epatch ${FILESDIR}/${PV}-configure.patch
36
	epatch ${FILESDIR}/${P}-fPIC.patch
43
	epatch ${FILESDIR}/${P}-fPIC.patch
37
	epatch ${FILESDIR}/${P}-gcc34.patch
44
	epatch ${FILESDIR}/${P}-gcc34.patch
38
	epatch ${FILESDIR}/${P}-dv.patch
39
40
	# remove checks for gtk in configure in
41
	use gtk || epatch ${FILESDIR}/${P}-nogtk.patch
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
Lines 46-59 Link Here
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
		#Worst workaround ever...
51
		#Worst workaround ever...
49
		sed -i \
52
		sed -i -e "s/const vector signed short /vector signed short /g" \
50
		-e "s/const vector signed short /vector signed short /g" \
53
			${S}/utils/altivec/fdct_idct.c
51
		${S}/utils/altivec/fdct_idct.c
52
	fi
54
	fi
53
55
54
	aclocal
55
	libtoolize --copy --force
56
	libtoolize --copy --force
56
	autoreconf || die
57
	ACLOCAL="aclocal -I ${WORKDIR}/m4" autoreconf || die
57
58
58
	use X || epatch "${FILESDIR}/no-x11-lib-2.patch"
59
	use X || epatch "${FILESDIR}/no-x11-lib-2.patch"
59
}
60
}
Lines 61-85 Link Here
61
src_compile() {
62
src_compile() {
62
	local myconf
63
	local myconf
63
64
64
	[ $(gcc-major-version) -eq 3 ] && [ "${ARCH}" == "x86" ] && append-flags -mno-sse2
65
	if use yv12; then
65
66
		if use dv; then
66
	myconf="${myconf} $(use_with X x)"
67
			myconf="${myconf} --with-dv-yv12"
67
	myconf="${myconf} $(use_with quicktime)"
68
		else
68
	myconf="${myconf} $(use_enable x86 cmov-extensions)"
69
70
	# Fix for Via C3-1, see #30345
71
	grep -q cmov /proc/cpuinfo || myconf="${myconf} --enable-cmov-extension=no"
72
73
	if use dv; then
74
		myconf="${myconf} --with-dv=/usr"
75
		myconf="${myconf} $(use_with yv12 dv-yv12)"
76
	else
77
		myconf="${myconf} --without-dv --without-dv-yv12"
78
		if use yv12; then
79
			ewarn "yv12 support is only possible when \"dv\" is in your USE flags."
69
			ewarn "yv12 support is only possible when \"dv\" is in your USE flags."
80
		fi
70
		fi
81
	fi
71
	fi
82
72
73
	# This could be changed to allow building on g/fbsd in the future.
83
	if use x86; then
74
	if use x86; then
84
		if use mmx || use 3dnow || use sse; then
75
		if use mmx || use 3dnow || use sse; then
85
			myconf="${myconf} --enable-simd-accel"
76
			myconf="${myconf} --enable-simd-accel"
Lines 88-105 Link Here
88
		if use mmx; then
79
		if use mmx; then
89
			myconf="${myconf} --with-jpeg-mmx=/usr/include/jpeg-mmx"
80
			myconf="${myconf} --with-jpeg-mmx=/usr/include/jpeg-mmx"
90
		fi
81
		fi
82
		
83
		# Fix for Via C3-1, see #30345
84
		if grep -q cmov /proc/cpuinfo; then
85
			myconf="${myconf} --enable-cmov-extension"
86
		else
87
			myconf="${myconf} --disable-cmov-extension"
88
		fi
89
		
90
		[[ $(gcc-major-version) -eq 3 ]] && append-flags -mno-sse2
91
	fi
91
	fi
92
92
93
	econf ${myconf} || die
93
	econf \
94
94
		$(use_with X x) \
95
	if has_pie ; then
95
		$(use_enable dga xfree-ext) \
96
		pie_magic="`test_flag -fno-pic` `test_flag -nopie`"
96
		$(use_with quicktime) \
97
		for i in `find "${S}" -name "Makefile"` ; do
97
		$(use_with v4l) \
98
			sed -e "s:CC = gcc:CC = gcc ${pie_magic}:g" \
98
		$(use_with gtk) \
99
				-e "s:CXX = gcc:CXX = g++ ${pie_magic}:g" \
99
		$(use_with sdl) \
100
				-e "s:CXXCPP = gcc -E:CXX = g++ -E ${pie_magic}:g" \
100
		$(use_with dv dv /usr) \
101
				-i "${i}" || die "sed failed"
101
		${myconf} || die
102
		done
102
103
	if has_pie; then
104
		pie_magic="$(test_flag -fno-pic) $(test_flag -nopie)"
105
		
106
		find "${S}" -name Makefile | xargs sed -i \
107
			-e "s:CC = gcc:CC = gcc ${pie_magic}:g" \
108
			-e "s:CXX = gcc:CXX = g++ ${pie_magic}:g" \
109
			-e "s:CXXCPP = gcc -E:CXX = g++ -E ${pie_magic}:g" \
110
			|| die "sed failed"
103
	fi
111
	fi
104
112
105
	emake CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" -j1 || die "compile problem"
113
	emake CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" -j1 || die "compile problem"

Return to bug 86692