Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/
Date: Tue, 30 Oct 2018 17:46:29
Message-Id: 1540921562.c52c0909344d7ca52c08dcfbc8eb12e2f521620f.asturm@gentoo
1 commit: c52c0909344d7ca52c08dcfbc8eb12e2f521620f
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Tue Oct 30 15:47:09 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 30 17:46:02 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c52c0909
7
8 dev-qt/qtgui: xcb: Don't get initial screen rotation
9
10 Qt-Bug: https://bugreports.qt.io/browse/QTBUG-70760
11 KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=399053
12 Closes: https://bugs.gentoo.org/668994
13 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
14 Package-Manager: Portage-2.3.51, Repoman-2.3.11
15
16 .../files/qtgui-5.11.2-qapplication-block.patch | 53 +++++++
17 dev-qt/qtgui/qtgui-5.11.2-r1.ebuild | 172 +++++++++++++++++++++
18 2 files changed, 225 insertions(+)
19
20 diff --git a/dev-qt/qtgui/files/qtgui-5.11.2-qapplication-block.patch b/dev-qt/qtgui/files/qtgui-5.11.2-qapplication-block.patch
21 new file mode 100644
22 index 00000000000..115b42b8e93
23 --- /dev/null
24 +++ b/dev-qt/qtgui/files/qtgui-5.11.2-qapplication-block.patch
25 @@ -0,0 +1,53 @@
26 +From d4e937a6280f34bc1cce8c8cea3806a741312fbc Mon Sep 17 00:00:00 2001
27 +From: =?UTF-8?q?B=C5=82a=C5=BCej=20Szczygie=C5=82?= <spaz16@××.pl>
28 +Date: Tue, 25 Sep 2018 18:45:10 +0200
29 +Subject: xcb: Don't get initial screen rotation
30 +
31 +"xcb_randr_get_screen_info" can be slow and in some configurations can
32 +cause short mouse cursor freezes (which will happen on Qt application
33 +startup).
34 +
35 +Initial screen rotation was used only to not handle possible redundant
36 +screen change event.
37 +
38 +Fixes: QTBUG-70760
39 +Change-Id: I9f01325a045d2c82c4dd2fce91a18a34e54a4bcd
40 +Reviewed-by: Gatis Paeglis <gatis.paeglis@××.io>
41 +---
42 + src/plugins/platforms/xcb/qxcbscreen.cpp | 7 -------
43 + src/plugins/platforms/xcb/qxcbscreen.h | 2 +-
44 + 2 files changed, 1 insertion(+), 8 deletions(-)
45 +
46 +diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
47 +index 7f2793b2b7..a696e2a311 100644
48 +--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
49 ++++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
50 +@@ -118,13 +118,6 @@ QXcbVirtualDesktop::QXcbVirtualDesktop(QXcbConnection *connection, xcb_screen_t
51 +
52 + xcb_depth_next(&depth_iterator);
53 + }
54 +-
55 +- if (connection->hasXRandr()) {
56 +- xcb_connection_t *conn = connection->xcb_connection();
57 +- auto screen_info = Q_XCB_REPLY(xcb_randr_get_screen_info, conn, screen->root);
58 +- if (screen_info)
59 +- m_rotation = screen_info->rotation;
60 +- }
61 + }
62 +
63 + QXcbVirtualDesktop::~QXcbVirtualDesktop()
64 +diff --git a/src/plugins/platforms/xcb/qxcbscreen.h b/src/plugins/platforms/xcb/qxcbscreen.h
65 +index 6438669e7a..792aca4b06 100644
66 +--- a/src/plugins/platforms/xcb/qxcbscreen.h
67 ++++ b/src/plugins/platforms/xcb/qxcbscreen.h
68 +@@ -220,7 +220,7 @@ private:
69 + xcb_randr_crtc_t m_crtc;
70 + xcb_randr_mode_t m_mode = XCB_NONE;
71 + bool m_primary = false;
72 +- uint8_t m_rotation = XCB_RANDR_ROTATION_ROTATE_0;
73 ++ uint8_t m_rotation = 0;
74 +
75 + QString m_outputName;
76 + QSizeF m_outputSizeMillimeters;
77 +--
78 +cgit v1.2.1
79
80 diff --git a/dev-qt/qtgui/qtgui-5.11.2-r1.ebuild b/dev-qt/qtgui/qtgui-5.11.2-r1.ebuild
81 new file mode 100644
82 index 00000000000..f3b8dc42d1b
83 --- /dev/null
84 +++ b/dev-qt/qtgui/qtgui-5.11.2-r1.ebuild
85 @@ -0,0 +1,172 @@
86 +# Copyright 1999-2018 Gentoo Authors
87 +# Distributed under the terms of the GNU General Public License v2
88 +
89 +EAPI=6
90 +QT5_MODULE="qtbase"
91 +inherit qt5-build
92 +
93 +DESCRIPTION="The GUI module and platform plugins for the Qt5 framework"
94 +
95 +if [[ ${QT5_BUILD_TYPE} == release ]]; then
96 + KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd"
97 +fi
98 +
99 +# TODO: linuxfb
100 +
101 +IUSE="accessibility dbus egl eglfs evdev +gif gles2 ibus
102 + jpeg +libinput +png tslib tuio +udev vnc +xcb"
103 +REQUIRED_USE="
104 + || ( eglfs xcb )
105 + accessibility? ( dbus xcb )
106 + eglfs? ( egl )
107 + ibus? ( dbus )
108 + libinput? ( udev )
109 + xcb? ( gles2? ( egl ) )
110 +"
111 +
112 +RDEPEND="
113 + dev-libs/glib:2
114 + ~dev-qt/qtcore-${PV}
115 + media-libs/fontconfig
116 + >=media-libs/freetype-2.6.1:2
117 + >=media-libs/harfbuzz-1.6.0:=
118 + >=sys-libs/zlib-1.2.5
119 + virtual/opengl
120 + dbus? ( ~dev-qt/qtdbus-${PV} )
121 + egl? ( media-libs/mesa[egl] )
122 + eglfs? (
123 + media-libs/mesa[gbm]
124 + x11-libs/libdrm
125 + )
126 + evdev? ( sys-libs/mtdev )
127 + gles2? ( media-libs/mesa[gles2] )
128 + jpeg? ( virtual/jpeg:0 )
129 + libinput? (
130 + dev-libs/libinput:=
131 + x11-libs/libxkbcommon
132 + )
133 + png? ( media-libs/libpng:0= )
134 + tslib? ( x11-libs/tslib )
135 + tuio? ( ~dev-qt/qtnetwork-${PV} )
136 + udev? ( virtual/libudev:= )
137 + vnc? ( ~dev-qt/qtnetwork-${PV} )
138 + xcb? (
139 + x11-libs/libICE
140 + x11-libs/libSM
141 + x11-libs/libX11
142 + >=x11-libs/libXi-1.7.5
143 + >=x11-libs/libxcb-1.10:=[xkb]
144 + >=x11-libs/libxkbcommon-0.4.1[X]
145 + x11-libs/xcb-util-image
146 + x11-libs/xcb-util-keysyms
147 + x11-libs/xcb-util-renderutil
148 + x11-libs/xcb-util-wm
149 + )
150 +"
151 +DEPEND="${RDEPEND}
152 + evdev? ( sys-kernel/linux-headers )
153 + udev? ( sys-kernel/linux-headers )
154 +"
155 +PDEPEND="
156 + ibus? ( app-i18n/ibus )
157 +"
158 +
159 +PATCHES=( "${FILESDIR}"/${P}-qapplication-block.patch ) # bug 668994
160 +
161 +QT5_TARGET_SUBDIRS=(
162 + src/tools/qvkgen
163 + src/gui
164 + src/openglextensions
165 + src/platformheaders
166 + src/platformsupport
167 + src/plugins/generic
168 + src/plugins/imageformats
169 + src/plugins/platforms
170 + src/plugins/platforminputcontexts
171 +)
172 +
173 +QT5_GENTOO_CONFIG=(
174 + accessibility:accessibility-atspi-bridge
175 + egl
176 + eglfs
177 + eglfs:eglfs_egldevice:
178 + eglfs:eglfs_gbm:
179 + evdev
180 + evdev:mtdev:
181 + :fontconfig
182 + :system-freetype:FREETYPE
183 + !:no-freetype:
184 + !gif:no-gif:
185 + gles2::OPENGL_ES
186 + gles2:opengles2:OPENGL_ES_2
187 + !:no-gui:
188 + :system-harfbuzz:HARFBUZZ
189 + !:no-harfbuzz:
190 + jpeg:system-jpeg:IMAGEFORMAT_JPEG
191 + !jpeg:no-jpeg:
192 + libinput
193 + libinput:xkbcommon-evdev:
194 + :opengl
195 + png:png:
196 + png:system-png:IMAGEFORMAT_PNG
197 + !png:no-png:
198 + tslib
199 + udev:libudev:
200 + xcb:xcb:
201 + xcb:xcb-glx:
202 + xcb:xcb-plugin:
203 + xcb:xcb-render:
204 + xcb:xcb-sm:
205 + xcb:xcb-xlib:
206 + xcb:xinput2:
207 + xcb::XKB
208 +)
209 +
210 +QT5_GENTOO_PRIVATE_CONFIG=(
211 + :gui
212 +)
213 +
214 +src_prepare() {
215 + # egl_x11 is activated when both egl and xcb are enabled
216 + use egl && QT5_GENTOO_CONFIG+=(xcb:egl_x11) || QT5_GENTOO_CONFIG+=(egl:egl_x11)
217 +
218 + qt_use_disable_config dbus dbus \
219 + src/platformsupport/themes/genericunix/genericunix.pri
220 +
221 + qt_use_disable_config tuio tuiotouch src/plugins/generic/generic.pro
222 +
223 + qt_use_disable_mod ibus dbus \
224 + src/plugins/platforminputcontexts/platforminputcontexts.pro
225 +
226 + use vnc || sed -i -e '/SUBDIRS += vnc/d' \
227 + src/plugins/platforms/platforms.pro || die
228 +
229 + qt5-build_src_prepare
230 +}
231 +
232 +src_configure() {
233 + local myconf=(
234 + $(usex dbus -dbus-linked '')
235 + $(qt_use egl)
236 + $(qt_use eglfs)
237 + $(usex eglfs '-gbm -kms' '')
238 + $(qt_use evdev)
239 + $(qt_use evdev mtdev)
240 + -fontconfig
241 + -system-freetype
242 + $(usex gif '' -no-gif)
243 + -gui
244 + -system-harfbuzz
245 + $(qt_use jpeg libjpeg system)
246 + $(qt_use libinput)
247 + $(qt_use libinput xkbcommon-evdev)
248 + -opengl $(usex gles2 es2 desktop)
249 + $(qt_use png libpng system)
250 + $(qt_use tslib)
251 + $(qt_use udev libudev)
252 + $(qt_use xcb xcb system)
253 + $(qt_use xcb xkbcommon-x11 system)
254 + $(usex xcb '-xcb-xlib -xinput2 -xkb' '')
255 + )
256 + qt5-build_src_configure
257 +}