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