commit:     2b091db3656dee836ae6bf206ac4e84e43334030
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 20 16:04:55 2023 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Sep 19 12:11:36 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b091db3

dev-qt/qtwayland: Use newer patchset to drop patches from FILESDIR

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 dev-qt/qtwayland/Manifest                          |  1 -
 ...5.15.10-QTBUG-95434-convert-cursor-bitmap.patch | 66 ----------------------
 ...ix-mouse-stuck-in-pressed-state-after-DnD.patch | 37 ------------
 dev-qt/qtwayland/qtwayland-5.15.10-r4.ebuild       | 20 ++++---
 4 files changed, 11 insertions(+), 113 deletions(-)

diff --git a/dev-qt/qtwayland/Manifest b/dev-qt/qtwayland/Manifest
index dddef08d8d20..0c6394eb7efc 100644
--- a/dev-qt/qtwayland/Manifest
+++ b/dev-qt/qtwayland/Manifest
@@ -1,4 +1,3 @@
-DIST qtwayland-5.15.10-gentoo-kde-2.tar.xz 43076 BLAKE2B 
735ac875c0957de47f90d08931eaaaf8d53b1db0012c7d0a592c78ae78da56ffc8a1ba9bbac0577a78d4c05a92a22acef51a6afc95db54bea2d1a2a9658b67c4
 SHA512 
e0131bb1f2a09597a85d1d8a402bcb1d529cbc44f62e9be8dd8eba9c10007ca4f83572ca48052529b2325cdd8d886abed1f96ba4e00768e4b1c2febe1eb5ef91
 DIST qtwayland-5.15.10-gentoo-kde-3.tar.xz 46984 BLAKE2B 
e0fa3708d1f91599d292d5c84e4285e165cfc14e6dfba420df487e33fb13fba3b19c4e722aa3c658eb6c33e775610a0d1363361a7dd7f67c1d2c275d852b9f4d
 SHA512 
30333d9987311eeba7d970d75806a3fd3682856890b6c8bdf5048761f14c187dcaff45c9fed445a75c594772a2dd174eee39f550fcae25042bc7ab052e0743e1
 DIST qtwayland-everywhere-opensource-src-5.15.10.tar.xz 568552 BLAKE2B 
c5cd4ed5ff78befb5bb49f9eb809562c418b2469aa0fa23728a1de46d57f42788bba3f87a54c8dda2ee0900c76b84213d1111fd86159dc5e6707f7b67ed386de
 SHA512 
214b1fec7dfd815d148a7485f7811e623b06d172e58e4ee3167264a4e4b8f4aeec11474e574f91652a0bd3a48476a6747cad468f1e5035c49a55a96fc1400899
 DIST qtwayland-everywhere-src-6.5.2.tar.xz 1059356 BLAKE2B 
4708b78ff5c8e413edaa4d4400317f58dd068273a5eef7caf1500abf8afbe4e9ac405b6854691ef93265a7eeb0cfb7406024826a0b7c7ba3f8149218af67fd48
 SHA512 
520d109402f1d629481029a3b1eaab740e66135db4069c34651172bb2ad821b22de60e9956a96331d2f32a4522fc52c6a4ba99b474092d755760cad08c776477

diff --git 
a/dev-qt/qtwayland/files/qtwayland-5.15.10-QTBUG-95434-convert-cursor-bitmap.patch
 
