# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=2 #inherit kde-functions eutils toolchain-funcs inherit kde-functions eutils base DESCRIPTION="MLT is an open source multimedia framework, designed and developed for television broadcasting" HOMEPAGE="http://mlt.sourceforge.net/" SRC_URI="mirror://sourceforge/mlt/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64" IUSE="dv ffmpeg frei0r gtk jack kde libsamplerate mmx mp3 png qt3 qt4 quicktime sdl sox sse theora vorbis xine xml" RDEPEND="dv? ( media-libs/libdv ) ffmpeg? ( media-video/ffmpeg[mp3,theora,vorbis] ) frei0r? ( media-plugins/frei0r ) gtk? ( x11-libs/gtk+:2 x11-libs/pango ) jack? ( media-sound/jack-audio-connection-kit media-libs/ladspa-sdk dev-libs/libxml2 ) libsamplerate? ( media-libs/libsamplerate ) qt3? ( x11-libs/qt:3 kde? ( kde-base/kdelibs:3.5 ) ) !qt3? ( qt4? ( || ( x11-libs/qt-gui:4 x11-libs/qt:4 ) ) ) quicktime? ( media-libs/libquicktime ) sdl? ( media-libs/libsdl media-libs/sdl-image ) sox? ( media-sound/sox[libsamplerate=] ) vorbis? ( media-libs/libvorbis ) xine? ( media-libs/xine-lib ) xml? ( dev-libs/libxml2 )" DEPEND="${RDEPEND} png? ( media-gfx/imagemagick )" PDEPEND="!qt3? ( kde? ( media-video/kdenlive ) )" src_prepare() { epatch "${FILESDIR}"/mlt-0.2.3-nostrip.patch epatch "${FILESDIR}"/${P}-qimage.patch } src_configure() { local myconf="--enable-gpl --enable-motion-est $(use_enable dv) $(use_enable ffmpeg avformat) $(use_enable frei0r) $(use_enable gtk gtk2) $(use_enable jack jackrack) $(use_enable libsamplerate resample) $(use_enable mmx) $(use_enable sdl) $(use_enable sox) $(use_enable sse) $(use_enable vorbis) $(use_enable xine) $(use_enable xml westley)" use ffmpeg && myconf="${myconf} --avformat-swscale" use png && myconf="${myconf} --luma-compress" ( use quicktime && use dv ) || myconf="${myconf} --disable-kino" if use qt3; then myconf="${myconf} --disable-kdenlive" else myconf="${myconf} $(use_enable kde kdenlive)" fi if use qt3; then myconf="${myconf} --qimage-libdir=$QTDIR/$(get_libdir) --qimage-includedir=$QTDIR/include" if use kde; then # compile extra image formats using kde set-kdedir 3.5 myconf="${myconf} --kde-libdir=$KDEDIR/$(get_libdir) --kde-includedir=$KDEDIR/include" fi elif use qt4; then myconf="${myconf} --qimage-libdir=/usr/$(get_libdir)/qt4 --qimage-includedir=/usr/include/qt4" else myconf="${myconf} --disable-qimage" fi econf ${myconf} || die "econf failed" sed -i -e s/^OPT/#OPT/ "${S}/config.mak" } src_compile() { tc-export CC emake || die "emake failed" } src_install() { emake DESTDIR="${D}" install || die "emake install failed" dodoc docs/*.txt ChangeLog README docs/TODO dodir /usr/share/${PN} insinto /usr/share/${PN} doins -r demo }