logo

overlay

My (experimental) gentoo overlay
commit: 5970ebc85dc2e02262fa7a315eaecddeeff8df30
parent: 195c85de48bcb6f493b0fba7b77c375bf16fce25
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Tue,  4 Jul 2017 02:11:47 +0200

dev-qt/qtnetwork: Import from ::libressl

Diffstat:

Adev-qt/qtnetwork/Manifest2++
Adev-qt/qtnetwork/files/qtnetwork-5.6.2-libressl-warn.patch12++++++++++++
Adev-qt/qtnetwork/files/qtnetwork-5.6.2-libressl.patch122+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adev-qt/qtnetwork/files/qtnetwork-5.7.1-libressl.patch168+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adev-qt/qtnetwork/metadata.xml25+++++++++++++++++++++++++
Adev-qt/qtnetwork/qtnetwork-5.6.2.ebuild61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adev-qt/qtnetwork/qtnetwork-5.7.1.ebuild61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7 files changed, 451 insertions(+), 0 deletions(-)

diff --git a/dev-qt/qtnetwork/Manifest b/dev-qt/qtnetwork/Manifest @@ -0,0 +1,2 @@ +DIST qtbase-opensource-src-5.6.2.tar.xz 46825164 SHA256 2f6eae93c5d982fe0a387a01aeb3435571433e23e9d9d9246741faf51f1ee787 SHA512 ff55204e6f0b046ccb03430ac6a22bd743bc2f3822625f0c23a481a8a7acb5d93f5b8e900815c70f10554887fbe26b3ee79f6d702acfa5c370e4e3cbd1f2b321 WHIRLPOOL 4a68aae4e471b0cfac3abf3652bb18cac8ffce17c941c8589a154bf07eb8d26945fab535f2e1acb866a584584c1811e953aa19fb1b3709831d85a620f0b6dc5a +DIST qtbase-opensource-src-5.7.1.tar.xz 44992616 SHA256 edcdf549d94d98aff08e201dcb3ca25bc3628a37b1309e320d5f556b6b66557e SHA512 0506a3a856f76e5ba182e3382a515282b6096f3900fbdc14cd5aec425105ab61922e0ada0361234387335ceb80b3c69e39cd34d75476c2946c4371e7b8c0827f WHIRLPOOL de5ff1380b3fd9cbcca741d212ac516e3f8a31366219605730cf5525a04e4efc9965a9b3cf8e99f50a2912bc7add83f61e7f90a85e176ad2830e4c1422b5d682 diff --git a/dev-qt/qtnetwork/files/qtnetwork-5.6.2-libressl-warn.patch b/dev-qt/qtnetwork/files/qtnetwork-5.6.2-libressl-warn.patch @@ -0,0 +1,12 @@ +diff -Naur qtbase-opensource-src-5.6.2.orig/config.tests/unix/openssl/openssl.cpp qtbase-opensource-src-5.6.2/config.tests/unix/openssl/openssl.cpp +--- qtbase-opensource-src-5.6.2.orig/config.tests/unix/openssl/openssl.cpp 2016-10-12 10:59:49.797703074 -0700 ++++ qtbase-opensource-src-5.6.2/config.tests/unix/openssl/openssl.cpp 2016-10-12 11:01:51.944406142 -0700 +@@ -40,7 +40,7 @@ + #include <openssl/ssl.h> + + #if OPENSSL_VERSION_NUMBER-0 >= 0x10002000L && !defined(OPENSSL_NO_EC) && !defined(SSL_CTRL_SET_CURVES) +-# error "OpenSSL was reported as >= 1.0.2 but is missing required features, possibly it's libressl which is unsupported" ++# warning "OpenSSL was reported as >= 1.0.2 but is missing required features, possibly it's libressl which is unsupported" + #endif + + int main() diff --git a/dev-qt/qtnetwork/files/qtnetwork-5.6.2-libressl.patch b/dev-qt/qtnetwork/files/qtnetwork-5.6.2-libressl.patch @@ -0,0 +1,122 @@ +diff -Naur qtbase-opensource-src-5.6.2.orig/src/network/ssl/qsslcontext_openssl.cpp qtbase-opensource-src-5.6.2/src/network/ssl/qsslcontext_openssl.cpp +--- qtbase-opensource-src-5.6.2.orig/src/network/ssl/qsslcontext_openssl.cpp 2017-04-12 11:13:04.973962293 -0700 ++++ qtbase-opensource-src-5.6.2/src/network/ssl/qsslcontext_openssl.cpp 2017-04-12 11:15:23.619233947 -0700 +@@ -65,6 +65,15 @@ + return dh; + } + ++static bool q_enableECSetCurves() { ++ // The ability to select elliptic curves is ++ // present in OpenSSL 1.0.2+ and in LibreSSL 2.5.1+ ++ // RFC4492 Section 5.1.1 "Supported Elliptic Curves Extension" ++ return (q_SSLeay() >= 0x10002000L && !q_LibreSSL()) || ++ q_LibreSSL_version() >= 0x2050100fL; ++} ++ ++ + QSslContext::QSslContext() + : ctx(0), + pkey(0), +@@ -340,24 +349,21 @@ + + const QVector<QSslEllipticCurve> qcurves = sslContext->sslConfiguration.ellipticCurves(); + if (!qcurves.isEmpty()) { +-#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC) ++#if defined(SSL_CTRL_SET_CURVES) && !defined(OPENSSL_NO_EC) + // Set the curves to be used +- if (q_SSLeay() >= 0x10002000L) { +- // SSL_CTX_ctrl wants a non-const pointer as last argument, +- // but let's avoid a copy into a temporary array +- if (!q_SSL_CTX_ctrl(sslContext->ctx, +- SSL_CTRL_SET_CURVES, +- qcurves.size(), +- const_cast<int *>(reinterpret_cast<const int *>(qcurves.data())))) { ++ if (q_enableECSetCurves()) { ++ if (!q_SSL_CTX_set1_curves(sslContext->ctx, ++ reinterpret_cast<const int *>(qcurves.data()), ++ qcurves.size())) { + sslContext->errorStr = msgErrorSettingEllipticCurves(QSslSocketBackendPrivate::getErrorsFromOpenSsl()); + sslContext->errorCode = QSslError::UnspecifiedError; + return sslContext; + } + } else +-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC) ++#endif // defined(SSL_CTRL_SET_CURVES) && !defined(OPENSSL_NO_EC) + { + // specific curves requested, but not possible to set -> error +- sslContext->errorStr = msgErrorSettingEllipticCurves(QSslSocket::tr("OpenSSL version too old, need at least v1.0.2")); ++ sslContext->errorStr = msgErrorSettingEllipticCurves(QSslSocket::tr("This version of OpenSSL lacks support for selecting specific elliptic curves.")); + sslContext->errorCode = QSslError::UnspecifiedError; + return sslContext; + } +diff -Naur qtbase-opensource-src-5.6.2.orig/src/network/ssl/qsslsocket_openssl_symbols.cpp qtbase-opensource-src-5.6.2/src/network/ssl/qsslsocket_openssl_symbols.cpp +--- qtbase-opensource-src-5.6.2.orig/src/network/ssl/qsslsocket_openssl_symbols.cpp 2017-04-12 11:13:04.973962293 -0700 ++++ qtbase-opensource-src-5.6.2/src/network/ssl/qsslsocket_openssl_symbols.cpp 2017-04-12 11:17:44.496537867 -0700 +@@ -241,6 +241,9 @@ + DEFINEFUNC(int, SSL_connect, SSL *a, a, return -1, return) + DEFINEFUNC(int, SSL_CTX_check_private_key, const SSL_CTX *a, a, return -1, return) + DEFINEFUNC4(long, SSL_CTX_ctrl, SSL_CTX *a, a, int b, b, long c, c, void *d, d, return -1, return) ++#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x2050100fL ++DEFINEFUNC3(int, SSL_CTX_set1_groups, SSL_CTX *a, a, const int* b, b, size_t c, c, return 0, return) ++#endif + DEFINEFUNC(void, SSL_CTX_free, SSL_CTX *a, a, return, DUMMYARG) + #if OPENSSL_VERSION_NUMBER >= 0x10000000L + DEFINEFUNC(SSL_CTX *, SSL_CTX_new, const SSL_METHOD *a, a, return 0, return) +@@ -840,6 +843,10 @@ + RESOLVEFUNC(SSL_CIPHER_get_bits) + RESOLVEFUNC(SSL_CTX_check_private_key) + RESOLVEFUNC(SSL_CTX_ctrl) ++#ifdef LIBRESSL_VERSION_NUMBER ++ if (q_LibreSSL_version() >= 0x2050100fL) ++ RESOLVEFUNC(SSL_CTX_set1_groups) ++#endif + RESOLVEFUNC(SSL_CTX_free) + RESOLVEFUNC(SSL_CTX_new) + RESOLVEFUNC(SSL_CTX_set_cipher_list) +@@ -1000,6 +1007,20 @@ + #endif + return true; + } ++ ++bool q_LibreSSL() ++{ ++ return strncmp(q_SSLeay_version(SSLEAY_VERSION), "LibreSSL", 8) == 0; ++} ++ ++long q_LibreSSL_version() ++{ ++#ifdef LIBRESSL_VERSION_NUMBER ++ return LIBRESSL_VERSION_NUMBER; ++#else ++ return 0L; ++#endif ++} + #endif // !defined QT_LINKED_OPENSSL + + //============================================================================== +diff -Naur qtbase-opensource-src-5.6.2.orig/src/network/ssl/qsslsocket_openssl_symbols_p.h qtbase-opensource-src-5.6.2/src/network/ssl/qsslsocket_openssl_symbols_p.h +--- qtbase-opensource-src-5.6.2.orig/src/network/ssl/qsslsocket_openssl_symbols_p.h 2017-04-12 11:13:04.967962240 -0700 ++++ qtbase-opensource-src-5.6.2/src/network/ssl/qsslsocket_openssl_symbols_p.h 2017-04-12 11:16:28.381833371 -0700 +@@ -209,6 +209,8 @@ + #endif // !defined QT_LINKED_OPENSSL + + bool q_resolveOpenSslSymbols(); ++bool q_LibreSSL(); ++long q_LibreSSL_version(); + long q_ASN1_INTEGER_get(ASN1_INTEGER *a); + unsigned char * q_ASN1_STRING_data(ASN1_STRING *a); + int q_ASN1_STRING_length(ASN1_STRING *a); +@@ -321,6 +323,13 @@ + int q_SSL_connect(SSL *a); + int q_SSL_CTX_check_private_key(const SSL_CTX *a); + long q_SSL_CTX_ctrl(SSL_CTX *a, int b, long c, void *d); ++#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x2050100fL ++int q_SSL_CTX_set1_groups(SSL_CTX *a, const int* b, size_t c); ++# define q_SSL_CTX_set1_curves q_SSL_CTX_set1_groups ++#elif !defined(LIBRESSL_VERSION_NUMBER) ++# define SSL_CTX_set1_curves(ctx, clist, clistlen) \ ++ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_CURVES,clistlen,(char *)clist) ++#endif + void q_SSL_CTX_free(SSL_CTX *a); + #if OPENSSL_VERSION_NUMBER >= 0x10000000L + SSL_CTX *q_SSL_CTX_new(const SSL_METHOD *a); diff --git a/dev-qt/qtnetwork/files/qtnetwork-5.7.1-libressl.patch b/dev-qt/qtnetwork/files/qtnetwork-5.7.1-libressl.patch @@ -0,0 +1,168 @@ +diff -Naur qtbase-opensource-src-5.7.1.orig/src/network/ssl/qsslcontext_openssl.cpp qtbase-opensource-src-5.7.1/src/network/ssl/qsslcontext_openssl.cpp +--- qtbase-opensource-src-5.7.1.orig/src/network/ssl/qsslcontext_openssl.cpp 2017-02-05 12:14:22.961487032 -0800 ++++ qtbase-opensource-src-5.7.1/src/network/ssl/qsslcontext_openssl.cpp 2017-02-05 12:15:16.772029960 -0800 +@@ -71,6 +71,15 @@ + return dh; + } + ++static bool q_enableECSetCurves() { ++ // The ability to select elliptic curves is ++ // present in OpenSSL 1.0.2+ and in LibreSSL 2.5.1+ ++ // RFC4492 Section 5.1.1 "Supported Elliptic Curves Extension" ++ return (q_SSLeay() >= 0x10002000L && !q_LibreSSL()) || ++ q_LibreSSL_version() >= 0x2050100fL; ++} ++ ++ + QSslContext::QSslContext() + : ctx(0), + pkey(0), +@@ -347,23 +356,20 @@ + + const QVector<QSslEllipticCurve> qcurves = sslContext->sslConfiguration.ellipticCurves(); + if (!qcurves.isEmpty()) { +-#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC) ++#if defined(SSL_CTRL_SET_CURVES) && !defined(OPENSSL_NO_EC) + // Set the curves to be used +- if (q_SSLeay() >= 0x10002000L) { +- // SSL_CTX_ctrl wants a non-const pointer as last argument, +- // but let's avoid a copy into a temporary array +- if (!q_SSL_CTX_ctrl(sslContext->ctx, +- SSL_CTRL_SET_CURVES, +- qcurves.size(), +- const_cast<int *>(reinterpret_cast<const int *>(qcurves.data())))) { ++ if (q_enableECSetCurves()) { ++ if (!q_SSL_CTX_set1_curves(sslContext->ctx, ++ reinterpret_cast<const int *>(qcurves.data()), ++ qcurves.size())) { + sslContext->errorStr = msgErrorSettingEllipticCurves(QSslSocketBackendPrivate::getErrorsFromOpenSsl()); + sslContext->errorCode = QSslError::UnspecifiedError; + } + } else +-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC) ++#endif // defined(SSL_CTRL_SET_CURVES) && !defined(OPENSSL_NO_EC) + { + // specific curves requested, but not possible to set -> error +- sslContext->errorStr = msgErrorSettingEllipticCurves(QSslSocket::tr("OpenSSL version too old, need at least v1.0.2")); ++ sslContext->errorStr = msgErrorSettingEllipticCurves(QSslSocket::tr("This version of OpenSSL lacks support for selecting specific elliptic curves.")); + sslContext->errorCode = QSslError::UnspecifiedError; + } + } +diff -Naur qtbase-opensource-src-5.7.1.orig/src/network/ssl/qsslsocket_openssl.cpp qtbase-opensource-src-5.7.1/src/network/ssl/qsslsocket_openssl.cpp +--- qtbase-opensource-src-5.7.1.orig/src/network/ssl/qsslsocket_openssl.cpp 2017-02-05 12:14:22.959487012 -0800 ++++ qtbase-opensource-src-5.7.1/src/network/ssl/qsslsocket_openssl.cpp 2017-02-05 12:15:00.140862158 -0800 +@@ -98,6 +98,14 @@ + int QSslSocketBackendPrivate::s_indexForSSLExtraData = -1; + #endif + ++static bool q_enableGetServerTmpKey() { ++ // The ability to get the ephemeral server key is ++ // present in OpenSSL 1.0.2+ and in LibreSSL 2.5.1+ ++ // RFC4492 Section 5.4 "Server Key Exchange" ++ return (q_SSLeay() >= 0x10002000L && !q_LibreSSL()) || ++ q_LibreSSL_version() >= 0x2050100fL; ++} ++ + /* \internal + + From OpenSSL's thread(3) manual page: +@@ -1587,13 +1595,13 @@ + } + #endif // OPENSSL_VERSION_NUMBER >= 0x1000100fL ... + +-#if OPENSSL_VERSION_NUMBER >= 0x10002000L +- if (q_SSLeay() >= 0x10002000L && mode == QSslSocket::SslClientMode) { ++#if defined(SSL_CTRL_GET_SERVER_TMP_KEY) ++ if (q_enableGetServerTmpKey() && mode == QSslSocket::SslClientMode) { + EVP_PKEY *key; + if (q_SSL_get_server_tmp_key(ssl, &key)) + configuration.ephemeralServerKey = QSslKey(key, QSsl::PublicKey); + } +-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L ... ++#endif // defined(SSL_CTRL_GET_SERVER_TMP_KEY) + + connectionEncrypted = true; + emit q->encrypted(); +diff -Naur qtbase-opensource-src-5.7.1.orig/src/network/ssl/qsslsocket_openssl_symbols.cpp qtbase-opensource-src-5.7.1/src/network/ssl/qsslsocket_openssl_symbols.cpp +--- qtbase-opensource-src-5.7.1.orig/src/network/ssl/qsslsocket_openssl_symbols.cpp 2017-02-05 12:14:22.964487063 -0800 ++++ qtbase-opensource-src-5.7.1/src/network/ssl/qsslsocket_openssl_symbols.cpp 2017-02-05 12:23:00.659626640 -0800 +@@ -247,6 +247,9 @@ + DEFINEFUNC(int, SSL_connect, SSL *a, a, return -1, return) + DEFINEFUNC(int, SSL_CTX_check_private_key, const SSL_CTX *a, a, return -1, return) + DEFINEFUNC4(long, SSL_CTX_ctrl, SSL_CTX *a, a, int b, b, long c, c, void *d, d, return -1, return) ++#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x2050100fL ++DEFINEFUNC3(int, SSL_CTX_set1_groups, SSL_CTX *a, a, const int* b, b, size_t c, c, return 0, return) ++#endif + DEFINEFUNC(void, SSL_CTX_free, SSL_CTX *a, a, return, DUMMYARG) + #if OPENSSL_VERSION_NUMBER >= 0x10000000L + DEFINEFUNC(SSL_CTX *, SSL_CTX_new, const SSL_METHOD *a, a, return 0, return) +@@ -846,6 +849,10 @@ + RESOLVEFUNC(SSL_CIPHER_get_bits) + RESOLVEFUNC(SSL_CTX_check_private_key) + RESOLVEFUNC(SSL_CTX_ctrl) ++#ifdef LIBRESSL_VERSION_NUMBER ++ if (q_LibreSSL_version() >= 0x2050100fL) ++ RESOLVEFUNC(SSL_CTX_set1_groups) ++#endif + RESOLVEFUNC(SSL_CTX_free) + RESOLVEFUNC(SSL_CTX_new) + RESOLVEFUNC(SSL_CTX_set_cipher_list) +@@ -1006,6 +1012,20 @@ + #endif + return true; + } ++ ++bool q_LibreSSL() ++{ ++ return strncmp(q_SSLeay_version(SSLEAY_VERSION), "LibreSSL", 8) == 0; ++} ++ ++long q_LibreSSL_version() ++{ ++#ifdef LIBRESSL_VERSION_NUMBER ++ return LIBRESSL_VERSION_NUMBER; ++#else ++ return 0L; ++#endif ++} + #endif // !defined QT_LINKED_OPENSSL + + //============================================================================== +diff -Naur qtbase-opensource-src-5.7.1.orig/src/network/ssl/qsslsocket_openssl_symbols_p.h qtbase-opensource-src-5.7.1/src/network/ssl/qsslsocket_openssl_symbols_p.h +--- qtbase-opensource-src-5.7.1.orig/src/network/ssl/qsslsocket_openssl_symbols_p.h 2017-02-05 12:14:22.962487042 -0800 ++++ qtbase-opensource-src-5.7.1/src/network/ssl/qsslsocket_openssl_symbols_p.h 2017-02-05 12:21:31.253743268 -0800 +@@ -215,6 +215,8 @@ + #endif // !defined QT_LINKED_OPENSSL + + bool q_resolveOpenSslSymbols(); ++bool q_LibreSSL(); ++long q_LibreSSL_version(); + long q_ASN1_INTEGER_get(ASN1_INTEGER *a); + unsigned char * q_ASN1_STRING_data(ASN1_STRING *a); + int q_ASN1_STRING_length(ASN1_STRING *a); +@@ -327,6 +329,13 @@ + int q_SSL_connect(SSL *a); + int q_SSL_CTX_check_private_key(const SSL_CTX *a); + long q_SSL_CTX_ctrl(SSL_CTX *a, int b, long c, void *d); ++#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x2050100fL ++int q_SSL_CTX_set1_groups(SSL_CTX *a, const int* b, size_t c); ++# define q_SSL_CTX_set1_curves q_SSL_CTX_set1_groups ++#elif !defined(LIBRESSL_VERSION_NUMBER) ++# define SSL_CTX_set1_curves(ctx, clist, clistlen) \ ++ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_CURVES,clistlen,(char *)clist) ++#endif + void q_SSL_CTX_free(SSL_CTX *a); + #if OPENSSL_VERSION_NUMBER >= 0x10000000L + SSL_CTX *q_SSL_CTX_new(const SSL_METHOD *a); +@@ -489,9 +498,9 @@ + int q_EC_curve_nist2nid(const char *name); + #endif // OPENSSL_VERSION_NUMBER >= 0x10002000L + #endif // OPENSSL_NO_EC +-#if OPENSSL_VERSION_NUMBER >= 0x10002000L ++#if defined(SSL_CTRL_GET_SERVER_TMP_KEY) + #define q_SSL_get_server_tmp_key(ssl, key) q_SSL_ctrl((ssl), SSL_CTRL_GET_SERVER_TMP_KEY, 0, (char *)key) +-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L ++#endif // defined(SSL_CTRL_GET_SERVER_TMP_KEY) + + // PKCS#12 support + int q_PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca); diff --git a/dev-qt/qtnetwork/metadata.xml b/dev-qt/qtnetwork/metadata.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>qt@gentoo.org</email> + <name>Gentoo Qt Project</name> + </maintainer> + <use> + <flag name="bindist">Disable EC support via <pkg>dev-libs/openssl</pkg></flag> + <flag name="connman">Enable <pkg>net-misc/connman</pkg>-based bearer plugin</flag> + <flag name="libproxy">Use <pkg>net-libs/libproxy</pkg> for automatic + HTTP/SOCKS proxy configuration</flag> + <flag name="networkmanager">Enable <pkg>net-misc/networkmanager</pkg>-based + bearer plugin</flag> + </use> + <upstream> + <bugs-to>https://bugreports.qt.io/</bugs-to> + <doc>http://doc.qt.io/</doc> + </upstream> + <slots> + <subslots> + Must only be used by packages that are known to use private parts of the Qt API. + </subslots> + </slots> +</pkgmetadata> diff --git a/dev-qt/qtnetwork/qtnetwork-5.6.2.ebuild b/dev-qt/qtnetwork/qtnetwork-5.6.2.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +QT5_MODULE="qtbase" +inherit qt5-build + +DESCRIPTION="Network abstraction library for the Qt5 framework" + +if [[ ${QT5_BUILD_TYPE} == release ]]; then + KEYWORDS="amd64 arm ~arm64 hppa ppc ppc64 x86" +fi + +IUSE="bindist connman libproxy libressl networkmanager +ssl" + +DEPEND=" + ~dev-qt/qtcore-${PV} + >=sys-libs/zlib-1.2.5 + connman? ( ~dev-qt/qtdbus-${PV} ) + libproxy? ( net-libs/libproxy ) + networkmanager? ( ~dev-qt/qtdbus-${PV} ) + ssl? ( + !libressl? ( dev-libs/openssl:0=[bindist=] ) + libressl? ( dev-libs/libressl:0= ) + ) +" +RDEPEND="${DEPEND} + connman? ( net-misc/connman ) + networkmanager? ( net-misc/networkmanager ) +" + +PATCHES=( + "${FILESDIR}/${PN}-5.6.2-libressl.patch" # bug 562050 + "${FILESDIR}/${PN}-5.6.2-libressl-warn.patch" +) + +QT5_TARGET_SUBDIRS=( + src/network + src/plugins/bearer/generic +) + +QT5_GENTOO_CONFIG=( + libproxy + ssl::SSL + ssl::OPENSSL + ssl:openssl-linked:LINKED_OPENSSL +) + +pkg_setup() { + use connman && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/connman) + use networkmanager && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/networkmanager) +} + +src_configure() { + local myconf=( + $(use connman || use networkmanager && echo -dbus-linked) + $(qt_use libproxy) + $(usex ssl -openssl-linked '') + ) + qt5-build_src_configure +} diff --git a/dev-qt/qtnetwork/qtnetwork-5.7.1.ebuild b/dev-qt/qtnetwork/qtnetwork-5.7.1.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +QT5_MODULE="qtbase" +inherit qt5-build + +DESCRIPTION="Network abstraction library for the Qt5 framework" + +if [[ ${QT5_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86" +fi + +IUSE="bindist connman libproxy libressl networkmanager +ssl" + +DEPEND=" + ~dev-qt/qtcore-${PV} + >=sys-libs/zlib-1.2.5 + connman? ( ~dev-qt/qtdbus-${PV} ) + libproxy? ( net-libs/libproxy ) + networkmanager? ( ~dev-qt/qtdbus-${PV} ) + ssl? ( + !libressl? ( dev-libs/openssl:0=[bindist=] ) + libressl? ( dev-libs/libressl:0= ) + ) +" +RDEPEND="${DEPEND} + connman? ( net-misc/connman ) + networkmanager? ( net-misc/networkmanager ) +" + +PATCHES=( + "${FILESDIR}/${PN}-5.7.1-libressl.patch" # bug 562050 + "${FILESDIR}/${PN}-5.6.2-libressl-warn.patch" +) + +QT5_TARGET_SUBDIRS=( + src/network + src/plugins/bearer/generic +) + +QT5_GENTOO_CONFIG=( + libproxy + ssl::SSL + ssl::OPENSSL + ssl:openssl-linked:LINKED_OPENSSL +) + +pkg_setup() { + use connman && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/connman) + use networkmanager && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/networkmanager) +} + +src_configure() { + local myconf=( + $(use connman || use networkmanager && echo -dbus-linked) + $(qt_use libproxy) + $(usex ssl -openssl-linked '') + ) + qt5-build_src_configure +}