public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/libressl:migration commit in: net-libs/pjproject/, net-libs/pjproject/files/
@ 2021-01-17 19:33 Quentin Retornaz
  0 siblings, 0 replies; only message in thread
From: Quentin Retornaz @ 2021-01-17 19:33 UTC (permalink / raw
  To: gentoo-commits

commit:     5d72649f942cd6af92a3004c1cb9620fea7c0a4d
Author:     Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
AuthorDate: Sun Jan 17 19:32:53 2021 +0000
Commit:     Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Sun Jan 17 19:32:53 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=5d72649f

net-libs/pjproject: new package

Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>

 net-libs/pjproject/Manifest                        |   3 +
 .../pjproject/files/pjproject-2.7.2-libressl.patch |  98 ++++++++++++++++
 .../files/pjproject-2.7.2-ssl-flipflop.patch       | 103 +++++++++++++++++
 .../pjproject/files/pjproject-2.9-config_site.h    |  74 +++++++++++++
 .../pjproject/files/pjproject-2.9-ssl-enable.patch | 100 +++++++++++++++++
 net-libs/pjproject/metadata.xml                    |  29 +++++
 net-libs/pjproject/pjproject-2.10.ebuild           | 123 +++++++++++++++++++++
 net-libs/pjproject/pjproject-2.7.2-r2.ebuild       | 117 ++++++++++++++++++++
 net-libs/pjproject/pjproject-2.9-r2.ebuild         | 123 +++++++++++++++++++++
 9 files changed, 770 insertions(+)

diff --git a/net-libs/pjproject/Manifest b/net-libs/pjproject/Manifest
new file mode 100644
index 0000000..5d10ffe
--- /dev/null
+++ b/net-libs/pjproject/Manifest
@@ -0,0 +1,3 @@
+DIST pjproject-2.10.tar.gz 8768705 BLAKE2B 42d70867e2e0474313426f1e188586d203d6165c28a133a62dedacd2deb2899215212824d9402a48fcc66bb08a17b796d3625e1d51a8aedc9aa4b3a3bf1cb8fa SHA512 a67f083df175b536b4e6a7b7fe39e07d3ee805d6917ec64a50694542a7455c33a100889191044ab3fa679b6656774a6be045621aa53510b5f04cdde9ddd59893
+DIST pjproject-2.7.2.tar.bz2 4994233 BLAKE2B 44ecaf0997d5dd9b18e0b811cead7c9104e63894fa06fb1d64e79b60fa4210968fd90ef47e5f5be3629675363c8756ce3bc1834caa9700654ab4c53efe676ee7 SHA512 3d355ffcbbeed62cfc711e574a987dc06043ccf4f2625820adffa89167022b8306fcee3fada71d3d45e7b902fc9c65ac8221de101cbafed25362a3921f702afd
+DIST pjproject-2.9.tar.bz2 5009546 BLAKE2B 853f86e57c0f58943e977856bebc7dc20684ac4a6a16a55f3fe4ddf58ca58187bdc1011c5df2bc72de690f1695484012b582e56dd0e88a624ef319a5f3623772 SHA512 a65823a86ad0cd76890cf7dd2485f7547fd90aea2ef631c5420c009b35f39eda3b78551a42fc2816c2470de9eb728c26497774a8494824472ecaa1d2889cc20b

diff --git a/net-libs/pjproject/files/pjproject-2.7.2-libressl.patch b/net-libs/pjproject/files/pjproject-2.7.2-libressl.patch
new file mode 100644
index 0000000..07efa9c
--- /dev/null
+++ b/net-libs/pjproject/files/pjproject-2.7.2-libressl.patch
@@ -0,0 +1,98 @@
+Index: /third_party/srtp/crypto/hash/hmac_ossl.c
+===================================================================
+--- /third_party/srtp/crypto/hash/hmac_ossl.c	(revision 5725)
++++ /third_party/srtp/crypto/hash/hmac_ossl.c	(revision 5726)
+@@ -52,6 +52,8 @@
+ #include <openssl/evp.h>
+ #include <openssl/hmac.h>
++#include <openssl/opensslv.h>
+ 
+ #define SHA1_DIGEST_SIZE		20
++#define USING_LIBRESSL (defined(LIBRESSL_VERSION_NUMBER))
+ 
+ /* the debug module for authentiation */
+@@ -77,5 +79,5 @@
+ /* OpenSSL 1.1.0 made HMAC_CTX an opaque structure, which must be allocated
+    using HMAC_CTX_new.  But this function doesn't exist in OpenSSL 1.0.x. */
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if USING_LIBRESSL || OPENSSL_VERSION_NUMBER < 0x10100000L
+     {
+         /* allocate memory for auth and HMAC_CTX structures */
+@@ -122,5 +124,5 @@
+     hmac_ctx = (HMAC_CTX*)a->state;
+ 
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if USING_LIBRESSL || OPENSSL_VERSION_NUMBER < 0x10100000L
+     HMAC_CTX_cleanup(hmac_ctx);
+ 
+Index: /pjlib/src/pj/ssl_sock_ossl.c
+===================================================================
+--- /pjlib/src/pj/ssl_sock_ossl.c	(revision 5725)
++++ /pjlib/src/pj/ssl_sock_ossl.c	(revision 5726)
+@@ -56,6 +56,10 @@
+ #include <openssl/rand.h>
+ #include <openssl/opensslconf.h>
+-
+-#if !defined(OPENSSL_NO_EC) && OPENSSL_VERSION_NUMBER >= 0x1000200fL
++#include <openssl/opensslv.h>
++
++#define USING_LIBRESSL (defined(LIBRESSL_VERSION_NUMBER))
++
++#if !USING_LIBRESSL && !defined(OPENSSL_NO_EC) \
++	&& OPENSSL_VERSION_NUMBER >= 0x1000200fL
+ 
+ #   include <openssl/obj_mac.h>
+@@ -115,5 +119,5 @@
+ 
+ 
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++#if !USING_LIBRESSL && OPENSSL_VERSION_NUMBER >= 0x10100000L
+ #  define OPENSSL_NO_SSL2	    /* seems to be removed in 1.1.0 */
+ #  define M_ASN1_STRING_data(x)	    ASN1_STRING_get0_data(x)
+@@ -539,5 +543,5 @@
+ 
+     /* Init OpenSSL lib */
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if USING_LIBRESSL || OPENSSL_VERSION_NUMBER < 0x10100000L
+     SSL_library_init();
+     SSL_load_error_strings();
+@@ -560,5 +564,7 @@
+ 	const char *cname;
+ 
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if (USING_LIBRESSL && LIBRESSL_VERSION_NUMBER < 0x2020100fL)\
++    || OPENSSL_VERSION_NUMBER < 0x10100000L
++
+ 	meth = (SSL_METHOD*)SSLv23_server_method();
+ 	if (!meth)
+@@ -603,5 +609,6 @@
+ 	SSL_set_session(ssl, SSL_SESSION_new());
+ 
+-#if !defined(OPENSSL_NO_EC) && OPENSSL_VERSION_NUMBER >= 0x1000200fL
++#if !USING_LIBRESSL && !defined(OPENSSL_NO_EC) \
++    && OPENSSL_VERSION_NUMBER >= 0x1000200fL
+ 	openssl_curves_num = SSL_get_shared_curve(ssl,-1);
+ 	if (openssl_curves_num > PJ_ARRAY_SIZE(openssl_curves))
+@@ -795,5 +802,6 @@
+ 
+     /* Determine SSL method to use */
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if (USING_LIBRESSL && LIBRESSL_VERSION_NUMBER < 0x2020100fL)\
++    || OPENSSL_VERSION_NUMBER < 0x10100000L
+     switch (ssock->param.proto) {
+     case PJ_SSL_SOCK_PROTO_TLS1:
+@@ -1232,5 +1240,6 @@
+ static pj_status_t set_curves_list(pj_ssl_sock_t *ssock)
+ {
+-#if !defined(OPENSSL_NO_EC) && OPENSSL_VERSION_NUMBER >= 0x1000200fL
++#if !USING_LIBRESSL && !defined(OPENSSL_NO_EC) \
++    && OPENSSL_VERSION_NUMBER >= 0x1000200fL
+     int ret;
+     int curves[PJ_SSL_SOCK_MAX_CURVES];
+@@ -1263,5 +1272,5 @@
+ static pj_status_t set_sigalgs(pj_ssl_sock_t *ssock)
+ {
+-#if OPENSSL_VERSION_NUMBER >= 0x1000200fL
++#if !USING_LIBRESSL && OPENSSL_VERSION_NUMBER >= 0x1000200fL
+     int ret;
+ 

diff --git a/net-libs/pjproject/files/pjproject-2.7.2-ssl-flipflop.patch b/net-libs/pjproject/files/pjproject-2.7.2-ssl-flipflop.patch
new file mode 100644
index 0000000..c984bc6
--- /dev/null
+++ b/net-libs/pjproject/files/pjproject-2.7.2-ssl-flipflop.patch
@@ -0,0 +1,103 @@
+--- pjproject-2.7.1.ORIG/aconfigure.ac	2018-02-06 11:34:20.973411193 +0000
++++ pjproject-2.7.1/aconfigure.ac	2018-02-06 13:33:31.525015674 +0000
+@@ -1551,57 +1551,56 @@
+     enable_ssl=no
+ fi
+ 
+-dnl # Include SSL support
++dnl # Correct --enable vs --disable SSL flipflop logic
+ AC_SUBST(ac_no_ssl)
+ AC_SUBST(ac_ssl_has_aes_gcm,0)
+ AC_ARG_ENABLE(ssl,
+ 	      AS_HELP_STRING([--disable-ssl],
+ 			     [Exclude SSL support the build (default: autodetect)])
+-	      ,
+-	      [
+-		if test "$enable_ssl" = "no"; then
+-		 [ac_no_ssl=1]
+-		 AC_MSG_RESULT([Checking if SSL support is disabled... yes])
+-	        fi
+-	      ],
+-	      [
+-		AC_MSG_RESULT([checking for OpenSSL installations..])
+-                if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then
+-                    CFLAGS="$CFLAGS -I$with_ssl/include"
+-                    LDFLAGS="$LDFLAGS -L$with_ssl/lib"
+-                    AC_MSG_RESULT([Using SSL prefix... $with_ssl])
+-                fi
+-		AC_SUBST(openssl_h_present)
+-		AC_SUBST(libssl_present)
+-		AC_SUBST(libcrypto_present)
+-		AC_CHECK_HEADER(openssl/ssl.h,[openssl_h_present=1])
+-		AC_CHECK_LIB(crypto,ERR_load_BIO_strings,[libcrypto_present=1 && LIBS="-lcrypto $LIBS"])
+-		AC_CHECK_LIB(ssl,SSL_CTX_new,[libssl_present=1 && LIBS="-lssl $LIBS"])
+-		if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then
+-	        	AC_MSG_RESULT([OpenSSL library found, SSL support enabled])
+-			
+-			# Check if SRTP should be compiled with OpenSSL
+-			# support, to enable cryptos such as AES GCM.
+-			
+-			# EVP_CIPHER_CTX is now opaque in OpenSSL 1.1.0, libsrtp 1.5.4 uses it as a transparent type.
+-			# Update 2.7: our bundled libsrtp has been upgraded to 2.1.0,
+-			# so we can omit EVP_CIPHER_CTX definition check now.
+-			AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <openssl/evp.h>]],
+-							  [EVP_CIPHER_CTX *ctx;EVP_aes_128_gcm();])],
+-					  [AC_CHECK_LIB(crypto,EVP_aes_128_gcm,[ac_ssl_has_aes_gcm=1])])
+-			if test "x$ac_ssl_has_aes_gcm" = "x1"; then
+-				AC_MSG_RESULT([OpenSSL has AES GCM support, SRTP will use OpenSSL])
+-			else
+-				AC_MSG_RESULT([OpenSSL AES GCM support not found, SRTP will only support AES CM cryptos])
+-			fi
+-
+-			# PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK
+-			#AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1)
+-			AC_DEFINE(PJ_HAS_SSL_SOCK, 1)
++)
++
++dnl # OpenSSL detection
++AC_MSG_CHECKING([OpenSSL installations])
++if test "x$enable_ssl" = "xno"; then
++	ac_no_ssl=1
++	AC_MSG_RESULT([explicitly disabled])
++else
++	if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then
++		CFLAGS="$CFLAGS -I$with_ssl/include"
++		LDFLAGS="$LDFLAGS -L$with_ssl/lib"
++		AC_MSG_RESULT([Using SSL prefix... $with_ssl])
++	fi
++	AC_SUBST(openssl_h_present)
++	AC_SUBST(libssl_present)
++	AC_SUBST(libcrypto_present)
++	AC_CHECK_HEADER(openssl/ssl.h,[openssl_h_present=1])
++	AC_CHECK_LIB(crypto,ERR_load_BIO_strings,[libcrypto_present=1 && LIBS="-lcrypto $LIBS"])
++	AC_CHECK_LIB(ssl,SSL_CTX_new,[libssl_present=1 && LIBS="-lssl $LIBS"])
++	if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then
++	       	AC_MSG_RESULT([OpenSSL library found, SSL support enabled])
++
++		# Check if SRTP should be compiled with OpenSSL
++		# support, to enable cryptos such as AES GCM.
++
++		# EVP_CIPHER_CTX is now opaque in OpenSSL 1.1.0, libsrtp 1.5.4 uses it as a transparent type.
++		# Update 2.7: our bundled libsrtp has been upgraded to 2.1.0,
++		# so we can omit EVP_CIPHER_CTX definition check now.
++		AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <openssl/evp.h>]],
++						  [EVP_CIPHER_CTX *ctx;EVP_aes_128_gcm();])],
++				  [AC_CHECK_LIB(crypto,EVP_aes_128_gcm,[ac_ssl_has_aes_gcm=1])])
++		if test "x$ac_ssl_has_aes_gcm" = "x1"; then
++			AC_MSG_RESULT([OpenSSL has AES GCM support, SRTP will use OpenSSL])
+ 		else
+-			AC_MSG_RESULT([** OpenSSL libraries not found, disabling SSL support **])
++			AC_MSG_RESULT([OpenSSL AES GCM support not found, SRTP will only support AES CM cryptos])
+ 		fi
+-	      ])
++
++		# PJSIP_HAS_TLS_TRANSPORT setting follows PJ_HAS_SSL_SOCK
++		#AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1)
++		AC_DEFINE(PJ_HAS_SSL_SOCK, 1)
++	else
++		AC_MSG_RESULT([** OpenSSL libraries not found, disabling SSL support **])
++	fi
++fi
+ 
+ dnl # Obsolete option --with-opencore-amrnb
+ AC_ARG_WITH(opencore-amrnb,

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 0000000..d41ac1d
--- /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 0000000..bb8a11d
--- /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
new file mode 100644
index 0000000..ebb6d87
--- /dev/null
+++ b/net-libs/pjproject/metadata.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<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="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="vpx">Include VP8 and VP9 codec support in the build</flag>
+		<flag name="webrtc">Enable WebRTC support</flag>
+	</use>
+</pkgmetadata>

diff --git a/net-libs/pjproject/pjproject-2.10.ebuild b/net-libs/pjproject/pjproject-2.10.ebuild
new file mode 100644
index 0000000..9d9953b
--- /dev/null
+++ b/net-libs/pjproject/pjproject-2.10.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=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"
+
+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 vpx"
+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? ( 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/libsdl )
+	speex? (
+		media-libs/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
+
+	LD="$(tc-getCC)" 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 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"
+}

diff --git a/net-libs/pjproject/pjproject-2.7.2-r2.ebuild b/net-libs/pjproject/pjproject-2.7.2-r2.ebuild
new file mode 100644
index 0000000..e31ed4a
--- /dev/null
+++ b/net-libs/pjproject/pjproject-2.7.2-r2.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+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"
+CODEC_FLAGS="g711 g722 g7221 gsm ilbc speex l16"
+VIDEO_FLAGS="sdl ffmpeg v4l2 openh264 libyuv"
+SOUND_FLAGS="alsa oss portaudio"
+IUSE="amr debug doc epoll examples ipv6 libressl opus resample silk ssl static-libs webrtc ${CODEC_FLAGS} ${VIDEO_FLAGS} ${SOUND_FLAGS}"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-ssl-flipflop.patch
+	"${FILESDIR}"/${P}-libressl.patch
+)
+
+RDEPEND="alsa? ( media-libs/alsa-lib )
+	oss? ( media-libs/portaudio[oss] )
+	portaudio? ( media-libs/portaudio )
+
+	amr? ( media-libs/opencore-amr )
+	gsm? ( media-sound/gsm )
+	ilbc? ( media-libs/libilbc )
+	opus? ( media-libs/opus )
+	speex? ( media-libs/speexdsp )
+
+	ffmpeg? ( media-video/ffmpeg:= )
+	sdl? ( media-libs/libsdl )
+	openh264? ( media-libs/openh264 )
+	resample? ( media-libs/libsamplerate )
+
+	ssl? (
+		!libressl? ( dev-libs/openssl:0= )
+		libressl? ( dev-libs/libressl:0= )
+	)
+
+	net-libs/libsrtp:0"
+DEPEND="${RDEPEND}
+	virtual/pkgconfig
+	!!media-plugins/mediastreamer-bcg729"
+
+REQUIRED_USE="?? ( ${SOUND_FLAGS} )"
+
+src_prepare() {
+	default
+	rm configure || die "Unable to remove unwanted wrapper"
+	mv aconfigure.ac configure.ac || die "Unable to rename configure script source"
+	eautoreconf
+}
+
+src_configure() {
+	local myconf=()
+	local videnable="--disable-video"
+	local t
+
+	use ipv6 && append-cflags -DPJ_HAS_IPV6=1
+	use debug || append-cflags -DNDEBUG=1
+
+	for t in ${CODEC_FLAGS}; do
+		myconf+=( $(use_enable ${t} ${t}-codec) )
+	done
+
+	for t in ${VIDEO_FLAGS}; do
+		myconf+=( $(use_enable ${t}) )
+		use "${t}" && videnable="--enable-video"
+	done
+
+	econf \
+		--enable-shared \
+		--with-external-srtp \
+		${videnable} \
+		$(use_enable epoll) \
+		$(use_with gsm external-gsm) \
+		$(use_with speex external-speex) \
+		$(use_enable speex speex-aec) \
+		$(use_enable resample) \
+		$(use_enable resample libsamplerate) \
+		$(use_enable resample resample-dll) \
+		$(use_enable alsa sound) \
+		$(use_enable oss) \
+		$(use_with portaudio external-pa) \
+		$(use_enable portaudio ext-sound) \
+		$(use_enable amr opencore-amr) \
+		$(use_enable silk) \
+		$(use_enable opus) \
+		$(use_enable ssl) \
+		$(use_enable webrtc libwebrtc) \
+		"${myconf[@]}"
+}
+
+src_compile() {
+	emake dep
+	emake
+}
+
+src_install() {
+	emake DESTDIR="${D}" install
+
+	if use doc; then
+		dodoc README.txt README-RTEMS
+	fi
+
+	if use examples; then
+		insinto "/usr/share/doc/${PF}/examples"
+		doins -r pjsip-apps/src/samples
+	fi
+
+	use static-libs || rm "${D}/usr/$(get_libdir)/*.a"
+}

diff --git a/net-libs/pjproject/pjproject-2.9-r2.ebuild b/net-libs/pjproject/pjproject-2.9-r2.ebuild
new file mode 100644
index 0000000..df77d17
--- /dev/null
+++ b/net-libs/pjproject/pjproject-2.9-r2.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=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://www.pjsip.org/release/${PV}/${P}.tar.bz2"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~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? ( 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/libsdl )
+	speex? (
+		media-libs/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
+
+	LD="$(tc-getCC)" 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 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"
+}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-17 19:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-17 19:33 [gentoo-commits] repo/proj/libressl:migration commit in: net-libs/pjproject/, net-libs/pjproject/files/ Quentin Retornaz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox