From 6bfb5c577b8bc5fc55484b4a838d6f0b4f837abd Mon Sep 17 00:00:00 2001 From: John Date: Thu, 24 Sep 2020 18:06:17 +0200 Subject: [PATCH] qt5: add patch for Qt5GuiConfigExtras.cmake to find GL libs when cross compiling [ci skip] --- srcpkgs/qt5/patches/0002-gl-lib-dir.patch | 15 ++++ .../qt5/patches/0060-upstream-65243ad7.patch | 87 +++++++++++++++++++ srcpkgs/qt5/template | 2 +- 3 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/qt5/patches/0002-gl-lib-dir.patch create mode 100644 srcpkgs/qt5/patches/0060-upstream-65243ad7.patch diff --git a/srcpkgs/qt5/patches/0002-gl-lib-dir.patch b/srcpkgs/qt5/patches/0002-gl-lib-dir.patch new file mode 100644 index 00000000000..d74d4e97d1d --- /dev/null +++ b/srcpkgs/qt5/patches/0002-gl-lib-dir.patch @@ -0,0 +1,15 @@ +--- ./qtbase/src/gui/Qt5GuiConfigExtras.cmake.in 2020-09-19 13:27:22.130997854 +0200 ++++ - 2020-09-19 13:36:44.503955926 +0200 +@@ -106,12 +106,6 @@ + set(Qt5Gui_${_cmake_lib_name}_LIBRARY ${_lib}) + else() + find_library(Qt5Gui_${_cmake_lib_name}_LIBRARY ${_lib} +-!!IF !isEmpty(CROSS_COMPILE) +- PATHS \"${LibDir}\" +-!!IF !mac +- NO_DEFAULT_PATH +-!!ENDIF +-!!ENDIF + ) + endif() + !!IF mac diff --git a/srcpkgs/qt5/patches/0060-upstream-65243ad7.patch b/srcpkgs/qt5/patches/0060-upstream-65243ad7.patch new file mode 100644 index 00000000000..d11ae1d8865 --- /dev/null +++ b/srcpkgs/qt5/patches/0060-upstream-65243ad7.patch @@ -0,0 +1,87 @@ +From 65243ad7aef48af4689ea4454916b504025b5051 Mon Sep 17 00:00:00 2001 +From: Friedemann Kleint +Date: Fri, 25 Sep 2020 14:10:58 +0200 +Subject: Emit QScreen::geometryChanged when the logical DPI changes + +Add the missing call to QScreenPrivate::emitGeometryChangeSignals() +along with an emission of physicalDotsPerInchChanged() +since that is calculated from geometry and physical size. + +Rearrange the code in +QGuiApplicationPrivate::processScreenGeometryChange() +to prevent duplicate emissions of geometryChanged(), +physicalDotsPerInchChanged() which this change would introduce. + +Amends 5290027e3bab75f14fc0a2b7c206594d9cb91e76. + +Task-number: QTBUG-76902 +Task-number: QTBUG-79248 +Fixes: QTBUG-86604 +Change-Id: I3dc2ec5ccd9c6413e92f9246242f323e8afc5e57 +Reviewed-by: David Edmundson +(cherry picked from commit 5c7307775d32ae0a54acad8ae7a1c9d3cff7d45e) +Reviewed-by: Qt Cherry-pick Bot +--- + src/gui/kernel/qguiapplication.cpp | 11 +++++------ + src/gui/kernel/qscreen.cpp | 6 ++++++ + 2 files changed, 11 insertions(+), 6 deletions(-) + +diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp +index 239a78313c..ef09060581 100644 +--- qtbase/src/gui/kernel/qguiapplication.cpp ++++ qtbase/src/gui/kernel/qguiapplication.cpp +@@ -3162,13 +3162,14 @@ void QGuiApplicationPrivate::processScreenGeometryChange(QWindowSystemInterfaceP + bool availableGeometryChanged = e->availableGeometry != s->d_func()->availableGeometry; + s->d_func()->availableGeometry = e->availableGeometry; + +- if (geometryChanged) { +- Qt::ScreenOrientation primaryOrientation = s->primaryOrientation(); ++ const Qt::ScreenOrientation primaryOrientation = s->primaryOrientation(); ++ if (geometryChanged) + s->d_func()->updatePrimaryOrientation(); + +- emit s->geometryChanged(s->geometry()); ++ s->d_func()->emitGeometryChangeSignals(geometryChanged, availableGeometryChanged); ++ ++ if (geometryChanged) { + emit s->physicalSizeChanged(s->physicalSize()); +- emit s->physicalDotsPerInchChanged(s->physicalDotsPerInch()); + emit s->logicalDotsPerInchChanged(s->logicalDotsPerInch()); + + if (s->primaryOrientation() != primaryOrientation) +@@ -3178,8 +3179,6 @@ void QGuiApplicationPrivate::processScreenGeometryChange(QWindowSystemInterfaceP + updateFilteredScreenOrientation(s); + } + +- s->d_func()->emitGeometryChangeSignals(geometryChanged, availableGeometryChanged); +- + resetCachedDevicePixelRatio(); + } + +diff --git a/src/gui/kernel/qscreen.cpp b/src/gui/kernel/qscreen.cpp +index df628fcc73..a1afc1ba14 100644 +--- qtbase/src/gui/kernel/qscreen.cpp ++++ qtbase/src/gui/kernel/qscreen.cpp +@@ -88,6 +88,9 @@ void QScreenPrivate::updateGeometriesWithSignals() + void QScreenPrivate::emitGeometryChangeSignals(bool geometryChanged, bool availableGeometryChanged) + { + Q_Q(QScreen); ++ if (geometryChanged) ++ emit q->geometryChanged(geometry); ++ + if (availableGeometryChanged) + emit q->availableGeometryChanged(availableGeometry); + +@@ -96,6 +99,9 @@ void QScreenPrivate::emitGeometryChangeSignals(bool geometryChanged, bool availa + for (QScreen* sibling : siblings) + emit sibling->virtualGeometryChanged(sibling->virtualGeometry()); + } ++ ++ if (geometryChanged) ++ emit q->physicalDotsPerInchChanged(q->physicalDotsPerInch()); + } + + void QScreenPrivate::setPlatformScreen(QPlatformScreen *screen) +-- +cgit v1.2.1 + diff --git a/srcpkgs/qt5/template b/srcpkgs/qt5/template index 8dd5b6eaaf2..1954048e2b1 100644 --- a/srcpkgs/qt5/template +++ b/srcpkgs/qt5/template @@ -1,7 +1,7 @@ # Template file for 'qt5' pkgname=qt5 version=5.15.1 -revision=1 +revision=2 wrksrc="qt-everywhere-src-${version}" build_style=meta hostmakedepends="cmake clang flex perl glib-devel pkg-config