Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/qt:master commit in: dev-qt/qtcore/files/, dev-qt/qtcore/
Date: Sun, 09 Feb 2020 19:24:37
Message-Id: 1581276140.91b38cc3ab9bb6c70c9e40ba6a5fbbe41b2da753.asturm@gentoo
1 commit: 91b38cc3ab9bb6c70c9e40ba6a5fbbe41b2da753
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sun Feb 9 10:59:22 2020 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 9 19:22:20 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/qt.git/commit/?id=91b38cc3
7
8 dev-qt/qtcore: Fix cmake macro compat. for upgrade from <Qt-5.14
9
10 Closes: https://bugs.gentoo.org/703306
11 Closes: https://bugs.gentoo.org/705198
12 Package-Manager: Portage-2.3.87, Repoman-2.3.20
13 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
14 (cherry picked from commit fe1eb44a73d1a8e99aae1eeb2b7504b326df2cd1)
15
16 ...qtcore-5.14.1-cmake-macro-backward-compat.patch | 50 ++++++++++++++++++++++
17 dev-qt/qtcore/qtcore-5.14.9999.ebuild | 4 +-
18 dev-qt/qtcore/qtcore-5.15.9999.ebuild | 4 +-
19 3 files changed, 56 insertions(+), 2 deletions(-)
20
21 diff --git a/dev-qt/qtcore/files/qtcore-5.14.1-cmake-macro-backward-compat.patch b/dev-qt/qtcore/files/qtcore-5.14.1-cmake-macro-backward-compat.patch
22 new file mode 100644
23 index 00000000..30b5abc3
24 --- /dev/null
25 +++ b/dev-qt/qtcore/files/qtcore-5.14.1-cmake-macro-backward-compat.patch
26 @@ -0,0 +1,50 @@
27 +From: Andreas Sturmlechner <asturm@g.o>
28 +Date: Sun, 9 Feb 2020 11:45:00 +0100
29 +Subject: [PATCH] qtcore: Fix cmake macro compat. for upgrade from <Qt-5.14
30 +
31 +In upstream commit:
32 +
33 +https://code.qt.io/cgit/qt/qtbase.git/commit/?h=5.14&id=63d9cd17
34 +
35 +_populate_$${CMAKE_MODULE_NAME}_plugin_properties in 5.14.0 gained an additional argument
36 +IsDebugAndRelease without providing backward compatibility. This macro is used (at least) for
37 +QtGui and QtDesigner plugins added by qtimageformats, qtsvg, qtvirtualkeyboard and qtwayland.
38 +During upgrade from <Qt-5.14 to >=Qt-5.14, as a consequence of slot upgrade rebuilds, some
39 +reverse dependencies are slated for rebuild before these Qt consumers have been rebuilt and their
40 +cmake files regenerated, leading to cmake errors like:
41 +
42 +https://bugs.gentoo.org/703306
43 +https://bugs.gentoo.org/705198
44 +
45 +From mkspecs/features/create_cmake.prf:
46 +
47 +# CMAKE_DEBUG_AND_RELEASE is used to tell the _populate_$${CMAKE_MODULE_NAME}_target_properties
48 +# functions whether a Configuration specific generator expression needs to be added to the values
49 +# of INTERFACE_LINK_LIBRARIES and INTERFACE_LINK_OPTIONS. For debug_and_release builds, we do need
50 +# configuration specific values. For singular builds (only release or only debug), we want the
51 +# values to be applied regardless of the configuration.
52 +# This would allow on Linux and macOS (and with a recent enough version of CMake on Windows) to
53 +# build a Debug configuration of an application, even if Qt was built in a Release configuration.
54 +
55 +qt5-build.eclass is configuring either as 'release' or as 'debug', so we make IsDebugAndRelease
56 +optional and default to FALSE.
57 +
58 +--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2020-01-23 13:37:32.000000000 +0100
59 ++++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2020-02-09 15:15:21.156219814 +0100
60 +@@ -538,8 +538,14 @@
61 +
62 + file(GLOB pluginTargets \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*Plugin.cmake\")
63 +
64 +- macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION
65 +- IsDebugAndRelease)
66 ++ macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION)
67 ++ set(IsDebugAndRelease FALSE)
68 ++ set (list_var ${ARGN})
69 ++ list(LENGTH list_var num_extra_arg)
70 ++ if (${num_extra_arg} GREATER 0)
71 ++ list(GET list_var 0 IsDebugAndRelease)
72 ++ endif()
73 ++
74 + set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
75 +
76 + !!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE)
77
78 diff --git a/dev-qt/qtcore/qtcore-5.14.9999.ebuild b/dev-qt/qtcore/qtcore-5.14.9999.ebuild
79 index e6a7a124..9b476abf 100644
80 --- a/dev-qt/qtcore/qtcore-5.14.9999.ebuild
81 +++ b/dev-qt/qtcore/qtcore-5.14.9999.ebuild
82 @@ -1,4 +1,4 @@
83 -# Copyright 1999-2019 Gentoo Authors
84 +# Copyright 1999-2020 Gentoo Authors
85 # Distributed under the terms of the GNU General Public License v2
86
87 EAPI=7
88 @@ -42,6 +42,8 @@ QT5_GENTOO_PRIVATE_CONFIG=(
89 !:xml
90 )
91
92 +PATCHES=( "${FILESDIR}/${PN}-5.14.1-cmake-macro-backward-compat.patch" ) # bug 703306
93 +
94 src_prepare() {
95 # don't add -O3 to CXXFLAGS, bug 549140
96 sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/corelib/corelib.pro || die
97
98 diff --git a/dev-qt/qtcore/qtcore-5.15.9999.ebuild b/dev-qt/qtcore/qtcore-5.15.9999.ebuild
99 index e6a7a124..9b476abf 100644
100 --- a/dev-qt/qtcore/qtcore-5.15.9999.ebuild
101 +++ b/dev-qt/qtcore/qtcore-5.15.9999.ebuild
102 @@ -1,4 +1,4 @@
103 -# Copyright 1999-2019 Gentoo Authors
104 +# Copyright 1999-2020 Gentoo Authors
105 # Distributed under the terms of the GNU General Public License v2
106
107 EAPI=7
108 @@ -42,6 +42,8 @@ QT5_GENTOO_PRIVATE_CONFIG=(
109 !:xml
110 )
111
112 +PATCHES=( "${FILESDIR}/${PN}-5.14.1-cmake-macro-backward-compat.patch" ) # bug 703306
113 +
114 src_prepare() {
115 # don't add -O3 to CXXFLAGS, bug 549140
116 sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/corelib/corelib.pro || die