From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6131A158094 for ; Wed, 13 Jul 2022 08:01:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2275DE0D42; Wed, 13 Jul 2022 08:01:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E3415E0DBD for ; Wed, 13 Jul 2022 08:01:29 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A15EA340C33 for ; Wed, 13 Jul 2022 08:01:28 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E6E01456 for ; Wed, 13 Jul 2022 08:01:26 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1657699249.9a59fa196adc0c98fbb19d56533e107ef1625b43.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/pjproject/files/, net-libs/pjproject/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-libs/pjproject/files/pjproject-2.12.1-config_site.h net-libs/pjproject/pjproject-2.12.1-r1.ebuild net-libs/pjproject/pjproject-2.12.1.ebuild X-VCS-Directories: net-libs/pjproject/ net-libs/pjproject/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 9a59fa196adc0c98fbb19d56533e107ef1625b43 X-VCS-Branch: master Date: Wed, 13 Jul 2022 08:01:26 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a07f2b92-ecd6-40f3-9cea-90a219f1e593 X-Archives-Hash: 2f394b153e6d9ac3d061c1ad39d94626 commit: 9a59fa196adc0c98fbb19d56533e107ef1625b43 Author: Jaco Kroon uls co za> AuthorDate: Mon Jun 27 21:42:02 2022 +0000 Commit: Sam James gentoo org> CommitDate: Wed Jul 13 08:00:49 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a59fa19 net-libs/pjproject: rev bump to update config_site.h. Straight to stable: This fixes major usability problems in 2.10 revisions of pjproject, and asterisk 18.* depends on this (already stable). This brings in updates from newer versions of asterisk. Note that USE=ipv6 gets dropped as flipping this causes ABI breakage, and the way in which this was done could cause ABI issues as it was. Since there are no extra dependencies, just remove the USE flag completely. Also introduce _pj_ functions in the ebuild itself to manipulate the way in which ./configure is used (pjproject generally enables everything it can find dependencies for, and passing --enable-XXX generally ends up having the same effect as --disable ...). PENDING: ISUE=srtp. Asterisk has patches but I don't want to figure that out at this stage. Bug: https://bugs.gentoo.org/834491 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Jaco Kroon uls.co.za> Signed-off-by: Sam James gentoo.org> .../pjproject/files/pjproject-2.12.1-config_site.h | 97 ++++++++++++++++++++++ ...ct-2.12.1.ebuild => pjproject-2.12.1-r1.ebuild} | 29 +++++-- 2 files changed, 119 insertions(+), 7 deletions(-) diff --git a/net-libs/pjproject/files/pjproject-2.12.1-config_site.h b/net-libs/pjproject/files/pjproject-2.12.1-config_site.h new file mode 100644 index 000000000000..37d094e24bbc --- /dev/null +++ b/net-libs/pjproject/files/pjproject-2.12.1-config_site.h @@ -0,0 +1,97 @@ +/* + * Based off of the Asterisk config_site.h file. + * + * In general it's the same with some removals due to being ebuild-managed. + */ + +#include + +#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 */ + +/* + * Defining PJMEDIA_HAS_SRTP to 0 does NOT disable Asterisk's ability to use srtp. + * It only disables the pjmedia srtp transport which Asterisk doesn't use. + * The reason for the disable is that while Asterisk works fine with older libsrtp + * versions, newer versions of pjproject won't compile with them. + * + * Disabling this depends on an additional pjproject patch. So just leave it + * enabled for the time being, as it has always been enabled. + */ +#define PJMEDIA_HAS_SRTP 1 + +/* 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/pjproject-2.12.1.ebuild b/net-libs/pjproject/pjproject-2.12.1-r1.ebuild similarity index 73% rename from net-libs/pjproject/pjproject-2.12.1.ebuild rename to net-libs/pjproject/pjproject-2.12.1-r1.ebuild index e4b5b281a448..bbf767978443 100644 --- a/net-libs/pjproject/pjproject-2.12.1.ebuild +++ b/net-libs/pjproject/pjproject-2.12.1-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2022 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 @@ -8,7 +8,7 @@ inherit autotools flag-o-matic toolchain-funcs DESCRIPTION="Open source SIP, Media, and NAT Traversal Library" HOMEPAGE="https://www.pjsip.org/" SRC_URI="https://github.com/pjsip/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" +KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 x86" LICENSE="GPL-2" SLOT="0/${PV}" @@ -17,7 +17,7 @@ SLOT="0/${PV}" 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 ipv6 opus resample silk ssl static-libs webrtc +IUSE="amr debug epoll examples opus resample silk ssl static-libs webrtc ${CODEC_FLAGS} g729 ${VIDEO_FLAGS} ${SOUND_FLAGS}" @@ -55,21 +55,36 @@ src_prepare() { 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" + cp "${FILESDIR}/pjproject-2.12.1-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 - use ipv6 && append-cflags -DPJ_HAS_IPV6=1 - append-cflags -DPJMEDIA_HAS_SRTP=1 for t in ${CODEC_FLAGS}; do myconf+=( $(_pj_enable ${t} ${t}-codec) ) @@ -81,7 +96,7 @@ src_configure() { use "${t}" && videnable="--enable-video" done - [ "${videnable}" = "--enable-video" ] && append-cflags -DPJMEDIA_HAS_VIDEO=1 + [ "${videnable}" = "--enable-video" ] && _pj_set_define PJMEDIA_HAS_VIDEO 1 || _pj_set_define PJMEDIA_HAS_VIDEO 0 LD="$(tc-getCC)" econf \ --enable-shared \