summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD8
-rw-r--r--qt4-gcc9.patch46
3 files changed, 55 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 57d9f09d04fc..5df83a429a31 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = qt4
pkgdesc = A cross-platform application and UI framework
pkgver = 4.8.7
- pkgrel = 29
+ pkgrel = 30
url = https://www.qt.io
arch = x86_64
license = GPL3
@@ -55,6 +55,7 @@ pkgbase = qt4
source = l-qclipboard_delay.patch
source = qt4-gcc6.patch
source = qt4-gcc8.patch
+ source = qt4-gcc9.patch
source = qt4-glibc-2.25.patch
source = qt4-icu59.patch
source = qt4-openssl-1.1.patch
@@ -74,6 +75,7 @@ pkgbase = qt4
sha256sums = af3648ddb2372333b0e428788fd2ffbcfe571653fb46f898a55ae5a202f7e242
sha256sums = 51da49e41edac66559d3ec8dd0a152995a51a53e5d1f63f09fa089a8af7e3112
sha256sums = 0497411e54a0461f76ffa204236f5146a2ed0d272ae66afcfabd74090459208b
+ sha256sums = 8d6104d7bc3b050ec87e82b9df245154cd1d80e03eb3bbe633084d6b3c079d5e
sha256sums = e6555f4a681227447e94e9f14e11626d50b7e5108aad06088311e87063bc0347
sha256sums = 61d6bf45649c728dec5f8d22be5b496ed9d40f52c2c70102696d07133cd1750d
sha256sums = ff3ddb5428cd2ff243558dc0c75b35f470077e9204bbc989ddcba04c866c1b68
diff --git a/PKGBUILD b/PKGBUILD
index c8715668e16e..24cf95c8a68c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=qt4
pkgver=4.8.7
-pkgrel=29
+pkgrel=30
arch=('x86_64')
url='https://www.qt.io'
license=('GPL3' 'LGPL' 'FDL' 'custom')
@@ -37,7 +37,7 @@ source=("https://download.qt.io/archive/qt/4.8/${pkgver}/${_pkgfqn}.tar.gz"
'disable-sslv3.patch'
'l-qclipboard_fix_recursive.patch'
'l-qclipboard_delay.patch'
- 'qt4-gcc6.patch' 'qt4-gcc8.patch' 'qt4-glibc-2.25.patch' 'qt4-icu59.patch' 'qt4-openssl-1.1.patch')
+ 'qt4-gcc6.patch' 'qt4-gcc8.patch' 'qt4-gcc9.patch' 'qt4-glibc-2.25.patch' 'qt4-icu59.patch' 'qt4-openssl-1.1.patch')
sha256sums=('e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0'
'157eb47865f0b43e4717819783823c569127a2e9fc48309982ca0f2b753517a1'
'd63f22858174489068c30a12b9115d1b4e23ade00c31c117513212e9a225c1ce'
@@ -54,6 +54,7 @@ sha256sums=('e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0'
'af3648ddb2372333b0e428788fd2ffbcfe571653fb46f898a55ae5a202f7e242'
'51da49e41edac66559d3ec8dd0a152995a51a53e5d1f63f09fa089a8af7e3112'
'0497411e54a0461f76ffa204236f5146a2ed0d272ae66afcfabd74090459208b'
+ '8d6104d7bc3b050ec87e82b9df245154cd1d80e03eb3bbe633084d6b3c079d5e'
'e6555f4a681227447e94e9f14e11626d50b7e5108aad06088311e87063bc0347'
'61d6bf45649c728dec5f8d22be5b496ed9d40f52c2c70102696d07133cd1750d'
'ff3ddb5428cd2ff243558dc0c75b35f470077e9204bbc989ddcba04c866c1b68')
@@ -98,6 +99,9 @@ prepare() {
# Fix build with GCC-8.3
patch -Np0 -i "$srcdir"/qt4-gcc8.patch
+ # Fix build with GCC9
+ patch -Np0 -i "$srcdir"/qt4-gcc9.patch
+
# Fix build of Qt4 applications with glibc 2.25 (Fedora)
patch -p1 -i "$srcdir"/qt4-glibc-2.25.patch
diff --git a/qt4-gcc9.patch b/qt4-gcc9.patch
new file mode 100644
index 000000000000..28bbcd2d3eae
--- /dev/null
+++ b/qt4-gcc9.patch
@@ -0,0 +1,46 @@
+--- src/corelib/global/qglobal.h 2015-05-07 17:14:48.000000000 +0300
++++ src/corelib/global/qglobal.h 2019-05-28 20:04:15.689744432 +0300
+@@ -2480,26 +2480,35 @@
+ typedef uint Flags;
+ #define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
+
+ #endif /* Q_NO_TYPESAFE_FLAGS */
+
+-#if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && !defined(Q_CC_RVCT)
++#if defined(Q_CC_GNU) && !defined(Q_CC_RVCT)
+ /* make use of typeof-extension */
+ template <typename T>
+ class QForeachContainer {
+ public:
+- inline QForeachContainer(const T& t) : c(t), brk(0), i(c.begin()), e(c.end()) { }
++ inline QForeachContainer(const T& t) : c(t), i(c.begin()), e(c.end()), control(1) { }
+ const T c;
+- int brk;
+ typename T::const_iterator i, e;
++ int control;
+ };
+
+-#define Q_FOREACH(variable, container) \
+-for (QForeachContainer<__typeof__(container)> _container_(container); \
+- !_container_.brk && _container_.i != _container_.e; \
+- __extension__ ({ ++_container_.brk; ++_container_.i; })) \
+- for (variable = *_container_.i;; __extension__ ({--_container_.brk; break;}))
++// Explanation of the control word:
++// - it's initialized to 1
++// - that means both the inner and outer loops start
++// - if there were no breaks, at the end of the inner loop, it's set to 0, which
++// causes it to exit (the inner loop is run exactly once)
++// - at the end of the outer loop, it's inverted, so it becomes 1 again, allowing
++// the outer loop to continue executing
++// - if there was a break inside the inner loop, it will exit with control still
++// set to 1; in that case, the outer loop will invert it to 0 and will exit too
++#define Q_FOREACH(variable, container) \
++for (QForeachContainer<__typeof__(container)> _container_(container); \
++ _container_.control && _container_.i != _container_.e; \
++ ++_container_.i, _container_.control ^= 1) \
++for (variable = *_container_.i; _container_.control; _container_.control = 0)
+
+ #else
+
+ struct QForeachContainerBase {};
+