--- mjpegtools-1.9.0-r1.ebuild 2011-04-03 11:25:16.949865334 +0200 +++ mjpegtools-2.0.0_rc1.ebuild 2011-04-19 21:38:52.665962668 +0200 @@ -2,9 +2,9 @@ # Distributed under the terms of the GNU General Public License v2 # $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 $ -EAPI="1" +EAPI=4 -inherit flag-o-matic toolchain-funcs eutils libtool +inherit autotools eutils flag-o-matic toolchain-funcs MY_P=${P/_/} @@ -14,14 +14,15 @@ LICENSE="as-is" SLOT="1" -KEYWORDS="alpha amd64 ppc ppc64 sparc x86" -IUSE="gtk dv quicktime sdl yv12 v4l dga png mmx" +KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="dga dv gtk mmx png quicktime sdl v4l" RDEPEND="virtual/jpeg - gtk? ( x11-libs/gtk+:2 ) - dv? ( >=media-libs/libdv-0.99 ) quicktime? ( media-libs/libquicktime ) + dv? ( >=media-libs/libdv-0.99 ) png? ( media-libs/libpng ) + dga? ( x11-libs/libXxf86dga ) + gtk? ( x11-libs/gtk+:2 ) sdl? ( >=media-libs/libsdl-1.2.7-r3 ) x11-libs/libX11 x11-libs/libXt" @@ -29,46 +30,41 @@ DEPEND="${RDEPEND} mmx? ( dev-lang/nasm ) >=sys-apps/sed-4 + sys-apps/gawk dev-util/pkgconfig" -S="${WORKDIR}/${MY_P}" +S="${WORKDIR}/${P/_rc*}" -src_unpack() { - unpack ${A} - cd "${S}" - sed -i -e '/ARCHFLAGS=/s:=.*:=:' configure - epatch "${FILESDIR}"/${P}-glibc-2.10.patch \ - "${FILESDIR}"/${P}-jpeg-7.patch +src_prepare() { + sed -i -e '/ARCHFLAGS=/s:=.*:=:' configure.ac + epatch "${FILESDIR}"/${P}-libpng-1.5.patch \ + "${FILESDIR}"/${P}-sdl-automagic.patch \ + "${FILESDIR}"/${P}-gtk-automagic.patch \ + "${FILESDIR}"/${P}-dga-automagic.patch \ + "${FILESDIR}"/${P}-v4l-automagic.patch + eautoreconf } -src_compile() { - local myconf - - if use yv12 && use dv; then - myconf="${myconf} --with-dv-yv12" - elif use yv12; then - ewarn "yv12 support is possible when 'dv' is in your USE flags." - fi - +src_configure() { [[ $(gcc-major-version) -eq 3 ]] && append-flags -mno-sse2 - append-flags -fno-strict-aliasing econf \ - --with-x \ - $(use_enable dga xfree-ext) \ + --enable-compile-warnings \ + $(use_enable mmx simd-accel) \ + --enable-largefile \ $(use_with quicktime libquicktime) \ + $(use_with dv libdv) \ $(use_with png libpng) \ - $(use_with v4l) \ + $(use_with dga) \ $(use_with gtk) \ - $(use_with sdl) \ - $(use_with dv libdv /usr) \ - $(use_enable mmx simd-accel) \ - --enable-largefile \ - --without-jpeg-mmx \ - ${myconf} + $(use_with sdl libsdl) \ + $(use_with v4l) \ + --with-x +} - emake || die +src_compile() { + default cd docs local infofile @@ -81,7 +77,7 @@ } src_install() { - einstall || die - dodoc mjpeg_howto.txt README* PLANS NEWS TODO HINTS BUGS ChangeLog \ - AUTHORS CHANGES + default + + dodoc mjpeg_howto.txt PLANS HINTS docs/FAQ.txt }