aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Retornaz <gentoo@retornaz.com>2021-01-27 23:30:44 +0100
committerQuentin Retornaz <gentoo@retornaz.com>2021-01-27 23:30:44 +0100
commit21ac3653f78ef5484fd9e029e93de3e90889780a (patch)
tree01048c62f3683ae19704a25551e909bf8d2d6b36
parentx11-misc/x11vnc: new package (diff)
downloadlibressl-21ac3653f78ef5484fd9e029e93de3e90889780a.tar.gz
libressl-21ac3653f78ef5484fd9e029e93de3e90889780a.tar.bz2
libressl-21ac3653f78ef5484fd9e029e93de3e90889780a.zip
dev-qt/qtnetwork: revbump to 5.15.2-r1
Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Quentin Retornaz <gentoo@retornaz.com>
-rw-r--r--dev-qt/qtnetwork/Manifest1
-rw-r--r--dev-qt/qtnetwork/files/qtnetwork-5.15.2-QNetworkAccessManager-memleak.patch41
-rw-r--r--dev-qt/qtnetwork/qtnetwork-5.15.2-r1.ebuild82
3 files changed, 124 insertions, 0 deletions
diff --git a/dev-qt/qtnetwork/Manifest b/dev-qt/qtnetwork/Manifest
index 8d47df5..c298c0a 100644
--- a/dev-qt/qtnetwork/Manifest
+++ b/dev-qt/qtnetwork/Manifest
@@ -1 +1,2 @@
+DIST qtbase-5.15.2-gcc11.patch.xz 1208 BLAKE2B a2e5764b723adda991eca5b84cf8e15437a4832febd12e3c93cdc394931af666e17c01e229e9be7e0efc446a955cc26388c0f93cadfcabd93cc6b6f03bb41eb0 SHA512 da3a41ea5d9573a029946d26b26d51d6dce9c8b91db6d78ca71d8343d3ceb5010d21750dcb45abb663e227b5f068985ff4ed51da07efd17c64cc8dd5aef8f3e4
DIST qtbase-everywhere-src-5.15.2.tar.xz 50179672 BLAKE2B 0e4bdaab43cf59664bde89f87ea260c39acc2ef866d8629d41d9c326cab0ab68bcd943c86a472ae74bc9fb0b7ad50795ccb66275bb6b77d1fcf0a38b5662cb42 SHA512 a549bfaf867d746ff744ab224eb65ac1bdcdac7e8457dfa379941b2b225a90442fcfc1e1175b9afb1f169468f8130b7ab917c67be67156520a4bfb5c92d304f9
diff --git a/dev-qt/qtnetwork/files/qtnetwork-5.15.2-QNetworkAccessManager-memleak.patch b/dev-qt/qtnetwork/files/qtnetwork-5.15.2-QNetworkAccessManager-memleak.patch
new file mode 100644
index 0000000..be2c1f6
--- /dev/null
+++ b/dev-qt/qtnetwork/files/qtnetwork-5.15.2-QNetworkAccessManager-memleak.patch
@@ -0,0 +1,41 @@
+From 0807f16eb407eaf8a5b34b67602d0a97778d945d Mon Sep 17 00:00:00 2001
+From: =?utf8?q?M=C3=A5rten=20Nordheim?= <marten.nordheim@qt.io>
+Date: Fri, 6 Nov 2020 12:51:42 +0100
+Subject: [PATCH] QNAM: Work around QObject finicky orphan cleanup details
+
+Details described in a comment.
+
+Task-number: QTBUG-88063
+Change-Id: I763ecfedf518de97615e04a8eaae0fe1fd784f52
+Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
+(cherry picked from commit 1c6d6cbb62c5e93cbcad2d740c3b0ed01095618c)
+Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
+---
+ src/network/access/qnetworkreplyhttpimpl.cpp | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/src/network/access/qnetworkreplyhttpimpl.cpp b/src/network/access/qnetworkreplyhttpimpl.cpp
+index 21916f53f15..727c1a0316d 100644
+--- a/src/network/access/qnetworkreplyhttpimpl.cpp
++++ b/src/network/access/qnetworkreplyhttpimpl.cpp
+@@ -808,7 +808,17 @@ void QNetworkReplyHttpImplPrivate::postRequest(const QNetworkRequest &newHttpReq
+
+ // For the synchronous HTTP, this is the normal way the delegate gets deleted
+ // For the asynchronous HTTP this is a safety measure, the delegate deletes itself when HTTP is finished
+- QObject::connect(thread, SIGNAL(finished()), delegate, SLOT(deleteLater()));
++ QMetaObject::Connection threadFinishedConnection =
++ QObject::connect(thread, SIGNAL(finished()), delegate, SLOT(deleteLater()));
++
++ // QTBUG-88063: When 'delegate' is deleted the connection will be added to 'thread''s orphaned
++ // connections list. This orphaned list will be cleaned up next time 'thread' emits a signal,
++ // unfortunately that's the finished signal. It leads to a soft-leak so we do this to disconnect
++ // it on deletion so that it cleans up the orphan immediately.
++ QObject::connect(delegate, &QObject::destroyed, delegate, [threadFinishedConnection]() {
++ if (bool(threadFinishedConnection))
++ QObject::disconnect(threadFinishedConnection);
++ });
+
+ // Set the properties it needs
+ delegate->httpRequest = httpRequest;
+--
+2.16.3
diff --git a/dev-qt/qtnetwork/qtnetwork-5.15.2-r1.ebuild b/dev-qt/qtnetwork/qtnetwork-5.15.2-r1.ebuild
new file mode 100644
index 0000000..cc9144c
--- /dev/null
+++ b/dev-qt/qtnetwork/qtnetwork-5.15.2-r1.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="Network abstraction library for the Qt5 framework"
+SRC_URI+=" https://dev.gentoo.org/~asturm/distfiles/qtbase-${PV}-gcc11.patch.xz"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="amd64 arm arm64 ~hppa ppc ppc64 ~sparc x86"
+fi
+
+IUSE="bindist connman gssapi libressl libproxy networkmanager sctp +ssl"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}:5=
+ sys-libs/zlib:=
+ connman? ( ~dev-qt/qtdbus-${PV} )
+ gssapi? ( virtual/krb5 )
+ libproxy? ( net-libs/libproxy )
+ networkmanager? ( ~dev-qt/qtdbus-${PV} )
+ sctp? ( kernel_linux? ( net-misc/lksctp-tools ) )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.1.1:0=[bindist=] )
+ libressl? ( dev-libs/libressl:0= )
+ )
+"
+RDEPEND="${DEPEND}
+ connman? ( net-misc/connman )
+ networkmanager? ( net-misc/networkmanager )
+"
+
+QT5_TARGET_SUBDIRS=(
+ src/network
+ src/plugins/bearer/generic
+)
+
+QT5_GENTOO_CONFIG=(
+ libproxy:libproxy:
+ ssl::SSL
+ ssl::OPENSSL
+ ssl:openssl-linked:LINKED_OPENSSL
+)
+
+QT5_GENTOO_PRIVATE_CONFIG=(
+ :network
+)
+
+PATCHES=(
+ "${FILESDIR}"/${P}-QNetworkAccessManager-memleak.patch # QTBUG-88063
+ "${FILESDIR}"/${PN}-5.15.2-libressl.patch # Bug 562050, not upstreamable
+ "${WORKDIR}"/qtbase-${PV}-gcc11.patch # bug 752012
+)
+
+pkg_setup() {
+ use connman && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/connman)
+ use networkmanager && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/networkmanager)
+}
+
+src_configure() {
+ local myconf=(
+ $(usex connman -dbus-linked '')
+ $(usex gssapi -feature-gssapi -no-feature-gssapi)
+ $(qt_use libproxy)
+ $(usex networkmanager -dbus-linked '')
+ $(qt_use sctp)
+ $(usex ssl -openssl-linked '')
+ )
+ qt5-build_src_configure
+}
+
+src_install() {
+ qt5-build_src_install
+ # workaround for bug 652650
+ if use ssl; then
+ sed -e "/^#define QT_LINKED_OPENSSL/s/$/ true/" \
+ -i "${D}${QT5_HEADERDIR}"/Gentoo/${PN}-qconfig.h || die
+ fi
+}