# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="2" DESCRIPTION="A free and efficient efficient library for ROHC compression" HOMEPAGE="http://launchpad.net/rohc" SRC_URI="http://launchpad.net/${PN}/1.3.x/${PV}/+download/${P}.tar.bz2 test? ( http://launchpad.net/${PN}/1.3.x/${PV}/+download/${PN}-tests-${PV}.tar.bz2 )" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~arm ~amd64" IUSE="debug doc rtp-bit-type test" DEPEND="test? ( net-libs/libpcap ) doc? ( app-doc/doxygen[latex] sci-visualization/gnuplot )" src_prepare() { # the traffic captures for tests are in a separate archive # this saves bandwidth if tests are disabled if use test ; then unpack ${PN}-tests-${PV}.tar.bz2 \ || die "failed to unpack network captures for tests" fi } src_configure() { local myconf myconf=" $(use_enable rtp-bit-type) $(use_enable test rohc-tests)" # configure log level if use debug ; then myconf="${myconf} --enable-rohc-debug=3" else myconf="${myconf} --enable-rohc-debug=0" fi # configure the library econf ${myconf} || die "failed to configure library" # build the library emake || die "failed to build library" # build HTML documentation and perf graphs if use doc ; then emake doc || die "failed to generate HTML documentation" emake measures || die "failed generate perf graphs" fi } src_install() { # install libraries but not useless *.la files emake DESTDIR="${D}" install || die "failed to install library" for lib in common comp decomp ; do rm -f ${D}/usr/lib/librohc_${lib}.la done # install README/INSTALL... files dodoc README INSTALL COPYING AUTHORS ChangeLog \ || die "failed to install README, INSTALL... files" # install HTML documentation and perf graphs if use doc ; then dohtml -r doc/html/* || die "failed to install HTML documentation" docinto graphs || die "failed to create dir for perf graphs" dodoc measures/*/*.png || die "failed to install perf graphs" fi }