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