summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2017-09-18 01:22:15 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2017-09-18 19:53:41 +0200
commit86da4fbf7f337c0101ab15ad9f95f175f458e898 (patch)
tree8c9d84056e5c6ee31f1c44b29f59dae60f14792f /net-p2p
parentnet-p2p/eiskaltdcpp: EAPI 6, qt4 -> qt5, fdo-mime -> xdg-utils (diff)
downloadgentoo-86da4fbf7f337c0101ab15ad9f95f175f458e898.tar.gz
gentoo-86da4fbf7f337c0101ab15ad9f95f175f458e898.tar.bz2
gentoo-86da4fbf7f337c0101ab15ad9f95f175f458e898.zip
net-p2p/eiskaltdcpp: 2.2.10 version bump
Backport upstream fixes for net-libs/miniupnpc-2. Thanks-to: Francisco Blas (klondike) Izquierdo Riera <klondike@gentoo.org> Gentoo-Bug: 578308, 615276
Diffstat (limited to 'net-p2p')
-rw-r--r--net-p2p/eiskaltdcpp/Manifest1
-rw-r--r--net-p2p/eiskaltdcpp/eiskaltdcpp-2.2.10.ebuild149
-rw-r--r--net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-ipv6_upnp.patch123
-rw-r--r--net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-miniupnpc1.patch31
-rw-r--r--net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-miniupnpc2.patch29
-rw-r--r--net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-openssl-1.1.patch138
-rw-r--r--net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-tray-close.patch23
7 files changed, 494 insertions, 0 deletions
diff --git a/net-p2p/eiskaltdcpp/Manifest b/net-p2p/eiskaltdcpp/Manifest
index 7deffb05ff6..93b7ee2adde 100644
--- a/net-p2p/eiskaltdcpp/Manifest
+++ b/net-p2p/eiskaltdcpp/Manifest
@@ -1 +1,2 @@
+DIST eiskaltdcpp-2.2.10.tar.gz 3843143 SHA256 e461c8c499e459651d6382a6ded6788e5ac9a9c4ff26386c3cf073d94d606127 SHA512 97c39287b9568aebc5ab21aeabefb63ea32bde8744242bb8647b742c933de9cf74a7fbb2e6df7be6046319bbc660e8abdec0fa332ee91ec5048492af0d763818 WHIRLPOOL 463abac15ccabdbe002d6b5e30cf1baa7486055e304ec963a4d50449ff8b451d093beba273d2e11a9002e642d6dcb06e05970898b893a86c7917dfbfa02611ae
DIST eiskaltdcpp-2.2.9.tar.gz 3578993 SHA256 99f1f66038ec19ec14992df484f97b88238df5dd260ca72d5023fb9a6fef44b4 SHA512 8b3a58e1fe757b5cef50b3ec534f135b2285d843f0120758f07bd3a1ce82aaf0874d78a04ba1d2eb4f584db50a2bc3315536ebdbabbb4d296b42e8ca90cc630b WHIRLPOOL 0bb140c903556fd82d1e888b2dd581c362375983ad585ea0686e5cb8bebcf257d8356d546af3779103b9173c1f3a1061df383da8932a835eb7c5a1bb0e932c55
diff --git a/net-p2p/eiskaltdcpp/eiskaltdcpp-2.2.10.ebuild b/net-p2p/eiskaltdcpp/eiskaltdcpp-2.2.10.ebuild
new file mode 100644
index 00000000000..69ba4dfd9af
--- /dev/null
+++ b/net-p2p/eiskaltdcpp/eiskaltdcpp-2.2.10.ebuild
@@ -0,0 +1,149 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PLOCALES="be bg cs de el en es eu fr hu it pl pt_BR ru sk sr@latin sr sv_SE uk vi zh_CN"
+
+inherit cmake-utils gnome2-utils l10n xdg-utils
+[[ ${PV} = *9999* ]] && inherit git-r3
+
+DESCRIPTION="Qt/DC++ based client for DirectConnect and ADC protocols"
+HOMEPAGE="https://github.com/eiskaltdcpp/eiskaltdcpp"
+
+LICENSE="GPL-2 GPL-3"
+SLOT="0"
+IUSE="cli daemon dbus +dht examples idn -javascript json lua +minimal pcre +qt5 spell sqlite upnp -xmlrpc"
+
+REQUIRED_USE="
+ ?? ( json xmlrpc )
+ cli? ( ^^ ( json xmlrpc ) )
+ dbus? ( qt5 )
+ javascript? ( qt5 )
+ spell? ( qt5 )
+ sqlite? ( qt5 )
+"
+
+if [[ ${PV} != *9999* ]]; then
+ SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+else
+ EGIT_REPO_URI="https://github.com/${PN}/${PN}.git"
+ KEYWORDS=""
+fi
+
+RDEPEND="
+ app-arch/bzip2
+ dev-libs/boost:=
+ dev-libs/openssl:0=
+ sys-apps/attr
+ sys-libs/zlib
+ virtual/libiconv
+ virtual/libintl
+ cli? (
+ dev-lang/perl
+ dev-perl/Data-Dump
+ dev-perl/Term-ShellUI
+ virtual/perl-Getopt-Long
+ json? ( dev-perl/JSON-RPC )
+ xmlrpc? ( dev-perl/RPC-XML )
+ )
+ daemon? ( xmlrpc? ( dev-libs/xmlrpc-c[abyss,cxx] ) )
+ idn? ( net-dns/libidn )
+ lua? ( dev-lang/lua:= )
+ pcre? ( dev-libs/libpcre )
+ qt5? (
+ dev-qt/qtconcurrent:5
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtmultimedia:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtxml:5
+ dbus? ( dev-qt/qtdbus:5 )
+ javascript? (
+ dev-qt/qtdeclarative:5
+ dev-qt/qtscript:5
+ )
+ spell? ( app-text/aspell )
+ sqlite? ( dev-qt/qtsql:5[sqlite] )
+ )
+ upnp? ( net-libs/miniupnpc )
+"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig
+ qt5? ( dev-qt/linguist-tools:5 )
+"
+
+DOCS=( AUTHORS ChangeLog.txt )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-ipv6_upnp.patch
+ "${FILESDIR}"/${P}-miniupnpc{1,2}.patch
+ "${FILESDIR}"/${P}-openssl-1.1.patch
+ "${FILESDIR}"/${P}-tray-close.patch
+)
+
+src_prepare() {
+ cmake-utils_src_prepare
+ l10n_find_plocales_changes 'eiskaltdcpp-qt/translations' '' '.ts'
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLIB_INSTALL_DIR="$(get_libdir)"
+ -Dlinguas="$(l10n_get_locales)"
+ -DLOCAL_MINIUPNP=OFF
+ -DUSE_GTK=OFF
+ -DUSE_GTK3=OFF
+ -DUSE_LIBGNOME2=OFF
+ -DUSE_LIBCANBERRA=OFF
+ -DUSE_LIBNOTIFY=OFF
+ -DUSE_QT=OFF
+ -DUSE_QT_QML=OFF
+ -DNO_UI_DAEMON=$(usex daemon)
+ -DDBUS_NOTIFY=$(usex dbus)
+ -DWITH_DHT=$(usex dht)
+ -DWITH_EXAMPLES=$(usex examples)
+ -DUSE_IDNA=$(usex idn)
+ -DUSE_JS=$(usex javascript)
+ -DLUA_SCRIPT=$(usex lua)
+ -DWITH_LUASCRIPTS=$(usex lua)
+ -DWITH_DEV_FILES=$(usex !minimal)
+ -DPERL_REGEX=$(usex pcre)
+ -DUSE_QT5=$(usex qt5)
+ -DWITH_EMOTICONS=$(usex qt5)
+ -DWITH_SOUNDS=$(usex qt5)
+ -DUSE_ASPELL=$(usex spell)
+ -DUSE_QT_SQLITE=$(usex sqlite)
+ -DUSE_MINIUPNP=$(usex upnp)
+ )
+ if use cli; then
+ mycmakeargs+=(
+ -DUSE_CLI_JSONRPC=$(usex json)
+ -DUSE_CLI_XMLRPC=$(usex xmlrpc)
+ )
+ fi
+ if use daemon; then
+ mycmakeargs+=(
+ -DJSONRPC_DAEMON=$(usex json)
+ -DXMLRPC_DAEMON=$(usex xmlrpc)
+ )
+ fi
+ cmake-utils_src_configure
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+ gnome2_icon_cache_update
+}
diff --git a/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-ipv6_upnp.patch b/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-ipv6_upnp.patch
new file mode 100644
index 00000000000..9b1f7638b6a
--- /dev/null
+++ b/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-ipv6_upnp.patch
@@ -0,0 +1,123 @@
+From 639b9f9aa286f10ce11f9fb28f0c83985f069a0d Mon Sep 17 00:00:00 2001
+From: Sergey Farbotka <z8sergey8z@gmail.com>
+Date: Mon, 31 Aug 2015 23:55:44 +0300
+Subject: [PATCH] Core: send IPv4-only address in UPNP request
+
+The app sends first available local IP address in UPNP request.
+If first available address is IPv6, miniupnpd sends the following error:
+"Failed to convert hostname '<my-ipv6-address>' to ip address"
+
+As eiskaltdc++ does not support IPv6 yet, we can use IPv4 address only
+in UPNP requests.
+---
+ dcpp/ConnectivityManager.cpp | 2 +-
+ dcpp/Util.cpp | 17 ++++++++++++-----
+ dcpp/Util.h | 5 +++--
+ extra/upnpc.cpp | 2 +-
+ 4 files changed, 17 insertions(+), 9 deletions(-)
+
+diff --git a/dcpp/ConnectivityManager.cpp b/dcpp/ConnectivityManager.cpp
+index 3495a9a..acc0d68 100644
+--- a/dcpp/ConnectivityManager.cpp
++++ b/dcpp/ConnectivityManager.cpp
+@@ -90,7 +90,7 @@ void ConnectivityManager::detectConnection() {
+
+ autoDetected = true;
+
+- if (!Util::isPrivateIp(Util::getLocalIp())) {
++ if (!Util::isPrivateIp(Util::getLocalIp(AF_INET))) {
+ SettingsManager::getInstance()->set(SettingsManager::INCOMING_CONNECTIONS, SettingsManager::INCOMING_DIRECT);
+ log(_("Public IP address detected, selecting active mode with direct connection"));
+ fire(ConnectivityManagerListener::Finished());
+diff --git a/dcpp/Util.cpp b/dcpp/Util.cpp
+index dc7e08e..9b5a2ca 100644
+--- a/dcpp/Util.cpp
++++ b/dcpp/Util.cpp
+@@ -704,7 +704,7 @@ string Util::formatExactSize(int64_t aBytes) {
+ #endif
+ }
+
+-vector<string> Util::getLocalIPs() {
++vector<string> Util::getLocalIPs(unsigned short sa_family) {
+ vector<string> addresses;
+
+ #ifdef HAVE_IFADDRS_H
+@@ -712,6 +712,9 @@ vector<string> Util::getLocalIPs() {
+
+ if (getifaddrs(&ifap) == 0)
+ {
++ bool ipv4 = (sa_family == AF_UNSPEC) || (sa_family == AF_INET);
++ bool ipv6 = (sa_family == AF_UNSPEC) || (sa_family == AF_INET6);
++
+ for (struct ifaddrs *i = ifap; i != NULL; i = i->ifa_next)
+ {
+ struct sockaddr *sa = i->ifa_addr;
+@@ -723,14 +726,14 @@ vector<string> Util::getLocalIPs() {
+ socklen_t len;
+
+ // IPv4 address
+- if (sa->sa_family == AF_INET)
++ if (ipv4 && (sa->sa_family == AF_INET))
+ {
+ struct sockaddr_in* sai = (struct sockaddr_in*)sa;
+ src = (void*) &(sai->sin_addr);
+ len = INET_ADDRSTRLEN;
+ }
+ // IPv6 address
+- else if (sa->sa_family == AF_INET6)
++ else if (ipv6 && (sa->sa_family == AF_INET6))
+ {
+ struct sockaddr_in6* sai6 = (struct sockaddr_in6*)sa;
+ src = (void*) &(sai6->sin6_addr);
+@@ -752,9 +755,13 @@ vector<string> Util::getLocalIPs() {
+
+ return addresses;
+ }
+-string Util::getLocalIp() {
++string Util::getLocalIp(unsigned short as_family) {
+ #ifdef HAVE_IFADDRS_H
+- return getLocalIPs().empty() ? "0.0.0.0" : getLocalIPs()[0];
++ vector<string> addresses = getLocalIPs(as_family);
++ if (addresses.empty())
++ return (((as_family == AF_UNSPEC) || (as_family == AF_INET)) ? "0.0.0.0" : "::");
++
++ return addresses[0];
+ #else
+ string tmp;
+
+diff --git a/dcpp/Util.h b/dcpp/Util.h
+index a489f70..f2842d3 100644
+--- a/dcpp/Util.h
++++ b/dcpp/Util.h
+@@ -28,6 +28,7 @@
+
+ #include <sys/stat.h>
+ #include <sys/types.h>
++#include <sys/socket.h>
+ #include <unistd.h>
+ #include <cstdlib>
+ #include <vector>
+@@ -403,8 +404,8 @@ class Util
+ }
+
+ static string encodeURI(const string& /*aString*/, bool reverse = false);
+- static string getLocalIp();
+- static std::vector<string> getLocalIPs();
++ static string getLocalIp(unsigned short sa_family = AF_UNSPEC);
++ static std::vector<string> getLocalIPs(unsigned short sa_family = AF_UNSPEC);
+ static bool isPrivateIp(string const& ip);
+ static string formatAdditionalInfo(const std::string& aIp, bool sIp, bool sCC);
+ /**
+diff --git a/extra/upnpc.cpp b/extra/upnpc.cpp
+index fb61f14..63f6d34 100644
+--- a/extra/upnpc.cpp
++++ b/extra/upnpc.cpp
+@@ -63,7 +63,7 @@ bool UPnPc::add(const unsigned short port, const UPnP::Protocol protocol, const
+ const string port_ = Util::toString(port);
+
+ return UPNP_AddPortMapping(urls.controlURL, data.first.servicetype, port_.c_str(), port_.c_str(),
+- Util::getLocalIp().c_str(), description.c_str(), protocols[protocol], NULL
++ Util::getLocalIp(AF_INET).c_str(), description.c_str(), protocols[protocol], NULL
+ #if (MINIUPNPC_API_VERSION == 8 || defined(MINIUPNPC16))
+ , 0) == UPNPCOMMAND_SUCCESS;
+ #else
diff --git a/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-miniupnpc1.patch b/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-miniupnpc1.patch
new file mode 100644
index 00000000000..7cca21840c7
--- /dev/null
+++ b/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-miniupnpc1.patch
@@ -0,0 +1,31 @@
+From 33bf1489e75d1b1cc834d6eb9629598cd77d6c58 Mon Sep 17 00:00:00 2001
+From: Pavel Vatagin <pavelvat@gmail.com>
+Date: Sun, 17 Jan 2016 03:00:36 +0300
+Subject: [PATCH] extra: fix static build for windows with -DLOCAL_MINIUPNP=OFF
+
+---
+ extra/upnpc.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/extra/upnpc.cpp b/extra/upnpc.cpp
+index 63f6d34..40a011a 100644
+--- a/extra/upnpc.cpp
++++ b/extra/upnpc.cpp
+@@ -42,7 +42,7 @@ using namespace dcpp;
+ bool UPnPc::init()
+ {
+ UPNPDev *devices = upnpDiscover(5000, SettingsManager::getInstance()->isDefault(SettingsManager::BIND_ADDRESS) ? 0 : SETTING(BIND_ADDRESS).c_str(), 0, 0
+-#if (MINIUPNPC_API_VERSION == 8 || defined(MINIUPNPC16))
++#if (MINIUPNPC_API_VERSION >= 8 || defined(MINIUPNPC16))
+ , 0, 0);
+ #else
+ );
+@@ -64,7 +64,7 @@ bool UPnPc::add(const unsigned short port, const UPnP::Protocol protocol, const
+
+ return UPNP_AddPortMapping(urls.controlURL, data.first.servicetype, port_.c_str(), port_.c_str(),
+ Util::getLocalIp(AF_INET).c_str(), description.c_str(), protocols[protocol], NULL
+-#if (MINIUPNPC_API_VERSION == 8 || defined(MINIUPNPC16))
++#if (MINIUPNPC_API_VERSION >= 8 || defined(MINIUPNPC16))
+ , 0) == UPNPCOMMAND_SUCCESS;
+ #else
+ ) == UPNPCOMMAND_SUCCESS;
diff --git a/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-miniupnpc2.patch b/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-miniupnpc2.patch
new file mode 100644
index 00000000000..bbe113b9cf4
--- /dev/null
+++ b/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-miniupnpc2.patch
@@ -0,0 +1,29 @@
+From b88120830e974d843cbfec552b639fa72c64dcbd Mon Sep 17 00:00:00 2001
+From: Pavel Vatagin <pavelvat@gmail.com>
+Date: Fri, 5 Feb 2016 04:15:33 +0300
+Subject: [PATCH] extra: fix #332
+
+---
+ extra/upnpc.cpp | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/extra/upnpc.cpp b/extra/upnpc.cpp
+index 40a011a..bbd7bbf 100644
+--- a/extra/upnpc.cpp
++++ b/extra/upnpc.cpp
+@@ -41,9 +41,13 @@ using namespace dcpp;
+
+ bool UPnPc::init()
+ {
+- UPNPDev *devices = upnpDiscover(5000, SettingsManager::getInstance()->isDefault(SettingsManager::BIND_ADDRESS) ? 0 : SETTING(BIND_ADDRESS).c_str(), 0, 0
++ UPNPDev *devices = upnpDiscover(5000, SettingsManager::getInstance()->isDefault(SettingsManager::BIND_ADDRESS) ? 0 : SETTING(BIND_ADDRESS).c_str(), NULL, 0
+ #if (MINIUPNPC_API_VERSION >= 8 || defined(MINIUPNPC16))
+- , 0, 0);
++ , 0
++#if (MINIUPNPC_API_VERSION >= 14)
++ , 2
++#endif
++ , NULL);
+ #else
+ );
+ #endif
diff --git a/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-openssl-1.1.patch b/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-openssl-1.1.patch
new file mode 100644
index 00000000000..bf6f387ec26
--- /dev/null
+++ b/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-openssl-1.1.patch
@@ -0,0 +1,138 @@
+From 3b9c502ff5c98856d4f8fdb7ed3c6ef34448bfb7 Mon Sep 17 00:00:00 2001
+From: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
+Date: Tue, 7 Feb 2017 09:19:18 +0100
+Subject: [PATCH] crypto: add support for OpenSSL 1.1
+
+In OpenSSL 1.1 BN and SSL are opaque structures.
+
+* BN_set0_pqg() has been implemented in 1.1
+* SSL_is_server() has been implemented in 1.0.2 and 1.1
+
+Reported-by: Vasiliy Glazov <vascom2@gmail.com>
+Closes: https://github.com/eiskaltdcpp/eiskaltdcpp/issues/356
+Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
+---
+ dcpp/CryptoManager.cpp | 15 +++++++++++----
+ dcpp/SSLSocket.cpp | 11 +++++++++--
+ 2 files changed, 20 insertions(+), 6 deletions(-)
+
+diff --git a/dcpp/CryptoManager.cpp b/dcpp/CryptoManager.cpp
+index 08893a75c..b672d92f4 100644
+--- a/dcpp/CryptoManager.cpp
++++ b/dcpp/CryptoManager.cpp
+@@ -27,12 +27,20 @@
+ #include "version.h"
+
+ #include <openssl/bn.h>
+-
++#include <openssl/rand.h>
+ #include <bzlib.h>
+
+ namespace dcpp {
+
+-
++static const char ciphersuites[] =
++ "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:"
++ "ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:"
++ "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:"
++ "ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:"
++ "ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:"
++ "DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:"
++ "AES256-GCM-SHA384:AES256-SHA256:AES256-SHA:AES128-SHA"
++ "!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK";
+
+ CryptoManager::CryptoManager()
+ :
+@@ -42,10 +50,10 @@
+ {
+ SSL_library_init();
+
+- clientContext.reset(SSL_CTX_new(TLSv1_client_method()));
+- clientVerContext.reset(SSL_CTX_new(TLSv1_client_method()));
+- serverContext.reset(SSL_CTX_new(TLSv1_server_method()));
+- serverVerContext.reset(SSL_CTX_new(TLSv1_server_method()));
++ clientContext.reset(SSL_CTX_new(SSLv23_client_method()));
++ clientVerContext.reset(SSL_CTX_new(SSLv23_client_method()));
++ serverContext.reset(SSL_CTX_new(SSLv23_server_method()));
++ serverVerContext.reset(SSL_CTX_new(SSLv23_server_method()));
+
+ if(clientContext && clientVerContext && serverContext && serverVerContext) {
+ dh.reset(DH_new());
+@@ -101,10 +109,15 @@
+ };
+
+ if(dh) {
+- dh->p = BN_bin2bn(dh4096_p, sizeof(dh4096_p), 0);
+- dh->g = BN_bin2bn(dh4096_g, sizeof(dh4096_g), 0);
+-
++ BIGNUM *p = BN_bin2bn(dh4096_p, sizeof(dh4096_p), 0);
++ BIGNUM *g = BN_bin2bn(dh4096_g, sizeof(dh4096_g), 0);
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++ dh->p = p;
++ dh->g = g;
+ if (!dh->p || !dh->g) {
++#else
++ if (!DH_set0_pqg(dh, p, NULL, g)) {
++#endif
+ dh.reset();
+ } else {
+ SSL_CTX_set_options(serverContext, SSL_OP_SINGLE_DH_USE);
+@@ -112,6 +125,28 @@
+ SSL_CTX_set_tmp_dh(serverContext, (DH*)dh);
+ SSL_CTX_set_tmp_dh(serverVerContext, (DH*)dh);
+ }
++ BN_free(p);
++ BN_free(g);
++ }
++
++ SSL_CTX_set_options(clientContext, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_COMPRESSION);
++ SSL_CTX_set_cipher_list(clientContext, ciphersuites);
++ SSL_CTX_set_options(serverContext, SSL_OP_SINGLE_DH_USE | SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_COMPRESSION);
++ SSL_CTX_set_cipher_list(serverContext, ciphersuites);
++ SSL_CTX_set_options(clientVerContext, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_COMPRESSION);
++ SSL_CTX_set_cipher_list(clientVerContext, ciphersuites);
++ SSL_CTX_set_options(serverVerContext, SSL_OP_SINGLE_DH_USE | SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_COMPRESSION);
++ SSL_CTX_set_cipher_list(serverVerContext, ciphersuites);
++
++ EC_KEY* tmp_ecdh;
++ /* NID_X9_62_prime256v1 is not secure, more secure is NID_secp384r1 or NID_secp521r1*/
++ if((tmp_ecdh = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1)) != NULL) {
++ SSL_CTX_set_options(serverContext, SSL_OP_SINGLE_ECDH_USE);
++ SSL_CTX_set_tmp_ecdh(serverContext, tmp_ecdh);
++ SSL_CTX_set_options(serverVerContext, SSL_OP_SINGLE_ECDH_USE);
++ SSL_CTX_set_tmp_ecdh(serverVerContext, tmp_ecdh);
++
++ EC_KEY_free(tmp_ecdh);
+ }
+
+ SSL_CTX_set_verify(serverContext, SSL_VERIFY_NONE, 0);
+diff --git a/dcpp/SSLSocket.cpp b/dcpp/SSLSocket.cpp
+index 1e283eec8..d4dc12388 100644
+--- a/dcpp/SSLSocket.cpp
++++ b/dcpp/SSLSocket.cpp
+@@ -37,6 +37,13 @@ void SSLSocket::connect(const string& aIp, uint16_t aPort) {
+ waitConnected(0);
+ }
+
++#if OPENSSL_VERSION_NUMBER < 0x10002000L
++static inline int SSL_is_server(SSL *s)
++{
++ return s->server;
++}
++#endif
++
+ bool SSLSocket::waitConnected(uint32_t millis) {
+ if(!ssl) {
+ if(!Socket::waitConnected(millis)) {
+@@ -54,9 +61,9 @@ bool SSLSocket::waitConnected(uint32_t millis) {
+ }
+
+ while(true) {
+- int ret = ssl->server?SSL_accept(ssl):SSL_connect(ssl);
++ int ret = SSL_is_server(ssl)?SSL_accept(ssl):SSL_connect(ssl);
+ if(ret == 1) {
+- dcdebug("Connected to SSL server using %s as %s\n", SSL_get_cipher(ssl), ssl->server?"server":"client");
++ dcdebug("Connected to SSL server using %s as %s\n", SSL_get_cipher(ssl), SSL_is_server(ssl)?"server":"client");
+ return true;
+ }
+ if(!waitWant(ret, millis)) {
diff --git a/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-tray-close.patch b/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-tray-close.patch
new file mode 100644
index 00000000000..0749fe80802
--- /dev/null
+++ b/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-tray-close.patch
@@ -0,0 +1,23 @@
+From 35edb67258747a4704bad0288d9d02d3486493d8 Mon Sep 17 00:00:00 2001
+From: aneo78 <aneo78@yandex.ru>
+Date: Fri, 11 Aug 2017 23:29:33 +0700
+Subject: [PATCH] fix issue 363: eiskaltdcpp-qt don't close in Qt5
+
+---
+ eiskaltdcpp-qt/src/MainWindow.cpp | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/eiskaltdcpp-qt/src/MainWindow.cpp b/eiskaltdcpp-qt/src/MainWindow.cpp
+index a80c5e9c0..e8b49e4b6 100644
+--- a/eiskaltdcpp-qt/src/MainWindow.cpp
++++ b/eiskaltdcpp-qt/src/MainWindow.cpp
+@@ -390,6 +390,9 @@ void MainWindow::closeEvent(QCloseEvent *c_e){
+ if (ConnectionManager::getInstance())
+ ConnectionManager::getInstance()->disconnect();
+
++ if (Notification::getInstance())
++ Notify->enableTray(false);
++
+ d->arena->hide();
+ d->arena->setWidget(NULL);
+