# 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.gz" LICENSE="GPL" SLOT="1" KEYWORDS="~amd64 ~ppc ~x86" IUSE="sound ssl speex ilbc gsm examples python" RDEPEND="sound? (media-libs/alsa-lib) ssl? (dev-libs/openssl) python? (dev-lang/python)" DEPEND="${RDEPEND}" src_unpack() { unpack ${A} mv "${WORKDIR}/pjproject-${PV}" "${WORKDIR}/pjsip-${PV}" cd "${S}" mv -f aconfigure.ac configure.ac mv -f aconfigure configure epatch "${FILESDIR}/${P}-prefix.diff" epatch "${FILESDIR}/${P}-fPIC.diff" } src_compile() { econf $(use_enable sound) \ $(use_enable ssl) \ $(use_enable speex) \ $(use_enable speex speex-aec) \ $(use_enable ilbc) \ $(use_enable gsm) || die "emake failed." emake -j1 || die } src_install() { DESTDIR="${D}" emake install || die if use python; then cd pjsip-apps/src/py_pjsua python setup.py install --prefix="${D}/usr/" fi dodoc COPYING README.txt README-RTEMS INSTALL.txt if use examples; then mkdir -p ${D}/usr/share/doc/${P}/examples cp ${S}/pjsip-apps/src/samples/* ${D}/usr/share/doc/${P}/examples/ fi }