b/dev-qt/qtwayland/files/qtwayland-5.15.10-QTBUG-95434-convert-cursor-bitmap.patch
deleted file mode 100644
index 7b43ee3b2149..000000000000
--- 
a/dev-qt/qtwayland/files/qtwayland-5.15.10-QTBUG-95434-convert-cursor-bitmap.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From dd5c9e2d894ca94faaeef7dfc3cc4344a7f62640 Mon Sep 17 00:00:00 2001
-From: Michael Weghorn <[email protected]>
-Date: Mon, 20 Feb 2023 14:02:23 +0100
-Subject: [PATCH] Convert cursor bitmap to supported format
-
-The 1-bit image formats QImage::Format_Mono and
-QImage::Format_MonoLSB used by cursor bitmaps don't have
-a corresponding wl_shm_format.
-
-Therefore, convert to a supported image format as necessary
-to make such bitmap cursors work on Wayland as well.
-
-Fixes: QTBUG-95434
-Change-Id: I402fd870b301ddc01075251b66f2cf7cc1923133
-Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
-(cherry picked from commit 45ec1362f8fcb5ade92f4d2d4985b1c24e78c8ba)
-
-Backport changes: Use Qt::ReturnByValue version for QCursor::mask() and 
QCursor::bitmap()
----
- src/client/qwaylandcursor.cpp | 23 ++++++++++++++++++++++-
- 1 file changed, 22 insertions(+), 1 deletion(-)
-
-diff --git a/src/client/qwaylandcursor.cpp b/src/client/qwaylandcursor.cpp
-index e4eca9d4e..ba76ba2d0 100644
---- a/src/client/qwaylandcursor.cpp
-+++ b/src/client/qwaylandcursor.cpp
-@@ -44,6 +44,7 @@
- #include "qwaylandshmbackingstore_p.h"
- 
- #include <QtGui/QImageReader>
-+#include <QBitmap>
- #include <QDebug>
- 
- #include <wayland-cursor.h>
-@@ -250,7 +251,27 @@ QWaylandCursor::QWaylandCursor(QWaylandDisplay *display)
- QSharedPointer<QWaylandBuffer> 
QWaylandCursor::cursorBitmapBuffer(QWaylandDisplay *display, const QCursor 
*cursor)
- {
-     Q_ASSERT(cursor->shape() == Qt::BitmapCursor);
--    const QImage &img = cursor->pixmap().toImage();
-+
-+    const QBitmap mask = cursor->mask(Qt::ReturnByValue);
-+    QImage img;
-+    if (cursor->pixmap().isNull())
-+        img = cursor->bitmap(Qt::ReturnByValue).toImage();
-+    else
-+        img = cursor->pixmap().toImage();
-+
-+    // convert to supported format if necessary
-+    if (!display->shm()->formatSupported(img.format())) {
-+        if (mask.isNull()) {
-+            img.convertTo(QImage::Format_RGB32);
-+        } else {
-+            // preserve mask
-+            img.convertTo(QImage::Format_ARGB32);
-+            QPixmap pixmap = QPixmap::fromImage(img);
-+            pixmap.setMask(mask);
-+            img = pixmap.toImage();
-+        }
-+    }
-+
-     QSharedPointer<QWaylandShmBuffer> buffer(new QWaylandShmBuffer(display, 
img.size(), img.format()));
-     memcpy(buffer->image()->bits(), img.bits(), size_t(img.sizeInBytes()));
-     return buffer;
--- 
-GitLab
-

diff --git 
a/dev-qt/qtwayland/files/qtwayland-5.15.9-fix-mouse-stuck-in-pressed-state-after-DnD.patch
 
b/dev-qt/qtwayland/files/qtwayland-5.15.9-fix-mouse-stuck-in-pressed-state-after-DnD.patch
deleted file mode 100644
index abeb7f7a1e5d..000000000000
--- 
a/dev-qt/qtwayland/files/qtwayland-5.15.9-fix-mouse-stuck-in-pressed-state-after-DnD.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From f90f19ec0155b82981046509160849f9a3aedd9b Mon Sep 17 00:00:00 2001
-From: Ilya Fedin <[email protected]>
-Date: Sun, 19 Mar 2023 10:20:11 +0400
-Subject: [PATCH] Client: Fix the mouse being stuck in pressed state after DnD
-
-I can still reproduce the problem using QtWidgets applications
-on KDE Plasma 5.27. Both Windows and macOS QPA have a similar quirk
-and they both send a MouseButtonRelease event rather than a MouseMove
-event.
-
-Amends f7a386eeaec8e6314c1be7de5e14e9fe3847f9ba
-
-Task-number: QTBUG-97037
-Pick-to: 6.5 6.2 5.15
-Change-Id: I864a1cb68b3660d858623f943b3958f7cafbf955
-Reviewed-by: David Edmundson <[email protected]>
-(cherry picked from commit e3c74961b1c7415fd94678802ad7f8173d0be4c1)
----
- src/client/qwaylandinputdevice.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/client/qwaylandinputdevice.cpp 
b/src/client/qwaylandinputdevice.cpp
-index 9a0fe49d..bc05583a 100644
---- a/src/client/qwaylandinputdevice.cpp
-+++ b/src/client/qwaylandinputdevice.cpp
-@@ -845,7 +845,7 @@ void QWaylandInputDevice::Pointer::releaseButtons()
-     mButtons = Qt::NoButton;
- 
-     if (auto *window = focusWindow()) {
--        MotionEvent e(focusWindow(), mParent->mTime, mSurfacePos, mGlobalPos, 
mButtons, mParent->modifiers());
-+        ReleaseEvent e(focusWindow(), mParent->mTime, mSurfacePos, 
mGlobalPos, mButtons, Qt::NoButton, mParent->modifiers());
-         window->handleMouse(mParent, e);
-     }
- }
--- 
-2.40.0
-

diff --git a/dev-qt/qtwayland/qtwayland-5.15.10-r4.ebuild 
b/dev-qt/qtwayland/qtwayland-5.15.10-r4.ebuild
index 88b6d7321d3a..995fc3d6e37e 100644
--- a/dev-qt/qtwayland/qtwayland-5.15.10-r4.ebuild
+++ b/dev-qt/qtwayland/qtwayland-5.15.10-r4.ebuild
@@ -4,7 +4,7 @@
 EAPI=8
 
 if [[ ${PV} != *9999* ]]; then
-       QT5_KDEPATCHSET_REV=2
+       QT5_KDEPATCHSET_REV=3
        KEYWORDS="amd64 arm arm64 ~hppa ~loong ppc ppc64 ~riscv ~sparc x86"
 fi
 
@@ -31,14 +31,16 @@ DEPEND="
 RDEPEND="${DEPEND}"
 BDEPEND="dev-util/wayland-scanner"
 
-PATCHES=(
-       # QTBUG-97037, pending upstream:
-       # https://invent.kde.org/qt/qt/qtwayland/-/merge_requests/71
-       
"${FILESDIR}/${PN}-5.15.9-fix-mouse-stuck-in-pressed-state-after-DnD.patch"
-       # QTBUG-95434, pending/approved upstream:
-       # https://invent.kde.org/qt/qt/qtwayland/-/merge_requests/79
-       "${FILESDIR}/${P}-QTBUG-95434-convert-cursor-bitmap.patch"
-)
+src_prepare() {
+       # new patchset for FILESDIR cleanup, drop past -r4 rev patches
+       pushd "${WORKDIR}/${P}-gentoo-kde-${QT5_KDEPATCHSET_REV}" > /dev/null 
|| die
+               rm 
0055-Replace-scale-with-devicePixelRatio-for-non-integer-.patch \
+                       0056-Client-Fix-buffer-damage.patch \
+                       
0057-client-Fix-infinite-recursion-with-text-input-v2.patch || die
+       popd > /dev/null || die
+
+       qt5-build_src_prepare
+}
 
 src_configure() {
        local myqmakeargs=(

Reply via email to