commit:     76c59c377a3f2cef432012075ebd9b2cec80102c
Author:     Stefan Strogin <steils <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  1 11:17:51 2019 +0000
Commit:     Stefan Strogin <steils <AT> gentoo <DOT> org>
CommitDate: Mon Jul  1 11:57:37 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76c59c37

net-libs/libssh: add patch for LibreSSL

Closes: https://bugs.gentoo.org/688974
Package-Manager: Portage-2.3.67, Repoman-2.3.16
Signed-off-by: Stefan Strogin <steils <AT> gentoo.org>

 net-libs/libssh/files/libssh-0.9.0-libressl.patch | 33 +++++++++++++++++++++++
 net-libs/libssh/libssh-0.9.0.ebuild               |  5 +++-
 net-libs/libssh/libssh-9999.ebuild                |  5 +++-
 3 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/net-libs/libssh/files/libssh-0.9.0-libressl.patch 
b/net-libs/libssh/files/libssh-0.9.0-libressl.patch
new file mode 100644
index 00000000000..355e832308e
--- /dev/null
+++ b/net-libs/libssh/files/libssh-0.9.0-libressl.patch
@@ -0,0 +1,33 @@
+From 08bdd5b26388f92867ab03e36d73e32481faed88 Mon Sep 17 00:00:00 2001
+From: Stefan Strogin <[email protected]>
+Date: Mon, 1 Jul 2019 13:35:09 +0300
+Subject: [PATCH] libcrypto: fix compilation with LibreSSL
+
+LibreSSL does not support FIPS, so do not check it.
+
+Signed-off-by: Stefan Strogin <[email protected]>
+Upstream-Status: Submitted
+[https://www.libssh.org/archive/libssh/2019-07/0000000.html]
+---
+ include/libssh/libcrypto.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/include/libssh/libcrypto.h b/include/libssh/libcrypto.h
+index 541912b5..1a1df635 100644
+--- a/include/libssh/libcrypto.h
++++ b/include/libssh/libcrypto.h
+@@ -112,7 +112,11 @@ typedef BN_CTX* bignum_CTX;
+ 
+ 
+ /* Returns true if the OpenSSL is operating in FIPS mode */
++#ifndef LIBRESSL_VERSION_NUMBER
+ #define ssh_fips_mode() (FIPS_mode() != 0)
++#else
++#define ssh_fips_mode() false
++#endif
+ 
+ #endif /* HAVE_LIBCRYPTO */
+ 
+-- 
+2.22.0
+

diff --git a/net-libs/libssh/libssh-0.9.0.ebuild 
b/net-libs/libssh/libssh-0.9.0.ebuild
index 19777b48ff3..14ceb5386a6 100644
--- a/net-libs/libssh/libssh-0.9.0.ebuild
+++ b/net-libs/libssh/libssh-0.9.0.ebuild
@@ -42,7 +42,10 @@ DEPEND="${RDEPEND}
 
 DOCS=( AUTHORS README ChangeLog )
 
-PATCHES=( "${FILESDIR}/${PN}-0.8.0-tests.patch" )
+PATCHES=(
+       "${FILESDIR}/${PN}-0.8.0-tests.patch"
+       "${FILESDIR}/${PN}-0.9.0-libressl.patch"
+)
 
 src_prepare() {
        cmake-utils_src_prepare

diff --git a/net-libs/libssh/libssh-9999.ebuild 
b/net-libs/libssh/libssh-9999.ebuild
index 19777b48ff3..14ceb5386a6 100644
--- a/net-libs/libssh/libssh-9999.ebuild
+++ b/net-libs/libssh/libssh-9999.ebuild
@@ -42,7 +42,10 @@ DEPEND="${RDEPEND}
 
 DOCS=( AUTHORS README ChangeLog )
 
-PATCHES=( "${FILESDIR}/${PN}-0.8.0-tests.patch" )
+PATCHES=(
+       "${FILESDIR}/${PN}-0.8.0-tests.patch"
+       "${FILESDIR}/${PN}-0.9.0-libressl.patch"
+)
 
 src_prepare() {
        cmake-utils_src_prepare

Reply via email to