|
Line 0
Link Here
|
|
|
1 |
# Copyright 1999-2016 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Id$ |
| 4 |
|
| 5 |
EAPI=5 |
| 6 |
|
| 7 |
DESCRIPTION="Open source SIP, Media, and NAT Traversal Library" |
| 8 |
HOMEPAGE="http://www.pjsip.org/" |
| 9 |
SRC_URI="http://www.pjsip.org/release/${PV}/${P}.tar.bz2" |
| 10 |
|
| 11 |
LICENSE="GPL-2" |
| 12 |
SLOT="0" |
| 13 |
KEYWORDS="~amd64" |
| 14 |
IUSE="alsa doc epoll examples +ext-sound ffmpeg g711 g722 g7221 gsm gsm-builtin ilbc ipp l16 large-filter libsamplerate libyuv opencore-amr openh264 opus oss portaudio python resample resample-dll sdl +shared silk small-filter sound speex speex-aec speex-builtin +srtp ssl v4l2 video webrtc" |
| 15 |
|
| 16 |
DEPEND="alsa? ( media-libs/alsa-lib ) |
| 17 |
gsm? ( media-sound/gsm ) |
| 18 |
ilbc? ( dev-libs/ilbc-rfc3951 ) |
| 19 |
speex? ( media-libs/speex ) |
| 20 |
srtp? ( net-libs/libsrtp ) |
| 21 |
ssl? ( net-libs/gnutls )" |
| 22 |
|
| 23 |
RDEPEND="${DEPEND}" |
| 24 |
|
| 25 |
src_configure() { |
| 26 |
econf \ |
| 27 |
$(use_enable epoll) \ |
| 28 |
$(use_enable shared) \ |
| 29 |
$(use_enable resample) \ |
| 30 |
$(use_enable sound) \ |
| 31 |
$(use_enable oss) \ |
| 32 |
$(use_enable video) \ |
| 33 |
$(use_enable ext-sound) \ |
| 34 |
$(use_enable small-filter) \ |
| 35 |
$(use_enable large-filter) \ |
| 36 |
$(use_enable speex-aec) \ |
| 37 |
$(use_enable g711 g711-codec) \ |
| 38 |
$(use_enable l16 l16-codec) \ |
| 39 |
$(use_enable gsm-builtin gsm-codec) \ |
| 40 |
$(use_enable g722 g722-codec) \ |
| 41 |
$(use_enable g7221 g7221-codec) \ |
| 42 |
$(use_enable speex-builtin speex-codec) \ |
| 43 |
$(use_enable ilbc ilbc-codec) \ |
| 44 |
$(use_enable libsamplerate) \ |
| 45 |
$(use_enable resample-dll) \ |
| 46 |
$(use_enable sdl) \ |
| 47 |
$(use_enable ffmpeg) \ |
| 48 |
$(use_enable v4l2) \ |
| 49 |
$(use_enable openh264) \ |
| 50 |
$(use_enable libyuv) \ |
| 51 |
$(use_enable webrtc) \ |
| 52 |
$(use_enable ipp) \ |
| 53 |
$(use_enable ssl) \ |
| 54 |
$(use_enable opencore-amr) \ |
| 55 |
$(use_enable silk) \ |
| 56 |
$(use_enable opus) \ |
| 57 |
$(use_with speex external-speex) \ |
| 58 |
$(use_with gsm external-gsm) \ |
| 59 |
$(use_with srtp external-srtp) \ |
| 60 |
$(use_with portaudio external-pa) |
| 61 |
} |
| 62 |
|
| 63 |
src_compile () { |
| 64 |
emake -j1 |
| 65 |
} |
| 66 |
|
| 67 |
src_install() { |
| 68 |
emake install DESTDIR="${D}" |
| 69 |
|
| 70 |
if use python; then |
| 71 |
pushd pjsip-apps/src/python |
| 72 |
${EPYTHON} setup.py install --prefix="${D}/usr/" |
| 73 |
popd |
| 74 |
fi |
| 75 |
|
| 76 |
if use doc; then |
| 77 |
dodoc README.txt README-RTEMS |
| 78 |
fi |
| 79 |
|
| 80 |
if use examples; then |
| 81 |
insinto "/usr/share/doc/${P}/examples" |
| 82 |
doins "${S}/pjsip-apps/src/samples/"* |
| 83 |
fi |
| 84 |
|
| 85 |
# Remove files that pjproject should not install |
| 86 |
rm -r "${D}/usr/lib/libportaudio.a" \ |
| 87 |
"${D}/usr/lib/libsrtp.a" |
| 88 |
} |