Initial import from #188056. Thanks.
authorJean-Noël Rivasseau <elvanor@gentoo.org>
Fri, 16 Jul 2010 09:47:34 +0000 (09:47 +0000)
committerJean-Noël Rivasseau <elvanor@gentoo.org>
Fri, 16 Jul 2010 09:47:34 +0000 (09:47 +0000)
Package-Manager: portage-2.1.8.3/cvs/Linux i686

net-libs/pjsip/ChangeLog [new file with mode: 0644]
net-libs/pjsip/Manifest [new file with mode: 0644]
net-libs/pjsip/metadata.xml [new file with mode: 0644]
net-libs/pjsip/pjsip-1.6.ebuild [new file with mode: 0644]

diff --git a/net-libs/pjsip/ChangeLog b/net-libs/pjsip/ChangeLog
new file mode 100644 (file)
index 0000000..ec72d7c
--- /dev/null
@@ -0,0 +1,12 @@
+# ChangeLog for net-libs/pjsip
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-libs/pjsip/ChangeLog,v 1.1 2010/07/16 09:47:34 elvanor Exp $
+
+*pjsip-1.6 (16 Jul 2010)
+
+  16 Jul 2010; Jean-Noël Rivasseau <elvanor@gentoo.org> +pjsip-1.6.ebuild,
+  +metadata.xml:
+  Initial import from bug #188056. Cleaned up a bit the ebuild from Atman
+  Sense (atman.sense@zise.de).
+  Thanks!
+
diff --git a/net-libs/pjsip/Manifest b/net-libs/pjsip/Manifest
new file mode 100644 (file)
index 0000000..694783f
--- /dev/null
@@ -0,0 +1,4 @@
+DIST pjproject-1.6.tar.bz2 3716047 RMD160 4a8c1342ad2860983e785bbfbd170410edc2b7d7 SHA1 63e7cd6963290cf396024a837d1fb5194107db57 SHA256 8f13d7197eddd1442d24cf164b395582c00e7f19283f3c0e9d1315d85551ec7b
+EBUILD pjsip-1.6.ebuild 2809 RMD160 3c2763dfe9013521c161631bf48dcbc84f7445f2 SHA1 aaa83271af3e9d13d8b6e85559a5f822691ba9ad SHA256 819465f5f877ae58b313d2556faafcc6495b1dc1a317b7c069b4d939733c03e8
+MISC ChangeLog 437 RMD160 7cb6898f517201a20219efb36c630dcbcabd0b7f SHA1 ff22857fecff8f0b07c44db5d42346cd81d57e63 SHA256 2c133ee99555d657b8327cd6e542690820728c371e3a8637683a826af9bb1fc2
+MISC metadata.xml 875 RMD160 4cd1111d26ef3a1f6aa513e9707a742014c0a990 SHA1 7de7383b209b6c6dd953071ef50543b02ea8bebd SHA256 3407df107160e74285617b2613cb8b0761bd114592680c36fd84f397b8902b2a
diff --git a/net-libs/pjsip/metadata.xml b/net-libs/pjsip/metadata.xml
new file mode 100644 (file)
index 0000000..db7437e
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <herd>no-herd</herd>
+       <maintainer>
+               <email>elvanor@gentoo.org</email>
+               <name>Jean-Noël Rivasseau</name>
+       </maintainer>
+       <longdescription>
+               Pjsip is a set of Open Source, comprehensive, high performance, small footprint
+               multimedia communication libraries written in C language for building
+               embedded/non-embedded VoIP applications.
+       </longdescription>
+       <use>
+               <flag name="epoll">epoll system call support</flag>
+               <flag name="ext-sound">External sound device support</flag>
+               <flag name="g711">Builds the G711 codec</flag>
+               <flag name="g722">Builds the G722 codec</flag>
+               <flag name="g7221">Builds the G7221 codec</flag>
+               <flag name="ilbc">Builds the ilbc codec</flag>
+               <flag name="l16">Builds the L16 codec</flag>
+       </use>
+</pkgmetadata>
+
diff --git a/net-libs/pjsip/pjsip-1.6.ebuild b/net-libs/pjsip/pjsip-1.6.ebuild
new file mode 100644 (file)
index 0000000..3c86298
--- /dev/null
@@ -0,0 +1,98 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-libs/pjsip/pjsip-1.6.ebuild,v 1.1 2010/07/16 09:47:34 elvanor Exp $
+
+EAPI="2"
+
+DESCRIPTION="Multimedia communication libraries written in C language
+for building VoIP applications."
+HOMEPAGE="http://www.pjsip.org/"
+SRC_URI="http://www.pjsip.org/release/${PV}/pjproject-${PV}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="alsa doc epoll examples ext-sound g711 g722 g7221 gsm ilbc l16
+oss python speex"
+#small-filter large-filter speex-aec ssl
+
+DEPEND="alsa? ( media-libs/alsa-lib )
+       gsm? ( media-sound/gsm )
+       ilbc? ( dev-libs/ilbc-rfc3951 )
+       speex? ( media-libs/speex )"
+       #ssl? ( dev-libs/openssl )
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/pjproject-${PV}"
+
+src_prepare() {
+       # Remove target name from lib names
+       sed -i -e 's/-$(TARGET_NAME)//g' \
+               -e 's/= $(TARGET_NAME).a/= .a/g' \
+               -e 's/-$(LIB_SUFFIX)/$(LIB_SUFFIX)/g' \
+               $(find . -name '*.mak*' -o -name Makefile) || die "sed failed."
+
+       # Fix hardcoded prefix and flags
+       sed -i \
+               -e 's/poll@/poll@\nexport PREFIX := @prefix@\n/g' \
+               -e 's!prefix = /usr/local!prefix = $(PREFIX)!' \
+               -e '/PJLIB_CFLAGS/ s/(_CFLAGS)/(_CFLAGS) -fPIC/g' \
+               -e '/PJLIB_UTIL_CFLAGS/ s/(_CFLAGS)/(_CFLAGS) -fPIC/g' \
+               Makefile \
+               build.mak.in || die "sed failed."
+
+       # Disable symlinking (lib-target_name to lib)
+       sed -i -e '/cd \$/b1;b;:1 N;N;d' Makefile || die "sed failed."
+
+       # TODO: remove deps to shipped codecs and libs, use system ones
+       # rm -r third_party
+       # libresample: https://ccrma.stanford.edu/~jos/resample/Free_Resampling_Software.html
+}
+
+src_configure() {
+       # Disable through portage available codecs
+       econf --disable-gsm-codec \
+               --disable-speex-codec \
+               --disable-ilbc-codec \
+               --disable-speex-aec \
+               $(use_enable epoll) \
+               $(use_enable alsa sound) \
+               $(use_enable oss) \
+               $(use_enable ext-sound) \
+               $(use_enable g711 g711-codec) \
+               $(use_enable l16 l16-codec) \
+               $(use_enable g722 g722-codec) \
+               $(use_enable g7221 g7221-codec) || die "econf failed."
+               #$(use_enable small-filter) \
+               #$(use_enable large-filter) \
+               #$(use_enable speex-aec) \
+               #$(use_enable ssl) \ #broken? sflphone doesn't compile if enabled or disabled
+}
+
+src_compile() {
+       emake dep || die "emake dep 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 README.txt README-RTEMS
+       fi
+
+       if use examples; then
+               insinto "/usr/share/doc/${P}/examples"
+               doins "${S}/pjsip-apps/src/samples/"*
+       fi
+
+       # Remove files that pjproject should not install
+       rm -r "${D}/usr/lib/libportaudio.a" \
+               "${D}/usr/lib/libsrtp.a"
+}