From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3576F1584AD for ; Tue, 29 Apr 2025 19:05:05 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 1E64533BF29 for ; Tue, 29 Apr 2025 19:05:05 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id AA8ED110328; Tue, 29 Apr 2025 19:05:02 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id A2DC7110328 for ; Tue, 29 Apr 2025 19:05:02 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 57E17335D21 for ; Tue, 29 Apr 2025 19:05:02 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E24F81F6A for ; Tue, 29 Apr 2025 19:05:00 +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: <1745953367.1e0a5ae70d5a1995b7761f946c0ac0f95e64d3b5.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/pjproject/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-libs/pjproject/pjproject-2.15.1-r1.ebuild X-VCS-Directories: net-libs/pjproject/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 1e0a5ae70d5a1995b7761f946c0ac0f95e64d3b5 X-VCS-Branch: master Date: Tue, 29 Apr 2025 19:05:00 +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: 5353fa89-976d-49ed-8b6d-6ab6732fd3cb X-Archives-Hash: 26adda0eaca74ea1cd1eae3ceea90a34 commit: 1e0a5ae70d5a1995b7761f946c0ac0f95e64d3b5 Author: Alfred Wingate protonmail com> AuthorDate: Tue Apr 29 18:34:45 2025 +0000 Commit: Sam James gentoo org> CommitDate: Tue Apr 29 19:02:47 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e0a5ae7 net-libs/pjproject: unvendor libyuv Dropped keywords ppc, ppc64, sparc Bug: https://bugs.gentoo.org/955077 Signed-off-by: Alfred Wingate protonmail.com> Part-of: https://github.com/gentoo/gentoo/pull/41849 Signed-off-by: Sam James gentoo.org> net-libs/pjproject/pjproject-2.15.1-r1.ebuild | 133 ++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) diff --git a/net-libs/pjproject/pjproject-2.15.1-r1.ebuild b/net-libs/pjproject/pjproject-2.15.1-r1.ebuild new file mode 100644 index 000000000000..2e43c11664de --- /dev/null +++ b/net-libs/pjproject/pjproject-2.15.1-r1.ebuild @@ -0,0 +1,133 @@ +# Copyright 1999-2025 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" +LICENSE="GPL-2" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" + +# 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 ) + libyuv? ( media-libs/libyuv:= ) + 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" + +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-getCXX)" 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) \ + --with-external-yuv \ + "${myconf[@]}" +} + +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" +}