summaryrefslogtreecommitdiff
path: root/net-libs/pjproject
diff options
context:
space:
mode:
Diffstat (limited to 'net-libs/pjproject')
-rw-r--r--net-libs/pjproject/Manifest6
-rw-r--r--net-libs/pjproject/files/pjproject-2.9-config_site.h74
-rw-r--r--net-libs/pjproject/files/pjproject-2.9-ssl-enable.patch100
-rw-r--r--net-libs/pjproject/metadata.xml11
-rw-r--r--net-libs/pjproject/pjproject-2.9.ebuild120
5 files changed, 307 insertions, 4 deletions
diff --git a/net-libs/pjproject/Manifest b/net-libs/pjproject/Manifest
index ccaeffcd33a7..db465397bb51 100644
--- a/net-libs/pjproject/Manifest
+++ b/net-libs/pjproject/Manifest
@@ -1,8 +1,12 @@
AUX pjproject-2.7.1-ssl-flipflop.patch 4345 BLAKE2B b52f5a2cb86abdae86e9cfe58fe63b187f615b39ea4991768d0937e8b6e353a8496f1ad24f3cbaff92a09847c1ec444b81f9e470f1e78325ea26ca04456579e7 SHA512 00e7b8b347f73929f52015e102286f0631699de4c0e3631c53df6b00130d5b6760492748454ae7315eb9df0b182019901c59b9ed15c8fdd578548f9039080050
AUX pjproject-2.7.2-libressl.patch 3446 BLAKE2B 47b21f621ffd1990e276459d9692ed7e8a083b93fc8dd0f44225af7cbf8f8390f9790efd61c8c790a0f20da64cb7f47db4fd83a8f0604de9a1bce30d54b3079f SHA512 173fc80e85673c4036b433cbf8152c58862d4716d4d98688cfaebf4c5ed3df76b8d4893709577c1dfff82a02baeeb0220dcae1dafc2e69ea9472056727b0d0fc
AUX pjproject-2.7.2-ssl-flipflop.patch 4336 BLAKE2B 999150475bd24989f64bb718d082ff1c40d5ba383103371550d2c682578a9c57d58b4029e512ac5a064fae3a526bd6e62fb645ba45b4067c47fd148bcce668aa SHA512 438a61353c0200d3f230b81cc13f565a178d078b4580aa468a9241b5b95f5a2336d039f4aaf99cd57e7b1042f4c0a1cafd00c29191e36c08f2194d984811b8d6
+AUX pjproject-2.9-config_site.h 2168 BLAKE2B 39d526e7a2ca79ea2c1e453d95d420a6245e7a93641227a908660fea553a8b66d5dfb6b7108b49dc0686de6522c2485b72a6e7511096cbfe50bdb2800d559e6f SHA512 d6456b7fa36b3256613eea515b78f0884fa6b56705817cd421a962f3c3302bf0efa69006432dffca49400ef75dc99ebc7639d270aebe5bc2d4a9a9515cc56408
+AUX pjproject-2.9-ssl-enable.patch 3515 BLAKE2B d68479ba509513828d8488b60358ba00651c87d0b39b9bc800fe0d38294f2afad43fd7f4ee5c260bd62044d17b010112c59363277739f4ae7d20940943437539 SHA512 5fd3e681801e6e2cd56ec177d71a65422ec22b788adfad3920562616c737188f71097a545d9c59bd6a3d876ba143f90f731d165d8c68da25aa93b03c009753e8
DIST pjproject-2.7.1.tar.bz2 4880007 BLAKE2B 33fca89f07abc0b9662b1070c96b903c236a60149734755286dad3111411dbeef5779077a77d21112be6db2957cb7e18c5c833b3c5fd32c26be44d4550fb215e SHA512 cd15afee2a02659668ff228b2652d2bd179393e3b5031afae1c326354fb9676babc08eb689e466165536abc360684299b4fdb41dbb1148aed89afe1ce7e5d979
DIST pjproject-2.7.2.tar.bz2 4994233 BLAKE2B 44ecaf0997d5dd9b18e0b811cead7c9104e63894fa06fb1d64e79b60fa4210968fd90ef47e5f5be3629675363c8756ce3bc1834caa9700654ab4c53efe676ee7 SHA512 3d355ffcbbeed62cfc711e574a987dc06043ccf4f2625820adffa89167022b8306fcee3fada71d3d45e7b902fc9c65ac8221de101cbafed25362a3921f702afd
+DIST pjproject-2.9.tar.bz2 5009546 BLAKE2B 853f86e57c0f58943e977856bebc7dc20684ac4a6a16a55f3fe4ddf58ca58187bdc1011c5df2bc72de690f1695484012b582e56dd0e88a624ef319a5f3623772 SHA512 a65823a86ad0cd76890cf7dd2485f7547fd90aea2ef631c5420c009b35f39eda3b78551a42fc2816c2470de9eb728c26497774a8494824472ecaa1d2889cc20b
EBUILD pjproject-2.7.1.ebuild 2614 BLAKE2B 10ee58a83d0ebce1fe52bfe395bd319e08a4128364f7fbf889d0d089daef222859992b12786bf0796d6bf77f599a9dcc9dc9800253d4e781069a9587efe07259 SHA512 2bd916ffdc6449e3fc62fd4aa1d3dee7634a97351b369e896384b46316e089185121c39efb8fa30143745c6c91ccd001c797cd0f13020481769dc3bf0e196e8f
EBUILD pjproject-2.7.2.ebuild 2755 BLAKE2B efbca2a7da848ea23594811a1ae9636ac15010f1ee7228b821237076d3d497d0aa240c15cdce4f14619138acef073aa86670b5bfba051c027532c04e3a524bb8 SHA512 f1ccce719dc7b0e7c667cccd0c9137115089d0ef882949994918215068913369843391490ee407bd2c164204a0241b55b87c6b63b75c5160c3402d46fa42a964
-MISC metadata.xml 1096 BLAKE2B 03a918c911b8a3c8bdd0aafaabc820b2750dbf5a3b7573ffe987e71ee8edad4a369e7c15845d4ad748150c8972d646d44f6489a9a54e16895dee7a6048b5eac5 SHA512 d2547bfdc7aced6f242f7493a39425f4c2ba5881ab2cc6b8da386e84c092780ab0f876dcf947436150a5060faedc3a0a55377ad389f3a53f6142ef188b321a92
+EBUILD pjproject-2.9.ebuild 3030 BLAKE2B 1418bc3c0973a06f109f3b5afa61418074676354755b6878ac6908cae06b452852703d9de60acd45de5282883f40a3b0d202c3c2fd1aae18a31bb8b97345bdd3 SHA512 9f8481927212966ae472220fce138e211779bb7ce453795f5c0376434713180ebee985ec029e39c2cbd0ee87e165bceabd1494a7198ff20f146febace1715b5d
+MISC metadata.xml 1275 BLAKE2B 6d833264ab353a9393a577f50a5241948bffe17ecfa551aebd4736fef54e7ef316c481faee27ddde3a5aab327a22bd38520e781aaeefc5a2c14cb2fd08dcf608 SHA512 563deb2cb83e6a638d9cc99b912c4ca907acd0ea133168a33d452f29d856b27ee38ee73bf27ed6147b6decfb6b4a74ef1ea40b1742e201408916fdeca9400771
diff --git a/net-libs/pjproject/files/pjproject-2.9-config_site.h b/net-libs/pjproject/files/pjproject-2.9-config_site.h
new file mode 100644
index 000000000000..d41ac1d1947b
--- /dev/null
+++ b/net-libs/pjproject/files/pjproject-2.9-config_site.h
@@ -0,0 +1,74 @@
+/*
+ * Based off of the Asterisk config_site.h file.
+ *
+ * In general it's the same with some removals due to being ebuild-managed.
+ */
+
+#include <sys/select.h>
+
+/* handled by ebuild, default to disabled here */
+#ifndef PJMEDIA_HAS_SRTP
+#define PJMEDIA_HAS_SRTP 0
+#endif
+
+#define PJ_MAX_HOSTNAME (256)
+#define PJSIP_MAX_URL_SIZE (512)
+#ifdef PJ_HAS_LINUX_EPOLL
+#define PJ_IOQUEUE_MAX_HANDLES (5000)
+#else
+#define PJ_IOQUEUE_MAX_HANDLES (FD_SETSIZE)
+#endif
+#define PJ_IOQUEUE_HAS_SAFE_UNREG 1
+#define PJ_IOQUEUE_MAX_EVENTS_IN_SINGLE_POLL (16)
+
+#define PJ_SCANNER_USE_BITWISE 0
+#define PJ_OS_HAS_CHECK_STACK 0
+
+#ifndef PJ_LOG_MAX_LEVEL
+#define PJ_LOG_MAX_LEVEL 6
+#endif
+
+#define PJ_ENABLE_EXTRA_CHECK 1
+#define PJSIP_MAX_TSX_COUNT ((64*1024)-1)
+#define PJSIP_MAX_DIALOG_COUNT ((64*1024)-1)
+#define PJSIP_UDP_SO_SNDBUF_SIZE (512*1024)
+#define PJSIP_UDP_SO_RCVBUF_SIZE (512*1024)
+#define PJSIP_SAFE_MODULE 0
+#define PJ_HAS_STRICMP_ALNUM 0
+
+/*
+ * Do not ever enable PJ_HASH_USE_OWN_TOLOWER because the algorithm is
+ * inconsistently used when calculating the hash value and doesn't
+ * convert the same characters as pj_tolower()/tolower(). Thus you
+ * can get different hash values if the string hashed has certain
+ * characters in it. (ASCII '@', '[', '\\', ']', '^', and '_')
+ */
+#undef PJ_HASH_USE_OWN_TOLOWER
+
+/*
+ It is imperative that PJSIP_UNESCAPE_IN_PLACE remain 0 or undefined.
+ Enabling it will result in SEGFAULTS when URIs containing escape sequences are encountered.
+*/
+#undef PJSIP_UNESCAPE_IN_PLACE
+#define PJSIP_MAX_PKT_LEN 32000
+
+#undef PJ_TODO
+#define PJ_TODO(x)
+
+/* Defaults too low for WebRTC */
+#define PJ_ICE_MAX_CAND 32
+#define PJ_ICE_MAX_CHECKS (PJ_ICE_MAX_CAND * PJ_ICE_MAX_CAND)
+
+/* Increase limits to allow more formats */
+#define PJMEDIA_MAX_SDP_FMT 64
+#define PJMEDIA_MAX_SDP_BANDW 4
+#define PJMEDIA_MAX_SDP_ATTR (PJMEDIA_MAX_SDP_FMT*2 + 4)
+#define PJMEDIA_MAX_SDP_MEDIA 16
+
+/*
+ * Turn off the periodic sending of CRLNCRLN. Default is on (90 seconds),
+ * which conflicts with the global section's keep_alive_interval option in
+ * pjsip.conf.
+ */
+#define PJSIP_TCP_KEEP_ALIVE_INTERVAL 0
+#define PJSIP_TLS_KEEP_ALIVE_INTERVAL 0
diff --git a/net-libs/pjproject/files/pjproject-2.9-ssl-enable.patch b/net-libs/pjproject/files/pjproject-2.9-ssl-enable.patch
new file mode 100644
index 000000000000..bb8a11d7f457
--- /dev/null
+++ b/net-libs/pjproject/files/pjproject-2.9-ssl-enable.patch
@@ -0,0 +1,100 @@
+From 2942c73cd3b3389ec1a35258f22ac9d0f0742de1 Mon Sep 17 00:00:00 2001
+From: Jaco Kroon <jaco@iewc.co.za>
+Date: Thu, 24 May 2018 15:40:33 +0200
+Subject: [PATCH] Fix support for --enable-ssl.
+
+This change enables the explicit use of --enable-ssl in such a way that
+package managers such as portage (Gentoo) that explicitly does
+--enable-ssl or --disable-ssl will get the results that it's looking
+for.
+
+Without this specifying --enable-ssl would end up actually disabling it.
+
+Additionally, if --enable-ssl is specified but the script ends up being
+unable to enable ssl it will fail.
+---
+ aconfigure | 16 ++++++++++++----
+ aconfigure.ac | 15 ++++++++++++---
+ 2 files changed, 24 insertions(+), 7 deletions(-)
+
+diff --git a/aconfigure b/aconfigure
+index 0cf17faae..57bdfba87 100755
+--- a/aconfigure
++++ b/aconfigure
+@@ -8001,8 +8001,9 @@ if test "${enable_ssl+set}" = set; then :
+ $as_echo "Checking if SSL support is disabled... yes" >&6; }
+ fi
+
+-else
++fi
+
++if test "x$ac_no_ssl" != "x1"; then
+ if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then
+ CFLAGS="$CFLAGS -I$with_ssl/include"
+ CPPFLAGS="$CPPFLAGS -I$with_ssl/include"
+@@ -8317,16 +8318,23 @@ $as_echo "GnuTLS library found, SSL support enabled" >&6; }
+
+ ac_ssl_backend="gnutls"
+ else
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ** No GnuTLS libraries found, disabling SSL support **" >&5
+-$as_echo "** No GnuTLS libraries found, disabling SSL support **" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ** No GnuTLS libraries found **" >&5
++$as_echo "** No GnuTLS libraries found **" >&6; }
+ fi
+
+ fi
+
++ if test "x$ac_ssl_backend" = "x"; then
++ if test "x$enable_ssl" = "xyes"; then
++ as_fn_error $? "SSL Support requested but neither OpenSSL nor GnuTLS operational" "$LINENO" 5
++ else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: No SSL detected, disabling SSL support" >&5
++$as_echo "No SSL detected, disabling SSL support" >&6; }
++ fi
++ fi
+ fi
+
+
+-
+ # Check whether --with-opencore-amrnb was given.
+ if test "${with_opencore_amrnb+set}" = set; then :
+ withval=$with_opencore_amrnb; as_fn_error $? "This option is obsolete and replaced by --with-opencore-amr=DIR" "$LINENO" 5
+diff --git a/aconfigure.ac b/aconfigure.ac
+index 8d7d944a1..45c42756b 100644
+--- a/aconfigure.ac
++++ b/aconfigure.ac
+@@ -1607,7 +1607,8 @@ AC_ARG_ENABLE(ssl,
+ AC_MSG_RESULT([Checking if SSL support is disabled... yes])
+ fi
+ ],
+- [
++ [])
++if test "x$ac_no_ssl" != "x1"; then
+ if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then
+ CFLAGS="$CFLAGS -I$with_ssl/include"
+ CPPFLAGS="$CPPFLAGS -I$with_ssl/include"
+@@ -1692,11 +1693,19 @@ AC_ARG_ENABLE(ssl,
+ AC_DEFINE(PJ_SSL_SOCK_IMP, PJ_SSL_SOCK_IMP_GNUTLS)
+ ac_ssl_backend="gnutls"
+ else
+- AC_MSG_RESULT([** No GnuTLS libraries found, disabling SSL support **])
++ AC_MSG_RESULT([** No GnuTLS libraries found **])
+ fi
+
+ fi
+- ])
++
++ if test "x$ac_ssl_backend" = "x"; then
++ if test "x$enable_ssl" = "xyes"; then
++ AC_MSG_ERROR([SSL Support requested but neither OpenSSL nor GnuTLS operational])
++ else
++ AC_MSG_RESULT([No SSL detected, disabling SSL support])
++ fi
++ fi
++fi
+
+ dnl # Obsolete option --with-opencore-amrnb
+ AC_ARG_WITH(opencore-amrnb,
+--
+2.23.0
+
diff --git a/net-libs/pjproject/metadata.xml b/net-libs/pjproject/metadata.xml
index 3d82a0d2376c..6d51c770dce3 100644
--- a/net-libs/pjproject/metadata.xml
+++ b/net-libs/pjproject/metadata.xml
@@ -2,22 +2,27 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
- <email>chainsaw@gentoo.org</email>
- <name>Tony Vroon</name>
+ <email>jaco@uls.co.za</email>
+ <name>Jaco Kroon</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
</maintainer>
<use>
<flag name="amr">Inlcude AMR codec in the build</flag>
- <flag name="v4l2">Include Video4Linux v2 support in the build</flag>
<flag name="epoll">Use /dev/epoll ioqueue on Linux (experimental)</flag>
<flag name="g711">Include G.711 codecs in the build</flag>
<flag name="g722">Include G.722 codec in the build</flag>
<flag name="g7221">Include G.722.1 codec in the build</flag>
+ <flag name="g729">Include G.729 codec via net-libs/bcg729</flag>
<flag name="ilbc">Include iLBC codec in the build</flag>
<flag name="l16">Include Linear/L16 codec family in the build</flag>
<flag name="libyuv">Include libyuv in the build</flag>
<flag name="openh264">Include Open H.264 support in the build</flag>
<flag name="resample">Include resampling implementations in the build</flag>
<flag name="silk">Include SILK support in the build</flag>
+ <flag name="v4l2">Include Video4Linux v2 support in the build</flag>
<flag name="webrtc">Enable WebRTC support</flag>
</use>
</pkgmetadata>
diff --git a/net-libs/pjproject/pjproject-2.9.ebuild b/net-libs/pjproject/pjproject-2.9.ebuild
new file mode 100644
index 000000000000..5a4d582b1e2e
--- /dev/null
+++ b/net-libs/pjproject/pjproject-2.9.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools flag-o-matic
+
+DESCRIPTION="Open source SIP, Media, and NAT Traversal Library"
+HOMEPAGE="https://www.pjsip.org/"
+SRC_URI="https://www.pjsip.org/release/${PV}/${P}.tar.bz2"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+LICENSE="GPL-2"
+SLOT="0"
+
+# g729 not included due to special bcg729 handling.
+CODEC_FLAGS="g711 g722 g7221 gsm ilbc speex l16"
+VIDEO_FLAGS="sdl ffmpeg v4l2 openh264 libyuv"
+SOUND_FLAGS="alsa portaudio"
+IUSE="amr debug epoll examples ipv6 libressl opus resample silk ssl static-libs webrtc
+ ${CODEC_FLAGS} g729
+ ${VIDEO_FLAGS}
+ ${SOUND_FLAGS}"
+
+PATCHES=(
+ "${FILESDIR}/pjproject-2.9-ssl-enable.patch"
+)
+
+RDEPEND="net-libs/libsrtp:=
+
+ alsa? ( media-libs/alsa-lib )
+ amr? ( media-libs/opencore-amr )
+ ffmpeg? ( virtual/ffmpeg:= )
+ g729? ( media-libs/bcg729 )
+ gsm? ( media-sound/gsm )
+ ilbc? ( dev-libs/ilbc-rfc3951 )
+ openh264? ( media-libs/openh264 )
+ opus? ( media-libs/opus )
+ portaudio? ( media-libs/portaudio )
+ resample? ( media-libs/libsamplerate )
+ sdl? ( media-libs/libsdl )
+ speex? ( media-libs/speexdsp )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+src_prepare() {
+ default
+ rm configure || die "Unable to remove unwanted wrapper"
+ mv aconfigure.ac configure.ac || die "Unable to rename configure script source"
+ eautoreconf
+
+ cp "${FILESDIR}/pjproject-2.9-config_site.h" "${S}/pjlib/include/pj/config_site.h" || die "Unable to create config_site.h"
+}
+
+src_configure() {
+ local myconf=()
+ local videnable="--disable-video"
+ local t
+
+ use debug || append-cflags -DNDEBUG=1
+ use ipv6 && append-cflags -DPJ_HAS_IPV6=1
+ append-cflags -DPJMEDIA_HAS_SRTP=1
+
+ for t in ${CODEC_FLAGS}; do
+ myconf+=( $(use_enable ${t} ${t}-codec) )
+ done
+ myconf+=( $(use_enable g729 bcg729) )
+
+ for t in ${VIDEO_FLAGS}; do
+ myconf+=( $(use_enable ${t}) )
+ use "${t}" && videnable="--enable-video"
+ done
+
+ [ "${videnable}" = "--enable-video" ] && append-cflags -DPJMEDIA_HAS_VIDEO=1
+
+ econf \
+ --enable-shared \
+ --with-external-srtp \
+ ${videnable} \
+ $(use_enable alsa sound) \
+ $(use_enable amr opencore-amr) \
+ $(use_enable epoll) \
+ $(use_enable opus) \
+ $(use_enable portaudio ext-sound) \
+ $(use_enable resample libsamplerate) \
+ $(use_enable resample resample-dll) \
+ $(use_enable resample) \
+ $(use_enable silk) \
+ $(use_enable speex speex-aec) \
+ $(use_enable ssl) \
+ $(use_with gsm external-gsm) \
+ $(use_with portaudio external-pa) \
+ $(use_with speex external-speex) \
+ $(usex webrtc '' --disable-libwebrtc) \
+ "${myconf[@]}"
+}
+
+src_compile() {
+ emake dep
+ emake
+}
+
+src_install() {
+ default
+
+ newbin pjsip-apps/bin/pjsua-${CHOST} pjsua
+ newbin pjsip-apps/bin/pjsystest-${CHOST} pjsystest
+
+ if use examples; then
+ insinto "/usr/share/doc/${PF}/examples"
+ doins -r pjsip-apps/src/samples
+ fi
+
+ use static-libs || rm "${ED}/usr/$(get_libdir)"/*.a || die "Error removing static archives"
+}