commit:     9c7939e92210deb470bddaf8f293a7b3fd2dc36e
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 14 20:03:37 2017 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu Dec 14 20:04:05 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c7939e9

net-misc/freerdp: fix build with libressl

Closes: https://bugs.gentoo.org/640988
Package-Manager: Portage-2.3.18, Repoman-2.3.6_p30

 net-misc/freerdp/files/2.0.0-rc1-libressl.patch | 35 +++++++++++++++++++++++++
 net-misc/freerdp/freerdp-2.0.0_rc1.ebuild       |  4 +++
 2 files changed, 39 insertions(+)

diff --git a/net-misc/freerdp/files/2.0.0-rc1-libressl.patch 
b/net-misc/freerdp/files/2.0.0-rc1-libressl.patch
new file mode 100644
index 00000000000..76e2514ef2b
--- /dev/null
+++ b/net-misc/freerdp/files/2.0.0-rc1-libressl.patch
@@ -0,0 +1,35 @@
+From bfe3af4c72b45e33321962644d864843e1c9ce3d Mon Sep 17 00:00:00 2001
+From: Greg V <[email protected]>
+Date: Fri, 1 Dec 2017 18:34:48 +0300
+Subject: [PATCH] Fix LibreSSL build
+
+LibreSSL does not support FIPS mode.
+---
+ winpr/libwinpr/utils/ssl.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/winpr/libwinpr/utils/ssl.c b/winpr/libwinpr/utils/ssl.c
+index f749939ac..194f82609 100644
+--- a/winpr/libwinpr/utils/ssl.c
++++ b/winpr/libwinpr/utils/ssl.c
+@@ -279,7 +279,7 @@ static BOOL CALLBACK _winpr_openssl_initialize(PINIT_ONCE 
once, PVOID param, PVO
+ 
+       if (flags & WINPR_SSL_INIT_ENABLE_FIPS)
+       {
+-#if (OPENSSL_VERSION_NUMBER < 0x10001000L)
++#if (OPENSSL_VERSION_NUMBER < 0x10001000L) || defined(LIBRESSL_VERSION_NUMBER)
+               WLog_ERR(TAG, "Openssl fips mode ENable not available on 
openssl versions less than 1.0.1!");
+ #else
+               WLog_DBG(TAG, "Ensuring openssl fips mode is ENabled");
+@@ -348,7 +348,7 @@ BOOL winpr_CleanupSSL(DWORD flags)
+ 
+ BOOL winpr_FIPSMode(void)
+ {
+-#if (OPENSSL_VERSION_NUMBER < 0x10001000L)
++#if (OPENSSL_VERSION_NUMBER < 0x10001000L) || defined(LIBRESSL_VERSION_NUMBER)
+       return FALSE;
+ #else
+       return (FIPS_mode() == 1);
+-- 
+2.15.1
+

diff --git a/net-misc/freerdp/freerdp-2.0.0_rc1.ebuild 
b/net-misc/freerdp/freerdp-2.0.0_rc1.ebuild
index 631b7548fe1..c8a6ae3b610 100644
--- a/net-misc/freerdp/freerdp-2.0.0_rc1.ebuild
+++ b/net-misc/freerdp/freerdp-2.0.0_rc1.ebuild
@@ -88,6 +88,10 @@ DEPEND="${RDEPEND}
        ) ) )
 "
 
+PATCHES=(
+       "${FILESDIR}/2.0.0-rc1-libressl.patch"
+)
+
 src_configure() {
        local mycmakeargs=(
                -DBUILD_TESTING=$(usex test)

Reply via email to