Lines 2-10
Link Here
|
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.9.0-r1.ebuild,v 1.9 2011/04/01 09:48:15 ssuominen Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/media-video/mjpegtools/mjpegtools-1.9.0-r1.ebuild,v 1.9 2011/04/01 09:48:15 ssuominen Exp $ |
4 |
|
4 |
|
5 |
EAPI="1" |
5 |
EAPI=4 |
6 |
|
6 |
|
7 |
inherit flag-o-matic toolchain-funcs eutils libtool |
7 |
inherit autotools eutils flag-o-matic linux-info toolchain-funcs |
8 |
|
8 |
|
9 |
MY_P=${P/_/} |
9 |
MY_P=${P/_/} |
10 |
|
10 |
|
Lines 12-27
Link Here
|
12 |
HOMEPAGE="http://mjpeg.sourceforge.net/" |
12 |
HOMEPAGE="http://mjpeg.sourceforge.net/" |
13 |
SRC_URI="mirror://sourceforge/mjpeg/${MY_P}.tar.gz" |
13 |
SRC_URI="mirror://sourceforge/mjpeg/${MY_P}.tar.gz" |
14 |
|
14 |
|
15 |
LICENSE="as-is" |
15 |
LICENSE="GPL-2" |
16 |
SLOT="1" |
16 |
SLOT="1" |
17 |
KEYWORDS="alpha amd64 ppc ppc64 sparc x86" |
17 |
KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86" |
18 |
IUSE="gtk dv quicktime sdl yv12 v4l dga png mmx" |
18 |
IUSE="dga dv gtk mmx png quicktime sdl static-libs v4l" |
19 |
|
19 |
|
20 |
RDEPEND="virtual/jpeg |
20 |
RDEPEND="virtual/jpeg |
21 |
gtk? ( x11-libs/gtk+:2 ) |
|
|
22 |
dv? ( >=media-libs/libdv-0.99 ) |
23 |
quicktime? ( media-libs/libquicktime ) |
21 |
quicktime? ( media-libs/libquicktime ) |
|
|
22 |
dv? ( >=media-libs/libdv-0.99 ) |
24 |
png? ( media-libs/libpng ) |
23 |
png? ( media-libs/libpng ) |
|
|
24 |
dga? ( x11-libs/libXxf86dga ) |
25 |
gtk? ( x11-libs/gtk+:2 ) |
25 |
sdl? ( >=media-libs/libsdl-1.2.7-r3 ) |
26 |
sdl? ( >=media-libs/libsdl-1.2.7-r3 ) |
26 |
x11-libs/libX11 |
27 |
x11-libs/libX11 |
27 |
x11-libs/libXt" |
28 |
x11-libs/libXt" |
Lines 29-87
Link Here
|
29 |
DEPEND="${RDEPEND} |
30 |
DEPEND="${RDEPEND} |
30 |
mmx? ( dev-lang/nasm ) |
31 |
mmx? ( dev-lang/nasm ) |
31 |
>=sys-apps/sed-4 |
32 |
>=sys-apps/sed-4 |
|
|
33 |
sys-apps/gawk |
32 |
dev-util/pkgconfig" |
34 |
dev-util/pkgconfig" |
33 |
|
35 |
|
34 |
S="${WORKDIR}/${MY_P}" |
36 |
S="${WORKDIR}/${P/_rc*}" |
35 |
|
37 |
|
36 |
src_unpack() { |
38 |
pkg_pretend() { |
37 |
unpack ${A} |
39 |
if kernel_is ge 2 6 38 && use v4l; then |
38 |
cd "${S}" |
40 |
ewarn "Current versions of mjpegtools only support V4L1 which is not available" |
39 |
sed -i -e '/ARCHFLAGS=/s:=.*:=:' configure |
41 |
ewarn "for kernels versions 2.6.38 and above. V4L1 will be disabled." |
40 |
epatch "${FILESDIR}"/${P}-glibc-2.10.patch \ |
42 |
fi |
41 |
"${FILESDIR}"/${P}-jpeg-7.patch |
|
|
42 |
} |
43 |
} |
43 |
|
44 |
|
44 |
src_compile() { |
45 |
src_prepare() { |
45 |
local myconf |
46 |
sed -i -e '/ARCHFLAGS=/s:=.*:=:' configure.ac |
46 |
|
47 |
epatch "${FILESDIR}"/${P}-libpng-1.5.patch \ |
47 |
if use yv12 && use dv; then |
48 |
"${FILESDIR}"/${P}-amd-k8.patch \ |
48 |
myconf="${myconf} --with-dv-yv12" |
49 |
"${FILESDIR}"/${P}-v4l-automagic.patch \ |
49 |
elif use yv12; then |
50 |
"${FILESDIR}"/${P}-dga-gtk-sdl-automagic.patch |
50 |
ewarn "yv12 support is possible when 'dv' is in your USE flags." |
51 |
eautoreconf |
51 |
fi |
52 |
} |
52 |
|
53 |
|
|
|
54 |
src_configure() { |
53 |
[[ $(gcc-major-version) -eq 3 ]] && append-flags -mno-sse2 |
55 |
[[ $(gcc-major-version) -eq 3 ]] && append-flags -mno-sse2 |
54 |
|
56 |
|
55 |
append-flags -fno-strict-aliasing |
|
|
56 |
|
57 |
econf \ |
57 |
econf \ |
58 |
--with-x \ |
58 |
--enable-compile-warnings \ |
59 |
$(use_enable dga xfree-ext) \ |
59 |
$(use_enable mmx simd-accel) \ |
|
|
60 |
$(use_enable static-libs static) \ |
61 |
--enable-largefile \ |
60 |
$(use_with quicktime libquicktime) \ |
62 |
$(use_with quicktime libquicktime) \ |
|
|
63 |
$(use_with dv libdv) \ |
61 |
$(use_with png libpng) \ |
64 |
$(use_with png libpng) \ |
62 |
$(use_with v4l) \ |
65 |
$(use_with dga) \ |
63 |
$(use_with gtk) \ |
66 |
$(use_with gtk) \ |
64 |
$(use_with sdl) \ |
67 |
$(use_with sdl libsdl) \ |
65 |
$(use_with dv libdv /usr) \ |
68 |
$(use_with v4l) \ |
66 |
$(use_enable mmx simd-accel) \ |
69 |
--with-x |
67 |
--enable-largefile \ |
|
|
68 |
--without-jpeg-mmx \ |
69 |
${myconf} |
70 |
|
71 |
emake || die |
72 |
|
73 |
cd docs |
74 |
local infofile |
75 |
for infofile in mjpeg*info*; do |
76 |
echo "INFO-DIR-SECTION Miscellaneous" >> ${infofile} |
77 |
echo "START-INFO-DIR-ENTRY" >> ${infofile} |
78 |
echo "* mjpeg-howto: (mjpeg-howto). How to use the mjpeg-tools" >> ${infofile} |
79 |
echo "END-INFO-DIR-ENTRY" >> ${infofile} |
80 |
done |
81 |
} |
70 |
} |
82 |
|
71 |
|
83 |
src_install() { |
72 |
src_install() { |
84 |
einstall || die |
73 |
default |
85 |
dodoc mjpeg_howto.txt README* PLANS NEWS TODO HINTS BUGS ChangeLog \ |
74 |
|
86 |
AUTHORS CHANGES |
75 |
dodoc mjpeg_howto.txt PLANS HINTS docs/FAQ.txt |
|
|
76 |
|
77 |
find "${D}" -name '*.la' -exec rm -rf '{}' '+' || die "la removal failed" |
87 |
} |
78 |
} |