backport fix for older compilers (aka rhel6)

This commit is contained in:
Rex Dieter 2016-01-28 13:15:23 -06:00
parent 88a1dceba0
commit df27ad1199
2 changed files with 75 additions and 1 deletions

View File

@ -17,7 +17,7 @@
Summary: Qt5 - QtDeclarative component Summary: Qt5 - QtDeclarative component
Name: qt5-%{qt_module} Name: qt5-%{qt_module}
Version: 5.6.0 Version: 5.6.0
Release: 0.6.%{prerelease}%{?dist} Release: 0.7.%{prerelease}%{?dist}
# See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details
License: LGPLv2 with exceptions or GPLv3 with exceptions License: LGPLv2 with exceptions or GPLv3 with exceptions
@ -37,6 +37,9 @@ Patch1: qtdeclarative-opensource-src-5.5.0-no_sse2.patch
# https://bugs.kde.org/show_bug.cgi?id=348385 # https://bugs.kde.org/show_bug.cgi?id=348385
Patch2: qtdeclarative-QQuickShaderEffectSource_deadlock.patch Patch2: qtdeclarative-QQuickShaderEffectSource_deadlock.patch
# backport fix for older compilers (aka rhel6)
Patch3: qtdeclarative-c++11.patch
Obsoletes: qt5-qtjsbackend < 5.2.0 Obsoletes: qt5-qtjsbackend < 5.2.0
BuildRequires: qt5-qtbase-devel >= %{version} BuildRequires: qt5-qtbase-devel >= %{version}
@ -85,6 +88,8 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
%setup -q -n %{qt_module}-opensource-src-%{version}%{?prerelease:-%{prerelease}} %setup -q -n %{qt_module}-opensource-src-%{version}%{?prerelease:-%{prerelease}}
%patch1 -p1 -b .no_sse2 %patch1 -p1 -b .no_sse2
%patch2 -p1 -b .QQuickShaderEffectSource_deadlock %patch2 -p1 -b .QQuickShaderEffectSource_deadlock
%patch3 -p1 -b .c++11
%build %build
mkdir %{_target_platform} mkdir %{_target_platform}
@ -209,6 +214,9 @@ popd
%changelog %changelog
* Thu Jan 28 2016 Rex Dieter <rdieter@fedoraproject.org> 5.6.0-0.7.beta
- backport fix for older compilers (aka rhel6)
* Sun Jan 17 2016 Rex Dieter <rdieter@fedoraproject.org> 5.6.0-0.6.beta * Sun Jan 17 2016 Rex Dieter <rdieter@fedoraproject.org> 5.6.0-0.6.beta
- use %%license - use %%license

66
qtdeclarative-c++11.patch Normal file
View File

@ -0,0 +1,66 @@
From 187a5b0c6e74e0109e4ec257104428a3c87fb52f Mon Sep 17 00:00:00 2001
From: Marco Benelli <marco.benelli@theqtcompany.com>
Date: Wed, 27 Jan 2016 09:18:02 +0100
Subject: [PATCH] qmlimportscanner: do not use local predicates.
Some (?) pre C++11 compilers are not able to resolve template arguments
for std::find_if when the predicates are local to the function.
Change-Id: I1e5c4adc3409bd32081ddedff158ab9dcc2eaa9a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
---
tools/qmlimportscanner/main.cpp | 31 ++++++++++++++++++-------------
1 file changed, 18 insertions(+), 13 deletions(-)
diff --git a/tools/qmlimportscanner/main.cpp b/tools/qmlimportscanner/main.cpp
index b16253a..189459f 100644
--- a/tools/qmlimportscanner/main.cpp
+++ b/tools/qmlimportscanner/main.cpp
@@ -344,6 +344,24 @@ QVariantList mergeImports(const QVariantList &a, const QVariantList &b)
return merged;
}
+// Predicates needed by findQmlImportsInDirectory.
+
+struct isMetainfo {
+ bool operator() (const QFileInfo &x) const {
+ return x.suffix() == QLatin1String("metainfo");
+ }
+};
+
+struct pathStartsWith {
+ pathStartsWith(const QString &path) : _path(path) {}
+ bool operator() (const QString &x) const {
+ return _path.startsWith(x);
+ }
+ const QString _path;
+};
+
+
+
// Scan all qml files in directory for import statements
QVariantList findQmlImportsInDirectory(const QString &qmlDir)
{
@@ -353,19 +371,6 @@ QVariantList findQmlImportsInDirectory(const QString &qmlDir)
QDirIterator iterator(qmlDir, QDir::AllDirs | QDir::NoDotDot, QDirIterator::Subdirectories);
QStringList blacklist;
- struct isMetainfo {
- bool operator() (const QFileInfo &x) const {
- return x.suffix() == QLatin1String("metainfo");
- }
- };
- struct pathStartsWith {
- pathStartsWith(const QString &path) : _path(path) {}
- bool operator() (const QString &x) const {
- return _path.startsWith(x);
- }
- const QString _path;
- };
-
while (iterator.hasNext()) {
iterator.next();
--
1.9.3