[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/

2024-04-18 Thread Conrad Kostecki
commit: a6910b9337007134691025849ca4e7ecc2620eeb
Author: Michael Mair-Keimberger  levelnine  at>
AuthorDate: Thu Apr 18 18:04:42 2024 +
Commit: Conrad Kostecki  gentoo  org>
CommitDate: Thu Apr 18 19:31:44 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6910b93

dev-qt/qtgui: remove unused patch(es)

Signed-off-by: Michael Mair-Keimberger  levelnine.at>
Signed-off-by: Conrad Kostecki  gentoo.org>

 .../qtgui/files/qtgui-5.15.12-CVE-2024-25580.patch | 228 -
 1 file changed, 228 deletions(-)

diff --git a/dev-qt/qtgui/files/qtgui-5.15.12-CVE-2024-25580.patch 
b/dev-qt/qtgui/files/qtgui-5.15.12-CVE-2024-25580.patch
deleted file mode 100644
index 41a500c82578..
--- a/dev-qt/qtgui/files/qtgui-5.15.12-CVE-2024-25580.patch
+++ /dev/null
@@ -1,228 +0,0 @@
-From c8061284095abebebbcd6fea7167477aef44a00c Mon Sep 17 00:00:00 2001
-From: Jonas Karlsson 
-Date: Thu, 8 Feb 2024 17:01:05 +0100
-Subject: [PATCH] Improve KTX file reading memory safety
-
-* Use qAddOverflow/qSubOverflow methods for catching additions and
-  subtractions with overflow and handle these scenarios when reading the
-  file.
-* Add 'safeView' method that checks that the byte array view constructed
-  is not out of bounds.
-* Return error if number of levels is higher than what is reasonable.
-* Return error if number of faces is incorrect.
-* Add unit test with invalid KTX file previously causing a segmentation
-  fault.
-
-This fixes CVE-2024-25580.
-
-Fixes: QTBUG-121918
-Pick-to: 6.7 6.6 6.5 6.2 5.15
-Change-Id: Ie0824c32a5921de30cf07c1fc1b49a084e6d07b2
-Reviewed-by: Eirik Aavitsland 
-Reviewed-by: Qt CI Bot 
-(cherry picked from commit 28ecb523ce8490bff38b251b3df703c72e057519)

- src/gui/util/qktxhandler.cpp | 138 +++
- src/gui/util/qktxhandler_p.h |   2 +-
- 2 files changed, 110 insertions(+), 30 deletions(-)
-
-diff --git a/src/gui/util/qktxhandler.cpp b/src/gui/util/qktxhandler.cpp
-index 7eda4c46fb..2853e46c3d 100644
 a/src/gui/util/qktxhandler.cpp
-+++ b/src/gui/util/qktxhandler.cpp
-@@ -73,7 +73,7 @@ struct KTXHeader {
- quint32 bytesOfKeyValueData;
- };
- 
--static const quint32 headerSize = sizeof(KTXHeader);
-+static constexpr quint32 qktxh_headerSize = sizeof(KTXHeader);
- 
- // Currently unused, declared for future reference
- struct KTXKeyValuePairItem {
-@@ -103,11 +103,36 @@ struct KTXMipmapLevel {
- */
- };
- 
--bool QKtxHandler::canRead(const QByteArray , const QByteArray )
-+static bool qAddOverflow(quint32 v1, quint32 v2, quint32 *r) {
-+// unsigned additions are well-defined
-+*r = v1 + v2;
-+return v1 > quint32(v1 + v2);
-+}
-+
-+// Returns the nearest multiple of 4 greater than or equal to 'value'
-+static bool nearestMultipleOf4(quint32 value, quint32 *result)
-+{
-+constexpr quint32 rounding = 4;
-+*result = 0;
-+if (qAddOverflow(value, rounding - 1, result))
-+return true;
-+*result &= ~(rounding - 1);
-+return false;
-+}
-+
-+// Returns a slice with prechecked bounds
-+static QByteArray safeSlice(const QByteArray& array, quint32 start, quint32 
length)
- {
--Q_UNUSED(suffix)
-+quint32 end = 0;
-+if (qAddOverflow(start, length, ) || end > quint32(array.length()))
-+return {};
-+return QByteArray(array.data() + start, length);
-+}
- 
--return (qstrncmp(block.constData(), ktxIdentifier, KTX_IDENTIFIER_LENGTH) 
== 0);
-+bool QKtxHandler::canRead(const QByteArray , const QByteArray )
-+{
-+Q_UNUSED(suffix);
-+return block.startsWith(QByteArray::fromRawData(ktxIdentifier, 
KTX_IDENTIFIER_LENGTH));
- }
- 
- QTextureFileData QKtxHandler::read()
-@@ -115,42 +140,97 @@ QTextureFileData QKtxHandler::read()
- if (!device())
- return QTextureFileData();
- 
--QByteArray buf = device()->readAll();
--const quint32 dataSize = quint32(buf.size());
--if (dataSize < headerSize || !canRead(QByteArray(), buf)) {
--qCDebug(lcQtGuiTextureIO, "Invalid KTX file %s", 
logName().constData());
-+const QByteArray buf = device()->readAll();
-+if (size_t(buf.size()) > std::numeric_limits::max()) {
-+qWarning(lcQtGuiTextureIO, "Too big KTX file %s", 
logName().constData());
-+return QTextureFileData();
-+}
-+
-+if (!canRead(QByteArray(), buf)) {
-+qWarning(lcQtGuiTextureIO, "Invalid KTX file %s", 
logName().constData());
-+return QTextureFileData();
-+}
-+
-+if (buf.size() < qsizetype(qktxh_headerSize)) {
-+qWarning(lcQtGuiTextureIO, "Invalid KTX header size in %s", 
logName().constData());
- return QTextureFileData();
- }
- 
--const KTXHeader *header = reinterpret_cast(buf.constData());
--if (!checkHeader(*header)) {
--qCDebug(lcQtGuiTextureIO, "Unsupported KTX file format in %s", 
logName().constData());
-+KTXHeader header;
-+memcpy(, buf.data(), qktxh_headerSize);
-+if (!checkHeader(header)) {
-+

[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/

2024-02-15 Thread Andreas Sturmlechner
commit: a08e969a19e21838d80d19de94cb1e1108bd6122
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Thu Feb 15 13:02:50 2024 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Thu Feb 15 15:24:32 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a08e969a

dev-qt/qtgui: Fix CVE-2024-25580

See also:
https://www.qt.io/blog/security-advisory-potential-buffer-overflow-when-reading-ktx-images
https://lists.qt-project.org/pipermail/announce/2024-February/000472.html

Bug: https://bugs.gentoo.org/924647
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 .../qtgui/files/qtgui-5.15.12-CVE-2024-25580.patch | 228 +
 dev-qt/qtgui/qtgui-5.15.12-r2.ebuild   | 182 
 2 files changed, 410 insertions(+)

diff --git a/dev-qt/qtgui/files/qtgui-5.15.12-CVE-2024-25580.patch 
b/dev-qt/qtgui/files/qtgui-5.15.12-CVE-2024-25580.patch
new file mode 100644
index ..41a500c82578
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-5.15.12-CVE-2024-25580.patch
@@ -0,0 +1,228 @@
+From c8061284095abebebbcd6fea7167477aef44a00c Mon Sep 17 00:00:00 2001
+From: Jonas Karlsson 
+Date: Thu, 8 Feb 2024 17:01:05 +0100
+Subject: [PATCH] Improve KTX file reading memory safety
+
+* Use qAddOverflow/qSubOverflow methods for catching additions and
+  subtractions with overflow and handle these scenarios when reading the
+  file.
+* Add 'safeView' method that checks that the byte array view constructed
+  is not out of bounds.
+* Return error if number of levels is higher than what is reasonable.
+* Return error if number of faces is incorrect.
+* Add unit test with invalid KTX file previously causing a segmentation
+  fault.
+
+This fixes CVE-2024-25580.
+
+Fixes: QTBUG-121918
+Pick-to: 6.7 6.6 6.5 6.2 5.15
+Change-Id: Ie0824c32a5921de30cf07c1fc1b49a084e6d07b2
+Reviewed-by: Eirik Aavitsland 
+Reviewed-by: Qt CI Bot 
+(cherry picked from commit 28ecb523ce8490bff38b251b3df703c72e057519)
+---
+ src/gui/util/qktxhandler.cpp | 138 +++
+ src/gui/util/qktxhandler_p.h |   2 +-
+ 2 files changed, 110 insertions(+), 30 deletions(-)
+
+diff --git a/src/gui/util/qktxhandler.cpp b/src/gui/util/qktxhandler.cpp
+index 7eda4c46fb..2853e46c3d 100644
+--- a/src/gui/util/qktxhandler.cpp
 b/src/gui/util/qktxhandler.cpp
+@@ -73,7 +73,7 @@ struct KTXHeader {
+ quint32 bytesOfKeyValueData;
+ };
+ 
+-static const quint32 headerSize = sizeof(KTXHeader);
++static constexpr quint32 qktxh_headerSize = sizeof(KTXHeader);
+ 
+ // Currently unused, declared for future reference
+ struct KTXKeyValuePairItem {
+@@ -103,11 +103,36 @@ struct KTXMipmapLevel {
+ */
+ };
+ 
+-bool QKtxHandler::canRead(const QByteArray , const QByteArray )
++static bool qAddOverflow(quint32 v1, quint32 v2, quint32 *r) {
++// unsigned additions are well-defined
++*r = v1 + v2;
++return v1 > quint32(v1 + v2);
++}
++
++// Returns the nearest multiple of 4 greater than or equal to 'value'
++static bool nearestMultipleOf4(quint32 value, quint32 *result)
++{
++constexpr quint32 rounding = 4;
++*result = 0;
++if (qAddOverflow(value, rounding - 1, result))
++return true;
++*result &= ~(rounding - 1);
++return false;
++}
++
++// Returns a slice with prechecked bounds
++static QByteArray safeSlice(const QByteArray& array, quint32 start, quint32 
length)
+ {
+-Q_UNUSED(suffix)
++quint32 end = 0;
++if (qAddOverflow(start, length, ) || end > quint32(array.length()))
++return {};
++return QByteArray(array.data() + start, length);
++}
+ 
+-return (qstrncmp(block.constData(), ktxIdentifier, KTX_IDENTIFIER_LENGTH) 
== 0);
++bool QKtxHandler::canRead(const QByteArray , const QByteArray )
++{
++Q_UNUSED(suffix);
++return block.startsWith(QByteArray::fromRawData(ktxIdentifier, 
KTX_IDENTIFIER_LENGTH));
+ }
+ 
+ QTextureFileData QKtxHandler::read()
+@@ -115,42 +140,97 @@ QTextureFileData QKtxHandler::read()
+ if (!device())
+ return QTextureFileData();
+ 
+-QByteArray buf = device()->readAll();
+-const quint32 dataSize = quint32(buf.size());
+-if (dataSize < headerSize || !canRead(QByteArray(), buf)) {
+-qCDebug(lcQtGuiTextureIO, "Invalid KTX file %s", 
logName().constData());
++const QByteArray buf = device()->readAll();
++if (size_t(buf.size()) > std::numeric_limits::max()) {
++qWarning(lcQtGuiTextureIO, "Too big KTX file %s", 
logName().constData());
++return QTextureFileData();
++}
++
++if (!canRead(QByteArray(), buf)) {
++qWarning(lcQtGuiTextureIO, "Invalid KTX file %s", 
logName().constData());
++return QTextureFileData();
++}
++
++if (buf.size() < qsizetype(qktxh_headerSize)) {
++qWarning(lcQtGuiTextureIO, "Invalid KTX header size in %s", 
logName().constData());
+ return QTextureFileData();
+ }
+ 
+-const KTXHeader *header = reinterpret_cast(buf.constData());
+-if 

[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/

2023-10-24 Thread Andreas Sturmlechner
commit: 2831b01de82a3cde65b5b96f2f73065cf6d691e5
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Tue Oct 24 09:47:53 2023 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Tue Oct 24 10:25:42 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2831b01d

dev-qt/qtgui: (Non-)bump to QT5_KDEPATCHSET_REV=2

...just switching to upstream's patch.

Liang Qi (1):
  xkb: fix build with libxkbcommon 1.6.0 and later

Signed-off-by: Andreas Sturmlechner  gentoo.org>

 dev-qt/qtgui/Manifest  |  2 +-
 .../qtgui/files/qtgui-5.15.11-xkbcommon160.patch   | 22 --
 dev-qt/qtgui/qtgui-5.15.11.ebuild  |  6 +-
 3 files changed, 2 insertions(+), 28 deletions(-)

diff --git a/dev-qt/qtgui/Manifest b/dev-qt/qtgui/Manifest
index 12336c23f79a..53214af79b01 100644
--- a/dev-qt/qtgui/Manifest
+++ b/dev-qt/qtgui/Manifest
@@ -1,5 +1,5 @@
 DIST qtbase-5.15-gentoo-patchset-4.tar.xz 4884 BLAKE2B 
ef1f11ea63084b834e19a9bd4c4a146e0d47f10e6c1f540a23db64ba6b0d42f46d63f54f93587deae9ac528f6824fa0e88177fe109a53aaee7d8328d49e364cd
 SHA512 
1ae6630cef6bead9187aaaf7c420566b2c1f946bfa22cb983c52267c098e9b1c7b82c99204cbd3eed5eb6ebde0359726e260fd449618802735af465ca39f0a1d
 DIST qtbase-5.15.10-gentoo-kde-3.tar.xz 747604 BLAKE2B 
1d0f0be400504ef5e6f3c9cb5284ed85bf5bbf8b83f7d631fc06fb1622ef1b9750da9bda25b05e9426f64dabdad242181789785bbcdcf25c05abb931170e142a
 SHA512 
6a65d717a9bfda7707c4b92bb42c9a7c4b587a31683cb911f6972bb0f149c83cdd827c25a6b0af791368f2c1b2471aab98618006d02b82ead10bd6bfe51f08f5
-DIST qtbase-5.15.11-gentoo-kde-1.tar.xz 324008 BLAKE2B 
3ccd8645b5b727e4794fe4cb605d3db97159bf196b8e3e342ade364b701d6eb41e8e83ed608ec996480d7a82a43ddac098844dcecc9f122d63e9072abc21e9db
 SHA512 
d145af982de89a34eaa15c5dc48ed927b5757e6a6d9bfa064a5cef40618465d7d6139ecaccb71944eac43926b977031034f6c22d4986f1e4a704007de9cb325d
+DIST qtbase-5.15.11-gentoo-kde-2.tar.xz 327120 BLAKE2B 
38cf4106d620b28ab690de52dce7bbcf2da9de1009a0b126a68e19949013458ba788edd92a050410f9e33522be77e09eeeb95d4d696c3e482156dce5e120ee70
 SHA512 
235fb3baf660c551415300b5cc8a0d6091c7edd0a6f2c28bfb4e14bc63ada50203c0108cd8bd84b931860ee196cf83f68ec82a34509515c439ab989d80167d26
 DIST qtbase-everywhere-opensource-src-5.15.10.tar.xz 50422688 BLAKE2B 
2a625296967bef17d491a3ec8fbb4a3beaf00180a2cda728e485f796c801241798bd85dd06d57ca9fef26c591fe9910a2fcb83a67bbc17640b7393d280b9ce53
 SHA512 
94ac739d76dd9fff54cde46e818fee6c6763f8b207b759108455febff84c9dfeb48ea7807451d7248cbfd8af24c2a1263c34dcbd2be055136e39325e32725eef
 DIST qtbase-everywhere-opensource-src-5.15.11.tar.xz 50825756 BLAKE2B 
663d370d46a17939b984ef4c541414b81acdb98a2b7e67bb202c46891f9675e921723a025cef88b54b6111f235d94e273b97e1b55e2ca52b91e3eebca5ff7161
 SHA512 
4136092eec7bdceba661eee0187b7952ed6ba819148295979c0fd0392c17b0178165fa20136bdf460509a815c96f43892403294ba6e5322c54c51459c358fb7f

diff --git a/dev-qt/qtgui/files/qtgui-5.15.11-xkbcommon160.patch 
b/dev-qt/qtgui/files/qtgui-5.15.11-xkbcommon160.patch
deleted file mode 100644
index 0b5b3f964d57..
--- a/dev-qt/qtgui/files/qtgui-5.15.11-xkbcommon160.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-These were removed in libxkbcommon-1.6.0[1] and were apparently
-unnecesary. Usage results in build failure.
-
-Just a quick fix while waiting for what [2] comes up with.
-
-Update: will be fixed by [3], see also [4]
-
-[1] https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/70
-[2] https://bugreports.qt.io/browse/QTBUG-117950
-[3] https://invent.kde.org/qt/qt/qtbase/-/merge_requests/290
-[4] https://bugs.gentoo.org/915510
 a/src/platformsupport/input/xkbcommon/qxkbcommon.cpp
-+++ b/src/platformsupport/input/xkbcommon/qxkbcommon.cpp
-@@ -276,4 +276,4 @@
--Xkb2Qt,
--Xkb2Qt,
--Xkb2Qt,
--Xkb2Qt,
-+Xkb2Qt<0xfe90,  Qt::Key_Dead_Lowline>,
-+Xkb2Qt<0xfe91,  
Qt::Key_Dead_Aboveverticalline>,
-+Xkb2Qt<0xfe92,  
Qt::Key_Dead_Belowverticalline>,
-+Xkb2Qt<0xfe93,  
Qt::Key_Dead_Longsolidusoverlay>,

diff --git a/dev-qt/qtgui/qtgui-5.15.11.ebuild 
b/dev-qt/qtgui/qtgui-5.15.11.ebuild
index e8ef3f8a6ff9..65519037df3e 100644
--- a/dev-qt/qtgui/qtgui-5.15.11.ebuild
+++ b/dev-qt/qtgui/qtgui-5.15.11.ebuild
@@ -4,7 +4,7 @@
 EAPI=8
 
 if [[ ${PV} != ** ]]; then
-   QT5_KDEPATCHSET_REV=1
+   QT5_KDEPATCHSET_REV=2
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc 
~x86"
 fi
 
@@ -127,10 +127,6 @@ QT5_GENTOO_PRIVATE_CONFIG=(
:gui
 )
 
-PATCHES=(
-   "${FILESDIR}"/${PN}-5.15.11-xkbcommon160.patch
-)
-
 src_prepare() {
# don't add -O3 to CXXFLAGS, bug 549140
sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/gui/gui.pro || die



[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/

2023-10-11 Thread Ionen Wolkens
commit: bff11bebd8f6deda98703e76d6c2b50467afad68
Author: Ionen Wolkens  gentoo  org>
AuthorDate: Wed Oct 11 09:15:16 2023 +
Commit: Ionen Wolkens  gentoo  org>
CommitDate: Wed Oct 11 09:19:23 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bff11beb

dev-qt/qtgui: update description for xkbcommon160.patch

Current temporary fix is expectedly different than what upstream
did, but is not an issue -- due for cleanup either way.

Signed-off-by: Ionen Wolkens  gentoo.org>

 dev-qt/qtgui/files/qtgui-5.15.11-xkbcommon160.patch | 4 
 1 file changed, 4 insertions(+)

diff --git a/dev-qt/qtgui/files/qtgui-5.15.11-xkbcommon160.patch 
b/dev-qt/qtgui/files/qtgui-5.15.11-xkbcommon160.patch
index 92e907067fe6..0b5b3f964d57 100644
--- a/dev-qt/qtgui/files/qtgui-5.15.11-xkbcommon160.patch
+++ b/dev-qt/qtgui/files/qtgui-5.15.11-xkbcommon160.patch
@@ -3,8 +3,12 @@ unnecesary. Usage results in build failure.
 
 Just a quick fix while waiting for what [2] comes up with.
 
+Update: will be fixed by [3], see also [4]
+
 [1] https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/70
 [2] https://bugreports.qt.io/browse/QTBUG-117950
+[3] https://invent.kde.org/qt/qt/qtbase/-/merge_requests/290
+[4] https://bugs.gentoo.org/915510
 --- a/src/platformsupport/input/xkbcommon/qxkbcommon.cpp
 +++ b/src/platformsupport/input/xkbcommon/qxkbcommon.cpp
 @@ -276,4 +276,4 @@



[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/

2023-10-09 Thread Ionen Wolkens
commit: 66823bae94521bcf379c3875d63992a11a30848d
Author: Ionen Wolkens  gentoo  org>
AuthorDate: Mon Oct  9 23:38:14 2023 +
Commit: Ionen Wolkens  gentoo  org>
CommitDate: Mon Oct  9 23:40:19 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66823bae

dev-qt/qtgui: use a safer fix for xkbcommon-1.6.0

Do not believe it matters either way given these should be unused,
but shouldn't hurt to inline instead until upstream's own fix.

Signed-off-by: Ionen Wolkens  gentoo.org>

 dev-qt/qtgui/files/qtgui-5.15.11-xkbcommon160.patch | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dev-qt/qtgui/files/qtgui-5.15.11-xkbcommon160.patch 
b/dev-qt/qtgui/files/qtgui-5.15.11-xkbcommon160.patch
index d0da76580df2..92e907067fe6 100644
--- a/dev-qt/qtgui/files/qtgui-5.15.11-xkbcommon160.patch
+++ b/dev-qt/qtgui/files/qtgui-5.15.11-xkbcommon160.patch
@@ -7,8 +7,12 @@ Just a quick fix while waiting for what [2] comes up with.
 [2] https://bugreports.qt.io/browse/QTBUG-117950
 --- a/src/platformsupport/input/xkbcommon/qxkbcommon.cpp
 +++ b/src/platformsupport/input/xkbcommon/qxkbcommon.cpp
-@@ -276,4 +275,0 @@
+@@ -276,4 +276,4 @@
 -Xkb2Qt,
 -Xkb2Qt,
 -Xkb2Qt,
 -Xkb2Qt,
++Xkb2Qt<0xfe90,  Qt::Key_Dead_Lowline>,
++Xkb2Qt<0xfe91,  
Qt::Key_Dead_Aboveverticalline>,
++Xkb2Qt<0xfe92,  
Qt::Key_Dead_Belowverticalline>,
++Xkb2Qt<0xfe93,  
Qt::Key_Dead_Longsolidusoverlay>,



[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/

2023-10-09 Thread Ionen Wolkens
commit: e348405bae4e6094dc35832ecf58ff7c4c9d0485
Author: Ionen Wolkens  gentoo  org>
AuthorDate: Mon Oct  9 22:54:52 2023 +
Commit: Ionen Wolkens  gentoo  org>
CommitDate: Mon Oct  9 23:02:40 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e348405b

dev-qt/qtgui: fix build with >=libxkbcommon-1.6.0

Signed-off-by: Ionen Wolkens  gentoo.org>

 dev-qt/qtgui/files/qtgui-5.15.11-xkbcommon160.patch | 14 ++
 dev-qt/qtgui/qtgui-5.15.11.ebuild   |  4 
 2 files changed, 18 insertions(+)

diff --git a/dev-qt/qtgui/files/qtgui-5.15.11-xkbcommon160.patch 
b/dev-qt/qtgui/files/qtgui-5.15.11-xkbcommon160.patch
new file mode 100644
index ..d0da76580df2
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-5.15.11-xkbcommon160.patch
@@ -0,0 +1,14 @@
+These were removed in libxkbcommon-1.6.0[1] and were apparently
+unnecesary. Usage results in build failure.
+
+Just a quick fix while waiting for what [2] comes up with.
+
+[1] https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/70
+[2] https://bugreports.qt.io/browse/QTBUG-117950
+--- a/src/platformsupport/input/xkbcommon/qxkbcommon.cpp
 b/src/platformsupport/input/xkbcommon/qxkbcommon.cpp
+@@ -276,4 +275,0 @@
+-Xkb2Qt,
+-Xkb2Qt,
+-Xkb2Qt,
+-Xkb2Qt,

diff --git a/dev-qt/qtgui/qtgui-5.15.11.ebuild 
b/dev-qt/qtgui/qtgui-5.15.11.ebuild
index cf55be1bdcd7..e8ef3f8a6ff9 100644
--- a/dev-qt/qtgui/qtgui-5.15.11.ebuild
+++ b/dev-qt/qtgui/qtgui-5.15.11.ebuild
@@ -127,6 +127,10 @@ QT5_GENTOO_PRIVATE_CONFIG=(
:gui
 )
 
+PATCHES=(
+   "${FILESDIR}"/${PN}-5.15.11-xkbcommon160.patch
+)
+
 src_prepare() {
# don't add -O3 to CXXFLAGS, bug 549140
sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/gui/gui.pro || die



[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/

2022-12-10 Thread Andreas Sturmlechner
commit: c9e5d65c2ae4b112a738d9762849222d16d54fd5
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Sat Dec 10 12:09:58 2022 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Sat Dec 10 12:23:48 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9e5d65c

dev-qt/qtgui: Fix wrong to linear conversion

QTBUG: https://bugreports.qt.io/browse/QTBUG-109169

Signed-off-by: Andreas Sturmlechner  gentoo.org>

 ...gui-5.15.7-fix-wrong-to-linear-conversion.patch |  47 ++
 dev-qt/qtgui/qtgui-5.15.7-r1.ebuild| 186 +
 2 files changed, 233 insertions(+)

diff --git 
a/dev-qt/qtgui/files/qtgui-5.15.7-fix-wrong-to-linear-conversion.patch 
b/dev-qt/qtgui/files/qtgui-5.15.7-fix-wrong-to-linear-conversion.patch
new file mode 100644
index ..e0ae71f90f3c
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-5.15.7-fix-wrong-to-linear-conversion.patch
@@ -0,0 +1,47 @@
+From a9e67318e6a8924c4b5461656bcc6a80720ae899 Mon Sep 17 00:00:00 2001
+From: Allan Sandfeld Jensen 
+Date: Tue, 6 Dec 2022 10:42:59 +0100
+Subject: [PATCH] Fix wrong to linear conversion
+
+Causing bad rendering of gamma corrected text on non-standard image
+format paint devices.
+
+Pick-to: 6.4 6.2 5.15
+Fixes: QTBUG-109169
+Change-Id: I6d95e9a42b9ccac609071123dd4535d25e225a29
+Reviewed-by: Fabian Vogt 
+Reviewed-by: Eirik Aavitsland 
+(cherry picked from commit a09c33e1f7b5999a16bce9dd23ef8ca33d519210)
+---
+ src/gui/painting/qcolortrclut_p.h | 1 +
+ src/gui/painting/qdrawhelper.cpp  | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/gui/painting/qcolortrclut_p.h 
b/src/gui/painting/qcolortrclut_p.h
+index 76a6a60803..24fd522e6c 100644
+--- a/src/gui/painting/qcolortrclut_p.h
 b/src/gui/painting/qcolortrclut_p.h
+@@ -118,6 +118,7 @@ public:
+ return QRgba64::fromRgba64(r, g, b, qAlpha(rgb32) * 257);
+ #endif
+ }
++QRgba64 toLinear64(QRgba64) const = delete;
+ 
+ QRgb toLinear(QRgb rgb32) const
+ {
+diff --git a/src/gui/painting/qdrawhelper.cpp 
b/src/gui/painting/qdrawhelper.cpp
+index a61793508a..5ba2d277b7 100644
+--- a/src/gui/painting/qdrawhelper.cpp
 b/src/gui/painting/qdrawhelper.cpp
+@@ -6091,7 +6091,7 @@ static inline void alphargbblend_argb32(quint32 *dst, 
uint coverage, const QRgba
+ static inline void rgbBlendPixel(QRgba64 , int coverage, QRgba64 slinear, 
const QColorTrcLut *colorProfile)
+ {
+ // Do a gammacorrected RGB alphablend...
+-const QRgba64 dlinear = colorProfile ? colorProfile->toLinear64(dst) : 
dst;
++const QRgba64 dlinear = colorProfile ? colorProfile->toLinear(dst) : dst;
+ 
+ QRgba64 blend = rgbBlend(dlinear, slinear, coverage);
+ 
+-- 
+2.38.1
+

diff --git a/dev-qt/qtgui/qtgui-5.15.7-r1.ebuild 
b/dev-qt/qtgui/qtgui-5.15.7-r1.ebuild
new file mode 100644
index ..8c0d97088139
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-5.15.7-r1.ebuild
@@ -0,0 +1,186 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+if [[ ${PV} != ** ]]; then
+   QT5_KDEPATCHSET_REV=1
+   KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc 
~x86"
+fi
+
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="The GUI module and platform plugins for the Qt5 framework"
+
+SLOT=5/${QT5_PV} # bug 707658
+IUSE="accessibility dbus egl eglfs evdev gles2-only ibus jpeg +libinput
+   linuxfb +png tslib tuio +udev vnc vulkan wayland +X"
+REQUIRED_USE="
+   || ( eglfs linuxfb vnc X )
+   accessibility? ( dbus X )
+   eglfs? ( egl )
+   ibus? ( dbus )
+   libinput? ( udev )
+   X? ( gles2-only? ( egl ) )
+"
+
+RDEPEND="
+   dev-libs/glib:2
+   =dev-qt/qtcore-${QT5_PV}*:5=
+   dev-util/gtk-update-icon-cache
+   media-libs/fontconfig
+   media-libs/freetype:2
+   media-libs/harfbuzz:=
+   sys-libs/zlib:=
+   dbus? ( =dev-qt/qtdbus-${QT5_PV}* )
+   eglfs? (
+   media-libs/mesa[gbm(+)]
+   x11-libs/libdrm
+   )
+   evdev? ( sys-libs/mtdev )
+   jpeg? ( media-libs/libjpeg-turbo:= )
+   gles2-only? ( media-libs/libglvnd )
+   !gles2-only? ( media-libs/libglvnd[X] )
+   libinput? (
+   dev-libs/libinput:=
+   x11-libs/libxkbcommon
+   )
+   png? ( media-libs/libpng:= )
+   tslib? ( >=x11-libs/tslib-1.21 )
+   tuio? ( =dev-qt/qtnetwork-${QT5_PV}* )
+   udev? ( virtual/libudev:= )
+   vnc? ( =dev-qt/qtnetwork-${QT5_PV}* )
+   vulkan? ( dev-util/vulkan-headers )
+   X? (
+   x11-libs/libICE
+   x11-libs/libSM
+   x11-libs/libX11
+   x11-libs/libxcb:=
+   x11-libs/libxkbcommon[X]
+   x11-libs/xcb-util-image
+   x11-libs/xcb-util-keysyms
+   x11-libs/xcb-util-renderutil
+   x11-libs/xcb-util-wm
+   )
+"
+DEPEND="${RDEPEND}
+   evdev? ( 

[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/

2022-12-10 Thread Andreas Sturmlechner
commit: bef432ba24454b24ded98f376e2dcda93a2a555e
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Sat Dec 10 12:13:59 2022 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Sat Dec 10 12:23:51 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bef432ba

dev-qt/qtgui: Drop obsolete patch

Signed-off-by: Andreas Sturmlechner  gentoo.org>

 ...-update-_NET_SUPPORTED-when-WM-changes-it.patch | 38 --
 1 file changed, 38 deletions(-)

diff --git 
a/dev-qt/qtgui/files/qtgui-5.15.5-xcb-update-_NET_SUPPORTED-when-WM-changes-it.patch
 
b/dev-qt/qtgui/files/qtgui-5.15.5-xcb-update-_NET_SUPPORTED-when-WM-changes-it.patch
deleted file mode 100644
index 0d0acdf63a99..
--- 
a/dev-qt/qtgui/files/qtgui-5.15.5-xcb-update-_NET_SUPPORTED-when-WM-changes-it.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 97acde2828c8814671f4938e0c4805d945a4d110 Mon Sep 17 00:00:00 2001
-From: Tang Haixiang 
-Date: Thu, 25 Feb 2021 18:05:17 +0800
-Subject: [PATCH] xcb: Update _NET_SUPPORTED when the window manager changes it
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-In some cases, the application may start before the window manager, and in 
some window managers
-_NET_SUPPORTED may be changed. These situations will cause the _NET_SUPPORTED 
value obtained by Qt
-to be inconsistent with the window manager.
-
-Fixes: QTBUG-91396
-Change-Id: I63c6934ad2538cdb9f05926b3748216bd0dcf04e
-Reviewed-by: Tor Arne Vestbø 
-
-
-(cherry picked from commit acb0065cc7e4ee849cc87ce72e46b05a61370c43)

- src/plugins/platforms/xcb/qxcbconnection.cpp | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp 
b/src/plugins/platforms/xcb/qxcbconnection.cpp
-index 8477e28df1..6aa61e0d34 100644
 a/src/plugins/platforms/xcb/qxcbconnection.cpp
-+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
-@@ -659,6 +659,8 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t 
*event)
- QXcbVirtualDesktop *virtualDesktop = 
virtualDesktopForRootWindow(propertyNotify->window);
- if (virtualDesktop)
- virtualDesktop->updateWorkArea();
-+} else if (propertyNotify->atom == atom(QXcbAtom::_NET_SUPPORTED)) {
-+m_wmSupport->updateNetWMAtoms();
- } else {
- HANDLE_PLATFORM_WINDOW_EVENT(xcb_property_notify_event_t, window, 
handlePropertyNotifyEvent);
- }
--- 
-GitLab
-



[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/

2022-08-15 Thread Andreas Sturmlechner
commit: ae0a17684633d8932346d06c927cdcecc968b173
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Mon Aug 15 12:27:34 2022 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Mon Aug 15 14:09:53 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae0a1768

dev-qt/qtgui: xcb: Update _NET_SUPPORTED when the WM changes it

Upstream commit 97acde2828c8814671f4938e0c4805d945a4d110

KDE-bug: https://bugs.kde.org/show_bug.cgi?id=449196
QTBUG: https://bugreports.qt.io/browse/QTBUG-91396

Signed-off-by: Andreas Sturmlechner  gentoo.org>

 ...-update-_NET_SUPPORTED-when-WM-changes-it.patch |  38 +
 dev-qt/qtgui/qtgui-5.15.5-r2.ebuild| 185 +
 2 files changed, 223 insertions(+)

diff --git 
a/dev-qt/qtgui/files/qtgui-5.15.5-xcb-update-_NET_SUPPORTED-when-WM-changes-it.patch
 
b/dev-qt/qtgui/files/qtgui-5.15.5-xcb-update-_NET_SUPPORTED-when-WM-changes-it.patch
new file mode 100644
index ..0d0acdf63a99
--- /dev/null
+++ 
b/dev-qt/qtgui/files/qtgui-5.15.5-xcb-update-_NET_SUPPORTED-when-WM-changes-it.patch
@@ -0,0 +1,38 @@
+From 97acde2828c8814671f4938e0c4805d945a4d110 Mon Sep 17 00:00:00 2001
+From: Tang Haixiang 
+Date: Thu, 25 Feb 2021 18:05:17 +0800
+Subject: [PATCH] xcb: Update _NET_SUPPORTED when the window manager changes it
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+In some cases, the application may start before the window manager, and in 
some window managers
+_NET_SUPPORTED may be changed. These situations will cause the _NET_SUPPORTED 
value obtained by Qt
+to be inconsistent with the window manager.
+
+Fixes: QTBUG-91396
+Change-Id: I63c6934ad2538cdb9f05926b3748216bd0dcf04e
+Reviewed-by: Tor Arne Vestbø 
+
+
+(cherry picked from commit acb0065cc7e4ee849cc87ce72e46b05a61370c43)
+---
+ src/plugins/platforms/xcb/qxcbconnection.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp 
b/src/plugins/platforms/xcb/qxcbconnection.cpp
+index 8477e28df1..6aa61e0d34 100644
+--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
 b/src/plugins/platforms/xcb/qxcbconnection.cpp
+@@ -659,6 +659,8 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t 
*event)
+ QXcbVirtualDesktop *virtualDesktop = 
virtualDesktopForRootWindow(propertyNotify->window);
+ if (virtualDesktop)
+ virtualDesktop->updateWorkArea();
++} else if (propertyNotify->atom == atom(QXcbAtom::_NET_SUPPORTED)) {
++m_wmSupport->updateNetWMAtoms();
+ } else {
+ HANDLE_PLATFORM_WINDOW_EVENT(xcb_property_notify_event_t, window, 
handlePropertyNotifyEvent);
+ }
+-- 
+GitLab
+

diff --git a/dev-qt/qtgui/qtgui-5.15.5-r2.ebuild 
b/dev-qt/qtgui/qtgui-5.15.5-r2.ebuild
new file mode 100644
index ..0da032002fac
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-5.15.5-r2.ebuild
@@ -0,0 +1,185 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+QT5_KDEPATCHSET_REV=2
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="The GUI module and platform plugins for the Qt5 framework"
+SLOT=5/${QT5_PV} # bug 707658
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+   KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc 
~x86"
+fi
+
+IUSE="accessibility dbus egl eglfs evdev +gif gles2-only ibus jpeg
+   +libinput linuxfb +png tslib tuio +udev vnc vulkan wayland +X"
+REQUIRED_USE="
+   || ( eglfs linuxfb vnc X )
+   accessibility? ( dbus X )
+   eglfs? ( egl )
+   ibus? ( dbus )
+   libinput? ( udev )
+   X? ( gles2-only? ( egl ) )
+"
+
+RDEPEND="
+   dev-libs/glib:2
+   =dev-qt/qtcore-${QT5_PV}*:5=
+   dev-util/gtk-update-icon-cache
+   media-libs/fontconfig
+   media-libs/freetype:2
+   media-libs/harfbuzz:=
+   sys-libs/zlib:=
+   dbus? ( =dev-qt/qtdbus-${QT5_PV}* )
+   eglfs? (
+   media-libs/mesa[gbm(+)]
+   x11-libs/libdrm
+   )
+   evdev? ( sys-libs/mtdev )
+   jpeg? ( media-libs/libjpeg-turbo:= )
+   gles2-only? ( media-libs/libglvnd )
+   !gles2-only? ( media-libs/libglvnd[X] )
+   libinput? (
+   dev-libs/libinput:=
+   x11-libs/libxkbcommon
+   )
+   png? ( media-libs/libpng:= )
+   tslib? ( >=x11-libs/tslib-1.21 )
+   tuio? ( =dev-qt/qtnetwork-${QT5_PV}* )
+   udev? ( virtual/libudev:= )
+   vnc? ( =dev-qt/qtnetwork-${QT5_PV}* )
+   vulkan? ( dev-util/vulkan-headers )
+   X? (
+   x11-libs/libICE
+   x11-libs/libSM
+   x11-libs/libX11
+   x11-libs/libxcb:=[xkb]
+   x11-libs/libxkbcommon[X]
+   x11-libs/xcb-util-image
+   x11-libs/xcb-util-keysyms
+   x11-libs/xcb-util-renderutil
+   x11-libs/xcb-util-wm
+   )
+"

[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/

2022-04-18 Thread Sam James
commit: 898d75f14f78260fd90857704d69de5ec6a8d31c
Author: Michael Mair-Keimberger  levelnine  at>
AuthorDate: Mon Apr 18 07:01:38 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Apr 18 07:15:45 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=898d75f1

dev-qt/qtgui: remove unused patch

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Michael Mair-Keimberger  levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/25076
Signed-off-by: Sam James  gentoo.org>

 .../qtgui-5.14.1-cmake-macro-backward-compat.patch | 50 --
 1 file changed, 50 deletions(-)

diff --git a/dev-qt/qtgui/files/qtgui-5.14.1-cmake-macro-backward-compat.patch 
b/dev-qt/qtgui/files/qtgui-5.14.1-cmake-macro-backward-compat.patch
deleted file mode 100644
index 30b5abc39759..
--- a/dev-qt/qtgui/files/qtgui-5.14.1-cmake-macro-backward-compat.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From: Andreas Sturmlechner 
-Date: Sun, 9 Feb 2020 11:45:00 +0100
-Subject: [PATCH] qtcore: Fix cmake macro compat. for upgrade from https://code.qt.io/cgit/qt/qtbase.git/commit/?h=5.14=63d9cd17
-
-_populate_$${CMAKE_MODULE_NAME}_plugin_properties in 5.14.0 gained an 
additional argument
-IsDebugAndRelease without providing backward compatibility. This macro is used 
(at least) for
-QtGui and QtDesigner plugins added by qtimageformats, qtsvg, qtvirtualkeyboard 
and qtwayland.
-During upgrade from =Qt-5.14, as a consequence of slot upgrade 
rebuilds, some
-reverse dependencies are slated for rebuild before these Qt consumers have 
been rebuilt and their
-cmake files regenerated, leading to cmake errors like:
-
-https://bugs.gentoo.org/703306
-https://bugs.gentoo.org/705198
-
-From mkspecs/features/create_cmake.prf:
-
-# CMAKE_DEBUG_AND_RELEASE is used to tell the 
_populate_$${CMAKE_MODULE_NAME}_target_properties
-# functions whether a Configuration specific generator expression needs to be 
added to the values
-# of INTERFACE_LINK_LIBRARIES and INTERFACE_LINK_OPTIONS. For 
debug_and_release builds, we do need
-# configuration specific values. For singular builds (only release or only 
debug), we want the
-# values to be applied regardless of the configuration.
-# This would allow on Linux and macOS (and with a recent enough version of 
CMake on Windows) to
-# build a Debug configuration of an application, even if Qt was built in a 
Release configuration.
-
-qt5-build.eclass is configuring either as 'release' or as 'debug', so we make 
IsDebugAndRelease
-optional and default to FALSE.
-
 a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in  2020-01-23 
13:37:32.0 +0100
-+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in  2020-02-09 
15:15:21.156219814 +0100
-@@ -538,8 +538,14 @@
- 
- file(GLOB pluginTargets 
\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*Plugin.cmake\")
- 
--macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin 
Configuration PLUGIN_LOCATION
--  IsDebugAndRelease)
-+macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin 
Configuration PLUGIN_LOCATION)
-+set(IsDebugAndRelease FALSE)
-+set (list_var ${ARGN})
-+list(LENGTH list_var num_extra_arg)
-+if (${num_extra_arg} GREATER 0)
-+list(GET list_var 0 IsDebugAndRelease)
-+endif()
-+
- set_property(TARGET Qt5::${Plugin} APPEND PROPERTY 
IMPORTED_CONFIGURATIONS ${Configuration})
- 
- !!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE)



[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/

2021-01-01 Thread Andreas Sturmlechner
commit: c1656b6dcec27a716caf2b516e03c9d3fc2558c6
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Fri Jan  1 16:56:05 2021 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Sat Jan  2 01:22:31 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1656b6d

dev-qt/qtgui: Drop bogus xcb-util build dep

See also: https://bugreports.qt.io/browse/QTBUG-88688

Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 .../files/qtgui-5.15.2-bogus-xcb-util-dep.patch|  72 
 dev-qt/qtgui/qtgui-5.15.2-r1.ebuild| 188 +
 2 files changed, 260 insertions(+)

diff --git a/dev-qt/qtgui/files/qtgui-5.15.2-bogus-xcb-util-dep.patch 
b/dev-qt/qtgui/files/qtgui-5.15.2-bogus-xcb-util-dep.patch
new file mode 100644
index 000..b7f65483fb1
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-5.15.2-bogus-xcb-util-dep.patch
@@ -0,0 +1,72 @@
+From 61b07d75f96d4dfb07b485b2a9bd7aed099df987 Mon Sep 17 00:00:00 2001
+From: Liang Qi 
+Date: Tue, 1 Dec 2020 08:43:28 +0100
+Subject: [PATCH] Revert "xcb: add xcb-util dependency for xcb-image"
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf8
+Content-Transfer-Encoding: 8bit
+
+This reverts commit adc42bebcac764ca8de78578e3a4ac39b621bd09.
+
+adc42beb is wrong, the bug is for static build of qt with static
+xcb. It adds the explicit dependency of xcb-util 0.3.9, which is
+not available on Debian yet.
+
+Task-number: QTBUG-86287
+Fixes: QTBUG-88688
+Change-Id: Iffc821f49bdfcad3f2556951d3677c35a7682266
+Reviewed-by: Thiago Macieira 
+Reviewed-by: Tor Arne Vestbø 
+(adapted from commit 92a57e0b016f811876ec1d62328ca8edfe452a3a)
+---
+ src/gui/configure.json | 14 ++
+ 1 file changed, 2 insertions(+), 12 deletions(-)
+
+diff --git a/src/gui/configure.json b/src/gui/configure.json
+index c8c4864eca6..1f08795c57b 100644
+--- a/src/gui/configure.json
 b/src/gui/configure.json
+@@ -601,15 +601,6 @@
+ ],
+ "use": "xcb"
+ },
+-"xcb_util": {
+-"label": "XCB Util >= 0.3.9",
+-"headers": "xcb/xcb_util.h",
+-"sources": [
+-{ "type": "pkgConfig", "args": "xcb-util >= 0.3.9" },
+-"-lxcb-util"
+-],
+-"use": "xcb"
+-},
+ "xcb_image": {
+ "label": "XCB Image >= 0.3.9",
+ "headers": "xcb/xcb_image.h",
+@@ -617,7 +608,7 @@
+ { "type": "pkgConfig", "args": "xcb-image >= 0.3.9" },
+ "-lxcb-image"
+ ],
+-"use": "xcb_shm xcb_util xcb"
++"use": "xcb_shm xcb"
+ },
+ "xcb_keysyms": {
+ "label": "XCB Keysyms >= 0.3.9",
+@@ -1065,7 +1056,6 @@
+ "tail": "#undef explicit",
+ "include": [
+ "xcb/xcb.h",
+-"xcb/xcb_util.h",
+ "xcb/xcb_image.h",
+ "xcb/xcb_keysyms.h",
+ "xcb/randr.h",
+@@ -1097,7 +1087,7 @@
+ 
"xcb_xkb_get_kbd_by_name_replies_key_names_value_list_sizeof(nullptr, 0, 0, 0, 
0, 0, 0, 0, 0);"
+ ]
+ },
+-"use": "xcb_icccm xcb_util xcb_image xcb_keysyms xcb_randr 
xcb_render xcb_renderutil xcb_shape xcb_shm xcb_sync xcb_xfixes xcb_xinerama 
xcb_xkb xcb"
++"use": "xcb_icccm xcb_image xcb_keysyms xcb_randr xcb_render 
xcb_renderutil xcb_shape xcb_shm xcb_sync xcb_xfixes xcb_xinerama xcb_xkb xcb"
+ },
+ "x11prefix": {
+ "label": "X11 prefix",
+-- 
+2.16.3

diff --git a/dev-qt/qtgui/qtgui-5.15.2-r1.ebuild 
b/dev-qt/qtgui/qtgui-5.15.2-r1.ebuild
new file mode 100644
index 000..13063686d1c
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-5.15.2-r1.ebuild
@@ -0,0 +1,188 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="The GUI module and platform plugins for the Qt5 framework"
+SLOT=5/$(ver_cut 1-3) # bug 707658
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+   KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+# TODO: linuxfb
+
+IUSE="accessibility dbus egl eglfs evdev +gif gles2-only ibus jpeg
+   +libinput +png tslib tuio +udev vnc vulkan wayland +X"
+REQUIRED_USE="
+   || ( eglfs X )
+   accessibility? ( dbus X )
+   eglfs? ( egl )
+   ibus? ( dbus )
+   libinput? ( udev )
+   X? ( gles2-only? ( egl ) )
+"
+
+COMMON_DEPEND="
+   dev-libs/glib:2
+   ~dev-qt/qtcore-${PV}:5=
+   dev-util/gtk-update-icon-cache
+   media-libs/fontconfig
+   >=media-libs/freetype-2.6.1:2
+   >=media-libs/harfbuzz-1.6.0:=
+   sys-libs/zlib:=
+   dbus? ( ~dev-qt/qtdbus-${PV} )
+   egl? ( media-libs/mesa[egl] )
+   eglfs? (
+   media-libs/mesa[gbm]
+   

[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/

2020-10-04 Thread Andreas Sturmlechner
commit: 5e4b74cf31c4478d491f577d5746e4024b3ea552
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Fri Oct  2 19:36:04 2020 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Sun Oct  4 15:54:06 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e4b74cf

dev-qt/qtgui: Fix multiscreen regression

"There is a bug in Qt 5.15.1 that seriously affects multiscreen. We get
a bunch of reports every day. Effectively a screen change signal goes
missing and Plasma naturally breaks."

See also: 
https://mail.kde.org/pipermail/distributions/2020-September/000866.html
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=426496
QTBUG: https://bugreports.qt.io/browse/QTBUG-86604
Cherry-picked from: https://codereview.qt-project.org/c/qt/qtbase/+/315721

Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 ...-qscreen-geometrychanged-when-dpi-changes.patch |  86 ++
 dev-qt/qtgui/qtgui-5.15.1-r1.ebuild| 185 +
 2 files changed, 271 insertions(+)

diff --git 
a/dev-qt/qtgui/files/qtgui-5.15.1-emit-qscreen-geometrychanged-when-dpi-changes.patch
 
b/dev-qt/qtgui/files/qtgui-5.15.1-emit-qscreen-geometrychanged-when-dpi-changes.patch
new file mode 100644
index 000..3e4187b22a0
--- /dev/null
+++ 
b/dev-qt/qtgui/files/qtgui-5.15.1-emit-qscreen-geometrychanged-when-dpi-changes.patch
@@ -0,0 +1,86 @@
+From 65243ad7aef48af4689ea4454916b504025b5051 Mon Sep 17 00:00:00 2001
+From: Friedemann Kleint 
+Date: Fri, 25 Sep 2020 14:10:58 +0200
+Subject: [PATCH] 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 239a78313c5..ef090605819 100644
+--- a/src/gui/kernel/qguiapplication.cpp
 b/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 df628fcc73a..a1afc1ba143 100644
+--- a/src/gui/kernel/qscreen.cpp
 b/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)
+-- 
+2.16.3

diff --git 

[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/

2020-08-22 Thread Andreas Sturmlechner
commit: 621b799854a30f790193cf9f6177cb297048412a
Author: Jimi Huotari  gentoo  org>
AuthorDate: Thu Aug 20 12:03:19 2020 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Sat Aug 22 18:52:22 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=621b7998

dev-qt/qtgui: fix CVE-2020-17507

Upstream commit: https://code.qt.io/cgit/qt/qtbase.git/commit/?id=1616c719

Reported-by: John Helmert III (ajak)  posteo.net>
Bug: https://bugs.gentoo.org/736924
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Jimi Huotari  gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/17183
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 .../qtgui/files/qtgui-5.14.2-CVE-2020-17507.patch  |  39 +
 dev-qt/qtgui/qtgui-5.14.2-r1.ebuild| 185 +
 dev-qt/qtgui/qtgui-5.15.0-r1.ebuild| 185 +
 3 files changed, 409 insertions(+)

diff --git a/dev-qt/qtgui/files/qtgui-5.14.2-CVE-2020-17507.patch 
b/dev-qt/qtgui/files/qtgui-5.14.2-CVE-2020-17507.patch
new file mode 100644
index 000..cad9aa4b682
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-5.14.2-CVE-2020-17507.patch
@@ -0,0 +1,39 @@
+From 1616c71921b73b227f56ccb3f2c49a994ec23440 Mon Sep 17 00:00:00 2001
+From: Allan Sandfeld Jensen 
+Date: Thu, 23 Jul 2020 11:48:48 +0200
+Subject: Fix buffer overflow in XBM parser
+
+Avoid parsing over the buffer limit, or interpreting non-hex
+as hex.
+
+This still leaves parsing of lines longer than 300 chars
+unreliable
+
+Change-Id: I1c57a7e530c4380f6f9040b2ec729ccd7dc7a5fb
+Reviewed-by: Robert Loehning 
+Reviewed-by: Eirik Aavitsland 
+(cherry picked from commit c562c1fc19629fb505acd0f6380604840b634211)
+Reviewed-by: Qt Cherry-pick Bot 
+---
+ src/gui/image/qxbmhandler.cpp  |  4 ++-
+ .../gui/image/qimagereader/tst_qimagereader.cpp| 38 ++
+ 2 files changed, 41 insertions(+), 1 deletion(-)
+
+diff --git a/src/gui/image/qxbmhandler.cpp b/src/gui/image/qxbmhandler.cpp
+index f06561690c..72ce7f7ecd 100644
+--- a/src/gui/image/qxbmhandler.cpp
 b/src/gui/image/qxbmhandler.cpp
+@@ -159,7 +159,9 @@ static bool read_xbm_body(QIODevice *device, int w, int h, 
QImage *outImage)
+ w = (w+7)/8;// byte width
+ 
+ while (y < h) {// for all encoded bytes...
+-if (p) {// p = "0x.."
++if (p && p < (buf + readBytes - 3)) {  // p = "0x.."
++if (!isxdigit(p[2]) || !isxdigit(p[3]))
++return false;
+ *b++ = hex2byte(p+2);
+ p += 2;
+ if (++x == w && ++y < h) {
+-- 
+cgit v1.2.1
+

diff --git a/dev-qt/qtgui/qtgui-5.14.2-r1.ebuild 
b/dev-qt/qtgui/qtgui-5.14.2-r1.ebuild
new file mode 100644
index 000..a676219df35
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-5.14.2-r1.ebuild
@@ -0,0 +1,185 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="The GUI module and platform plugins for the Qt5 framework"
+SLOT=5/$(ver_cut 1-3) # bug 707658
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+   KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+fi
+
+# TODO: linuxfb
+
+IUSE="accessibility dbus egl eglfs evdev +gif gles2-only ibus jpeg
+   +libinput +png tslib tuio +udev vnc vulkan wayland +X"
+REQUIRED_USE="
+   || ( eglfs X )
+   accessibility? ( dbus X )
+   eglfs? ( egl )
+   ibus? ( dbus )
+   libinput? ( udev )
+   X? ( gles2-only? ( egl ) )
+"
+
+RDEPEND="
+   dev-libs/glib:2
+   ~dev-qt/qtcore-${PV}:5=
+   dev-util/gtk-update-icon-cache
+   media-libs/fontconfig
+   >=media-libs/freetype-2.6.1:2
+   >=media-libs/harfbuzz-1.6.0:=
+   sys-libs/zlib:=
+   virtual/opengl
+   dbus? ( ~dev-qt/qtdbus-${PV} )
+   egl? ( media-libs/mesa[egl] )
+   eglfs? (
+   media-libs/mesa[gbm]
+   x11-libs/libdrm
+   )
+   evdev? ( sys-libs/mtdev )
+   gles2-only? ( media-libs/mesa[gles2] )
+   jpeg? ( virtual/jpeg:0 )
+   libinput? (
+   dev-libs/libinput:=
+   >=x11-libs/libxkbcommon-0.5.0
+   )
+   png? ( media-libs/libpng:0= )
+   tslib? ( >=x11-libs/tslib-1.21 )
+   tuio? ( ~dev-qt/qtnetwork-${PV} )
+   udev? ( virtual/libudev:= )
+   vnc? ( ~dev-qt/qtnetwork-${PV} )
+   vulkan? ( dev-util/vulkan-headers )
+   X? (
+   x11-libs/libICE
+   x11-libs/libSM
+   x11-libs/libX11
+   >=x11-libs/libxcb-1.12:=[xkb]
+   >=x11-libs/libxkbcommon-0.5.0[X]
+   x11-libs/xcb-util-image
+   x11-libs/xcb-util-keysyms
+   x11-libs/xcb-util-renderutil
+   x11-libs/xcb-util-wm
+   )
+"
+DEPEND="${RDEPEND}
+   evdev? ( 

[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/

2019-03-01 Thread Mike Gilbert
commit: 1488107891b5800d923f2cd45a3ceea693104052
Author: Mike Gilbert  gentoo  org>
AuthorDate: Sat Mar  2 04:43:36 2019 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Sat Mar  2 04:43:36 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=14881078

dev-qt/qtgui: fix build with CXXFLAGS="-march=native"

Bug: https://bugs.gentoo.org/672946
Package-Manager: Portage-2.3.59_p2, Repoman-2.3.12_p67
Signed-off-by: Mike Gilbert  gentoo.org>

 dev-qt/qtgui/files/qt-5.12-gcc-avx2.patch | 29 +
 dev-qt/qtgui/qtgui-5.12.1.ebuild  |  4 
 2 files changed, 33 insertions(+)

diff --git a/dev-qt/qtgui/files/qt-5.12-gcc-avx2.patch 
b/dev-qt/qtgui/files/qt-5.12-gcc-avx2.patch
new file mode 100644
index 000..41814c061a4
--- /dev/null
+++ b/dev-qt/qtgui/files/qt-5.12-gcc-avx2.patch
@@ -0,0 +1,29 @@
+From 3f302cb16ebfefade17b3ea90c5ed258c9150f3a Mon Sep 17 00:00:00 2001
+From: Mike Gilbert 
+Date: Fri, 1 Mar 2019 21:37:52 -0500
+Subject: [PATCH] gcc: pass -mavx2 instead of -march=core-avx2
+
+Resolves a build failure when QMAKE_CXXFLAGS contains -march=native
+and the compiler is running on a CPU which does not support AVX2.
+
+Bug: https://bugs.gentoo.org/672946
+---
+ mkspecs/common/gcc-base.conf | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf
+index c2669e4833..44aa96af38 100644
+--- a/mkspecs/common/gcc-base.conf
 b/mkspecs/common/gcc-base.conf
+@@ -109,7 +109,7 @@ QMAKE_CFLAGS_MIPS_DSP  += -mdsp
+ QMAKE_CFLAGS_MIPS_DSPR2 += -mdspr2
+ 
+ # -march=haswell is supported as of GCC 4.9 and Clang 3.6
+-QMAKE_CFLAGS_ARCH_HASWELL   = -march=core-avx2
++QMAKE_CFLAGS_ARCH_HASWELL   = -mavx2
+ 
+ # Wrapper tools that understand .o/.a files with GIMPLE instead of machine 
code
+ QMAKE_AR_LTCG   = gcc-ar cqs
+-- 
+2.21.0.rc1
+

diff --git a/dev-qt/qtgui/qtgui-5.12.1.ebuild b/dev-qt/qtgui/qtgui-5.12.1.ebuild
index d0432526ea6..99baac703ae 100644
--- a/dev-qt/qtgui/qtgui-5.12.1.ebuild
+++ b/dev-qt/qtgui/qtgui-5.12.1.ebuild
@@ -122,6 +122,10 @@ QT5_GENTOO_PRIVATE_CONFIG=(
:gui
 )
 
+PATCHES=(
+   "${FILESDIR}/qt-5.12-gcc-avx2.patch" # 672946
+)
+
 src_prepare() {
# don't add -O3 to CXXFLAGS, bug 549140
sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/gui/gui.pro || die



[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/

2018-10-30 Thread Andreas Sturmlechner
commit: c52c0909344d7ca52c08dcfbc8eb12e2f521620f
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Tue Oct 30 15:47:09 2018 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Tue Oct 30 17:46:02 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c52c0909

dev-qt/qtgui: xcb: Don't get initial screen rotation

Qt-Bug: https://bugreports.qt.io/browse/QTBUG-70760
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=399053
Closes: https://bugs.gentoo.org/668994
Signed-off-by: Andreas Sturmlechner  gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 .../files/qtgui-5.11.2-qapplication-block.patch|  53 +++
 dev-qt/qtgui/qtgui-5.11.2-r1.ebuild| 172 +
 2 files changed, 225 insertions(+)

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
new file mode 100644
index 000..115b42b8e93
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-5.11.2-qapplication-block.patch
@@ -0,0 +1,53 @@
+From d4e937a6280f34bc1cce8c8cea3806a741312fbc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?B=C5=82a=C5=BCej=20Szczygie=C5=82?= 
+Date: Tue, 25 Sep 2018 18:45:10 +0200
+Subject: xcb: Don't get initial screen rotation
+
+"xcb_randr_get_screen_info" can be slow and in some configurations can
+cause short mouse cursor freezes (which will happen on Qt application
+startup).
+
+Initial screen rotation was used only to not handle possible redundant
+screen change event.
+
+Fixes: QTBUG-70760
+Change-Id: I9f01325a045d2c82c4dd2fce91a18a34e54a4bcd
+Reviewed-by: Gatis Paeglis 
+---
+ src/plugins/platforms/xcb/qxcbscreen.cpp | 7 ---
+ src/plugins/platforms/xcb/qxcbscreen.h   | 2 +-
+ 2 files changed, 1 insertion(+), 8 deletions(-)
+
+diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp 
b/src/plugins/platforms/xcb/qxcbscreen.cpp
+index 7f2793b2b7..a696e2a311 100644
+--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
 b/src/plugins/platforms/xcb/qxcbscreen.cpp
+@@ -118,13 +118,6 @@ QXcbVirtualDesktop::QXcbVirtualDesktop(QXcbConnection 
*connection, xcb_screen_t
+ 
+ xcb_depth_next(_iterator);
+ }
+-
+-if (connection->hasXRandr()) {
+-xcb_connection_t *conn = connection->xcb_connection();
+-auto screen_info = Q_XCB_REPLY(xcb_randr_get_screen_info, conn, 
screen->root);
+-if (screen_info)
+-m_rotation = screen_info->rotation;
+-}
+ }
+ 
+ QXcbVirtualDesktop::~QXcbVirtualDesktop()
+diff --git a/src/plugins/platforms/xcb/qxcbscreen.h 
b/src/plugins/platforms/xcb/qxcbscreen.h
+index 6438669e7a..792aca4b06 100644
+--- a/src/plugins/platforms/xcb/qxcbscreen.h
 b/src/plugins/platforms/xcb/qxcbscreen.h
+@@ -220,7 +220,7 @@ private:
+ xcb_randr_crtc_t m_crtc;
+ xcb_randr_mode_t m_mode = XCB_NONE;
+ bool m_primary = false;
+-uint8_t m_rotation = XCB_RANDR_ROTATION_ROTATE_0;
++uint8_t m_rotation = 0;
+ 
+ QString m_outputName;
+ QSizeF m_outputSizeMillimeters;
+-- 
+cgit v1.2.1

diff --git a/dev-qt/qtgui/qtgui-5.11.2-r1.ebuild 
b/dev-qt/qtgui/qtgui-5.11.2-r1.ebuild
new file mode 100644
index 000..f3b8dc42d1b
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-5.11.2-r1.ebuild
@@ -0,0 +1,172 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="The GUI module and platform plugins for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+   KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd"
+fi
+
+# TODO: linuxfb
+
+IUSE="accessibility dbus egl eglfs evdev +gif gles2 ibus
+   jpeg +libinput +png tslib tuio +udev vnc +xcb"
+REQUIRED_USE="
+   || ( eglfs xcb )
+   accessibility? ( dbus xcb )
+   eglfs? ( egl )
+   ibus? ( dbus )
+   libinput? ( udev )
+   xcb? ( gles2? ( egl ) )
+"
+
+RDEPEND="
+   dev-libs/glib:2
+   ~dev-qt/qtcore-${PV}
+   media-libs/fontconfig
+   >=media-libs/freetype-2.6.1:2
+   >=media-libs/harfbuzz-1.6.0:=
+   >=sys-libs/zlib-1.2.5
+   virtual/opengl
+   dbus? ( ~dev-qt/qtdbus-${PV} )
+   egl? ( media-libs/mesa[egl] )
+   eglfs? (
+   media-libs/mesa[gbm]
+   x11-libs/libdrm
+   )
+   evdev? ( sys-libs/mtdev )
+   gles2? ( media-libs/mesa[gles2] )
+   jpeg? ( virtual/jpeg:0 )
+   libinput? (
+   dev-libs/libinput:=
+   x11-libs/libxkbcommon
+   )
+   png? ( media-libs/libpng:0= )
+   tslib? ( x11-libs/tslib )
+   tuio? ( ~dev-qt/qtnetwork-${PV} )
+   udev? ( virtual/libudev:= )
+   vnc? ( ~dev-qt/qtnetwork-${PV} )
+   xcb? (
+   x11-libs/libICE
+   x11-libs/libSM
+   x11-libs/libX11
+   >=x11-libs/libXi-1.7.5
+   >=x11-libs/libxcb-1.10:=[xkb]
+   >=x11-libs/libxkbcommon-0.4.1[X]
+   

[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/

2018-02-22 Thread Andreas Sturmlechner
commit: 037aded72a13031ce659eaaf6a40c43d2e5e3380
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Thu Feb 22 09:37:12 2018 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Thu Feb 22 20:08:42 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=037aded7

dev-qt/qtgui: Bail if cached shader fails to load

Qt-Bug: https://bugreports.qt.io/browse/QTBUG-66420
See also: https://codereview.qt-project.org/#/c/221098
Package-Manager: Portage-2.3.24, Repoman-2.3.6

 dev-qt/qtgui/files/qtgui-5.9.4-opengl.patch |  87 ++
 dev-qt/qtgui/qtgui-5.9.4-r3.ebuild  | 175 
 2 files changed, 262 insertions(+)

diff --git a/dev-qt/qtgui/files/qtgui-5.9.4-opengl.patch 
b/dev-qt/qtgui/files/qtgui-5.9.4-opengl.patch
new file mode 100644
index 000..2a447414c21
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-5.9.4-opengl.patch
@@ -0,0 +1,87 @@
+From b63aeba4a88088c7de61c1664a510c02d38ade84 Mon Sep 17 00:00:00 2001
+From: Antonio Larrosa 
+Date: Fri, 16 Feb 2018 13:18:42 +0100
+Subject: [PATCH] opengl: Bail if cached shader fails to load
+
+QOpenGLProgramBinaryCache::setProgramBinary() should check
+GL_LINK_STATUS after glProgramBinary(), but doesn't.
+
+In practice, this means that SDDM is a white screen, and KDE is just
+a gray task bar.
+
+So far, Qt tries to check this using its internal ::link() function.
+But in case the cached binary fails to load, Qt currently attempts to
+link the inexistent program, resulting in a zero-length, fixed
+pipeline shader.
+
+Checking this already in ::setProgramBinary() makes the call to
+::link() superfluous, so we remove that as well.
+
+Done-with: Max Staudt 
+Done-with: Michal Srb 
+Done-with: Fabian Vogt 
+Task-number: QTBUG-66420
+Change-Id: Iabb51d0eb2c0c16bde696efff623e57d15f28d82
+Reviewed-by: Jesus Fernandez 
+Reviewed-by: Laszlo Agocs 
+(cherry picked from commit fa091640134b3ff99a9eb92df8286d15203122bf)
+---
+ src/gui/opengl/qopenglprogrambinarycache.cpp | 20 ++--
+ src/gui/opengl/qopenglshaderprogram.cpp  |  8 +---
+ 2 files changed, 19 insertions(+), 9 deletions(-)
+
+diff --git a/src/gui/opengl/qopenglprogrambinarycache.cpp 
b/src/gui/opengl/qopenglprogrambinarycache.cpp
+index 06373e1..d16173d 100644
+--- a/src/gui/opengl/qopenglprogrambinarycache.cpp
 b/src/gui/opengl/qopenglprogrambinarycache.cpp
+@@ -161,10 +161,26 @@ bool QOpenGLProgramBinaryCache::setProgramBinary(uint 
programId, uint blobFormat
+ QOpenGLExtraFunctions *funcs = 
QOpenGLContext::currentContext()->extraFunctions();
+ while (funcs->glGetError() != GL_NO_ERROR) { }
+ funcs->glProgramBinary(programId, blobFormat, p, blobSize);
+-int err = funcs->glGetError();
++
++GLenum err = funcs->glGetError();
++if (err != GL_NO_ERROR) {
++qCDebug(DBG_SHADER_CACHE, "Program binary failed to load for program 
%u, size %d, "
++  "format 0x%x, err = 0x%x",
++programId, blobSize, blobFormat, err);
++return false;
++}
++GLint linkStatus = 0;
++funcs->glGetProgramiv(programId, GL_LINK_STATUS, );
++if (linkStatus != GL_TRUE) {
++qCDebug(DBG_SHADER_CACHE, "Program binary failed to load for program 
%u, size %d, "
++  "format 0x%x, linkStatus = 0x%x, err = 
0x%x",
++programId, blobSize, blobFormat, linkStatus, err);
++return false;
++}
++
+ qCDebug(DBG_SHADER_CACHE, "Program binary set for program %u, size %d, 
format 0x%x, err = 0x%x",
+ programId, blobSize, blobFormat, err);
+-return err == 0;
++return true;
+ }
+ 
+ #ifdef Q_OS_UNIX
+diff --git a/src/gui/opengl/qopenglshaderprogram.cpp 
b/src/gui/opengl/qopenglshaderprogram.cpp
+index cc8af16..3b82bac 100644
+--- a/src/gui/opengl/qopenglshaderprogram.cpp
 b/src/gui/opengl/qopenglshaderprogram.cpp
+@@ -3824,13 +3824,7 @@ bool QOpenGLShaderProgramPrivate::linkBinary()
+ bool needsCompile = true;
+ if (binCache.load(cacheKey, q->programId())) {
+ qCDebug(DBG_SHADER_CACHE, "Program binary received from cache");
+-linkBinaryRecursion = true;
+-bool ok = q->link();
+-linkBinaryRecursion = false;
+-if (ok)
+-needsCompile = false;
+-else
+-qCDebug(DBG_SHADER_CACHE, "Link failed after glProgramBinary");
++needsCompile = false;
+ }
+ 
+ bool needsSave = false;
+-- 
+2.7.4
+

diff --git a/dev-qt/qtgui/qtgui-5.9.4-r3.ebuild 
b/dev-qt/qtgui/qtgui-5.9.4-r3.ebuild
new file mode 100644
index 000..91c5ac088c3
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-5.9.4-r3.ebuild
@@ -0,0 +1,175 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="The GUI 

[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/

2018-02-07 Thread Andreas Sturmlechner
commit: fbc5f96d8e4520254f41f380b7f603495231fb1a
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Wed Feb  7 15:56:18 2018 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Thu Feb  8 00:01:13 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fbc5f96d

dev-qt/qtgui: Fix libinput wheelevents

Patch taken from 5.9 branch (fixed in 5.9.5).

KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=386762
Qt-Bug: https://bugreports.qt.io/browse/QTBUG-59261
See also: https://codereview.qt-project.org/#/c/212398/

Package-Manager: Portage-2.3.24, Repoman-2.3.6
Closes: https://github.com/gentoo/gentoo/pull/7109

 .../files/qtgui-5.9.4-libinput-pixeldelta.patch|  68 
 dev-qt/qtgui/qtgui-5.9.4-r2.ebuild | 174 +
 2 files changed, 242 insertions(+)

diff --git a/dev-qt/qtgui/files/qtgui-5.9.4-libinput-pixeldelta.patch 
b/dev-qt/qtgui/files/qtgui-5.9.4-libinput-pixeldelta.patch
new file mode 100644
index 000..b9adb8b2f62
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-5.9.4-libinput-pixeldelta.patch
@@ -0,0 +1,68 @@
+From d196036024697a75868c1f1626525710495ca428 Mon Sep 17 00:00:00 2001
+From: Allan Sandfeld Jensen 
+Date: Thu, 23 Nov 2017 14:25:04 +0100
+Subject: [PATCH] Avoid providing bad pixelDeltas on X11
+
+With libinput we now get a hardcoded resolution that is unrelated to
+the hardware. So avoid using that as a real pixel delta and document
+pixel deltas as being driver specific and unreliable on X11.
+
+Task-number: QTBUG-59261
+Change-Id: I9fe86d80e7ccd290ed2e4091d7eafa52cb537d34
+Reviewed-by: David Edmundson 
+Reviewed-by: Marco Martin 
+Reviewed-by: Gatis Paeglis 
+---
+ src/gui/kernel/qevent.cpp|  1 +
+ src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | 14 --
+ 2 files changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
+index 06d52aa..c68f9af 100644
+--- a/src/gui/kernel/qevent.cpp
 b/src/gui/kernel/qevent.cpp
+@@ -971,6 +971,7 @@ QWheelEvent::QWheelEvent(const QPointF , const 
QPointF& globalPos,
+ \li scrolling is about to begin, but the distance did not yet change 
(Qt::ScrollBegin),
+ \li or scrolling has ended and the distance did not change anymore 
(Qt::ScrollEnd).
+ \endlist
++\note On X11 this value is driver specific and unreliable, use 
angleDelta() instead
+ */
+ 
+ /*!
+diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp 
b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
+index d1d97af..94f543f 100644
+--- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
 b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
+@@ -953,10 +953,12 @@ void QXcbConnection::xi2HandleScrollEvent(void *event, 
ScrollingDevice 
+ double delta = scrollingDevice.lastScrollPosition.y() - 
value;
+ scrollingDevice.lastScrollPosition.setY(value);
+ angleDelta.setY((delta / 
scrollingDevice.verticalIncrement) * 120);
+-// We do not set "pixel" delta if it is only measured in 
ticks.
+-if (scrollingDevice.verticalIncrement > 1)
++// With most drivers the increment is 1 for wheels.
++// For libinput it is hardcoded to a useless 15.
++// For a proper touchpad driver it should be in the same 
order of magnitude as 120
++if (scrollingDevice.verticalIncrement > 15)
+ rawDelta.setY(delta);
+-else if (scrollingDevice.verticalIncrement < -1)
++else if (scrollingDevice.verticalIncrement < -15)
+ rawDelta.setY(-delta);
+ }
+ }
+@@ -965,10 +967,10 @@ void QXcbConnection::xi2HandleScrollEvent(void *event, 
ScrollingDevice 
+ double delta = scrollingDevice.lastScrollPosition.x() - 
value;
+ scrollingDevice.lastScrollPosition.setX(value);
+ angleDelta.setX((delta / 
scrollingDevice.horizontalIncrement) * 120);
+-// We do not set "pixel" delta if it is only measured in 
ticks.
+-if (scrollingDevice.horizontalIncrement > 1)
++// See comment under vertical
++if (scrollingDevice.horizontalIncrement > 15)
+ rawDelta.setX(delta);
+-else if (scrollingDevice.horizontalIncrement < -1)
++else if (scrollingDevice.horizontalIncrement < -15)
+ rawDelta.setX(-delta);
+ }
+ }
+-- 
+2.7.4
+

diff --git a/dev-qt/qtgui/qtgui-5.9.4-r2.ebuild 
b/dev-qt/qtgui/qtgui-5.9.4-r2.ebuild
new file mode 100644
index 000..35f85253ada
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-5.9.4-r2.ebuild
@@ -0,0 +1,174 @@
+# Copyright 

[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/

2017-06-10 Thread Andreas Sturmlechner
commit: 7fcf911785efe14cd9d217bfb3c8f1613b2ba6ea
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Fri Jun  9 19:41:32 2017 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Sat Jun 10 05:59:30 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7fcf9117

dev-qt/qtgui: Fix QClipboard behaviour on XCB

This fix is also in 5.6.3 and >=5.8.0.

See also:
https://bugreports.qt.io/browse/QTBUG-56972
https://bugs.kde.org/show_bug.cgi?id=348390

Package-Manager: Portage-2.3.5, Repoman-2.3.1

 dev-qt/qtgui/files/qtgui-5.7.1-qclipboard.patch |  39 ++
 dev-qt/qtgui/qtgui-5.7.1-r1.ebuild  | 176 
 2 files changed, 215 insertions(+)

diff --git a/dev-qt/qtgui/files/qtgui-5.7.1-qclipboard.patch 
b/dev-qt/qtgui/files/qtgui-5.7.1-qclipboard.patch
new file mode 100644
index 000..42ee58b611f
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-5.7.1-qclipboard.patch
@@ -0,0 +1,39 @@
+From 291eba6f8099a0fec8fbd9cf8a1fb67e5c9f4f8d Mon Sep 17 00:00:00 2001
+From: Palo Kisa 
+Date: Mon, 7 Nov 2016 18:27:17 +0100
+Subject: QClipboard: Fix emitting changed() in XCB
+
+In XCB environment the QClipboard::changed() was not delivered if the
+QClipboard::clear() was issued by other Qt app/process.
+
+If the QClipboard::clear() is used, then the owner in
+xcb_xfixes_selection_notify_event_t is XCB_NONE, so we need make the
+decission to handle this event by the selection_timestamp and our
+m_timestamp[mode].
+
+Task-number: QTBUG-56972
+Change-Id: If4c486ac02223eac506465cac7ff1a07bd02a187
+Reviewed-by: Lars Knoll 
+---
+ src/plugins/platforms/xcb/qxcbclipboard.cpp | 6 --
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/plugins/platforms/xcb/qxcbclipboard.cpp 
b/src/plugins/platforms/xcb/qxcbclipboard.cpp
+index d44ebae..40abef4 100644
+--- a/src/plugins/platforms/xcb/qxcbclipboard.cpp
 b/src/plugins/platforms/xcb/qxcbclipboard.cpp
+@@ -723,8 +723,10 @@ void 
QXcbClipboard::handleXFixesSelectionRequest(xcb_xfixes_selection_notify_eve
+ if (mode > QClipboard::Selection)
+ return;
+ 
+-// here we care only about the xfixes events that come from non Qt 
processes
+-if (event->owner != XCB_NONE && event->owner != owner()) {
++// Note1: Here we care only about the xfixes events that come from other 
processes.
++// Note2: If the QClipboard::clear() is issued, event->owner is XCB_NONE,
++// so we check selection_timestamp to not handle our own 
QClipboard::clear().
++if (event->owner != owner() && event->selection_timestamp > 
m_timestamp[mode]) {
+ if (!m_xClipboard[mode]) {
+ m_xClipboard[mode].reset(new QXcbClipboardMime(mode, this));
+ } else {
+-- 
+cgit v1.0-4-g1e03

diff --git a/dev-qt/qtgui/qtgui-5.7.1-r1.ebuild 
b/dev-qt/qtgui/qtgui-5.7.1-r1.ebuild
new file mode 100644
index 000..4f6524102f5
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-5.7.1-r1.ebuild
@@ -0,0 +1,176 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="The GUI module and platform plugins for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+   KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86"
+fi
+
+# TODO: linuxfb
+
+IUSE="accessibility dbus egl eglfs evdev +gif gles2 gtk
+   ibus jpeg libinput +png tslib tuio +udev +xcb"
+REQUIRED_USE="
+   || ( eglfs xcb )
+   accessibility? ( dbus xcb )
+   eglfs? ( egl )
+   ibus? ( dbus )
+   libinput? ( udev )
+   xcb? ( gles2? ( egl ) )
+"
+
+RDEPEND="
+   dev-libs/glib:2
+   ~dev-qt/qtcore-${PV}
+   media-libs/fontconfig
+   >=media-libs/freetype-2.6.1:2
+   >=media-libs/harfbuzz-1.0.6:=
+   >=sys-libs/zlib-1.2.5
+   virtual/opengl
+   dbus? ( ~dev-qt/qtdbus-${PV} )
+   egl? ( media-libs/mesa[egl] )
+   eglfs? (
+   media-libs/mesa[gbm]
+   x11-libs/libdrm
+   )
+   evdev? ( sys-libs/mtdev )
+   gtk? (
+   x11-libs/gtk+:3
+   x11-libs/libX11
+   x11-libs/pango
+   !!x11-libs/cairo[qt4]
+   )
+   gles2? ( media-libs/mesa[gles2] )
+   jpeg? ( virtual/jpeg:0 )
+   libinput? (
+   dev-libs/libinput:=
+   x11-libs/libxkbcommon
+   )
+   png? ( media-libs/libpng:0= )
+   tslib? ( x11-libs/tslib )
+   tuio? ( ~dev-qt/qtnetwork-${PV} )
+   udev? ( virtual/libudev:= )
+   xcb? (
+   x11-libs/libICE
+   x11-libs/libSM
+   x11-libs/libX11
+   >=x11-libs/libXi-1.7.4
+   x11-libs/libXrender
+   >=x11-libs/libxcb-1.10:=[xkb]
+   >=x11-libs/libxkbcommon-0.4.1[X]
+   x11-libs/xcb-util-image
+   x11-libs/xcb-util-keysyms
+   

[gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/

2016-02-14 Thread Michael Palimaka
commit: 293c6581f8173670b09ad92c903c4866565652a1
Author: Michael Palimaka  gentoo  org>
AuthorDate: Sun Feb 14 16:28:18 2016 +
Commit: Michael Palimaka  gentoo  org>
CommitDate: Sun Feb 14 16:29:15 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=293c6581

dev-qt/qtgui: backport patch from upstream resolving crash

Gentoo-bug: 574636

Package-Manager: portage-2.2.27

 dev-qt/qtgui/files/qtgui-5.5.1-crash.patch |  34 ++
 dev-qt/qtgui/qtgui-5.5.1-r1.ebuild | 171 +
 2 files changed, 205 insertions(+)

diff --git a/dev-qt/qtgui/files/qtgui-5.5.1-crash.patch 
b/dev-qt/qtgui/files/qtgui-5.5.1-crash.patch
new file mode 100644
index 000..a2b8e62
--- /dev/null
+++ b/dev-qt/qtgui/files/qtgui-5.5.1-crash.patch
@@ -0,0 +1,34 @@
+From 79447068579ea93d616d840bb8cbbf8adb1ed6ec Mon Sep 17 00:00:00 2001
+From: Nicolas Capens 
+Date: Tue, 10 Nov 2015 00:03:34 -0500
+Subject: Fix potential division by zero.
+
+In a Chrome Remote Desktop session the htotal and/or vtotal timings
+can be zero and lead to a SIGFPE exception.
+
+Task-number: QTBUG-49322
+Change-Id: Id530335cc760d1938ed888ad095427fcf32c651d
+Reviewed-by: Oswald Buddenhagen 
+Reviewed-by: Nicolas Capens 
+Reviewed-by: Gatis Paeglis 
+---
+ src/plugins/platforms/xcb/qxcbscreen.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp 
b/src/plugins/platforms/xcb/qxcbscreen.cpp
+index 2a53b18..0e99d58 100644
+--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
 b/src/plugins/platforms/xcb/qxcbscreen.cpp
+@@ -558,7 +558,8 @@ void QXcbScreen::updateRefreshRate(xcb_randr_mode_t mode)
+ for (; modesIter.rem; xcb_randr_mode_info_next()) {
+ xcb_randr_mode_info_t *modeInfo = modesIter.data;
+ if (modeInfo->id == mode) {
+-m_refreshRate = modeInfo->dot_clock / (modeInfo->htotal * 
modeInfo->vtotal);
++const uint32_t dotCount = modeInfo->htotal * modeInfo->vtotal;
++m_refreshRate = (dotCount != 0) ? modeInfo->dot_clock / 
dotCount : 0;
+ m_mode = mode;
+ break;
+ }
+-- 
+cgit v0.11.0
+

diff --git a/dev-qt/qtgui/qtgui-5.5.1-r1.ebuild 
b/dev-qt/qtgui/qtgui-5.5.1-r1.ebuild
new file mode 100644
index 000..2bf7dd1
--- /dev/null
+++ b/dev-qt/qtgui/qtgui-5.5.1-r1.ebuild
@@ -0,0 +1,171 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="The GUI module and platform plugins for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+   KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~x86"
+fi
+
+# TODO: directfb, linuxfb, kms integration in eglfs
+
+IUSE="accessibility dbus egl eglfs evdev +gif gles2 gtkstyle
+   ibus jpeg libinput +png tslib tuio +udev +xcb"
+REQUIRED_USE="
+   || ( eglfs xcb )
+   accessibility? ( dbus xcb )
+   eglfs? ( egl )
+   ibus? ( dbus )
+   libinput? ( udev )
+   xcb? ( gles2? ( egl ) )
+"
+
+RDEPEND="
+   dev-libs/glib:2
+   ~dev-qt/qtcore-${PV}
+   media-libs/fontconfig
+   >=media-libs/freetype-2.5.5:2
+   >=media-libs/harfbuzz-0.9.40:=
+   >=sys-libs/zlib-1.2.5
+   virtual/opengl
+   dbus? ( ~dev-qt/qtdbus-${PV} )
+   egl? ( media-libs/mesa[egl] )
+   evdev? ( sys-libs/mtdev )
+   gtkstyle? (
+   x11-libs/gtk+:2
+   x11-libs/pango
+   !!x11-libs/cairo[qt4]
+   )
+   gles2? ( media-libs/mesa[gles2] )
+   jpeg? ( virtual/jpeg:0 )
+   libinput? (
+   dev-libs/libinput:=
+   x11-libs/libxkbcommon
+   )
+   png? ( media-libs/libpng:0= )
+   tslib? ( x11-libs/tslib )
+   tuio? ( ~dev-qt/qtnetwork-${PV} )
+   udev? ( virtual/libudev:= )
+   xcb? (
+   x11-libs/libICE
+   x11-libs/libSM
+   x11-libs/libX11
+   >=x11-libs/libXi-1.7.4
+   x11-libs/libXrender
+   >=x11-libs/libxcb-1.10:=[xkb]
+   >=x11-libs/libxkbcommon-0.4.1[X]
+   x11-libs/xcb-util-image
+   x11-libs/xcb-util-keysyms
+   x11-libs/xcb-util-renderutil
+   x11-libs/xcb-util-wm
+   )
+"
+DEPEND="${RDEPEND}
+   evdev? ( sys-kernel/linux-headers )
+   udev? ( sys-kernel/linux-headers )
+"
+PDEPEND="
+   ibus? ( app-i18n/ibus )
+"
+
+PATCHES=(
+   "${FILESDIR}/${P}-crash.patch" # bug 574636
+)
+
+QT5_TARGET_SUBDIRS=(
+   src/gui
+   src/openglextensions
+   src/platformheaders
+   src/platformsupport
+   src/plugins/generic
+   src/plugins/imageformats
+   src/plugins/platforms
+   src/plugins/platforminputcontexts
+