aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2020-04-07 00:21:40 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2020-04-07 00:24:50 +0200
commitaefade7ae0d3be5b6c432a7e6edef20d896ff3e9 (patch)
tree303d0272fea20c064e35bffcd113621ec1b14d8c
parentdev-qt/qtwidgets: Fix double inclusion of CMake plugin targets (diff)
downloadqt-aefade7a.tar.gz
qt-aefade7a.tar.bz2
qt-aefade7a.zip
dev-qt/qtdeclarative: Fix double inclusion of CMake plugin targets
See also: https://bugreports.qt.io/browse/QTBUG-83282 Package-Manager: Portage-2.3.96, Repoman-2.3.22 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
-rw-r--r--dev-qt/qtdeclarative/files/qtdeclarative-5.15.0_beta3-cmake-targets-double-inclusion.patch44
-rw-r--r--dev-qt/qtdeclarative/qtdeclarative-5.15.0_beta3.ebuild2
2 files changed, 46 insertions, 0 deletions
diff --git a/dev-qt/qtdeclarative/files/qtdeclarative-5.15.0_beta3-cmake-targets-double-inclusion.patch b/dev-qt/qtdeclarative/files/qtdeclarative-5.15.0_beta3-cmake-targets-double-inclusion.patch
new file mode 100644
index 00000000..1abf58a9
--- /dev/null
+++ b/dev-qt/qtdeclarative/files/qtdeclarative-5.15.0_beta3-cmake-targets-double-inclusion.patch
@@ -0,0 +1,44 @@
+From 1a2ab822fa24733f83d6720d2af8498ecbd5cbda Mon Sep 17 00:00:00 2001
+From: Alexandru Croitor <alexandru.croitor@qt.io>
+Date: Fri, 3 Apr 2020 10:04:04 +0200
+Subject: [PATCH] CMake: Fix double inclusion of CMake plugin targets
+
+After 99ace38d22c640e37bb1a41095ee3b126169816a, all plugin files are
+included automatically, not only the ones ending in Plugin.cmake.
+
+Thus the extra inclusion done by the QmlConfigExtras file should only
+be done if strict mode is set.
+
+This fixes errors of the following type when doing find_package(Qt5Qml)
+
+add_library cannot create imported target
+ "Qt5::QTcpServerConnectionFactory" because another target with the same
+ name already exists.
+
+Amends 99ace38d22c640e37bb1a41095ee3b126169816a
+Amends 2f2dd3b0c28db210ea1f00d569f6c1626894c5f4
+
+Task-number: QTBUG-83282
+Change-Id: I205036092bff9925aa95472f0aa6a212f0372227
+Reviewed-by: Kai Koehne <kai.koehne@qt.io>
+Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
+---
+ src/qml/Qt5QmlConfigExtras.cmake.in | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/src/qml/Qt5QmlConfigExtras.cmake.in b/src/qml/Qt5QmlConfigExtras.cmake.in
+index 9ddb9885cd..4242143bca 100644
+--- a/src/qml/Qt5QmlConfigExtras.cmake.in
++++ b/src/qml/Qt5QmlConfigExtras.cmake.in
+@@ -1,5 +1,7 @@
+-file(GLOB _qt5qml_other_plugins "${CMAKE_CURRENT_LIST_DIR}/Qt5Qml_*Factory.cmake")
++if(QT5_STRICT_PLUGIN_GLOB OR Qt5Qml_STRICT_PLUGIN_GLOB)
++ file(GLOB _qt5qml_other_plugins "${CMAKE_CURRENT_LIST_DIR}/Qt5Qml_*Factory.cmake")
+
+-foreach(_other_plugin ${_qt5qml_other_plugins})
+- include(${_other_plugin} OPTIONAL)
+-endforeach()
++ foreach(_other_plugin ${_qt5qml_other_plugins})
++ include(${_other_plugin} OPTIONAL)
++ endforeach()
++endif()
diff --git a/dev-qt/qtdeclarative/qtdeclarative-5.15.0_beta3.ebuild b/dev-qt/qtdeclarative/qtdeclarative-5.15.0_beta3.ebuild
index 5e576bf9..11037c81 100644
--- a/dev-qt/qtdeclarative/qtdeclarative-5.15.0_beta3.ebuild
+++ b/dev-qt/qtdeclarative/qtdeclarative-5.15.0_beta3.ebuild
@@ -27,6 +27,8 @@ RDEPEND="${DEPEND}
!<dev-qt/qtquickcontrols-5.7:5
"
+PATCHES=( "${FILESDIR}/${P}-cmake-targets-double-inclusion.patch" ) # QTBUG-83282
+
src_prepare() {
use jit || PATCHES+=("${FILESDIR}/${PN}-5.4.2-disable-jit.patch")