summaryrefslogtreecommitdiff
path: root/dev-qt
diff options
context:
space:
mode:
authorMichael Palimaka <kensington@gentoo.org>2015-10-30 03:40:35 +1100
committerMichael Palimaka <kensington@gentoo.org>2015-10-30 03:40:58 +1100
commitbeaed53e82472e6ad4283525798bd02286b1af22 (patch)
tree48255075d29aa2aecd8440f8478f752669413b82 /dev-qt
parentmedia-sound/mpd: version bump to 0.19.11 (diff)
downloadgentoo-beaed53e82472e6ad4283525798bd02286b1af22.tar.gz
gentoo-beaed53e82472e6ad4283525798bd02286b1af22.tar.bz2
gentoo-beaed53e82472e6ad4283525798bd02286b1af22.zip
dev-qt/qtwebchannel: backport patch from upstream solving build failure with USE="-qml"
Gentoo-bug: 564412 Package-Manager: portage-2.2.20.1
Diffstat (limited to 'dev-qt')
-rw-r--r--dev-qt/qtwebchannel/files/qtwebchannel-5.5.1-optional-qtdeclarative.patch62
-rw-r--r--dev-qt/qtwebchannel/qtwebchannel-5.5.1.ebuild2
2 files changed, 64 insertions, 0 deletions
diff --git a/dev-qt/qtwebchannel/files/qtwebchannel-5.5.1-optional-qtdeclarative.patch b/dev-qt/qtwebchannel/files/qtwebchannel-5.5.1-optional-qtdeclarative.patch
new file mode 100644
index 00000000000..e7011ad90a1
--- /dev/null
+++ b/dev-qt/qtwebchannel/files/qtwebchannel-5.5.1-optional-qtdeclarative.patch
@@ -0,0 +1,62 @@
+From 906d910415454d64ff0b021b06f0df422a8c82bd Mon Sep 17 00:00:00 2001
+From: Andy Shaw <andy.shaw@theqtcompany.com>
+Date: Wed, 23 Sep 2015 06:52:01 +0000
+Subject: [PATCH] Compile when QML is disabled
+
+Since QJSValue is part of the QML module then it should check if that is
+available before using it so we add a QT_NO_JSVALUE define to help with
+this.
+
+Task-number: QTBUG-46850
+Change-Id: I1974518a5c134dbb8508a46505b43c820a7a700a
+Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
+---
+ src/webchannel/qmetaobjectpublisher.cpp | 4 ++++
+ src/webchannel/webchannel.pro | 2 ++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/src/webchannel/qmetaobjectpublisher.cpp b/src/webchannel/qmetaobjectpublisher.cpp
+index 0cad569..22df02b 100644
+--- a/src/webchannel/qmetaobjectpublisher.cpp
++++ b/src/webchannel/qmetaobjectpublisher.cpp
+@@ -41,7 +41,9 @@
+ #include <QDebug>
+ #include <QJsonObject>
+ #include <QJsonArray>
++#ifndef QT_NO_JSVALUE
+ #include <QJSValue>
++#endif
+ #include <QUuid>
+
+ QT_BEGIN_NAMESPACE
+@@ -486,12 +488,14 @@ QJsonValue QMetaObjectPublisher::wrapResult(const QVariant &result, QWebChannelA
+ if (!classInfo.isEmpty())
+ objectInfo[KEY_DATA] = classInfo;
+ return objectInfo;
++#ifndef QT_NO_JSVALUE
+ } else if (result.canConvert<QJSValue>()) {
+ // Workaround for keeping QJSValues from QVariant.
+ // Calling QJSValue::toVariant() converts JS-objects/arrays to QVariantMap/List
+ // instead of stashing a QJSValue itself into a variant.
+ // TODO: Improve QJSValue-QJsonValue conversion in Qt.
+ return wrapResult(result.value<QJSValue>().toVariant(), transport, parentObjectId);
++#endif
+ } else if (result.canConvert<QVariantList>()) {
+ // recurse and potentially wrap contents of the array
+ return wrapList(result.toList(), transport);
+diff --git a/src/webchannel/webchannel.pro b/src/webchannel/webchannel.pro
+index eba8123..931ee03 100644
+--- a/src/webchannel/webchannel.pro
++++ b/src/webchannel/webchannel.pro
+@@ -39,6 +39,8 @@ qtHaveModule(qml) {
+
+ PRIVATE_HEADERS += \
+ qqmlwebchannelattached_p.h
++} else {
++ DEFINES += QT_NO_JSVALUE
+ }
+
+ HEADERS += $$PUBLIC_HEADERS $$PRIVATE_HEADERS
+--
+2.4.10
+
diff --git a/dev-qt/qtwebchannel/qtwebchannel-5.5.1.ebuild b/dev-qt/qtwebchannel/qtwebchannel-5.5.1.ebuild
index b3c9b854605..ac67dce120b 100644
--- a/dev-qt/qtwebchannel/qtwebchannel-5.5.1.ebuild
+++ b/dev-qt/qtwebchannel/qtwebchannel-5.5.1.ebuild
@@ -19,6 +19,8 @@ DEPEND="
"
RDEPEND="${DEPEND}"
+PATCHES=( "${FILESDIR}/${P}-optional-qtdeclarative.patch" )
+
src_prepare() {
qt_use_disable_mod qml quick src/src.pro
qt_use_disable_mod qml qml src/webchannel/webchannel.pro