summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartchus2019-09-16 17:09:46 +0200
committerMartchus2019-09-16 17:09:46 +0200
commitb6c82c0ec0fce7a81e3c7f7842c5ed0483e6c2fe (patch)
tree7995e2f09628b94c7699051f35668f6677dd8b02
parent2d7a8118f7d9590bb5a18d9703b54df7ca609951 (diff)
downloadaur-b6c82c0ec0fce7a81e3c7f7842c5ed0483e6c2fe.tar.gz
Fix QTBUG-78086
See https://bugreports.qt.io/browse/QTBUG-78086
-rw-r--r--.SRCINFO4
-rw-r--r--0001-Revert-Emit-_q_notify-only-if-there-s-no-notificatio.patch57
-rw-r--r--PKGBUILD16
3 files changed, 72 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4694e1cf763..a5c4e714654 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = mingw-w64-qt5-serialport
pkgdesc = Provides access to hardware and virtual serial ports (mingw-w64)
pkgver = 5.13.1
- pkgrel = 1
+ pkgrel = 2
url = https://www.qt.io/
arch = any
groups = mingw-w64-qt5
@@ -18,7 +18,9 @@ pkgbase = mingw-w64-qt5-serialport
options = !buildflags
options = staticlibs
source = https://download.qt.io/official_releases/qt/5.13/5.13.1/submodules/qtserialport-everywhere-src-5.13.1.tar.xz
+ source = 0001-Revert-Emit-_q_notify-only-if-there-s-no-notificatio.patch
sha256sums = d96706f406d89b459ed0ecd129b68309a91cea0f132b839958b5311ea0d118d2
+ sha256sums = 93f027427ebde7ecd969b0ddca9526fbea0c4524cc4b62b31ce6d0b7a2693e52
pkgname = mingw-w64-qt5-serialport
diff --git a/0001-Revert-Emit-_q_notify-only-if-there-s-no-notificatio.patch b/0001-Revert-Emit-_q_notify-only-if-there-s-no-notificatio.patch
new file mode 100644
index 00000000000..9e32c273b3c
--- /dev/null
+++ b/0001-Revert-Emit-_q_notify-only-if-there-s-no-notificatio.patch
@@ -0,0 +1,57 @@
+From 878bb0fc614f83757b69ba7665babc7fc7d56b01 Mon Sep 17 00:00:00 2001
+From: Denis Shienkov <denis.shienkov@gmail.com>
+Date: Fri, 6 Sep 2019 21:19:52 +0300
+Subject: [PATCH] Revert "Emit _q_notify only if there's no notification
+ pending"
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This reverts commit 85ee2c658a45d2958a54045951d236769640337f.
+
+That commit completely breaks the I/O on Windows.
+
+Task-number: QTBUG-78086
+Change-Id: I6c6b8ef0b5af7bd9dcbea791fbb8322c9e68b900
+Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
+(cherry picked from commit f6b43c36b3839dae54308a6437bbdd99ae9a44de)
+---
+ src/serialport/qwinoverlappedionotifier.cpp | 10 +++-------
+ 1 file changed, 3 insertions(+), 7 deletions(-)
+
+diff --git a/src/serialport/qwinoverlappedionotifier.cpp b/src/serialport/qwinoverlappedionotifier.cpp
+index 233ee69..615dacc 100644
+--- a/src/serialport/qwinoverlappedionotifier.cpp
++++ b/src/serialport/qwinoverlappedionotifier.cpp
+@@ -129,7 +129,6 @@ public:
+ HANDLE hSemaphore = nullptr;
+ HANDLE hResultsMutex = nullptr;
+ QAtomicInt waiting;
+- QAtomicInt pendingNotifications;
+ QQueue<IOResult> results;
+ };
+
+@@ -396,17 +395,14 @@ void QWinOverlappedIoNotifierPrivate::notify(DWORD numberOfBytes, DWORD errorCod
+ results.enqueue(IOResult(numberOfBytes, errorCode, overlapped));
+ ReleaseMutex(hResultsMutex);
+ ReleaseSemaphore(hSemaphore, 1, NULL);
+- if (!waiting && pendingNotifications-- == 0)
++ if (!waiting)
+ emit q->_q_notify();
+ }
+
+ void QWinOverlappedIoNotifierPrivate::_q_notified()
+ {
+- int n = pendingNotifications.fetchAndStoreAcquire(0);
+- while (--n >= 0) {
+- if (WaitForSingleObject(hSemaphore, 0) == WAIT_OBJECT_0)
+- dispatchNextIoResult();
+- }
++ if (WaitForSingleObject(hSemaphore, 0) == WAIT_OBJECT_0)
++ dispatchNextIoResult();
+ }
+
+ OVERLAPPED *QWinOverlappedIoNotifierPrivate::dispatchNextIoResult()
+--
+2.23.0
+
diff --git a/PKGBUILD b/PKGBUILD
index 1863c84d2d5..7caa97f5f45 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,7 +10,7 @@
_qt_module=qtserialport
pkgname="mingw-w64-qt5-serialport"
pkgver=5.13.1
-pkgrel=1
+pkgrel=2
arch=('any')
pkgdesc="Provides access to hardware and virtual serial ports (mingw-w64)"
depends=('mingw-w64-qt5-base')
@@ -20,8 +20,10 @@ groups=('mingw-w64-qt5')
license=('GPL3' 'LGPL3' 'FDL' 'custom')
url='https://www.qt.io/'
_pkgfqn="${_qt_module}-everywhere-src-$pkgver"
-source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/$pkgver/submodules/${_pkgfqn}.tar.xz")
-sha256sums=('d96706f406d89b459ed0ecd129b68309a91cea0f132b839958b5311ea0d118d2')
+source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/$pkgver/submodules/${_pkgfqn}.tar.xz"
+ '0001-Revert-Emit-_q_notify-only-if-there-s-no-notificatio.patch')
+sha256sums=('d96706f406d89b459ed0ecd129b68309a91cea0f132b839958b5311ea0d118d2'
+ '93f027427ebde7ecd969b0ddca9526fbea0c4524cc4b62b31ce6d0b7a2693e52')
_architectures='i686-w64-mingw32 x86_64-w64-mingw32'
[[ $NO_STATIC_LIBS ]] || \
@@ -33,8 +35,14 @@ _architectures='i686-w64-mingw32 x86_64-w64-mingw32'
prepare() {
cd "${srcdir}/${_pkgfqn}"
- # Don't build examples or tests.
+
+ # don't build examples or tests.
sed -i 's/ examples tests//' qtserialport.pro
+
+ # apply patches; further descriptions can be found in patch files itself
+ for patch in "$srcdir/"*.patch; do
+ patch -p1 -i "$patch"
+ done
}
build() {