[arch-commits] Commit in deepin-qt5dxcb-plugin/trunk (PKGBUILD qt5.12.patch)

2018-12-09 Thread Felix Yan via arch-commits
Date: Monday, December 10, 2018 @ 00:32:01
  Author: felixonmars
Revision: 413551

upgpkg: deepin-qt5dxcb-plugin 1.1.15-4

update the qt patch

Modified:
  deepin-qt5dxcb-plugin/trunk/PKGBUILD
  deepin-qt5dxcb-plugin/trunk/qt5.12.patch

--+
 PKGBUILD |4 ++--
 qt5.12.patch |   41 -
 2 files changed, 22 insertions(+), 23 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2018-12-10 00:31:57 UTC (rev 413550)
+++ PKGBUILD2018-12-10 00:32:01 UTC (rev 413551)
@@ -2,7 +2,7 @@
 
 pkgname=deepin-qt5dxcb-plugin
 pkgver=1.1.15
-pkgrel=3
+pkgrel=4
 pkgdesc='Qt platform plugins for DDE'
 arch=('x86_64')
 url="https://github.com/linuxdeepin/qt5dxcb-plugin;
@@ -13,7 +13,7 @@
 
source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/qt5dxcb-plugin/archive/$pkgver.tar.gz;
 qt5.12.patch)
 
