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/qtwebengine/
Date: Thu, 26 May 2022 19:35:41
Message-Id: 1653593659.fa0ed801438935af8cd8896d5b788483e7893fa1.asturm@gentoo
1 commit: fa0ed801438935af8cd8896d5b788483e7893fa1
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 26 19:34:05 2022 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Thu May 26 19:34:19 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa0ed801
7
8 dev-qt/qtwebengine: 5.15.4_p20220526 version bump
9
10 Various security fixes...
11
12 Snapshotted at:
13 Branch: 5.15
14 Commit: 79943b157ef381e5953f34f8e03049f2eecd6eb5
15
16 Submodule qtwebengine-chromium.git:
17 Branch: 87-based
18 Commit: 7857ff290ab254a5a1fe2e85e146680448b4d46e
19
20 Bug: https://bugs.gentoo.org/847613
21 Package-Manager: Portage-3.0.30, Repoman-3.0.3
22 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
23
24 dev-qt/qtwebengine/Manifest | 1 +
25 .../qtwebengine-5.15.4_p20220526.ebuild | 275 +++++++++++++++++++++
26 2 files changed, 276 insertions(+)
27
28 diff --git a/dev-qt/qtwebengine/Manifest b/dev-qt/qtwebengine/Manifest
29 index 4b7a113801fc..3f7cebd254e7 100644
30 --- a/dev-qt/qtwebengine/Manifest
31 +++ b/dev-qt/qtwebengine/Manifest
32 @@ -3,3 +3,4 @@ DIST qtwebengine-5.15.2_p20211019-jumbo-build.patch.bz2 2930 BLAKE2B fca1d140687
33 DIST qtwebengine-5.15.3_p20220406-patchset.tar.xz 35480 BLAKE2B ce6aeebbb3255196611130d04ee7a3907ba45d6d2a283f2433e2176cf67e473e74137b180de0a9998762cc54439bb06825815e81e9f95f9413ce2956ac9308b7 SHA512 47e29a1429dce2db324929af91c8ef8421c75ae48f5a491db71b434f8017a5b1e7475e9938989e331e8e012220852848565242e09747892e1a8a8d3ab7386840
34 DIST qtwebengine-5.15.3_p20220406.tar.xz 318979648 BLAKE2B 3aba9293c52f96379cfe37c418c7a29a28e2fc0a8526d35452bef28c03b101054131d0daf75f07f058f80fbd42678b6bd24733573318169908f1d5e18d147db8 SHA512 80bf51b547cc8e15473652327a0cb753211911e8c98b1cb8b2cd696af923e79eccdc74aa4b68b6184c74ceb3a9bd708c7313f48eab4381ebeaac8192daa163b6
35 DIST qtwebengine-5.15.3_p20220505.tar.xz 318923536 BLAKE2B 18798ee82864bf513525be30aba58636518b5f13061826a5f80a791baeb3a7695f2626a3eec8b8be88ef6ae4a4caa989f9a35b8b9d8d6f85f727ce3e3a18e110 SHA512 c5f0688aa782f1e8f6a076b0bc4ba0c5bb0518a784399d915da924f1a4e798dff1d23158b3bc73e46629020f5490a15823d6d5b36463dc7ebdec14331fe4323e
36 +DIST qtwebengine-5.15.4_p20220526.tar.xz 318787804 BLAKE2B 946331d1460f2db43730c7a1f506690eb1f6f25438e52ff627fff0776cbca439cde2d2654679a238ce0384b0a92bf8eb84db97d1093b2a733dd97fa08bf4c864 SHA512 a27d31ef46b5841fec91c10b91c3c1735ace77fde17fa09018836f8d11d85b34b08318b150b791a68efde59c1317109633e938dfbb5542c22033e8ba0ce46cad
37
38 diff --git a/dev-qt/qtwebengine/qtwebengine-5.15.4_p20220526.ebuild b/dev-qt/qtwebengine/qtwebengine-5.15.4_p20220526.ebuild
39 new file mode 100644
40 index 000000000000..2505b76ea618
41 --- /dev/null
42 +++ b/dev-qt/qtwebengine/qtwebengine-5.15.4_p20220526.ebuild
43 @@ -0,0 +1,275 @@
44 +# Copyright 1999-2022 Gentoo Authors
45 +# Distributed under the terms of the GNU General Public License v2
46 +
47 +EAPI=8
48 +
49 +PYTHON_COMPAT=( python3_{9,10} )
50 +PYTHON_REQ_USE="xml(+)"
51 +inherit check-reqs estack flag-o-matic multiprocessing python-any-r1 qt5-build toolchain-funcs
52 +
53 +DESCRIPTION="Library for rendering dynamic web content in Qt5 C++ and QML applications"
54 +HOMEPAGE="https://www.qt.io/"
55 +
56 +if [[ ${QT5_BUILD_TYPE} == release ]]; then
57 +# KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
58 + if [[ ${PV} == ${QT5_PV}_p* ]]; then
59 + SRC_URI="https://dev.gentoo.org/~asturm/distfiles/${P}.tar.xz"
60 + S="${WORKDIR}/${P}"
61 + QT5_BUILD_DIR="${S}_build"
62 + fi
63 +else
64 + EGIT_BRANCH="5.15"
65 + EGIT_REPO_URI=(
66 + "https://code.qt.io/qt/${QT5_MODULE}.git"
67 + "https://github.com/qt/${QT5_MODULE}.git"
68 + )
69 + inherit git-r3
70 +fi
71 +
72 +# ppc64 patchset based on https://github.com/chromium-ppc64le releases
73 +SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-5.15.2_p20211019-jumbo-build.patch.bz2
74 + https://dev.gentoo.org/~asturm/distfiles/${PN}-5.15.3_p20220406-patchset.tar.xz
75 + ppc64? ( https://dev.gentoo.org/~gyakovlev/distfiles/${PN}-5.15.2-r1-chromium87-ppc64le.tar.xz )"
76 +
77 +IUSE="alsa bindist designer geolocation +jumbo-build kerberos pulseaudio screencast +system-ffmpeg +system-icu widgets"
78 +REQUIRED_USE="designer? ( widgets )"
79 +
80 +RDEPEND="
81 + app-arch/snappy:=
82 + dev-libs/glib:2
83 + dev-libs/nspr
84 + dev-libs/nss
85 + dev-libs/expat
86 + dev-libs/libevent:=
87 + dev-libs/libxml2[icu]
88 + dev-libs/libxslt
89 + dev-libs/re2:=
90 + =dev-qt/qtcore-${QT5_PV}*
91 + =dev-qt/qtdeclarative-${QT5_PV}*
92 + =dev-qt/qtgui-${QT5_PV}*
93 + =dev-qt/qtnetwork-${QT5_PV}*
94 + =dev-qt/qtprintsupport-${QT5_PV}*
95 + =dev-qt/qtwebchannel-${QT5_PV}*[qml]
96 + media-libs/fontconfig
97 + media-libs/freetype
98 + media-libs/harfbuzz:=
99 + media-libs/lcms:2
100 + media-libs/libjpeg-turbo:=
101 + media-libs/libpng:0=
102 + >=media-libs/libvpx-1.5:=[svc(+)]
103 + media-libs/libwebp:=
104 + media-libs/opus
105 + sys-apps/dbus
106 + sys-apps/pciutils
107 + sys-libs/zlib[minizip]
108 + virtual/libudev
109 + x11-libs/libdrm
110 + x11-libs/libX11
111 + x11-libs/libXcomposite
112 + x11-libs/libXcursor
113 + x11-libs/libXdamage
114 + x11-libs/libXext
115 + x11-libs/libXfixes
116 + x11-libs/libXi
117 + x11-libs/libxkbfile
118 + x11-libs/libXrandr
119 + x11-libs/libXrender
120 + x11-libs/libXScrnSaver
121 + x11-libs/libXtst
122 + alsa? ( media-libs/alsa-lib )
123 + designer? ( =dev-qt/designer-${QT5_PV}* )
124 + geolocation? ( =dev-qt/qtpositioning-${QT5_PV}* )
125 + kerberos? ( virtual/krb5 )
126 + pulseaudio? ( media-sound/pulseaudio:= )
127 + screencast? ( media-video/pipewire:= )
128 + system-ffmpeg? ( media-video/ffmpeg:0= )
129 + system-icu? ( >=dev-libs/icu-69.1:= )
130 + widgets? (
131 + =dev-qt/qtdeclarative-${QT5_PV}*[widgets]
132 + =dev-qt/qtwidgets-${QT5_PV}*
133 + )
134 +"
135 +DEPEND="${RDEPEND}
136 + media-libs/libglvnd
137 +"
138 +BDEPEND="${PYTHON_DEPS}
139 + dev-util/gperf
140 + dev-util/ninja
141 + dev-util/re2c
142 + net-libs/nodejs[ssl]
143 + sys-devel/bison
144 + sys-devel/flex
145 + ppc64? ( >=dev-util/gn-0.1807 )
146 +"
147 +
148 +PATCHES=(
149 + "${FILESDIR}/${PN}-5.15.2-disable-fatal-warnings.patch" # downstream, bug 695446
150 + "${FILESDIR}/${PN}-5.15.3_p20220505-extra-gn.patch" # downstream, bug 774186
151 + "${FILESDIR}/${PN}-5.15.2_p20210224-chromium-87-v8-icu68.patch" # downstream, bug 757606
152 + "${FILESDIR}/${PN}-5.15.2_p20210224-disable-git.patch" # downstream snapshot fix
153 + "${FILESDIR}/${PN}-5.15.2_p20211015-pdfium-system-lcms2.patch" # by Debian, QTBUG-61746
154 + "${FILESDIR}/${PN}-5.15.3_p20220329-clang14.patch" # by FreeBSD, bug 836604
155 + "${FILESDIR}/${PN}-5.15.3_p20220406-gcc12-includes.patch" # by openSUSE, bug 840326
156 + "${WORKDIR}/${PN}-5.15.2_p20211019-jumbo-build.patch" # bug 813957
157 + "${WORKDIR}/${PN}-5.15.3_p20220406-patchset" # bug 698988 (py2--), pipewire-3
158 +)
159 +
160 +qtwebengine_check-reqs() {
161 + # bug #307861
162 + eshopts_push -s extglob
163 + if is-flagq '-g?(gdb)?([1-9])'; then
164 + ewarn "You have enabled debug info (probably have -g or -ggdb in your CFLAGS/CXXFLAGS)."
165 + ewarn "You may experience really long compilation times and/or increased memory usage."
166 + ewarn "If compilation fails, please try removing -g/-ggdb before reporting a bug."
167 + fi
168 + eshopts_pop
169 +
170 + [[ ${MERGE_TYPE} == binary ]] && return
171 +
172 + # (check-reqs added for bug #570534)
173 + #
174 + # Estimate the amount of RAM required
175 + # Multiplier is *10 because Bash doesn't do floating point maths.
176 + # Let's crudely assume ~2GB per compiler job for GCC.
177 + local multiplier=20
178 +
179 + # And call it ~1.5GB for Clang.
180 + if tc-is-clang ; then
181 + multiplier=15
182 + fi
183 +
184 + local CHECKREQS_DISK_BUILD="7G"
185 + local CHECKREQS_DISK_USR="150M"
186 + if ! has "distcc" ${FEATURES} ; then
187 + # bug #830661
188 + # Not super realistic to come up with good estimates for distcc right now
189 + local CHECKREQS_MEMORY=$(($(makeopts_jobs)*multiplier/10))G
190 + fi
191 +
192 + check-reqs_${EBUILD_PHASE_FUNC}
193 +}
194 +
195 +pkg_pretend() {
196 + qtwebengine_check-reqs
197 +}
198 +
199 +pkg_setup() {
200 + qtwebengine_check-reqs
201 + python-any-r1_pkg_setup
202 +}
203 +
204 +src_unpack() {
205 + case ${QT5_BUILD_TYPE} in
206 + live) git-r3_src_unpack ;&
207 + release) default ;;
208 + esac
209 +}
210 +
211 +src_prepare() {
212 + if [[ ${PV} == ${QT5_PV}_p* ]]; then
213 + # This is made from git, and for some reason will fail w/o .git directories.
214 + mkdir -p .git src/3rdparty/chromium/.git || die
215 + fi
216 + # We need to make sure this integrates well into Qt 5.15.3 installation.
217 + # Otherwise revdeps fail w/o heavy changes. This is the simplest way to do it.
218 + # See also: https://www.qt.io/blog/building-qt-webengine-against-other-qt-versions
219 + sed -E "/^MODULE_VERSION/s/5\.15\.[0-9]+/${QT5_PV}/" -i .qmake.conf || die
220 +
221 + # QTBUG-88657 - jumbo-build could still make trouble
222 + if ! use jumbo-build; then
223 + sed -i -e 's|use_jumbo_build=true|use_jumbo_build=false|' \
224 + src/buildtools/config/common.pri || die
225 + fi
226 +
227 + # bug 620444 - ensure local headers are used
228 + find "${S}" -type f -name "*.pr[fio]" | \
229 + xargs sed -i -e 's|INCLUDEPATH += |&$${QTWEBENGINE_ROOT}_build/include $${QTWEBENGINE_ROOT}/include |' || die
230 +
231 + if use system-icu; then
232 + # Sanity check to ensure that bundled copy of ICU is not used.
233 + # Whole src/3rdparty/chromium/third_party/icu directory cannot be deleted because
234 + # src/3rdparty/chromium/third_party/icu/BUILD.gn is used by build system.
235 + # If usage of headers of bundled copy of ICU occurs, then lists of shim headers in
236 + # shim_headers("icui18n_shim") and shim_headers("icuuc_shim") in
237 + # src/3rdparty/chromium/third_party/icu/BUILD.gn should be updated.
238 + local file
239 + while read file; do
240 + echo "#error This file should not be used!" > "${file}" || die
241 + done < <(find src/3rdparty/chromium/third_party/icu -type f "(" -name "*.c" -o -name "*.cpp" -o -name "*.h" ")" 2>/dev/null)
242 + fi
243 +
244 + # src/3rdparty/gn fails with libc++ due to passing of `-static-libstdc++`
245 + if tc-is-clang && has_version 'sys-devel/clang[default-libcxx]'; then
246 + eapply "${FILESDIR}/${PN}-5.15.2_p20210521-clang-libc++.patch"
247 + fi
248 +
249 + if use system-ffmpeg && has_version '>=media-video/ffmpeg-5'; then
250 + eapply "${FILESDIR}/${PN}-5.15.3_p20220406-ffmpeg5.patch" # by Archlinux, bug 831437
251 + fi
252 +
253 + qt_use_disable_config alsa webengine-alsa src/buildtools/config/linux.pri
254 + qt_use_disable_config pulseaudio webengine-pulseaudio src/buildtools/config/linux.pri
255 +
256 + qt_use_disable_mod designer webenginewidgets src/plugins/plugins.pro
257 +
258 + qt_use_disable_mod widgets widgets src/src.pro
259 +
260 + qt5-build_src_prepare
261 +
262 + # we need to generate ppc64 stuff because upstream does not ship it yet
263 + if use ppc64; then
264 + einfo "Patching for ppc64le and generating build files"
265 + eapply "${FILESDIR}/qtwebengine-5.15.2-enable-ppc64.patch"
266 + pushd src/3rdparty/chromium > /dev/null || die
267 + eapply -p0 "${WORKDIR}/${PN}-ppc64le"
268 + popd > /dev/null || die
269 + pushd src/3rdparty/chromium/third_party/libvpx > /dev/null || die
270 + mkdir -vp source/config/linux/ppc64 || die
271 + mkdir -p source/libvpx/test || die
272 + touch source/libvpx/test/test.mk || die
273 + ./generate_gni.sh || die
274 + popd >/dev/null || die
275 + fi
276 +}
277 +
278 +src_configure() {
279 + export NINJA_PATH=/usr/bin/ninja
280 + export NINJAFLAGS="${NINJAFLAGS:--j$(makeopts_jobs "${MAKEOPTS}" 999) -l$(makeopts_loadavg "${MAKEOPTS}" 0) -v}"
281 +
282 + local myqmakeargs=(
283 + --
284 + -no-build-qtpdf
285 + -printing-and-pdf
286 + -system-opus
287 + -system-webp
288 + $(qt_use alsa)
289 + $(qt_use !bindist proprietary-codecs)
290 + $(qt_use geolocation webengine-geolocation)
291 + $(qt_use kerberos webengine-kerberos)
292 + $(qt_use pulseaudio)
293 + $(usex screencast -webengine-webrtc-pipewire '')
294 + $(usex system-ffmpeg -system-ffmpeg -qt-ffmpeg)
295 + $(qt_use system-icu webengine-icu)
296 + )
297 + qt5-build_src_configure
298 +}
299 +
300 +src_install() {
301 + qt5-build_src_install
302 +
303 + # bug 601472
304 + if [[ ! -f ${D}${QT5_LIBDIR}/libQt5WebEngine.so ]]; then
305 + die "${CATEGORY}/${PF} failed to build anything. Please report to https://bugs.gentoo.org/"
306 + fi
307 +}
308 +
309 +pkg_preinst() {
310 + elog "This version of Qt WebEngine is based on Chromium version 87.0.4280.144,"
311 + elog "with additional security fixes from newer versions. Extensive as it is, the"
312 + elog "list of backports is impossible to evaluate, but always bound to be behind"
313 + elog "Chromium's release schedule."
314 + elog "In addition, various online services may deny service based on an outdated"
315 + elog "user agent version (and/or other checks). Google is already known to do so."
316 + elog
317 + elog "tldr: Your web browsing experience will be compromised."
318 +}