commit:     92d54be896563102786238893a9c645b8bdb43ef
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 13 11:37:36 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Feb 13 11:37:59 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92d54be8

dev-qt/qtcore: Fix headers for revdeps building with GCC-11

Closes: https://bugs.gentoo.org/768342
Closes: https://bugs.gentoo.org/768354
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 dev-qt/qtcore/files/qtcore-5.15.2-gcc11.patch | 38 +++++++++++++++++++++++++++
 dev-qt/qtcore/qtcore-5.15.2-r2.ebuild         |  1 +
 2 files changed, 39 insertions(+)

diff --git a/dev-qt/qtcore/files/qtcore-5.15.2-gcc11.patch 
b/dev-qt/qtcore/files/qtcore-5.15.2-gcc11.patch
new file mode 100644
index 00000000000..9d391311c34
--- /dev/null
+++ b/dev-qt/qtcore/files/qtcore-5.15.2-gcc11.patch
@@ -0,0 +1,38 @@
+Description: include <limits> to fix some GCC 11 build issues
+Origin: upstream, commits:
+ https://code.qt.io/cgit/qt/qtbase.git/commit/?id=813a928c7c3cf986
+ https://code.qt.io/cgit/qt/qtbase.git/commit/?id=9c56d4da2ff631a8
+Last-Update: 2021-01-26
+
+--- a/src/corelib/global/qendian.h
++++ b/src/corelib/global/qendian.h
+@@ -44,6 +44,8 @@
+ #include <QtCore/qfloat16.h>
+ #include <QtCore/qglobal.h>
+ 
++#include <limits>
++
+ // include stdlib.h and hope that it defines __GLIBC__ for glibc-based systems
+ #include <stdlib.h>
+ #include <string.h>
+--- a/src/corelib/global/qfloat16.h
++++ b/src/corelib/global/qfloat16.h
+@@ -43,6 +43,7 @@
+ 
+ #include <QtCore/qglobal.h>
+ #include <QtCore/qmetatype.h>
++#include <limits>
+ #include <string.h>
+ 
+ #if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__AVX2__) && 
!defined(__F16C__)
+--- a/src/corelib/text/qbytearraymatcher.h
++++ b/src/corelib/text/qbytearraymatcher.h
+@@ -42,6 +42,8 @@
+ 
+ #include <QtCore/qbytearray.h>
+ 
++#include <limits>
++
+ QT_BEGIN_NAMESPACE
+ 
+ 

diff --git a/dev-qt/qtcore/qtcore-5.15.2-r2.ebuild 
b/dev-qt/qtcore/qtcore-5.15.2-r2.ebuild
index e3a3aa50ca1..ed1722052c4 100644
--- a/dev-qt/qtcore/qtcore-5.15.2-r2.ebuild
+++ b/dev-qt/qtcore/qtcore-5.15.2-r2.ebuild
@@ -52,6 +52,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-5.15.1-timezone-{1,2}.patch # bug 737914
        "${FILESDIR}"/${P}-fix-UB-in-QDateTime.patch # QTBUG-88656
        "${FILESDIR}"/${P}-fix-alloc-mem-of-QByteArray.patch # QTBUG-87010
+       "${FILESDIR}"/${P}-gcc11.patch # bug 768342, 768354
        "${WORKDIR}"/qtbase-${PV}-gcc11.patch # bug 752012
 )
 

Reply via email to