# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="2" inherit autotools confutils multilib NICE_NAME="MediaInfo" DESCRIPTION="The ${NICE_NAME} library supplies technical and tag information about media files" HOMEPAGE="http://mediainfo.sourceforge.net" SRC_URI="mirror://sourceforge/mediainfo/source/${PV}/${PN}_${PV}.tar.bz2" S="${WORKDIR}/${NICE_NAME}Lib/Project/GNU/Library" LICENSE="LGPL-3" SLOT="0" KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" IUSE="curl debug doc libmms" # needed at run-time RDEPEND="sys-libs/zlib dev-libs/libzen curl? ( net-misc/curl ) libmms? ( >=media-libs/libmms-0.4 )" # only needed at build-time: DEPEND="${RDEPEND} doc? ( app-doc/doxygen )" src_prepare() { eautoreconf } src_configure() { local myconf=" --disable-dependency-tracking \ --enable-shared \ --enable-static \ $(use_enable debug) \ $(use_with curl libcurl) \ $(use_with libmms)" econf ${myconf} || die "econf failed" } src_compile() { emake || die "emake failed" sed -i ${PN}-config -e "s:${S}:\${exec_prefix}/lib:" if use doc; then cd "${WORKDIR}"/${NICE_NAME}Lib/Source/Doc doxygen Doxyfile fi } src_install() { cd "${S}" einstall || die "einstall failed" dobin ${PN}-config insinto /usr/$(get_abi_LIBDIR)/pkgconfig doins ${PN}.pc insinto /usr/include/${NICE_NAME} doins "${WORKDIR}"/${NICE_NAME}Lib/Source/${NICE_NAME}/*.h insinto /usr/include/${NICE_NAME}DLL doins "${WORKDIR}"/${NICE_NAME}Lib/Source/${NICE_NAME}DLL/*.h for subinc in Archive Audio Duplicate Export Image Multiple Reader Tag Text Video; do insinto /usr/include/${NICE_NAME}/${subinc} doins "${WORKDIR}"/${NICE_NAME}Lib/Source/${NICE_NAME}/${subinc}/*.h done dodoc "${WORKDIR}"/${NICE_NAME}Lib/*.txt if use doc; then dohtml "${WORKDIR}"/${NICE_NAME}Lib/Source/Doc/Documentation.html dohtml -r "${WORKDIR}"/${NICE_NAME}Lib/Doc fi }