public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mike Gilbert" <floppym@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/freerdp/files/, net-misc/freerdp/
Date: Mon, 20 Mar 2017 20:58:24 +0000 (UTC)	[thread overview]
Message-ID: <1490043474.419c9cbad4248fdf0fd043341026a60f423d561b.floppym@gentoo> (raw)

commit:     419c9cbad4248fdf0fd043341026a60f423d561b
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 20 20:57:54 2017 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Mar 20 20:57:54 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=419c9cba

net-misc/freerdp: fix build with libressl

Thanks to Aric Belsito for the patch.

Bug: https://bugs.gentoo.org/603656
Package-Manager: Portage-2.3.5_p2, Repoman-2.3.2_p32

 net-misc/freerdp/files/freerdp-libressl.patch     | 148 ++++++++++++++++++++++
 net-misc/freerdp/freerdp-2.0.0_pre20161219.ebuild |   6 +-
 2 files changed, 153 insertions(+), 1 deletion(-)

diff --git a/net-misc/freerdp/files/freerdp-libressl.patch b/net-misc/freerdp/files/freerdp-libressl.patch
new file mode 100644
index 00000000000..cbb79bcc1d3
--- /dev/null
+++ b/net-misc/freerdp/files/freerdp-libressl.patch
@@ -0,0 +1,148 @@
+From 70ab61c8e6083080093fc42e8e7172969864e2bd Mon Sep 17 00:00:00 2001
+From: Aric Belsito <lluixhi@gmail.com>
+Date: Sun, 19 Mar 2017 13:58:24 -0700
+Subject: [PATCH] Support LibreSSL
+
+Broken by the addition of OpenSSL 1.1.0 support.
+---
+ libfreerdp/crypto/opensslcompat.c | 4 ++--
+ libfreerdp/crypto/opensslcompat.h | 4 ++--
+ libfreerdp/crypto/tls.c           | 8 ++++----
+ winpr/libwinpr/crypto/hash.c      | 8 ++++----
+ winpr/libwinpr/utils/ssl.c        | 2 +-
+ 5 files changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/libfreerdp/crypto/opensslcompat.c b/libfreerdp/crypto/opensslcompat.c
+index bb5aff7..701902d 100644
+--- a/libfreerdp/crypto/opensslcompat.c
++++ b/libfreerdp/crypto/opensslcompat.c
+@@ -19,7 +19,7 @@
+ 
+ #include "opensslcompat.h"
+ 
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ 
+ BIO_METHOD* BIO_meth_new(int type, const char* name)
+ {
+@@ -41,4 +41,4 @@ void RSA_get0_key(const RSA* r, const BIGNUM** n, const BIGNUM** e, const BIGNUM
+ 		*d = r->d;
+ }
+ 
+-#endif /* OPENSSL < 1.1.0 */
++#endif /* OPENSSL < 1.1.0 || LIBRESSL */
+diff --git a/libfreerdp/crypto/opensslcompat.h b/libfreerdp/crypto/opensslcompat.h
+index a599863..b42d32f 100644
+--- a/libfreerdp/crypto/opensslcompat.h
++++ b/libfreerdp/crypto/opensslcompat.h
+@@ -30,7 +30,7 @@
+ 
+ #include <openssl/opensslv.h>
+ 
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ 
+ #include <openssl/bio.h>
+ #include <openssl/rsa.h>
+@@ -59,7 +59,7 @@
+ BIO_METHOD* BIO_meth_new(int type, const char* name);
+ void RSA_get0_key(const RSA* r, const BIGNUM** n, const BIGNUM** e, const BIGNUM** d);
+ 
+-#endif /* OPENSSL < 1.1.0 */
++#endif /* OPENSSL < 1.1.0 || LIBRESSL */
+ #endif /* WITH_OPENSSL */
+ 
+ #endif /* FREERDP_CRYPTO_OPENSSLCOMPAT_H */
+diff --git a/libfreerdp/crypto/tls.c b/libfreerdp/crypto/tls.c
+index 1071a2e..c415763 100644
+--- a/libfreerdp/crypto/tls.c
++++ b/libfreerdp/crypto/tls.c
+@@ -323,7 +323,7 @@ static long bio_rdp_tls_ctrl(BIO* bio, int cmd, long num, void* ptr)
+ 		case BIO_CTRL_PUSH:
+ 			if (next_bio && (next_bio != ssl_rbio))
+ 			{
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ 				SSL_set_bio(tls->ssl, next_bio, next_bio);
+ 				CRYPTO_add(&(bio->next_bio->references), 1, CRYPTO_LOCK_BIO);
+ #else
+@@ -346,7 +346,7 @@ static long bio_rdp_tls_ctrl(BIO* bio, int cmd, long num, void* ptr)
+ 				if (ssl_rbio != ssl_wbio)
+ 					BIO_free_all(ssl_wbio);
+ 
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ 				if (next_bio)
+ 					CRYPTO_add(&(bio->next_bio->references), -1, CRYPTO_LOCK_BIO);
+ 				tls->ssl->wbio = tls->ssl->rbio = NULL;
+@@ -384,7 +384,7 @@ static long bio_rdp_tls_ctrl(BIO* bio, int cmd, long num, void* ptr)
+ 					BIO_push(ssl_rbio, next_bio);
+ 
+ 				BIO_set_next(bio, ssl_rbio);
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ 				CRYPTO_add(&(ssl_rbio->references), 1, CRYPTO_LOCK_BIO);
+ #else
+ 				BIO_up_ref(ssl_rbio);
+@@ -1021,7 +1021,7 @@ BOOL tls_send_alert(rdpTls* tls)
+  *        SSL struct is opaqe now
+  */
+ 
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ 	if (tls->alertDescription != TLS_ALERT_DESCRIPTION_CLOSE_NOTIFY)
+ 	{
+ 		/**
+diff --git a/winpr/libwinpr/crypto/hash.c b/winpr/libwinpr/crypto/hash.c
+index 949d687..27eb434 100644
+--- a/winpr/libwinpr/crypto/hash.c
++++ b/winpr/libwinpr/crypto/hash.c
+@@ -146,7 +146,7 @@ WINPR_HMAC_CTX* winpr_HMAC_New(void)
+ 
+ #if defined(WITH_OPENSSL)
+ 	HMAC_CTX* hmac = NULL;
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
+ 	if (!(hmac = (HMAC_CTX*) calloc(1, sizeof(HMAC_CTX))))
+ 		return NULL;
+ 	HMAC_CTX_init(hmac);
+@@ -267,7 +267,7 @@ void winpr_HMAC_Free(WINPR_HMAC_CTX* ctx)
+ 	HMAC_CTX* hmac = (HMAC_CTX*) ctx;
+ 	if (hmac)
+ 	{
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
+ 		HMAC_CTX_cleanup(hmac);
+ 		free(hmac);
+ #else
+@@ -317,7 +317,7 @@ WINPR_DIGEST_CTX* winpr_Digest_New(void)
+ 
+ #if defined(WITH_OPENSSL)
+ 	EVP_MD_CTX* mdctx;
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
+ 	mdctx = EVP_MD_CTX_create();
+ #else
+ 	mdctx = EVP_MD_CTX_new();
+@@ -406,7 +406,7 @@ void winpr_Digest_Free(WINPR_DIGEST_CTX* ctx)
+ 	EVP_MD_CTX* mdctx = (EVP_MD_CTX*) ctx;
+ 	if (mdctx)
+ 	{
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
+ 		EVP_MD_CTX_destroy(mdctx);
+ #else
+ 		EVP_MD_CTX_free(mdctx);
+diff --git a/winpr/libwinpr/utils/ssl.c b/winpr/libwinpr/utils/ssl.c
+index 2f8100f..5fd6ac6 100644
+--- a/winpr/libwinpr/utils/ssl.c
++++ b/winpr/libwinpr/utils/ssl.c
+@@ -45,7 +45,7 @@ static BOOL g_winpr_openssl_initialized_by_winpr = FALSE;
+  * set locking callbacks to use OpenSSL in a multi-threaded environment.
+  */
+ 
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
+ 
+ #define WINPR_OPENSSL_LOCKING_REQUIRED 1
+ 

diff --git a/net-misc/freerdp/freerdp-2.0.0_pre20161219.ebuild b/net-misc/freerdp/freerdp-2.0.0_pre20161219.ebuild
index 40b489b8f17..68a46705081 100644
--- a/net-misc/freerdp/freerdp-2.0.0_pre20161219.ebuild
+++ b/net-misc/freerdp/freerdp-2.0.0_pre20161219.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -89,6 +89,10 @@ DEPEND="${RDEPEND}
 
 DOCS=( README )
 
+PATCHES=(
+	"${FILESDIR}"/freerdp-libressl.patch
+)
+
 src_configure() {
 	local mycmakeargs=(
 		-DWITH_ALSA=$(usex alsa)


             reply	other threads:[~2017-03-20 20:58 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-20 20:58 Mike Gilbert [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-18 19:46 [gentoo-commits] repo/gentoo:master commit in: net-misc/freerdp/files/, net-misc/freerdp/ Mike Gilbert
2024-05-22 17:33 Mike Gilbert
2023-12-07 21:00 Mike Gilbert
2023-06-07 10:34 Sam James
2022-05-02 21:25 Mike Gilbert
2021-10-24 14:29 Mike Gilbert
2021-10-23 16:09 Mike Gilbert
2021-08-11 15:04 Mike Gilbert
2021-07-31 19:57 Mike Gilbert
2020-08-30 21:42 Mike Gilbert
2020-07-18 13:19 Mike Gilbert
2020-06-08 17:25 Mike Gilbert
2020-05-14 22:15 Thomas Deutschmann
2020-05-09  4:15 Mike Gilbert
2020-04-10 14:49 Mike Gilbert
2019-12-12 20:15 Mike Gilbert
2019-10-07 17:18 Mike Gilbert
2018-12-04 17:31 Mike Gilbert
2018-12-02 17:15 Mike Gilbert
2018-05-16 21:19 Mike Gilbert
2017-12-14 20:04 Mike Gilbert
2017-08-26 19:05 Mike Gilbert
2017-07-28 21:03 Mike Gilbert
2015-11-08 17:44 Mike Gilbert
2015-09-16 20:57 Alexis Ballier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1490043474.419c9cbad4248fdf0fd043341026a60f423d561b.floppym@gentoo \
    --to=floppym@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox