summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-01-31 22:22:41 -0800
committerMartin Jansa <Martin.Jansa@gmail.com>2019-02-14 17:40:27 +0000
commit6713882563f4622ac92b87b4e95830b2556284bf (patch)
tree5274cab0bce7dbbc491b8a61f2f9e486a7804e34
parent9a83f2d9a69988c2805003a5f9e26e1038deface (diff)
downloadmeta-qt5-6713882563f4622ac92b87b4e95830b2556284bf.tar.gz
maliit-framework,maliit-plugins: Fix build with libc++
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--recipes-qt/maliit/maliit-framework-qt5/0001-Drop-tr1-namespace-its-not-there-in-c-11-and-newer.patch83
-rw-r--r--recipes-qt/maliit/maliit-framework-qt5_git.bb1
-rw-r--r--recipes-qt/maliit/maliit-plugins-qt5/0001-Do-not-use-tr1-namespace.patch58
-rw-r--r--recipes-qt/maliit/maliit-plugins-qt5_git.bb4
4 files changed, 145 insertions, 1 deletions
diff --git a/recipes-qt/maliit/maliit-framework-qt5/0001-Drop-tr1-namespace-its-not-there-in-c-11-and-newer.patch b/recipes-qt/maliit/maliit-framework-qt5/0001-Drop-tr1-namespace-its-not-there-in-c-11-and-newer.patch
new file mode 100644
index 00000000..920946ec
--- /dev/null
+++ b/recipes-qt/maliit/maliit-framework-qt5/0001-Drop-tr1-namespace-its-not-there-in-c-11-and-newer.patch
@@ -0,0 +1,83 @@
1From 60e7464fe2b75bb7187a4be0d6ba944d2b46f93e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 31 Jan 2019 22:02:32 -0800
4Subject: [PATCH] Drop tr1 namespace its not there in c++11 and newer
5
6compile as C++11 code
7libc++'s tr1 headers don't actually make a tr1 namespace.
8
9Upstream-Status: Pending
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 src/mimonscreenplugins.cpp | 10 +++++-----
13 .../ut_mimpluginmanagerconfig.cpp | 2 +-
14 .../ut_mimpluginmanagerconfig.h | 2 +-
15 3 files changed, 7 insertions(+), 7 deletions(-)
16
17diff --git a/src/mimonscreenplugins.cpp b/src/mimonscreenplugins.cpp
18index da6e937e..b830e1bf 100644
19--- a/src/mimonscreenplugins.cpp
20+++ b/src/mimonscreenplugins.cpp
21@@ -21,9 +21,9 @@
22 #include <QDebug>
23
24 #include <algorithm>
25-#include <tr1/functional>
26+#include <functional>
27
28-using namespace std::tr1::placeholders;
29+using namespace std::placeholders;
30
31 namespace
32 {
33@@ -118,10 +118,10 @@ bool MImOnScreenPlugins::isEnabled(const QString &plugin) const
34
35 std::remove_copy_if(mEnabledSubViews.begin(), mEnabledSubViews.end(),
36 std::back_inserter(mEnabledAndAvailableSubViews),
37- std::tr1::bind(&MImOnScreenPlugins::isSubViewUnavailable, this, _1));
38+ std::bind(&MImOnScreenPlugins::isSubViewUnavailable, this, _1));
39
40 return std::find_if(mEnabledAndAvailableSubViews.begin(), mEnabledAndAvailableSubViews.end(),
41- std::tr1::bind(equalPlugin, _1, plugin)) != mEnabledAndAvailableSubViews.end();
42+ std::bind(equalPlugin, _1, plugin)) != mEnabledAndAvailableSubViews.end();
43 }
44
45 bool MImOnScreenPlugins::isSubViewEnabled(const SubView &subView) const
46@@ -138,7 +138,7 @@ QList<MImOnScreenPlugins::SubView> MImOnScreenPlugins::enabledSubViews(const QSt
47 {
48 QList<MImOnScreenPlugins::SubView> result;
49 std::remove_copy_if(mEnabledSubViews.begin(), mEnabledSubViews.end(),
50- std::back_inserter(result), std::tr1::bind(notEqualPlugin, _1, plugin));
51+ std::back_inserter(result), std::bind(notEqualPlugin, _1, plugin));
52 return result;
53 }
54
55diff --git a/tests/ut_mimpluginmanagerconfig/ut_mimpluginmanagerconfig.cpp b/tests/ut_mimpluginmanagerconfig/ut_mimpluginmanagerconfig.cpp
56index dea443e3..677dd689 100644
57--- a/tests/ut_mimpluginmanagerconfig/ut_mimpluginmanagerconfig.cpp
58+++ b/tests/ut_mimpluginmanagerconfig/ut_mimpluginmanagerconfig.cpp
59@@ -39,7 +39,7 @@
60 #include "mattributeextensionmanager.h"
61 #include "msharedattributeextensionmanager.h"
62
63-using namespace std::tr1;
64+using namespace std;
65
66 typedef QSet<Maliit::HandlerState> HandlerStates;
67 Q_DECLARE_METATYPE(HandlerStates);
68diff --git a/tests/ut_mimpluginmanagerconfig/ut_mimpluginmanagerconfig.h b/tests/ut_mimpluginmanagerconfig/ut_mimpluginmanagerconfig.h
69index 5b1b691b..3ea18747 100644
70--- a/tests/ut_mimpluginmanagerconfig/ut_mimpluginmanagerconfig.h
71+++ b/tests/ut_mimpluginmanagerconfig/ut_mimpluginmanagerconfig.h
72@@ -16,7 +16,7 @@
73
74 #include "mimserveroptions.h"
75 #include "mimsettingsqsettings.h"
76-#include <tr1/memory>
77+#include <memory>
78
79 #include <QtTest/QtTest>
80 #include <QObject>
81--
822.20.1
83
diff --git a/recipes-qt/maliit/maliit-framework-qt5_git.bb b/recipes-qt/maliit/maliit-framework-qt5_git.bb
index 232e8252..308f3d02 100644
--- a/recipes-qt/maliit/maliit-framework-qt5_git.bb
+++ b/recipes-qt/maliit/maliit-framework-qt5_git.bb
@@ -10,6 +10,7 @@ SRC_URI = "git://github.com/maliit/framework.git;branch=master \
10 file://0001-Fix-MALIIT_INSTALL_PRF-to-allow-the-build-with-opene.patch \ 10 file://0001-Fix-MALIIT_INSTALL_PRF-to-allow-the-build-with-opene.patch \
11 file://maliit-server.desktop \ 11 file://maliit-server.desktop \
12 file://0001-config.pri-Use-O1-optimization-in-DEBUG-flags.patch \ 12 file://0001-config.pri-Use-O1-optimization-in-DEBUG-flags.patch \
13 file://0001-Drop-tr1-namespace-its-not-there-in-c-11-and-newer.patch \
13 " 14 "
14 15
15SRCREV = "60b1b10de14f932420313c547ab801daf522d539" 16SRCREV = "60b1b10de14f932420313c547ab801daf522d539"
diff --git a/recipes-qt/maliit/maliit-plugins-qt5/0001-Do-not-use-tr1-namespace.patch b/recipes-qt/maliit/maliit-plugins-qt5/0001-Do-not-use-tr1-namespace.patch
new file mode 100644
index 00000000..e5525379
--- /dev/null
+++ b/recipes-qt/maliit/maliit-plugins-qt5/0001-Do-not-use-tr1-namespace.patch
@@ -0,0 +1,58 @@
1From 19cc10dc4378e9eda15b58f3673f686c4ff845e2 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 31 Jan 2019 22:17:56 -0800
4Subject: [PATCH] Do not use tr1 namespace
5
6This is not a standard in C++11
7
8Upstream-Status: Pending
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 maliit-keyboard/lib/logic/layouthelper.cpp | 16 ++++++++--------
12 1 file changed, 8 insertions(+), 8 deletions(-)
13
14diff --git a/maliit-keyboard/lib/logic/layouthelper.cpp b/maliit-keyboard/lib/logic/layouthelper.cpp
15index a8bd995f..f694e819 100644
16--- a/maliit-keyboard/lib/logic/layouthelper.cpp
17+++ b/maliit-keyboard/lib/logic/layouthelper.cpp
18@@ -31,7 +31,7 @@
19 */
20
21 #include <algorithm>
22-#include <tr1/functional>
23+#include <functional>
24
25 #include "layouthelper.h"
26 #include "coreutils.h"
27@@ -76,7 +76,7 @@ struct KeyPredicate
28
29 } // namespace
30
31-typedef std::tr1::function<void(const KeyArea &, const KeyOverrides &)> EmitFunc;
32+typedef std::function<void(const KeyArea &, const KeyOverrides &)> EmitFunc;
33
34 class LayoutHelperPrivate
35 {
36@@ -468,13 +468,13 @@ void LayoutHelper::onKeysOverriden(const KeyOverrides &overriden_keys,
37 d->overriden_keys = overriden_keys;
38 }
39
40- using std::tr1::placeholders::_1;
41- using std::tr1::placeholders::_2;
42+ using std::placeholders::_1;
43+ using std::placeholders::_2;
44
45- d->overrideCheck(changed_ids, d->left, std::tr1::bind(&LayoutHelper::leftPanelChanged, this, _1, _2));
46- d->overrideCheck(changed_ids, d->right, std::tr1::bind(&LayoutHelper::rightPanelChanged, this, _1, _2));
47- d->overrideCheck(changed_ids, d->center, std::tr1::bind(&LayoutHelper::centerPanelChanged, this, _1, _2));
48- d->overrideCheck(changed_ids, d->extended, std::tr1::bind(&LayoutHelper::extendedPanelChanged, this, _1, _2));
49+ d->overrideCheck(changed_ids, d->left, std::bind(&LayoutHelper::leftPanelChanged, this, _1, _2));
50+ d->overrideCheck(changed_ids, d->right, std::bind(&LayoutHelper::rightPanelChanged, this, _1, _2));
51+ d->overrideCheck(changed_ids, d->center, std::bind(&LayoutHelper::centerPanelChanged, this, _1, _2));
52+ d->overrideCheck(changed_ids, d->extended, std::bind(&LayoutHelper::extendedPanelChanged, this, _1, _2));
53 }
54
55 }} // namespace Logic, MaliitKeyboard
56--
572.20.1
58
diff --git a/recipes-qt/maliit/maliit-plugins-qt5_git.bb b/recipes-qt/maliit/maliit-plugins-qt5_git.bb
index 8225cb54..8464e1f0 100644
--- a/recipes-qt/maliit/maliit-plugins-qt5_git.bb
+++ b/recipes-qt/maliit/maliit-plugins-qt5_git.bb
@@ -10,7 +10,9 @@ DEPENDS = "maliit-framework-qt5"
10 10
11RDEPENDS_${PN} += "qtsvg-plugins" 11RDEPENDS_${PN} += "qtsvg-plugins"
12 12
13SRC_URI = "git://github.com/maliit/plugins.git;branch=master" 13SRC_URI = "git://github.com/maliit/plugins.git;branch=master \
14 file://0001-Do-not-use-tr1-namespace.patch \
15 "
14 16
15SRCREV = "c6a348592607248a771a3dde5a0e33dc3c433a2a" 17SRCREV = "c6a348592607248a771a3dde5a0e33dc3c433a2a"
16PV = "0.99.0+git${SRCPV}" 18PV = "0.99.0+git${SRCPV}"