Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtwebengine/files/, dev-qt/qtwebengine/
Date: Tue, 02 Aug 2022 21:51:35
Message-Id: 1659476991.0ac0cccecd72547debeba29eeacbbace6f4f0b67.sam@gentoo
1 commit: 0ac0cccecd72547debeba29eeacbbace6f4f0b67
2 Author: Jimi Huotari <chiitoo <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 20 18:33:31 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 2 21:49:51 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ac0ccce
7
8 dev-qt/qtwebengine: add version 6.3.1
9
10 Bug: https://bugs.gentoo.org/838970
11 Package-Manager: Portage-3.0.30, Repoman-3.0.3
12 Signed-off-by: Jimi Huotari <chiitoo <AT> gentoo.org>
13 Signed-off-by: Sam James <sam <AT> gentoo.org>
14
15 dev-qt/qtwebengine/Manifest | 1 +
16 .../files/qtwebengine-6.3.1-widevine.patch | 18 ++
17 dev-qt/qtwebengine/qtwebengine-6.3.1.ebuild | 246 +++++++++++++++++++++
18 3 files changed, 265 insertions(+)
19
20 diff --git a/dev-qt/qtwebengine/Manifest b/dev-qt/qtwebengine/Manifest
21 index 282326e1c880..6db838137ef4 100644
22 --- a/dev-qt/qtwebengine/Manifest
23 +++ b/dev-qt/qtwebengine/Manifest
24 @@ -2,3 +2,4 @@ DIST qtwebengine-5.15.2-r1-chromium87-ppc64le.tar.xz 28784 BLAKE2B aa101d14446f3
25 DIST qtwebengine-5.15.2_p20211019-jumbo-build.patch.bz2 2930 BLAKE2B fca1d1406874d04eafb64bb4d8730512a6307ba44fb99d76f428ca1bd4a303758e0c3bd8f92a59f7bcf62e5b767c5a8ed239028bdb74ad7a8b62abf88d38c101 SHA512 61cbfbe4ff340b75ea8d356e031e932ac03fe65dd009999ff897ca4b0185d1d989490daf75ffeaaabb3e92c870c11c7ff8ad2cd6372f5363b3d774b8ecca6d89
26 DIST qtwebengine-5.15.3_p20220406-patchset.tar.xz 35480 BLAKE2B ce6aeebbb3255196611130d04ee7a3907ba45d6d2a283f2433e2176cf67e473e74137b180de0a9998762cc54439bb06825815e81e9f95f9413ce2956ac9308b7 SHA512 47e29a1429dce2db324929af91c8ef8421c75ae48f5a491db71b434f8017a5b1e7475e9938989e331e8e012220852848565242e09747892e1a8a8d3ab7386840
27 DIST qtwebengine-5.15.5_p20220618.tar.xz 320131236 BLAKE2B 842322c94737cdf647277ccf226c0d015ac0b362af54c4298cbad6b4494aa4ef0e73830577fb391be31c91b4331b85f407ec58641897a7cc7237e7623043577d SHA512 b1bab7aa5edc7f7b9d4f8338a05dbbd55ae6e0312e1a7e6061895bd7a98c67780127c20db1dbbc81664bf483a5b8f7ed887cedd1baaa1a0259e28fd4b13d6944
28 +DIST qtwebengine-everywhere-src-6.3.1.tar.xz 398269544 BLAKE2B 3b56a87fd93de0da9ccbfdeda0c5a3e07892dcb1c8dce848cc21c73cb45e7c94746bad299feaa68910ba036abf0c1c16fa423307fdc08c8af4e5e920e2e8a329 SHA512 e00601a7ec6400551f7707d15cf326340ae8d6a5bb8cda55df4619148414f4b3ca3daabfd7263dd5a2ff2ca8ba64f9e91c9db3f1a50bea4903148c57b6dc81dd
29
30 diff --git a/dev-qt/qtwebengine/files/qtwebengine-6.3.1-widevine.patch b/dev-qt/qtwebengine/files/qtwebengine-6.3.1-widevine.patch
31 new file mode 100644
32 index 000000000000..74da3f35f793
33 --- /dev/null
34 +++ b/dev-qt/qtwebengine/files/qtwebengine-6.3.1-widevine.patch
35 @@ -0,0 +1,18 @@
36 +Backport from 6.3.2
37 +https://bugreports.qt.io/browse/QTBUG-104238
38 +https://github.com/qutebrowser/qutebrowser/issues/7231
39 +--- a/src/core/content_client_qt.cpp
40 ++++ b/src/core/content_client_qt.cpp
41 +@@ -54,4 +54,5 @@
42 + #include "media/base/media_switches.h"
43 + #include "media/base/video_codecs.h"
44 ++#include "media/cdm/supported_audio_codecs.h"
45 + #include "media/media_buildflags.h"
46 + #include "ui/base/layout.h"
47 +@@ -276,4 +277,6 @@
48 + #endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
49 +
50 ++ capability->audio_codecs = media::GetCdmSupportedAudioCodecs();
51 ++
52 + // Add the supported encryption schemes as if they came from the
53 + // component manifest. This list must match the CDM that is being
54
55 diff --git a/dev-qt/qtwebengine/qtwebengine-6.3.1.ebuild b/dev-qt/qtwebengine/qtwebengine-6.3.1.ebuild
56 new file mode 100644
57 index 000000000000..468f7bbc29d7
58 --- /dev/null
59 +++ b/dev-qt/qtwebengine/qtwebengine-6.3.1.ebuild
60 @@ -0,0 +1,246 @@
61 +# Copyright 2021-2022 Gentoo Authors
62 +# Distributed under the terms of the GNU General Public License v2
63 +
64 +EAPI=8
65 +
66 +PYTHON_COMPAT=( python3_{9,10} )
67 +PYTHON_REQ_USE="xml(+)"
68 +CHROMIUM_VER="94.0.4606.126"
69 +CHROMIUM_PATCHES_VER="101.0.4951.64"
70 +
71 +inherit check-reqs estack flag-o-matic multiprocessing python-any-r1 qt6-build
72 +
73 +DESCRIPTION="Library for rendering dynamic web content in Qt6 C++ and QML applications"
74 +
75 +if [[ ${QT6_BUILD_TYPE} == release ]]; then
76 + KEYWORDS="~amd64"
77 +fi
78 +
79 +IUSE="
80 + alsa bindist designer geolocation +jumbo-build kerberos pulseaudio screencast
81 + +system-ffmpeg +system-icu widgets
82 +"
83 +REQUIRED_USE="designer? ( widgets )"
84 +
85 +BDEPEND="
86 + $(python_gen_any_dep 'dev-python/html5lib[${PYTHON_USEDEP}]')
87 + dev-util/gperf
88 + dev-util/ninja
89 + dev-util/re2c
90 + net-libs/nodejs[ssl]
91 + sys-devel/bison
92 + sys-devel/flex
93 +"
94 +RDEPEND="
95 + app-arch/snappy:=
96 + dev-libs/glib:2
97 + dev-libs/nspr
98 + dev-libs/nss
99 + dev-libs/expat
100 + dev-libs/libevent:=
101 + dev-libs/libxml2[icu]
102 + dev-libs/libxslt
103 + dev-libs/re2:=
104 + =dev-qt/qtdeclarative-${PV}*
105 + =dev-qt/qtwebchannel-${PV}*
106 + media-libs/fontconfig
107 + media-libs/freetype
108 + media-libs/harfbuzz:=
109 + media-libs/lcms:2
110 + media-libs/libjpeg-turbo:=
111 + media-libs/libpng:=
112 + >=media-libs/libvpx-1.5:=[svc(+)]
113 + media-libs/libwebp:=
114 + media-libs/opus
115 + sys-apps/dbus
116 + sys-apps/pciutils
117 + sys-libs/zlib[minizip]
118 + virtual/libudev
119 + x11-libs/libdrm
120 + x11-libs/libX11
121 + x11-libs/libXcomposite
122 + x11-libs/libXcursor
123 + x11-libs/libxcb:=
124 + x11-libs/libXdamage
125 + x11-libs/libXext
126 + x11-libs/libXfixes
127 + x11-libs/libXi
128 + x11-libs/libxkbcommon
129 + x11-libs/libxkbfile
130 + x11-libs/libXrandr
131 + x11-libs/libXrender
132 + x11-libs/libXScrnSaver
133 + x11-libs/libXtst
134 + alsa? ( media-libs/alsa-lib )
135 + geolocation? ( =dev-qt/qtpositioning-${PV}* )
136 + kerberos? ( virtual/krb5 )
137 + pulseaudio? ( media-libs/libpulse:= )
138 + screencast? ( media-video/pipewire:= )
139 + system-ffmpeg? ( media-video/ffmpeg:= )
140 + system-icu? ( >=dev-libs/icu-69.1:= )
141 + widgets? (
142 + =dev-qt/qtbase-${PV}*[widgets]
143 + )
144 +"
145 +DEPEND="${RDEPEND}
146 + media-libs/libglvnd
147 +"
148 +
149 +PATCHES=(
150 + "${FILESDIR}"/${P}-widevine.patch
151 +)
152 +
153 +python_check_deps() {
154 + python_has_version "dev-python/html5lib[${PYTHON_USEDEP}]"
155 +}
156 +
157 +qtwebengine_check-reqs() {
158 + # bug #307861
159 + eshopts_push -s extglob
160 + if is-flagq '-g?(gdb)?([1-9])'; then
161 + ewarn "You have enabled debug info (probably have -g or -ggdb in your CFLAGS/CXXFLAGS)."
162 + ewarn "You may experience really long compilation times and/or increased memory usage."
163 + ewarn "If compilation fails, please try removing -g/-ggdb before reporting a bug."
164 + fi
165 + eshopts_pop
166 +
167 + [[ ${MERGE_TYPE} == binary ]] && return
168 +
169 + # (check-reqs added for bug #570534)
170 + #
171 + # Estimate the amount of RAM required
172 + # Multiplier is *10 because Bash doesn't do floating point maths.
173 + # Let's crudely assume ~2GB per compiler job for GCC.
174 + local multiplier=20
175 +
176 + # And call it ~1.5GB for Clang.
177 + if tc-is-clang ; then
178 + multiplier=15
179 + fi
180 +
181 + local CHECKREQS_DISK_BUILD="7G"
182 + local CHECKREQS_DISK_USR="150M"
183 + if ! has "distcc" ${FEATURES} ; then
184 + # bug #830661
185 + # Not super realistic to come up with good estimates for distcc right now
186 + local CHECKREQS_MEMORY=$(($(makeopts_jobs)*multiplier/10))G
187 + fi
188 +
189 + check-reqs_${EBUILD_PHASE_FUNC}
190 +}
191 +
192 +pkg_pretend() {
193 + qtwebengine_check-reqs
194 +}
195 +
196 +pkg_setup() {
197 + qtwebengine_check-reqs
198 + python-any-r1_pkg_setup
199 +}
200 +
201 +pkg_preinst() {
202 + elog "This version of Qt WebEngine is based on Chromium version ${CHROMIUM_VER}, with"
203 + elog "additional security fixes up to ${CHROMIUM_PATCHES_VER}. Extensive as it is, the"
204 + elog "list of backports is impossible to evaluate, but always bound to be behind"
205 + elog "Chromium's release schedule."
206 + elog "In addition, various online services may deny service based on an outdated"
207 + elog "user agent version (and/or other checks). Google is already known to do so."
208 + elog
209 + elog "tldr: Your web browsing experience will be compromised."
210 +}
211 +
212 +src_unpack() {
213 + # bug 307861
214 + eshopts_push -s extglob
215 + if is-flagq '-g?(gdb)?([1-9])'; then
216 + ewarn
217 + ewarn "You have enabled debug info (probably have -g or -ggdb in your CFLAGS/CXXFLAGS)."
218 + ewarn "You may experience really long compilation times and/or increased memory usage."
219 + ewarn "If compilation fails, please try removing -g/-ggdb before reporting a bug."
220 + ewarn
221 + fi
222 + eshopts_pop
223 +
224 + case ${QT6_BUILD_TYPE} in
225 + live) git-r3_src_unpack ;&
226 + release) default ;;
227 + esac
228 +}
229 +
230 +src_prepare() {
231 + # bug 620444 - ensure local headers are used
232 + find . -type f -name "*.pr[fio]" -exec \
233 + sed -i -e 's|INCLUDEPATH += |&$${QTWEBENGINE_ROOT}_build/include $${QTWEBENGINE_ROOT}/include |' {} + || die
234 +
235 + if use system-icu; then
236 + # Sanity check to ensure that bundled copy of ICU is not used.
237 + # Whole src/3rdparty/chromium/third_party/icu directory cannot be deleted because
238 + # src/3rdparty/chromium/third_party/icu/BUILD.gn is used by build system.
239 + # If usage of headers of bundled copy of ICU occurs, then lists of shim headers in
240 + # shim_headers("icui18n_shim") and shim_headers("icuuc_shim") in
241 + # src/3rdparty/chromium/third_party/icu/BUILD.gn should be updated.
242 + local file
243 + while read file; do
244 + echo "#error This file should not be used!" > "${file}" || die
245 + done < <(find src/3rdparty/chromium/third_party/icu -type f "(" -name "*.c" -o -name "*.cpp" -o -name "*.h" ")" 2>/dev/null)
246 + fi
247 +
248 + qt6-build_src_prepare
249 +}
250 +
251 +src_configure() {
252 + export NINJA_PATH="${BROOT}"/usr/bin/ninja
253 + export NINJAFLAGS="${NINJAFLAGS:--j$(makeopts_jobs) -l$(makeopts_loadavg "${MAKEOPTS}" 0) -v}"
254 +
255 + local mycmakeargs=(
256 + #-DQT_FEATURE_accessibility=off
257 + #-DQT_FEATURE_force_asserts=off
258 + #-DQT_FEATURE_opengl=off
259 + #-DQT_FEATURE_printer=off
260 + -DQT_FEATURE_qtpdf_build=off
261 + -DQT_FEATURE_qtpdf_quick_build=off
262 + -DQT_FEATURE_qtpdf_widgets_build=off
263 + -DQT_FEATURE_qtwebengine_build=on
264 + -DQT_FEATURE_qtwebengine_quick_build=on
265 + -DQT_FEATURE_qtwebengine_widgets_build=on
266 + #-DQT_FEATURE_ssl=off
267 + #-DQT_FEATURE_static=off
268 + #-DQT_FEATURE_system_zlib=off
269 + #-DQT_FEATURE_system_png=off
270 + #-DQT_FEATURE_system_jpeg=off
271 + #-DQT_FEATURE_system_freetype=off
272 + #-DQT_FEATURE_system_harfbuzz=off
273 + #-DQT_FEATURE_use_gold_linker=off
274 + #-DQT_FEATURE_use_lld_linker=off
275 + -DQT_FEATURE_webengine_embedded_build=off
276 + -DQT_FEATURE_webengine_extensions=on
277 + #-DQT_FEATURE_webengine_full_debug_info=$(usex debug)
278 + -DQT_FEATURE_webengine_geolocation=$(usex geolocation on off)
279 + -DQT_FEATURE_webengine_jumbo_build=$(usex jumbo-build)
280 + #-DQT_FEATURE_webengine_jumbo_file_merge_limit
281 + -DQT_FEATURE_webengine_kerberos=$(usex kerberos on off)
282 + -DQT_FEATURE_webengine_native_spellchecker=off
283 + -DQT_FEATURE_webengine_ozone_x11=on
284 + -DQT_FEATURE_webengine_pepper_plugins=on
285 + -DQT_FEATURE_webengine_proprietary_codecs=$(usex bindist off on)
286 + -DQT_FEATURE_webengine_printing_and_pdf=on
287 + -DQT_FEATURE_webengine_sanitizer=on
288 + -DQT_FEATURE_webengine_spellchecker=on
289 + -DQT_FEATURE_webengine_system_opus=on
290 + -DQT_FEATURE_webengine_system_libwebp=on
291 + -DQT_FEATURE_webengine_system_alsa=$(usex alsa on off)
292 + -DQT_FEATURE_webengine_system_ffmpeg=$(usex system-ffmpeg)
293 + -DQT_FEATURE_webengine_system_icu=$(usex system-icu)
294 + -DQT_FEATURE_webengine_system_libevent=on
295 + -DQT_FEATURE_webengine_system_libpci=on
296 + -DQT_FEATURE_webengine_system_libpng=on
297 + -DQT_FEATURE_webengine_system_pulseaudio=$(usex pulseaudio on off)
298 + -DQT_FEATURE_webengine_system_zlib=on
299 + -DQT_FEATURE_webengine_webchannel=on
300 + -DQT_FEATURE_webengine_webrtc=on
301 + -DQT_FEATURE_webengine_webrtc_pipewire=$(usex screencast on off)
302 + #-DQT_FEATURE_xcb=off
303 + )
304 +
305 + qt6-build_src_configure
306 +}