# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="2" WX_GTK_VER="2.8" inherit autotools wxwidgets confutils multilib DESCRIPTION="MediaInfo supplies technical and tag information about media files" HOMEPAGE="http://mediainfo.sourceforge.net" SRC_URI="mirror://sourceforge/${PN}/source/${PV}/${PN}_${PV}.tar.bz2" S="${WORKDIR}/MediaInfo" LICENSE="LGPL-3" SLOT="0" KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" IUSE="+cli debug wxwidgets" # needed at run-time RDEPEND="dev-libs/libzen[wxwidgets=] =media-libs/lib${PN}-${PV} wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X] )" # only needed at build-time: DEPEND="${RDEPEND}" pkg_setup() { ! use cli && ! use wxwidgets && die "Nothing to build, enable cli or/and gui." use cli && TARGETS="CLI" use wxwidgets && TARGETS="${TARGETS} GUI" } src_prepare() { for target in ${TARGETS}; do cd "${S}/Project/GNU/${target}" eautoreconf done } src_configure() { for target in ${TARGETS}; do local myconf=" --disable-dependency-tracking \ --enable-shared \ --enable-static \ --with-dll \ $(use_enable debug)" if use wxwidgets && [[ "${target}" = "GUI" ]]; then myconf="$myconf --with-wxwidgets --with-wx-gui" fi cd "${S}/Project/GNU/${target}" econf ${myconf} || die "econf failed for ${target}" done } src_compile() { for target in ${TARGETS}; do cd "${S}/Project/GNU/${target}" emake || die "emake failed failed for ${target}" done } src_install() { for target in ${TARGETS}; do cd "${S}/Project/GNU/${target}" einstall || die "einstall failed" dodoc "${S}/History_${target}.txt" if use wxwidgets && [[ "${target}" = "GUI" ]]; then newicon "${S}"/Source/Ressource/Image/MediaInfo.png "${PN}".png make_desktop_entry "${PN}-gui" "MediaInfo" "${PN}" "AudioVideo;GTK;" fi done dodoc "${S}"/*.html }