net-libs/libssh: add patch for LibreSSL
authorStefan Strogin <steils@gentoo.org>
Mon, 1 Jul 2019 11:17:51 +0000 (14:17 +0300)
committerStefan Strogin <steils@gentoo.org>
Mon, 1 Jul 2019 11:57:37 +0000 (14:57 +0300)
Closes: https://bugs.gentoo.org/688974
Package-Manager: Portage-2.3.67, Repoman-2.3.16
Signed-off-by: Stefan Strogin <steils@gentoo.org>
net-libs/libssh/files/libssh-0.9.0-libressl.patch [new file with mode: 0644]
net-libs/libssh/libssh-0.9.0.ebuild
net-libs/libssh/libssh-9999.ebuild

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 (file)
index 0000000..355e832
--- /dev/null
@@ -0,0 +1,33 @@
+From 08bdd5b26388f92867ab03e36d73e32481faed88 Mon Sep 17 00:00:00 2001
+From: Stefan Strogin <steils@gentoo.org>
+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 <steils@gentoo.org>
+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
+
index 19777b48ff3915dcf745f3756153f2d7656ba72b..14ceb5386a6f0bd176b21254cfad05da83cb9e0d 100644 (file)
@@ -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
index 19777b48ff3915dcf745f3756153f2d7656ba72b..14ceb5386a6f0bd176b21254cfad05da83cb9e0d 100644 (file)
@@ -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