summaryrefslogtreecommitdiff
path: root/net-libs/pjproject
diff options
context:
space:
mode:
Diffstat (limited to 'net-libs/pjproject')
-rw-r--r--net-libs/pjproject/Manifest3
-rw-r--r--net-libs/pjproject/files/pjproject-2.7.2-libressl.patch98
-rw-r--r--net-libs/pjproject/pjproject-2.7.2.ebuild12
3 files changed, 109 insertions, 4 deletions
diff --git a/net-libs/pjproject/Manifest b/net-libs/pjproject/Manifest
index 44f641535dd5..8acd0f0e8cf7 100644
--- a/net-libs/pjproject/Manifest
+++ b/net-libs/pjproject/Manifest
@@ -1,7 +1,8 @@
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
DIST pjproject-2.7.1.tar.bz2 4880007 BLAKE2B 33fca89f07abc0b9662b1070c96b903c236a60149734755286dad3111411dbeef5779077a77d21112be6db2957cb7e18c5c833b3c5fd32c26be44d4550fb215e SHA512 cd15afee2a02659668ff228b2652d2bd179393e3b5031afae1c326354fb9676babc08eb689e466165536abc360684299b4fdb41dbb1148aed89afe1ce7e5d979
DIST pjproject-2.7.2.tar.bz2 4994233 BLAKE2B 44ecaf0997d5dd9b18e0b811cead7c9104e63894fa06fb1d64e79b60fa4210968fd90ef47e5f5be3629675363c8756ce3bc1834caa9700654ab4c53efe676ee7 SHA512 3d355ffcbbeed62cfc711e574a987dc06043ccf4f2625820adffa89167022b8306fcee3fada71d3d45e7b902fc9c65ac8221de101cbafed25362a3921f702afd
EBUILD pjproject-2.7.1.ebuild 2610 BLAKE2B a67e4c4c21bea82aba8fd25cdc152329734d6d9aa6550c8bcba951b997e6ee9db0e509ff344ab296dc401422ce6d2fcc4c675cd8101dae30bf254b99aee621f9 SHA512 d0d93d97ac40394416ad4e7286e226160ccb9652922a318e1293610361355130f95cabc4133e2144b62bb59d57fa8bfc2d3e5742832dbd420b87c7a7ee48ed75
-EBUILD pjproject-2.7.2.ebuild 2612 BLAKE2B 54521f7df9bda11dd925820bf39c0136bf5850f89ddc9a2cab517fa86be2a3eb93c8bf0c277109ea6d6fd47fb5a11aedbd944178a481258996ab5e3eab329326 SHA512 c4842f91ecce45548929f2504829a68bb00d7eb2e45c4a1cddc80a8acea4ef215ae32f5c7a17540f4fbabe89b90b79b68d86dad6aa40071da74f561f2780bb44
+EBUILD pjproject-2.7.2.ebuild 2713 BLAKE2B b319682f4850080fe47828e291ade7eb27a182f80c26deb5be81d85c55e23335e085f0a3a5053cc435fbbf2c6491bfa05614e75592b56328c30225ef7239cbe0 SHA512 4603a1fa9a66e27d203d4d2f2c6f72224935762477f1b59e77eca24c300beb16edea39a58b78c456aaf9d3b136e1eba82b5b55bc688619172ec4000c14e20a97
MISC metadata.xml 1157 BLAKE2B 1b40ee1b635cb8cdafaf001ad458264c4e55344393fd76ac7263521069bd355e4febd7ef534b24bd3879a75e5229863d8b93b8d89019639c49bb7511e1044ca5 SHA512 1171e638d0320d07b0bf3d6a6d31a75722dd659b296d9f451cfe1d3cc12016ff5b1c94b690054bb3772462d7a8d70b47fcb8b5c760c8677a727743ecebb57dce
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 000000000000..07efa9ccb8fd
--- /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/pjproject-2.7.2.ebuild b/net-libs/pjproject/pjproject-2.7.2.ebuild
index e4d25565824a..ee569db2b4e1 100644
--- a/net-libs/pjproject/pjproject-2.7.2.ebuild
+++ b/net-libs/pjproject/pjproject-2.7.2.ebuild
@@ -15,9 +15,12 @@ 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 opus resample silk ssl static-libs webrtc ${CODEC_FLAGS} ${VIDEO_FLAGS} ${SOUND_FLAGS}"
+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 )
+PATCHES=(
+ "${FILESDIR}"/${P}-ssl-flipflop.patch
+ "${FILESDIR}"/${P}-libressl.patch
+)
RDEPEND="alsa? ( media-libs/alsa-lib )
oss? ( media-libs/portaudio[oss] )
@@ -34,7 +37,10 @@ RDEPEND="alsa? ( media-libs/alsa-lib )
openh264? ( media-libs/openh264 )
resample? ( media-libs/libsamplerate )
- ssl? ( dev-libs/openssl:= )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
net-libs/libsrtp:0"
DEPEND="${RDEPEND}