sha512sums=('1abe72003872b63a202e83476e3cb15ad838b92fad050e669b963b33abb90681a312a2cac2f24996675b4e6a7d8ab77589eceebb5f72b83d3268cec681f13644'
-
'd90ea080bae5fd8ec4068a942d48548ba3284b1553e7fa2d0eb8f3de7e84b75b630a438d4d433fc9b794f0aeee99145f9d3a22c2ecf5c3076b29bb634858e551')
+
'7a2446c7f7b5176eb8119eef252fd620988b9cf1b2a0907651b3e0646cf5450f921a3dcb74a2d3fee9c85e17a4c9cfc89c490ffee4ab8aac6399d11599759dc9')
 
 prepare() {
   cd qt5dxcb-plugin-$pkgver

Modified: qt5.12.patch
===
--- qt5.12.patch2018-12-10 00:31:57 UTC (rev 413550)
+++ qt5.12.patch2018-12-10 00:32:01 UTC (rev 413551)
@@ -1,21 +1,23 @@
-commit 509c540aae4c8af46d8b38b2e971194f345fa6e3
-Author: Felix Yan 
-Date:   Thu Dec 6 18:32:05 2018 +0800
+From 5e6c084c90f16e2ff245dffe36202eadda8aaa44 Mon Sep 17 00:00:00 2001
+From: Felix Yan 
+Date: Thu, 06 Dec 2018 18:32:05 +0800
+Subject: [PATCH] Fix compilation under Qt 5.12
 
-Fix compilation under Qt 5.12
-
-Change-Id: I73566dc0686fe8607731dbb1b918429b8b15bd2a
+Change-Id: I73566dc0686fe8607731dbb1b918429b8b15bd2a
+---
 
 diff --git a/platformplugin/dforeignplatformwindow_x11.cpp 
b/platformplugin/dforeignplatformwindow_x11.cpp
-index 330f1d0..d9cc3e9 100644
+index 330f1d0..e4b10a5 100644
 --- a/platformplugin/dforeignplatformwindow_x11.cpp
 +++ b/platformplugin/dforeignplatformwindow_x11.cpp
-@@ -148,7 +148,9 @@ void 
DForeignPlatformWindow::handleConfigureNotifyEvent(const xcb_configure_noti
+@@ -148,7 +148,11 @@
  // will make the comparison later.
  QWindowSystemInterface::handleWindowScreenChanged(window(), 
newScreen->screen());
  
 +#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
  if (m_usingSyncProtocol && m_syncState == SyncReceived)
++#else
++if (connection()->hasXSync() && m_syncState == SyncReceived)
 +#endif
  m_syncState = SyncAndConfigureReceived;
  
@@ -24,7 +26,7 @@
 index 1a1dc33..70ae12a 100644
 --- a/platformplugin/dplatformbackingstorehelper.cpp
 +++ b/platformplugin/dplatformbackingstorehelper.cpp
-@@ -169,7 +169,12 @@ void DPlatformBackingStoreHelper::resize(const QSize 
, const QRegion 
+@@ -169,7 +169,12 @@
  VtableHook::callOriginalFun(this->backingStore(), 
::resize, size, staticContents);
  
  QXcbBackingStore *bs = static_cast(backingStore());
@@ -3830,7 +3832,7 @@
 index bfe8d41..59113c1 100644
 --- a/platformplugin/linux.pri
 +++ b/platformplugin/linux.pri
-@@ -28,14 +28,27 @@ contains(QT_CONFIG, xcb-xlib)|qtConfig(xcb-xlib) {
+@@ -28,14 +28,27 @@
  DEFINES += XCB_USE_XLIB
  QMAKE_USE += xcb_xlib
  
@@ -3866,10 +3868,10 @@
  }
  }
 diff --git a/platformplugin/windoweventhook.cpp 
b/platformplugin/windoweventhook.cpp
-index 14196e4..f0efcef 100644
+index 14196e4..cc01757 100644
 --- a/platformplugin/windoweventhook.cpp
 +++ b/platformplugin/windoweventhook.cpp
-@@ -275,8 +275,8 @@ void WindowEventHook::handleClientMessageEvent(const 
xcb_client_message_event_t
+@@ -275,8 +275,8 @@
  const QUrl  = dropData->property("DirectSaveUrl").toUrl();
  
  if (url.isValid() && drag->xdnd_dragsource) {
@@ -3880,7 +3882,7 @@
  QByteArray basename = 
Utility::windowProperty(drag->xdnd_dragsource, XdndDirectSaveAtom, textAtom, 
1024);
  QByteArray fileUri = url.toString().toLocal8Bit() + "/" + 
basename;
  
-@@ -538,7 +538,11 @@ void WindowEventHook::handleXIEnterLeave(xcb_ge_event_t 
*event)
+@@ -538,7 +538,11 @@
  me->QXcbWindow::handleXIEnterLeave(event);
  }
  
@@ -3892,15 +3894,12 @@
  {
  switch (event->type()) {
  case QEvent::DragEnter:
-@@ -557,7 +561,11 @@ void WindowEventHook::windowEvent(QEvent *event)
+@@ -557,7 +561,7 @@
  
  QXcbWindow *window = 
static_cast(reinterpret_cast(this));
  
-+#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
- window->QXcbWindow::windowEvent(event);
-+#else
+-window->QXcbWindow::windowEvent(event);
 +return window->QXcbWindow::windowEvent(event);
-+#endif
  }
  #endif
  
@@ -3908,7 +3907,7 @@
 

[arch-commits] Commit in deepin-qt5dxcb-plugin/trunk (PKGBUILD qt5.12.patch)

2018-12-06 Thread Felix Yan via arch-commits
Date: Thursday, December 6, 2018 @ 10:33:35
  Author: felixonmars
Revision: 411693

upgpkg: deepin-qt5dxcb-plugin 1.1.15-2

Added:
  deepin-qt5dxcb-plugin/trunk/qt5.12.patch
Modified:
  deepin-qt5dxcb-plugin/trunk/PKGBUILD

--+
 PKGBUILD |   11 ++--
 qt5.12.patch |  143 +
 2 files changed, 150 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2018-12-06 09:20:28 UTC (rev 411692)
+++ PKGBUILD2018-12-06 10:33:35 UTC (rev 411693)
@@ -2,7 +2,7 @@
 
 pkgname=deepin-qt5dxcb-plugin
 pkgver=1.1.15
-pkgrel=1
+pkgrel=2
 pkgdesc='Qt platform plugins for DDE'
 arch=('x86_64')
 url="https://github.com/linuxdeepin/qt5dxcb-plugin;
@@ -10,14 +10,17 @@
 depends=('cairo' 'qt5-x11extras')
 makedepends=('qt5-xcb-private-headers' 'libglvnd')
 groups=('deepin')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/qt5dxcb-plugin/archive/$pkgver.tar.gz;)
-sha512sums=('1abe72003872b63a202e83476e3cb15ad838b92fad050e669b963b33abb90681a312a2cac2f24996675b4e6a7d8ab77589eceebb5f72b83d3268cec681f13644')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/qt5dxcb-plugin/archive/$pkgver.tar.gz;
+qt5.12.patch)
+sha512sums=('1abe72003872b63a202e83476e3cb15ad838b92fad050e669b963b33abb90681a312a2cac2f24996675b4e6a7d8ab77589eceebb5f72b83d3268cec681f13644'
+
'5ffe224a6aa6e5f215362af93b3faa2f1902092460469cafd82ea434f1127cc3f0f8b782dee55d3c8fd223e898f5c94f2fe93222ce69b8519a29d003b39d9f48')
 
 prepare() {
   cd qt5dxcb-plugin-$pkgver
+  patch -p1 -i ../qt5.12.patch
+
   rm -r platformplugin/libqt5xcbqpa-dev
   sed -i 's|error(Not support Qt Version: .*)|INCLUDEPATH += 
/usr/include/qtxcb-private|' platformplugin/linux.pri
-  sed -e 's|xinput2|xcb-xinput|g' -e 's|QMAKE_USE += xcb-xinput|QMAKE_USE += 
xcb_xinput|' -i platformplugin/linux.pri # Fix build with Qt 5.12
 }
 
 build() {

Added: qt5.12.patch
===
--- qt5.12.patch(rev 0)
+++ qt5.12.patch2018-12-06 10:33:35 UTC (rev 411693)
@@ -0,0 +1,143 @@
+diff --git a/platformplugin/dforeignplatformwindow_x11.cpp 
b/platformplugin/dforeignplatformwindow_x11.cpp
+index 330f1d0..d9cc3e9 100644
+--- a/platformplugin/dforeignplatformwindow_x11.cpp
 b/platformplugin/dforeignplatformwindow_x11.cpp
+@@ -148,7 +148,9 @@ void 
DForeignPlatformWindow::handleConfigureNotifyEvent(const xcb_configure_noti
+ // will make the comparison later.
+ QWindowSystemInterface::handleWindowScreenChanged(window(), 
newScreen->screen());
+ 
++#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
+ if (m_usingSyncProtocol && m_syncState == SyncReceived)
++#endif
+ m_syncState = SyncAndConfigureReceived;
+ 
+ m_dirtyFrameMargins = true;
+diff --git a/platformplugin/dplatformbackingstorehelper.cpp 
b/platformplugin/dplatformbackingstorehelper.cpp
+index 1a1dc33..70ae12a 100644
+--- a/platformplugin/dplatformbackingstorehelper.cpp
 b/platformplugin/dplatformbackingstorehelper.cpp
+@@ -169,7 +169,12 @@ void DPlatformBackingStoreHelper::resize(const QSize 
, const QRegion 
+ VtableHook::callOriginalFun(this->backingStore(), 
::resize, size, staticContents);
+ 
+ QXcbBackingStore *bs = static_cast(backingStore());
++#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
+ QXcbShmImage *shm_image = reinterpret_cast(bs->m_image);
++#else
++struct _QXcbBackingStore { QImage *m_image; }; // Expose m_image
++QXcbShmImage *shm_image = 
reinterpret_cast(reinterpret_cast<_QXcbBackingStore*>(  
)->m_image);
++#endif
+ 
+ if (shm_image->m_shm_info.shmaddr) {
+ DPlatformWindowHelper *window_helper = 
DPlatformWindowHelper::mapped.value(bs->window()->handle());
+diff --git a/platformplugin/linux.pri b/platformplugin/linux.pri
+index bfe8d41..81224c3 100644
+--- a/platformplugin/linux.pri
 b/platformplugin/linux.pri
+@@ -28,14 +28,27 @@ contains(QT_CONFIG, xcb-xlib)|qtConfig(xcb-xlib) {
+ DEFINES += XCB_USE_XLIB
+ QMAKE_USE += xcb_xlib
+ 
+-contains(QT_CONFIG, xinput2)|qtConfig(xinput2) {
+-DEFINES += XCB_USE_XINPUT2
+-QMAKE_USE += xinput2
++greaterThan(QT_MINOR_VERSION, 11) {
++contains(QT_CONFIG, xcb-xinput)|qtConfig(xcb-xinput) {
++DEFINES += XCB_USE_XINPUT2
++QMAKE_USE += xcb_xinput
+ 
+-!isEmpty(QMAKE_LIBXI_VERSION_MAJOR) {
+-DEFINES += LIBXI_MAJOR=$$QMAKE_LIBXI_VERSION_MAJOR \
+-   LIBXI_MINOR=$$QMAKE_LIBXI_VERSION_MINOR \
+-   LIBXI_PATCH=$$QMAKE_LIBXI_VERSION_PATCH
++!isEmpty(QMAKE_LIBXI_VERSION_MAJOR) {
++DEFINES += LIBXI_MAJOR=$$QMAKE_LIBXI_VERSION_MAJOR \
++   LIBXI_MINOR=$$QMAKE_LIBXI_VERSION_MINOR \
++   LIBXI_PATCH=$$QMAKE_LIBXI_VERSION_PATCH
++}
++}
++} else