# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 inherit eutils flag-o-matic DESCRIPTION="A SIP stack supporting many SIP extensions/features." HOMEPAGE="http://www.pjsip.org/" SRC_URI="http://www.pjsip.org/release/${PV}/pjproject-${PV}.tar.bz2" LICENSE="GPL-2" SLOT="1" KEYWORDS="~amd64 ~ppc ~x86" IUSE="sound ssl speex ilbc gsm doc examples python l16 floating-point small-filter large-filter g711" RDEPEND=" sound? ( media-libs/alsa-lib ) ssl? ( dev-libs/openssl ) python? ( dev-lang/python ) " DEPEND="${RDEPEND}" S="${WORKDIR}/pjproject-${PV}" src_unpack() { unpack ${A} cd "${S}" } src_compile() { econf $(use_enable sound) \ $(use_enable ssl) \ $(use_enable l16) \ $(use_enable floating-point) \ $(use_enable small-filter) \ $(use_enable large-filter) \ $(use_enable speex) \ $(use_enable speex speex-aec) \ $(use_enable g711) \ $(use_enable g711 g711-plc) \ $(use_enable ilbc) \ $(use_enable gsm) || die "econf failed." emake -j1 || die "emake failed." } src_install() { DESTDIR="${D}" emake install || die "emake install failed." if use python; then pushd pjsip-apps/src/py_pjsua python setup.py install --prefix="${D}/usr/" popd fi if use doc; then dodoc COPYING README.txt README-RTEMS INSTALL.txt fi if use examples; then insinto /usr/share/doc/${P}/examples doins ${S}/pjsip-apps/src/samples/* fi }