Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtgui/, dev-qt/qtgui/files/
Date: Sun, 09 Feb 2020 18:51:35
Message-Id: 1581274263.9f10d5690b0a924021f54c7b09b4ce152fd37e0b.asturm@gentoo
1 commit: 9f10d5690b0a924021f54c7b09b4ce152fd37e0b
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 18:51:03 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f10d569
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
14 .../qtgui-5.14.1-cmake-macro-backward-compat.patch | 50 ++++++
15 dev-qt/qtgui/qtgui-5.14.1-r2.ebuild | 188 +++++++++++++++++++++
16 2 files changed, 238 insertions(+)
17
18 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
19 new file mode 100644
20 index 00000000000..30b5abc3975
21 --- /dev/null
22 +++ b/dev-qt/qtgui/files/qtgui-5.14.1-cmake-macro-backward-compat.patch
23 @@ -0,0 +1,50 @@
24 +From: Andreas Sturmlechner <asturm@g.o>
25 +Date: Sun, 9 Feb 2020 11:45:00 +0100
26 +Subject: [PATCH] qtcore: Fix cmake macro compat. for upgrade from <Qt-5.14
27 +
28 +In upstream commit:
29 +
30 +https://code.qt.io/cgit/qt/qtbase.git/commit/?h=5.14&id=63d9cd17
31 +
32 +_populate_$${CMAKE_MODULE_NAME}_plugin_properties in 5.14.0 gained an additional argument
33 +IsDebugAndRelease without providing backward compatibility. This macro is used (at least) for
34 +QtGui and QtDesigner plugins added by qtimageformats, qtsvg, qtvirtualkeyboard and qtwayland.
35 +During upgrade from <Qt-5.14 to >=Qt-5.14, as a consequence of slot upgrade rebuilds, some
36 +reverse dependencies are slated for rebuild before these Qt consumers have been rebuilt and their
37 +cmake files regenerated, leading to cmake errors like:
38 +
39 +https://bugs.gentoo.org/703306
40 +https://bugs.gentoo.org/705198
41 +
42 +From mkspecs/features/create_cmake.prf:
43 +
44 +# CMAKE_DEBUG_AND_RELEASE is used to tell the _populate_$${CMAKE_MODULE_NAME}_target_properties
45 +# functions whether a Configuration specific generator expression needs to be added to the values
46 +# of INTERFACE_LINK_LIBRARIES and INTERFACE_LINK_OPTIONS. For debug_and_release builds, we do need
47 +# configuration specific values. For singular builds (only release or only debug), we want the
48 +# values to be applied regardless of the configuration.
49 +# This would allow on Linux and macOS (and with a recent enough version of CMake on Windows) to
50 +# build a Debug configuration of an application, even if Qt was built in a Release configuration.
51 +
52 +qt5-build.eclass is configuring either as 'release' or as 'debug', so we make IsDebugAndRelease
53 +optional and default to FALSE.
54 +
55 +--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2020-01-23 13:37:32.000000000 +0100
56 ++++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in 2020-02-09 15:15:21.156219814 +0100
57 +@@ -538,8 +538,14 @@
58 +
59 + file(GLOB pluginTargets \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*Plugin.cmake\")
60 +
61 +- macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION
62 +- IsDebugAndRelease)
63 ++ macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION)
64 ++ set(IsDebugAndRelease FALSE)
65 ++ set (list_var ${ARGN})
66 ++ list(LENGTH list_var num_extra_arg)
67 ++ if (${num_extra_arg} GREATER 0)
68 ++ list(GET list_var 0 IsDebugAndRelease)
69 ++ endif()
70 ++
71 + set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
72 +
73 + !!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE)
74
75 diff --git a/dev-qt/qtgui/qtgui-5.14.1-r2.ebuild b/dev-qt/qtgui/qtgui-5.14.1-r2.ebuild
76 new file mode 100644
77 index 00000000000..e077dd59d73
78 --- /dev/null
79 +++ b/dev-qt/qtgui/qtgui-5.14.1-r2.ebuild
80 @@ -0,0 +1,188 @@
81 +# Copyright 1999-2020 Gentoo Authors
82 +# Distributed under the terms of the GNU General Public License v2
83 +
84 +EAPI=7
85 +
86 +QT5_MODULE="qtbase"
87 +inherit qt5-build
88 +
89 +DESCRIPTION="The GUI module and platform plugins for the Qt5 framework"
90 +SLOT=5/${PV} # bug 707658
91 +
92 +if [[ ${QT5_BUILD_TYPE} == release ]]; then
93 + KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
94 +fi
95 +
96 +# TODO: linuxfb
97 +
98 +IUSE="accessibility dbus egl eglfs evdev +gif gles2 ibus
99 + jpeg +libinput +png tslib tuio +udev vnc wayland +X"
100 +REQUIRED_USE="
101 + || ( eglfs X )
102 + accessibility? ( dbus X )
103 + eglfs? ( egl )
104 + ibus? ( dbus )
105 + libinput? ( udev )
106 + X? ( gles2? ( egl ) )
107 +"
108 +
109 +COMMON_DEPEND="
110 + dev-libs/glib:2
111 + ~dev-qt/qtcore-${PV}
112 + dev-util/gtk-update-icon-cache
113 + media-libs/fontconfig
114 + >=media-libs/freetype-2.6.1:2
115 + >=media-libs/harfbuzz-1.6.0:=
116 + sys-libs/zlib:=
117 + virtual/opengl
118 + dbus? ( ~dev-qt/qtdbus-${PV} )
119 + egl? ( media-libs/mesa[egl] )
120 + eglfs? (
121 + media-libs/mesa[gbm]
122 + x11-libs/libdrm
123 + )
124 + evdev? ( sys-libs/mtdev )
125 + gles2? ( media-libs/mesa[gles2] )
126 + jpeg? ( virtual/jpeg:0 )
127 + libinput? (
128 + dev-libs/libinput:=
129 + >=x11-libs/libxkbcommon-0.5.0
130 + )
131 + png? ( media-libs/libpng:0= )
132 + tslib? ( >=x11-libs/tslib-1.21 )
133 + tuio? ( ~dev-qt/qtnetwork-${PV} )
134 + udev? ( virtual/libudev:= )
135 + vnc? ( ~dev-qt/qtnetwork-${PV} )
136 + X? (
137 + x11-libs/libICE
138 + x11-libs/libSM
139 + x11-libs/libX11
140 + >=x11-libs/libxcb-1.12:=[xkb]
141 + >=x11-libs/libxkbcommon-0.5.0[X]
142 + x11-libs/xcb-util-image
143 + x11-libs/xcb-util-keysyms
144 + x11-libs/xcb-util-renderutil
145 + x11-libs/xcb-util-wm
146 + )
147 +"
148 +DEPEND="${COMMON_DEPEND}
149 + evdev? ( sys-kernel/linux-headers )
150 + udev? ( sys-kernel/linux-headers )
151 +"
152 +# bug 703306, _populate_Gui_plugin_properties breaks installed cmake modules
153 +RDEPEND="${COMMON_DEPEND}
154 + !<dev-qt/qtimageformats-5.14.0:5
155 + !<dev-qt/qtsvg-5.14.0:5
156 + !<dev-qt/qtvirtualkeyboard-5.14.0:5
157 + !<dev-qt/qtwayland-5.14.0:5
158 +"
159 +PDEPEND="
160 + ibus? ( app-i18n/ibus )
161 + wayland? ( ~dev-qt/qtwayland-${PV} )
162 +"
163 +
164 +QT5_TARGET_SUBDIRS=(
165 + src/tools/qvkgen
166 + src/gui
167 + src/openglextensions
168 + src/platformheaders
169 + src/platformsupport
170 + src/plugins/generic
171 + src/plugins/imageformats
172 + src/plugins/platforms
173 + src/plugins/platforminputcontexts
174 +)
175 +
176 +QT5_GENTOO_CONFIG=(
177 + accessibility:accessibility-atspi-bridge
178 + egl:egl:
179 + eglfs:eglfs:
180 + eglfs:eglfs_egldevice:
181 + eglfs:eglfs_gbm:
182 + evdev:evdev:
183 + evdev:mtdev:
184 + :fontconfig:
185 + :system-freetype:FREETYPE
186 + !:no-freetype:
187 + !gif:no-gif:
188 + gles2::OPENGL_ES
189 + gles2:opengles2:OPENGL_ES_2
190 + !:no-gui:
191 + :system-harfbuzz:
192 + !:no-harfbuzz:
193 + jpeg:system-jpeg:IMAGEFORMAT_JPEG
194 + !jpeg:no-jpeg:
195 + libinput
196 + libinput:xkbcommon:
197 + :opengl
198 + png:png:
199 + png:system-png:IMAGEFORMAT_PNG
200 + !png:no-png:
201 + tslib:tslib:
202 + udev:libudev:
203 + X:xcb:
204 + X:xcb-glx:
205 + X:xcb-plugin:
206 + X:xcb-render:
207 + X:xcb-sm:
208 + X:xcb-xlib:
209 + X:xcb-xinput:
210 +)
211 +
212 +QT5_GENTOO_PRIVATE_CONFIG=(
213 + :gui
214 +)
215 +
216 +PATCHES=(
217 + "${FILESDIR}/qt-5.12-gcc-avx2.patch" # bug 672946
218 + "${FILESDIR}/${PN}-5.14.1-cmake-macro-backward-compat.patch" # bug 703306
219 +)
220 +
221 +src_prepare() {
222 + # don't add -O3 to CXXFLAGS, bug 549140
223 + sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/gui/gui.pro || die
224 +
225 + # egl_x11 is activated when both egl and X are enabled
226 + use egl && QT5_GENTOO_CONFIG+=(X:egl_x11:) || QT5_GENTOO_CONFIG+=(egl:egl_x11:)
227 +
228 + qt_use_disable_config dbus dbus \
229 + src/platformsupport/themes/genericunix/genericunix.pri
230 +
231 + qt_use_disable_config tuio tuiotouch src/plugins/generic/generic.pro
232 +
233 + qt_use_disable_mod ibus dbus \
234 + src/plugins/platforminputcontexts/platforminputcontexts.pro
235 +
236 + use vnc || sed -i -e '/SUBDIRS += vnc/d' \
237 + src/plugins/platforms/platforms.pro || die
238 +
239 + qt5-build_src_prepare
240 +}
241 +
242 +src_configure() {
243 + local myconf=(
244 + $(usex dbus -dbus-linked '')
245 + $(qt_use egl)
246 + $(qt_use eglfs)
247 + $(usex eglfs '-gbm -kms' '')
248 + $(qt_use evdev)
249 + $(qt_use evdev mtdev)
250 + -fontconfig
251 + -system-freetype
252 + $(usex gif '' -no-gif)
253 + -gui
254 + -system-harfbuzz
255 + $(qt_use jpeg libjpeg system)
256 + $(qt_use libinput)
257 + -opengl $(usex gles2 es2 desktop)
258 + $(qt_use png libpng system)
259 + $(qt_use tslib)
260 + $(qt_use udev libudev)
261 + $(qt_use X xcb system)
262 + $(usex X '-xcb-xlib -xcb-xinput -xkb' '')
263 + )
264 + if use libinput || use X; then
265 + myconf+=( -xkbcommon )
266 + fi
267 + qt5-build_src_configure
268 +}