1 |
commit: fe1eb44a73d1a8e99aae1eeb2b7504b326df2cd1 |
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 18:51:02 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe1eb44a |
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 |
|
15 |
...qtcore-5.14.1-cmake-macro-backward-compat.patch | 50 +++++++++++++ |
16 |
dev-qt/qtcore/qtcore-5.14.1-r1.ebuild | 85 ++++++++++++++++++++++ |
17 |
2 files changed, 135 insertions(+) |
18 |
|
19 |
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 |
20 |
new file mode 100644 |
21 |
index 00000000000..30b5abc3975 |
22 |
--- /dev/null |
23 |
+++ b/dev-qt/qtcore/files/qtcore-5.14.1-cmake-macro-backward-compat.patch |
24 |
@@ -0,0 +1,50 @@ |
25 |
+From: Andreas Sturmlechner <asturm@g.o> |
26 |
+Date: Sun, 9 Feb 2020 11:45:00 +0100 |
27 |
+Subject: [PATCH] qtcore: Fix cmake macro compat. for upgrade from <Qt-5.14 |
28 |
+ |
29 |
+In upstream commit: |
30 |
+ |
31 |
+https://code.qt.io/cgit/qt/qtbase.git/commit/?h=5.14&id=63d9cd17 |
32 |
+ |
33 |
+_populate_$${CMAKE_MODULE_NAME}_plugin_properties in 5.14.0 gained an additional argument |
34 |
+IsDebugAndRelease without providing backward compatibility. This macro is used (at least) for |
35 |
+QtGui and QtDesigner plugins added by qtimageformats, qtsvg, qtvirtualkeyboard and qtwayland. |
36 |
+During upgrade from <Qt-5.14 to >=Qt-5.14, as a consequence of slot upgrade rebuilds, some |
37 |
+reverse dependencies are slated for rebuild before these Qt consumers have been rebuilt and their |
38 |
+cmake files regenerated, leading to cmake errors like: |
39 |
+ |
40 |
+https://bugs.gentoo.org/703306 |
41 |
+https://bugs.gentoo.org/705198 |
42 |
+ |
43 |
+From mkspecs/features/create_cmake.prf: |
44 |
+ |
45 |
+# CMAKE_DEBUG_AND_RELEASE is used to tell the _populate_$${CMAKE_MODULE_NAME}_target_properties |
46 |
+# functions whether a Configuration specific generator expression needs to be added to the values |
47 |
+# of INTERFACE_LINK_LIBRARIES and INTERFACE_LINK_OPTIONS. For debug_and_release builds, we do need |
48 |
+# configuration specific values. For singular builds (only release or only debug), we want the |
49 |
+# values to be applied regardless of the configuration. |
50 |
+# This would allow on Linux and macOS (and with a recent enough version of CMake on Windows) to |
51 |
+# build a Debug configuration of an application, even if Qt was built in a Release configuration. |
52 |
+ |
53 |
+qt5-build.eclass is configuring either as 'release' or as 'debug', so we make IsDebugAndRelease |
54 |
+optional and default to FALSE. |
55 |
+ |
56 |
+--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2020-01-23 13:37:32.000000000 +0100 |
57 |
++++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2020-02-09 15:15:21.156219814 +0100 |
58 |
+@@ -538,8 +538,14 @@ |
59 |
+ |
60 |
+ file(GLOB pluginTargets \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*Plugin.cmake\") |
61 |
+ |
62 |
+- macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION |
63 |
+- IsDebugAndRelease) |
64 |
++ macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION) |
65 |
++ set(IsDebugAndRelease FALSE) |
66 |
++ set (list_var ${ARGN}) |
67 |
++ list(LENGTH list_var num_extra_arg) |
68 |
++ if (${num_extra_arg} GREATER 0) |
69 |
++ list(GET list_var 0 IsDebugAndRelease) |
70 |
++ endif() |
71 |
++ |
72 |
+ set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) |
73 |
+ |
74 |
+ !!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE) |
75 |
|
76 |
diff --git a/dev-qt/qtcore/qtcore-5.14.1-r1.ebuild b/dev-qt/qtcore/qtcore-5.14.1-r1.ebuild |
77 |
new file mode 100644 |
78 |
index 00000000000..d96ec59bb31 |
79 |
--- /dev/null |
80 |
+++ b/dev-qt/qtcore/qtcore-5.14.1-r1.ebuild |
81 |
@@ -0,0 +1,85 @@ |
82 |
+# Copyright 1999-2020 Gentoo Authors |
83 |
+# Distributed under the terms of the GNU General Public License v2 |
84 |
+ |
85 |
+EAPI=7 |
86 |
+QT5_MODULE="qtbase" |
87 |
+inherit qt5-build |
88 |
+ |
89 |
+DESCRIPTION="Cross-platform application development framework" |
90 |
+ |
91 |
+if [[ ${QT5_BUILD_TYPE} == release ]]; then |
92 |
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86" |
93 |
+fi |
94 |
+ |
95 |
+IUSE="icu systemd" |
96 |
+ |
97 |
+DEPEND=" |
98 |
+ dev-libs/double-conversion:= |
99 |
+ dev-libs/glib:2 |
100 |
+ dev-libs/libpcre2[pcre16,unicode] |
101 |
+ sys-libs/zlib:= |
102 |
+ icu? ( dev-libs/icu:= ) |
103 |
+ !icu? ( virtual/libiconv ) |
104 |
+ systemd? ( sys-apps/systemd:= ) |
105 |
+" |
106 |
+RDEPEND="${DEPEND} |
107 |
+ !<dev-qt/qtcore-4.8.7-r4:4 |
108 |
+" |
109 |
+ |
110 |
+QT5_TARGET_SUBDIRS=( |
111 |
+ src/tools/bootstrap |
112 |
+ src/tools/moc |
113 |
+ src/tools/rcc |
114 |
+ src/corelib |
115 |
+ src/tools/qlalr |
116 |
+ doc |
117 |
+) |
118 |
+ |
119 |
+QT5_GENTOO_PRIVATE_CONFIG=( |
120 |
+ !:network |
121 |
+ !:sql |
122 |
+ !:testlib |
123 |
+ !:xml |
124 |
+) |
125 |
+ |
126 |
+PATCHES=( "${FILESDIR}/${P}-cmake-macro-backward-compat.patch" ) # bug 703306 |
127 |
+ |
128 |
+src_prepare() { |
129 |
+ # don't add -O3 to CXXFLAGS, bug 549140 |
130 |
+ sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/corelib/corelib.pro || die |
131 |
+ |
132 |
+ # fix missing qt_version_tag symbol w/ LTO, bug 674382 |
133 |
+ sed -i -e 's/^gcc:ltcg/gcc/' src/corelib/global/global.pri || die |
134 |
+ |
135 |
+ qt5-build_src_prepare |
136 |
+} |
137 |
+ |
138 |
+src_configure() { |
139 |
+ local myconf=( |
140 |
+ -no-feature-statx # bug 672856 |
141 |
+ $(qt_use icu) |
142 |
+ $(qt_use !icu iconv) |
143 |
+ $(qt_use systemd journald) |
144 |
+ ) |
145 |
+ qt5-build_src_configure |
146 |
+} |
147 |
+ |
148 |
+src_install() { |
149 |
+ qt5-build_src_install |
150 |
+ |
151 |
+ local flags=( |
152 |
+ DBUS FREETYPE IMAGEFORMAT_JPEG IMAGEFORMAT_PNG |
153 |
+ OPENGL OPENSSL SSL WIDGETS |
154 |
+ ) |
155 |
+ |
156 |
+ for flag in ${flags[@]}; do |
157 |
+ cat >> "${D}"/${QT5_HEADERDIR}/QtCore/qconfig.h <<- _EOF_ || die |
158 |
+ |
159 |
+ #if defined(QT_NO_${flag}) && defined(QT_${flag}) |
160 |
+ # undef QT_NO_${flag} |
161 |
+ #elif !defined(QT_NO_${flag}) && !defined(QT_${flag}) |
162 |
+ # define QT_NO_${flag} |
163 |
+ #endif |
164 |
+ _EOF_ |
165 |
+ done |
166 |
+} |