Gentoo Archives: gentoo-commits

From: Akinori Hattori <hattya@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/qterm/files/, x11-misc/qterm/
Date: Sat, 18 Aug 2018 02:10:00
Message-Id: 1534557865.3996b4a6d01bf9f5025bbeaf77c382c1f8b6be06.hattya@gentoo
1 commit: 3996b4a6d01bf9f5025bbeaf77c382c1f8b6be06
2 Author: Akinori Hattori <hattya <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 18 02:04:25 2018 +0000
4 Commit: Akinori Hattori <hattya <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 18 02:04:25 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3996b4a6
7
8 x11-misc/qterm: fix build with libressl
9
10 Closes: https://bugs.gentoo.org/645390
11 Package-Manager: Portage-2.3.40, Repoman-2.3.9
12
13 x11-misc/qterm/files/qterm-libressl.patch | 60 +++++++++++++++++++++++++++++++
14 x11-misc/qterm/qterm-0.7.1.ebuild | 5 ++-
15 2 files changed, 64 insertions(+), 1 deletion(-)
16
17 diff --git a/x11-misc/qterm/files/qterm-libressl.patch b/x11-misc/qterm/files/qterm-libressl.patch
18 new file mode 100644
19 index 00000000000..d0e0ae1f9cb
20 --- /dev/null
21 +++ b/x11-misc/qterm/files/qterm-libressl.patch
22 @@ -0,0 +1,60 @@
23 +--- a/src/ssh/libcrypto-compat.c
24 ++++ b/src/ssh/libcrypto-compat.c
25 +@@ -8,7 +8,7 @@
26 + */
27 +
28 + #include "libcrypto-compat.h"
29 +-#if OPENSSL_VERSION_NUMBER < 0x10100000L
30 ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
31 + #include <string.h>
32 + #include <openssl/engine.h>
33 +
34 +--- a/src/ssh/libcrypto-compat.h
35 ++++ b/src/ssh/libcrypto-compat.h
36 +@@ -9,7 +9,7 @@
37 + #include <openssl/evp.h>
38 + #include <openssl/hmac.h>
39 +
40 +-#if OPENSSL_VERSION_NUMBER < 0x10100000L
41 ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
42 +
43 + int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d);
44 + int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q);
45 +--- a/src/ssh/socket.cpp
46 ++++ b/src/ssh/socket.cpp
47 +@@ -36,7 +36,7 @@
48 + SSH2SocketPriv::SSH2SocketPriv(SocketPrivate * plainSocket, QByteArray & banner, QObject * parent)
49 + : SSHSocketPriv(parent), m_banner(banner), m_status(Init), m_sessionID(), m_channelList()
50 + {
51 +-#if OPENSSL_VERSION_NUMBER < 0x10100000L
52 ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
53 + OpenSSL_add_all_ciphers();
54 + #endif
55 + m_sessionID = NULL;
56 +@@ -56,7 +56,7 @@
57 +
58 + SSH2SocketPriv::~SSH2SocketPriv()
59 + {
60 +-#if OPENSSL_VERSION_NUMBER < 0x10100000L
61 ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
62 + EVP_cleanup();
63 + #endif
64 + }
65 +@@ -133,7 +133,7 @@
66 + #ifdef SSH_DEBUG
67 + qDebug() << "init ssh1 session";
68 + #endif
69 +-#if OPENSSL_VERSION_NUMBER < 0x10100000L
70 ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
71 + OpenSSL_add_all_ciphers();
72 + #endif
73 + m_inPacket = new SSH1InBuffer(plainSocket, this);
74 +@@ -148,7 +148,7 @@
75 +
76 + SSH1SocketPriv::~SSH1SocketPriv()
77 + {
78 +-#if OPENSSL_VERSION_NUMBER < 0x10100000L
79 ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
80 + EVP_cleanup();
81 + #endif
82 + }
83
84 diff --git a/x11-misc/qterm/qterm-0.7.1.ebuild b/x11-misc/qterm/qterm-0.7.1.ebuild
85 index daf1248d0cb..d1116333ae8 100644
86 --- a/x11-misc/qterm/qterm-0.7.1.ebuild
87 +++ b/x11-misc/qterm/qterm-0.7.1.ebuild
88 @@ -30,7 +30,10 @@ DEPEND="${RDEPEND}
89 dev-qt/qthelp:5
90 x11-base/xorg-proto"
91
92 -PATCHES=( "${FILESDIR}"/${P}-headers.patch )
93 +PATCHES=(
94 + "${FILESDIR}"/${PN}-libressl.patch
95 + "${FILESDIR}"/${P}-headers.patch
96 +)
97 DOCS=( README.rst RELEASE_NOTES TODO )
98
99 src_prepare() {