Gentoo Archives: gentoo-commits

From: Mart Raudsepp <leio@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/libnice/, net-libs/libnice/files/
Date: Fri, 15 Feb 2019 19:32:59
Message-Id: 1550259125.2a63099452ac1fa37f65a13e9373ce6db2a04ffd.leio@gentoo
1 commit: 2a63099452ac1fa37f65a13e9373ce6db2a04ffd
2 Author: Stefan Strogin <stefan.strogin <AT> gmail <DOT> com>
3 AuthorDate: Fri Feb 15 19:20:59 2019 +0000
4 Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 15 19:32:05 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a630994
7
8 net-libs/libnice: add patch for LibreSSL support
9
10 Closes: https://bugs.gentoo.org/678000
11 Closes: https://github.com/gentoo/gentoo/pull/11059
12 Package-Manager: Portage-2.3.60, Repoman-2.3.12
13 Signed-off-by: Stefan Strogin <stefan.strogin <AT> gmail.com>
14 Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>
15
16 .../libnice/files/libnice-0.1.15-libressl.patch | 57 ++++++++++++++++++++++
17 net-libs/libnice/libnice-0.1.15.ebuild | 2 +
18 2 files changed, 59 insertions(+)
19
20 diff --git a/net-libs/libnice/files/libnice-0.1.15-libressl.patch b/net-libs/libnice/files/libnice-0.1.15-libressl.patch
21 new file mode 100644
22 index 00000000000..6c38069bceb
23 --- /dev/null
24 +++ b/net-libs/libnice/files/libnice-0.1.15-libressl.patch
25 @@ -0,0 +1,57 @@
26 +From 926afef019ca9f297cebbe13479159ac5c087f00 Mon Sep 17 00:00:00 2001
27 +From: Stefan Strogin <stefan.strogin@×××××.com>
28 +Date: Fri, 15 Feb 2019 20:45:34 +0200
29 +Subject: [PATCH] stun: Fix LibreSSL support
30 +
31 +Closes #71
32 +---
33 + stun/stunhmac.c | 12 ++++++++----
34 + 1 file changed, 8 insertions(+), 4 deletions(-)
35 +
36 +diff --git a/stun/stunhmac.c b/stun/stunhmac.c
37 +index c7d1432..c9d183f 100644
38 +--- a/stun/stunhmac.c
39 ++++ b/stun/stunhmac.c
40 +@@ -75,7 +75,8 @@ void stun_sha1 (const uint8_t *msg, size_t len, size_t msg_len, uint8_t *sha,
41 + assert (ret == 1);
42 + #endif
43 +
44 +-#if OPENSSL_VERSION_NUMBER < 0x10100000L
45 ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
46 ++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
47 + HMAC_CTX stackctx;
48 + HMAC_CTX *ctx = &stackctx;
49 + HMAC_CTX_init (ctx);
50 +@@ -101,7 +102,8 @@ void stun_sha1 (const uint8_t *msg, size_t len, size_t msg_len, uint8_t *sha,
51 +
52 + TRY (HMAC_Final (ctx, sha, NULL));
53 +
54 +-#if OPENSSL_VERSION_NUMBER < 0x10100000L
55 ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
56 ++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
57 + HMAC_CTX_cleanup (ctx);
58 + #else
59 + HMAC_CTX_free (ctx);
60 +@@ -172,7 +174,8 @@ void stun_hash_creds (const uint8_t *realm, size_t realm_len,
61 + #ifdef HAVE_OPENSSL
62 + EVP_MD_CTX *ctx;
63 +
64 +-#if OPENSSL_VERSION_NUMBER < 0x10100000L
65 ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
66 ++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
67 + ctx = EVP_MD_CTX_create ();
68 + #else
69 + ctx = EVP_MD_CTX_new ();
70 +@@ -186,7 +189,8 @@ void stun_hash_creds (const uint8_t *realm, size_t realm_len,
71 + EVP_DigestUpdate (ctx, password_trimmed, password_len);
72 + EVP_DigestFinal_ex (ctx, md5, NULL);
73 +
74 +-#if OPENSSL_VERSION_NUMBER < 0x10100000L
75 ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
76 ++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
77 + EVP_MD_CTX_destroy (ctx);
78 + #else
79 + EVP_MD_CTX_free (ctx);
80 +--
81 +2.20.1
82 +
83
84 diff --git a/net-libs/libnice/libnice-0.1.15.ebuild b/net-libs/libnice/libnice-0.1.15.ebuild
85 index 990b285f6c2..e66ba68fd51 100644
86 --- a/net-libs/libnice/libnice-0.1.15.ebuild
87 +++ b/net-libs/libnice/libnice-0.1.15.ebuild
88 @@ -28,6 +28,8 @@ DEPEND="${RDEPEND}
89 >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
90 "
91
92 +PATCHES=( "${FILESDIR}/${P}-libressl.patch" ) # https://gitlab.freedesktop.org/libnice/libnice/merge_requests/50
93 +
94 multilib_src_configure() {
95 # gstreamer plugin split off into media-plugins/gst-plugins-libnice
96 ECONF_SOURCE=${S} \