commit: aefade7ae0d3be5b6c432a7e6edef20d896ff3e9 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> AuthorDate: Mon Apr 6 22:21:40 2020 +0000 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> CommitDate: Mon Apr 6 22:24:50 2020 +0000 URL: https://gitweb.gentoo.org/proj/qt.git/commit/?id=aefade7a
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 <AT> gentoo.org> ...15.0_beta3-cmake-targets-double-inclusion.patch | 44 ++++++++++++++++++++++ .../qtdeclarative-5.15.0_beta3.ebuild | 2 + 2 files changed, 46 insertions(+) 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.croi...@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.koe...@qt.io> +Reviewed-by: Friedemann Kleint <friedemann.kle...@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")