summaryrefslogtreecommitdiff
path: root/net-libs
diff options
context:
space:
mode:
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/Manifest.gzbin31853 -> 31852 bytes
-rw-r--r--net-libs/pjproject/Manifest4
-rw-r--r--net-libs/pjproject/files/pjproject-2.13.1-r1-config_site.h86
-rw-r--r--net-libs/pjproject/metadata.xml1
-rw-r--r--net-libs/pjproject/pjproject-2.13.1-r1.ebuild142
5 files changed, 232 insertions, 1 deletions
diff --git a/net-libs/Manifest.gz b/net-libs/Manifest.gz
index 75b9c7f44313..c3a6f3267744 100644
--- a/net-libs/Manifest.gz
+++ b/net-libs/Manifest.gz
Binary files differ
diff --git a/net-libs/pjproject/Manifest b/net-libs/pjproject/Manifest
index 1c49405c827e..a7efc7fe5cb5 100644
--- a/net-libs/pjproject/Manifest
+++ b/net-libs/pjproject/Manifest
@@ -3,8 +3,10 @@ AUX pjproject-2.13-r1-CVE-2022-23537-buffer-overread-on-STUN-error-decode.patch
AUX pjproject-2.13-r1-CVE-2022-23547-buffer-overread-on-STUN-decode.patch 1665 BLAKE2B 6351b770947a5487e8f1c59ab8ae09a9e8e7eb9c3ab25975e58e04349505b26af5a8917e4044f4d48c5d04001a3f276182328505e1976f829a6dab51e0fd0160 SHA512 a3bdf959f199db105eca701d0b8d9f1e6bce495436277670bad0b6cd60f4718b41e35bcad86f338b9b919de7121d5610af0d5a5f33fa48767b761fc2e4b515da
AUX pjproject-2.13-r1-Make-sure-that-NOTIFY-tdata-is-set-before-sending-it_new.patch 1662 BLAKE2B 48f4b7113ecd0b539b1a8449a3493dbd8459af70566867b5a1c70b794b2ca0136a496f45d24d97602787082cc8bf61c25138fcfe448115bf5215b329888df686 SHA512 de77f0d4f4a6dc2e57ab46727944191fc050fd423b659c26c9d4f4dd7f23ba7cc1d9a55fe63317caaf66b5ea58ac410997bae57a6d3ac28ab7cb6dde47ce9b15
AUX pjproject-2.13.1-fix-ptimesized-wav-input.patch 1331 BLAKE2B bb06858331c9519558dda9431602d92719c5ff23a9a6d62a736ff202bb3d7193be6c8db88e7c1046ce092c0e8856cd15d168260920bd3898563be40049cae892 SHA512 8487201c3b5c3f9dbc65438735a2b9c2b32129f8f55cb61f999d03b330d917f0fe8d37075d56d6477e2052aba3a595de7c63b6517d74e511ae0c066ef405a84a
+AUX pjproject-2.13.1-r1-config_site.h 2728 BLAKE2B a8edc8377a86c0716003755897fbeec17a5923c97748c42d3b5b7bfdc6a2273a9e98e8d2b59f9f5e52d49472e3e4be53ad3a0dc139c92ddafcf14fd57138cfa1 SHA512 c44c64815586963b6436c0e427aff230314b762d61908bc4182152b6f58e52ecd30369e450e999b1e03614b486455ace25fc759b227724445e7041f30f9106ef
DIST pjproject-2.13.1.tar.gz 9746437 BLAKE2B a50278be52df755c5cec08da0c1a604a8c0ad6911853a424596ce05bc423a829818d2e7425b55bdc00fa24a91b9a3e891c54aa2add5cdbf8698173ac44ae2975 SHA512 1cdfaedafa2f42b306eef38174530163db19952c6842d5c96324c7439e2437a17cd96670ac58ae04da221b06d7eb91d612f4347cd421e036be62b27cb9501cda
DIST pjproject-2.13.tar.gz 9744716 BLAKE2B 947fe076089b3cd0826a554db3cda9939e228b9e7bb5ed2d01242e44e5e5b0d9d2ddc52b378f141efb89fcbfbd628fcdff341e54bc3615280e23f30ea58daf56 SHA512 df184511d554e5f77ca1a551bdf6b22c4c8ae2b6ad61be0e7e459e2d7db50f496af66c37e080f178019a509ea25847e70a342ac48c820a6b9302b4cbf174c520
EBUILD pjproject-2.13-r2.ebuild 4030 BLAKE2B 6eff6a7456727ffd6427b477f48291770aff6395fa69ba849e5106173c5de8768a11de75194b839053d803a659abbe40f089c79dd043c7f3b66d57f109876b70 SHA512 8c1c3f0014bf99173d2161a82dade22fdc29abfa0595f2f3948a59f7958f379af82feba4c6bd9fc4ee48b691b056d2e616b69c9a9f3f6ee718dfc457f8f08892
+EBUILD pjproject-2.13.1-r1.ebuild 3985 BLAKE2B b50520d7f7f7975e0092351ee034fa9b6d7b2abdc0b81fff5289fed2acfa020d742dadddeaa8915bfb93d2feb7f402b1cda5605b52a2065ce17d1aceaae2f7c5 SHA512 88c3dc1cfdd58cfe103301c6254a24bcf668a109d961bba1d28560a279418ec564109b25ead4d1dd8695fb342335ca43f7af8d4866460578f6a1eb24657e2b95
EBUILD pjproject-2.13.1.ebuild 3935 BLAKE2B 9c203874d6027b5407e7aa699ceebb0f0132292d4816da4497c1feadd683ee83f3d20436f975d46798db93862592f3891fda9f1108dc5682e18c72d54cacfdfb SHA512 43bbbe44b937125b9b43b49ab62b4ee8f22946e5bfe2430e9db095875a63daa0f2b8083045292bbc7a6f770d08da9810eb4ae571e6b2eb919961bdd258f6a546
-MISC metadata.xml 1459 BLAKE2B e35f9c8621ea7c1c2670d90f69c341b53b20501ece6fcb41fefdec9f328a6c2b88f2f9d2fd2a77938b802fc74c36f2e3387cad3be7c9126767f28d32b42d19ed SHA512 498a94fb2bf3692b60c644e9d3e341761b20e8a4e0215e1c14c4444a199f9abb085f3421e143e7b944bac54a4f774c0b47af76c6fae5fc2cda4da13d1781a9b0
+MISC metadata.xml 1547 BLAKE2B a465349046fca9d13d16905db5cafb13b4ebce8542bdeedf3df46265981a776b9c564aa4b1bd5fdd3dd0dc114a2a856611f5359081c418a4708ef67cc2715dad SHA512 3e2ed35ca8d3a6440c5b87bbb58140586d1d0327e6b0b58c0a91d82d8b3bfac57cae787318868f2c9290bb97dce3732dc456c1ab42b43fda8ebad02b8d36c269
diff --git a/net-libs/pjproject/files/pjproject-2.13.1-r1-config_site.h b/net-libs/pjproject/files/pjproject-2.13.1-r1-config_site.h
new file mode 100644
index 000000000000..c2dd59149e9f
--- /dev/null
+++ b/net-libs/pjproject/files/pjproject-2.13.1-r1-config_site.h
@@ -0,0 +1,86 @@
+/*
+ * 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>
+
+#define GENTOO_INVALID (Gentoo compile failure - please report a bug on bugs.gentoo.org)
+
+/* asterisk_malloc_debug.h is not required ... most of the operations are no-ops regardless
+ * and I can't see why asterisk is looking to compile this directly into pjproject */
+
+/* Ability to change this has ABI implications, force it on */
+/* Can be reconsidered in future: https://bugs.gentoo.org/680496 */
+#define PJ_HAS_IPV6 1
+
+#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 PJ_DEBUG 0
+#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 65535
+
+#undef PJ_TODO
+#define PJ_TODO(x)
+
+/* Defaults too low for WebRTC */
+#define PJ_ICE_MAX_CAND 64
+#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*3 + 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
+
+#define PJSIP_TSX_UAS_CONTINUE_ON_TP_ERROR 0
+#define PJ_SSL_SOCK_OSSL_USE_THREAD_CB 0
+#define PJSIP_AUTH_ALLOW_MULTIPLE_AUTH_HEADER 1
+
+/* Required to enable things like USE=video. */
+#define PJMEDIA_HAS_VIDEO GENTOO_INVALID
diff --git a/net-libs/pjproject/metadata.xml b/net-libs/pjproject/metadata.xml
index 526020157e7d..b7d5dd9a9604 100644
--- a/net-libs/pjproject/metadata.xml
+++ b/net-libs/pjproject/metadata.xml
@@ -22,6 +22,7 @@
<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="srtp">Enable support for encrypted voice transmission (secure RTP)</flag>
<flag name="v4l2">Include Video4Linux v2 support in the build</flag>
<flag name="vpx">Include VP8 and VP9 codec support in the build</flag>
<flag name="webrtc">Enable WebRTC support</flag>
diff --git a/net-libs/pjproject/pjproject-2.13.1-r1.ebuild b/net-libs/pjproject/pjproject-2.13.1-r1.ebuild
new file mode 100644
index 000000000000..536c98527bac
--- /dev/null
+++ b/net-libs/pjproject/pjproject-2.13.1-r1.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+# TODO: Figure out a way to disable SRTP from pjproject entirely.
+EAPI=8
+
+inherit autotools flag-o-matic toolchain-funcs
+
+DESCRIPTION="Open source SIP, Media, and NAT Traversal Library"
+HOMEPAGE="https://github.com/pjsip/pjproject https://www.pjsip.org/"
+SRC_URI="https://github.com/pjsip/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
+
+LICENSE="GPL-2"
+SLOT="0/${PV}"
+
+# g729 not included due to special bcg729 handling.
+CODEC_FLAGS="g711 g722 g7221 gsm ilbc speex l16"
+VIDEO_FLAGS="sdl ffmpeg v4l2 openh264 libyuv vpx"
+SOUND_FLAGS="alsa portaudio"
+IUSE="amr debug epoll examples opus resample silk srtp ssl static-libs webrtc
+ ${CODEC_FLAGS} g729
+ ${VIDEO_FLAGS}
+ ${SOUND_FLAGS}"
+
+RDEPEND="
+ alsa? ( media-libs/alsa-lib )
+ amr? ( media-libs/opencore-amr )
+ ffmpeg? ( media-video/ffmpeg:= )
+ g729? ( media-libs/bcg729 )
+ gsm? ( media-sound/gsm )
+ ilbc? ( media-libs/libilbc )
+ openh264? ( media-libs/openh264 )
+ opus? ( media-libs/opus )
+ portaudio? ( media-libs/portaudio )
+ resample? ( media-libs/libsamplerate )
+ sdl? ( media-libs/libsdl2 )
+ speex? (
+ media-libs/speex
+ media-libs/speexdsp
+ )
+ srtp? ( >=net-libs/libsrtp-2.3.0:= )
+ ssl? ( dev-libs/openssl:0= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/pjproject-2.13-r1-Make-sure-that-NOTIFY-tdata-is-set-before-sending-it_new.patch"
+ "${FILESDIR}/pjproject-2.13.1-fix-ptimesized-wav-input.patch"
+)
+
+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.13.1-r1-config_site.h" "${S}/pjlib/include/pj/config_site.h" \
+ || die "Unable to create config_site.h"
+}
+
+_pj_enable() {
+ usex "$1" '' "--disable-${2:-$1}"
+}
+
+_pj_get_define() {
+ local r="$(sed -nre "s/^#define[[:space:]]+$1[[:space:]]+//p" "${S}/pjlib/include/pj/config_site.h")"
+ [[ -z "${r}" ]] && die "Unable to fine #define $1 in config_site.h"
+ echo "$r"
+}
+
+_pj_set_define() {
+ local c=$(_pj_get_define "$1")
+ [[ "$c" = "$2" ]] && return 0
+ sed -re "s/^#define[[:space:]]+$1[[:space:]].*/#define $1 $2/" -i "${S}/pjlib/include/pj/config_site.h" \
+ || die "sed failed updating $1 to $2."
+ [[ "$(_pj_get_define "$1")" != "$2" ]] && die "sed failed to perform update for $1 to $2."
+}
+
+_pj_use_set_define() {
+ _pj_set_define "$2" $(usex "$1" 1 0)
+}
+
+src_configure() {
+ local myconf=()
+ local videnable="--disable-video"
+ local t
+
+ use debug || append-cflags -DNDEBUG=1
+
+ for t in ${CODEC_FLAGS}; do
+ myconf+=( $(_pj_enable ${t} ${t}-codec) )
+ done
+ myconf+=( $(_pj_enable g729 bcg729) )
+
+ for t in ${VIDEO_FLAGS}; do
+ myconf+=( $(_pj_enable ${t}) )
+ use "${t}" && videnable="--enable-video"
+ done
+
+ [ "${videnable}" = "--enable-video" ] && _pj_set_define PJMEDIA_HAS_VIDEO 1 || _pj_set_define PJMEDIA_HAS_VIDEO 0
+
+ LD="$(tc-getCC)" econf \
+ --enable-shared \
+ ${videnable} \
+ $(_pj_enable alsa sound) \
+ $(_pj_enable amr opencore-amr) \
+ $(_pj_enable epoll) \
+ $(_pj_enable opus) \
+ $(_pj_enable portaudio ext-sound) \
+ $(_pj_enable resample libsamplerate) \
+ $(_pj_enable resample resample-dll) \
+ $(_pj_enable resample) \
+ $(_pj_enable silk) \
+ $(_pj_enable speex speex-aec) \
+ $(_pj_enable ssl) \
+ $(_pj_enable webrtc libwebrtc) \
+ $(use_with gsm external-gsm) \
+ $(use_with portaudio external-pa) \
+ $(use_with speex external-speex) \
+ $(usex srtp --with-external-srtp --disable-libsrtp) \
+ "${myconf[@]}"
+}
+
+src_compile() {
+ emake dep LD="$(tc-getCC)"
+ emake LD="$(tc-getCC)"
+}
+
+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"
+}