Gentoo Archives: gentoo-commits

From: Stephan Hartmann <sultan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/chromium/
Date: Tue, 07 Dec 2021 17:09:27
Message-Id: 1638896951.c27645d440020c25623848a3a3958007a775d417.sultan@gentoo
1 commit: c27645d440020c25623848a3a3958007a775d417
2 Author: Stephan Hartmann <sultan <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 7 17:08:56 2021 +0000
4 Commit: Stephan Hartmann <sultan <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 7 17:09:11 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c27645d4
7
8 www-client/chromium: stable channel bump to 96.0.4664.93
9
10 Package-Manager: Portage-3.0.28, Repoman-3.0.3
11 Signed-off-by: Stephan Hartmann <sultan <AT> gentoo.org>
12
13 www-client/chromium/Manifest | 1 +
14 www-client/chromium/chromium-96.0.4664.93.ebuild | 963 +++++++++++++++++++++++
15 2 files changed, 964 insertions(+)
16
17 diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest
18 index 4342d3b8065c..14d8c01c9871 100644
19 --- a/www-client/chromium/Manifest
20 +++ b/www-client/chromium/Manifest
21 @@ -1,6 +1,7 @@
22 DIST chromium-96-patchset-4.tar.xz 4812 BLAKE2B 5d82d212b8ec1689be6f4a7a0646256311d06c17e74ee0e5b2035c32125a5235e4b6b7605cefffa367cc53e651be17b75f5e339149b4c80dca50cd959b1623f1 SHA512 a72c1bb2c58e9e2912a641093c153f01ad7239dc971c7c96481ba4164204afe41741f3253e8af03070dab8276179784dc6a11761b39ad7902ed2553016778282
23 DIST chromium-96-ppc64le-1.tar.xz 29224 BLAKE2B 3369a3b15eb4f42761e01758135995a1f34e40cecbfc0372a4bc17b393d50b276ea5a0813d1c57f73f0dd34cf2a021356d25c2b4dcaa95998ffc082545dc915c SHA512 256d64fbf192e55d77c6580d36766a67dadfbd0f1e34e49bfc6d55114da7f2252d783db0dd09123996a71a01ec4a3d5c70fd1a5c8852db135857b8495f7cfbf1
24 DIST chromium-96.0.4664.45.tar.xz 1221965612 BLAKE2B e990a2c3f0ae6d8bc4b6dddbecea2c640bb6491d9b321a301c1f168a35ad37553a23b8290a28dc05d50be005d3ad57fa69af2d3574266b9c83dcd24e65116c35 SHA512 0b1ccaf95697c14cb080dcb22e8584817ddcd98e704d081bc4f35a22dcfc8cca82dcabc4b82ad89ed0cd64752d226f389941bfab33b615e3948e2f778b9d9028
25 +DIST chromium-96.0.4664.93.tar.xz 1209670724 BLAKE2B ebc99f6232fb65874dc73af6157c7175c1b7bf98f800819c343bdb37c42f49369b6af0146a093663a09a2588652eeb196526e9de776098f69e5ba8d75d205e69 SHA512 3441380372014dc338418f494fcd7407dd3888cea07af3415c9e8ff2c3547abbd516ae03eb4b831b89923817046a6d1549fb9558db9aa271aa0ba397e514c0b3
26 DIST chromium-97-patchset-4.tar.xz 4240 BLAKE2B 450d013b6fd68f7e0bcb21a2b0828d531eda86965e636fe24fc36c2e7e1f74fe93f27f0d4b1d03e67c605797e28db37de4949ff78d5106e07b0362bec4bc5d8a SHA512 181c706c83bdbe07b2e7f02b654922a860aea761ad267e6545fb7d56b66373b003c1c79fae5cd45eeb3be8917782fa45df1c05bbb00e170f0146e7385f4246c4
27 DIST chromium-97.0.4692.36.tar.xz 1213467240 BLAKE2B 5a21c2b94fce104bef4dba895f170b496167154d0c364631f2f02d62a4ebb3fd0fa9143f570e4aad50d6b84214a6682b297aeef3cf6963fe7948a9b420c777bd SHA512 8aa99149c0bdf740988a0ba2d8e397f29df5b4372c6ab1e6700893e9a5978153c7d9701439ce7925de2ae521da689e5a1116876977e06d0c36350d03e10f8fc0
28 DIST chromium-98-patchset-2.tar.xz 6732 BLAKE2B 8d742607a5dbdabeed1885fcf69486628a1364980f885f51e729291c392d5ff63190ae6c77687dd0096dc8a5208c14606777b92a19fb66a643e6a23f382c014b SHA512 a94004e165f1437d9955aaeb600a8809443d2d5bc852967740c420c64da4a1cdde006cff1be9e0cc0f4fef15727349ae8f2526f0bcfcff702cc5a60515fbf873
29
30 diff --git a/www-client/chromium/chromium-96.0.4664.93.ebuild b/www-client/chromium/chromium-96.0.4664.93.ebuild
31 new file mode 100644
32 index 000000000000..e01296b19a1c
33 --- /dev/null
34 +++ b/www-client/chromium/chromium-96.0.4664.93.ebuild
35 @@ -0,0 +1,963 @@
36 +# Copyright 2009-2021 Gentoo Authors
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=8
40 +PYTHON_COMPAT=( python3_{8..10} )
41 +PYTHON_REQ_USE="xml"
42 +
43 +CHROMIUM_LANGS="am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu he
44 + hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr
45 + sv sw ta te th tr uk vi zh-CN zh-TW"
46 +
47 +inherit check-reqs chromium-2 desktop flag-o-matic ninja-utils pax-utils python-any-r1 readme.gentoo-r1 toolchain-funcs xdg-utils
48 +
49 +DESCRIPTION="Open-source version of Google Chrome web browser"
50 +HOMEPAGE="https://chromium.org/"
51 +PATCHSET="4"
52 +PATCHSET_NAME="chromium-$(ver_cut 1)-patchset-${PATCHSET}"
53 +PPC64LE_PATCHSET="1"
54 +SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.xz
55 + https://github.com/stha09/chromium-patches/releases/download/${PATCHSET_NAME}/${PATCHSET_NAME}.tar.xz
56 + ppc64? ( https://dev.gentoo.org/~gyakovlev/distfiles/${PN}-$(ver_cut 1)-ppc64le-${PPC64LE_PATCHSET}.tar.xz )"
57 +
58 +LICENSE="BSD"
59 +SLOT="0/stable"
60 +KEYWORDS="~amd64 ~arm64 ~x86"
61 +IUSE="component-build cups cpu_flags_arm_neon debug +hangouts headless +js-type-check kerberos +official pic +proprietary-codecs pulseaudio screencast selinux +suid +system-ffmpeg +system-harfbuzz +system-icu vaapi wayland widevine"
62 +REQUIRED_USE="
63 + component-build? ( !suid )
64 + screencast? ( wayland )
65 +"
66 +
67 +COMMON_X_DEPEND="
68 + media-libs/mesa:=[gbm(+)]
69 + x11-libs/libX11:=
70 + x11-libs/libXcomposite:=
71 + x11-libs/libXcursor:=
72 + x11-libs/libXdamage:=
73 + x11-libs/libXext:=
74 + x11-libs/libXfixes:=
75 + >=x11-libs/libXi-1.6.0:=
76 + x11-libs/libXrandr:=
77 + x11-libs/libXrender:=
78 + x11-libs/libXtst:=
79 + x11-libs/libxcb:=
80 + x11-libs/libxshmfence:=
81 + vaapi? ( >=x11-libs/libva-2.7:=[X,drm] )
82 +"
83 +
84 +COMMON_DEPEND="
85 + app-arch/bzip2:=
86 + cups? ( >=net-print/cups-1.3.11:= )
87 + dev-libs/expat:=
88 + dev-libs/glib:2
89 + >=dev-libs/libxml2-2.9.4-r3:=[icu]
90 + dev-libs/nspr:=
91 + >=dev-libs/nss-3.26:=
92 + >=media-libs/alsa-lib-1.0.19:=
93 + media-libs/fontconfig:=
94 + >=media-libs/freetype-2.11.0-r1:=
95 + system-harfbuzz? ( >=media-libs/harfbuzz-2.9.0:0=[icu(-)] )
96 + media-libs/libjpeg-turbo:=
97 + media-libs/libpng:=
98 + pulseaudio? ( media-sound/pulseaudio:= )
99 + system-ffmpeg? (
100 + >=media-video/ffmpeg-4.3:=
101 + || (
102 + media-video/ffmpeg[-samba]
103 + >=net-fs/samba-4.5.10-r1[-debug(-)]
104 + )
105 + >=media-libs/opus-1.3.1:=
106 + )
107 + net-misc/curl[ssl]
108 + sys-apps/dbus:=
109 + sys-apps/pciutils:=
110 + virtual/udev
111 + x11-libs/cairo:=
112 + x11-libs/gdk-pixbuf:2
113 + x11-libs/libxkbcommon:=
114 + x11-libs/pango:=
115 + media-libs/flac:=
116 + >=media-libs/libwebp-0.4.0:=
117 + sys-libs/zlib:=[minizip]
118 + kerberos? ( virtual/krb5 )
119 + !headless? (
120 + ${COMMON_X_DEPEND}
121 + >=app-accessibility/at-spi2-atk-2.26:2
122 + >=app-accessibility/at-spi2-core-2.26:2
123 + >=dev-libs/atk-2.26
124 + x11-libs/gtk+:3[X]
125 + wayland? (
126 + dev-libs/wayland:=
127 + screencast? ( media-video/pipewire:0/0.3 )
128 + x11-libs/gtk+:3[wayland,X]
129 + x11-libs/libdrm:=
130 + )
131 + )
132 +"
133 +RDEPEND="${COMMON_DEPEND}
134 + x11-misc/xdg-utils
135 + virtual/opengl
136 + virtual/ttf-fonts
137 + selinux? ( sec-policy/selinux-chromium )
138 +"
139 +DEPEND="${COMMON_DEPEND}
140 +"
141 +# dev-vcs/git - https://bugs.gentoo.org/593476
142 +BDEPEND="
143 + ${PYTHON_DEPS}
144 + $(python_gen_any_dep '
145 + dev-python/setuptools[${PYTHON_USEDEP}]
146 + ')
147 + >=app-arch/gzip-1.7
148 + dev-lang/perl
149 + >=dev-util/gn-0.1807
150 + dev-vcs/git
151 + >=dev-util/gperf-3.0.3
152 + >=dev-util/ninja-1.7.2
153 + >=net-libs/nodejs-7.6.0[inspector]
154 + >=sys-devel/bison-2.4.3
155 + sys-devel/flex
156 + virtual/pkgconfig
157 + js-type-check? ( virtual/jre )
158 +"
159 +
160 +# These are intended for ebuild maintainer use to force clang if GCC is broken.
161 +: ${CHROMIUM_FORCE_CLANG=no}
162 +: ${CHROMIUM_FORCE_LIBCXX=no}
163 +
164 +if [[ ${CHROMIUM_FORCE_CLANG} == yes ]]; then
165 + BDEPEND+=" >=sys-devel/clang-12"
166 +fi
167 +
168 +if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
169 + RDEPEND+=" >=sys-libs/libcxx-12"
170 + DEPEND+=" >=sys-libs/libcxx-12"
171 +else
172 + COMMON_DEPEND="
173 + dev-libs/libxslt:=
174 + >=dev-libs/re2-0.2019.08.01:=
175 + >=media-libs/openh264-1.6.0:=
176 + system-icu? ( >=dev-libs/icu-69.1:= )
177 + "
178 + RDEPEND+="${COMMON_DEPEND}"
179 + DEPEND+="${COMMON_DEPEND}"
180 +fi
181 +
182 +if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
183 + EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
184 +fi
185 +
186 +DISABLE_AUTOFORMATTING="yes"
187 +DOC_CONTENTS="
188 +Some web pages may require additional fonts to display properly.
189 +Try installing some of the following packages if some characters
190 +are not displayed properly:
191 +- media-fonts/arphicfonts
192 +- media-fonts/droid
193 +- media-fonts/ipamonafont
194 +- media-fonts/noto
195 +- media-fonts/ja-ipafonts
196 +- media-fonts/takao-fonts
197 +- media-fonts/wqy-microhei
198 +- media-fonts/wqy-zenhei
199 +
200 +To fix broken icons on the Downloads page, you should install an icon
201 +theme that covers the appropriate MIME types, and configure this as your
202 +GTK+ icon theme.
203 +
204 +For native file dialogs in KDE, install kde-apps/kdialog.
205 +
206 +To make password storage work with your desktop environment you may
207 +have install one of the supported credentials management applications:
208 +- app-crypt/libsecret (GNOME)
209 +- kde-frameworks/kwallet (KDE)
210 +If you have one of above packages installed, but don't want to use
211 +them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
212 +in /etc/chromium/default.
213 +"
214 +
215 +python_check_deps() {
216 + has_version -b "dev-python/setuptools[${PYTHON_USEDEP}]"
217 +}
218 +
219 +pre_build_checks() {
220 + if [[ ${MERGE_TYPE} != binary ]]; then
221 + local -x CPP="$(tc-getCXX) -E"
222 + if tc-is-gcc && ! ver_test "$(gcc-version)" -ge 9.2; then
223 + die "At least gcc 9.2 is required"
224 + fi
225 + if [[ ${CHROMIUM_FORCE_CLANG} == yes ]] || tc-is-clang; then
226 + CPP="${CHOST}-clang++ -E"
227 + if ! ver_test "$(clang-major-version)" -ge 12; then
228 + die "At least clang 12 is required"
229 + fi
230 + fi
231 + fi
232 +
233 + # Check build requirements, bug #541816 and bug #471810 .
234 + CHECKREQS_MEMORY="4G"
235 + CHECKREQS_DISK_BUILD="9G"
236 + if ( shopt -s extglob; is-flagq '-g?(gdb)?([1-9])' ); then
237 + if use custom-cflags || use component-build; then
238 + CHECKREQS_DISK_BUILD="25G"
239 + fi
240 + if ! use component-build; then
241 + CHECKREQS_MEMORY="16G"
242 + fi
243 + fi
244 + check-reqs_pkg_setup
245 +}
246 +
247 +pkg_pretend() {
248 + pre_build_checks
249 +}
250 +
251 +pkg_setup() {
252 + pre_build_checks
253 +
254 + chromium_suid_sandbox_check_kernel_config
255 +
256 + # nvidia-drivers does not work correctly with Wayland due to unsupported EGLStreams
257 + if use wayland && ! use headless && has_version "x11-drivers/nvidia-drivers"; then
258 + ewarn "Proprietary nVidia driver does not work with Wayland. You can disable"
259 + ewarn "Wayland by setting DISABLE_OZONE_PLATFORM=true in /etc/chromium/default."
260 + fi
261 +}
262 +
263 +src_prepare() {
264 + # Calling this here supports resumption via FEATURES=keepwork
265 + python_setup
266 +
267 + local PATCHES=(
268 + "${WORKDIR}/patches"
269 + "${FILESDIR}/chromium-93-InkDropHost-crash.patch"
270 + "${FILESDIR}/chromium-96-EnumTable-crash.patch"
271 + "${FILESDIR}/chromium-96-freetype-unbundle.patch"
272 + "${FILESDIR}/chromium-glibc-2.34.patch"
273 + "${FILESDIR}/chromium-use-oauth2-client-switches-as-default.patch"
274 + "${FILESDIR}/chromium-shim_headers.patch"
275 + )
276 +
277 + use ppc64 && PATCHES+=( "${WORKDIR}/${PN}-ppc64le" )
278 +
279 + default
280 +
281 + mkdir -p third_party/node/linux/node-linux-x64/bin || die
282 + ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
283 +
284 + # adjust python interpreter version
285 + sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
286 +
287 + local keeplibs=(
288 + base/third_party/cityhash
289 + base/third_party/double_conversion
290 + base/third_party/dynamic_annotations
291 + base/third_party/icu
292 + base/third_party/nspr
293 + base/third_party/superfasthash
294 + base/third_party/symbolize
295 + base/third_party/valgrind
296 + base/third_party/xdg_mime
297 + base/third_party/xdg_user_dirs
298 + buildtools/third_party/libc++
299 + buildtools/third_party/libc++abi
300 + chrome/third_party/mozilla_security_manager
301 + courgette/third_party
302 + net/third_party/mozilla_security_manager
303 + net/third_party/nss
304 + net/third_party/quic
305 + net/third_party/uri_template
306 + third_party/abseil-cpp
307 + third_party/angle
308 + third_party/angle/src/common/third_party/base
309 + third_party/angle/src/common/third_party/smhasher
310 + third_party/angle/src/common/third_party/xxhash
311 + third_party/angle/src/third_party/libXNVCtrl
312 + third_party/angle/src/third_party/trace_event
313 + third_party/angle/src/third_party/volk
314 + third_party/apple_apsl
315 + third_party/axe-core
316 + third_party/blink
317 + third_party/boringssl
318 + third_party/boringssl/src/third_party/fiat
319 + third_party/breakpad
320 + third_party/breakpad/breakpad/src/third_party/curl
321 + third_party/brotli
322 + third_party/catapult
323 + third_party/catapult/common/py_vulcanize/third_party/rcssmin
324 + third_party/catapult/common/py_vulcanize/third_party/rjsmin
325 + third_party/catapult/third_party/beautifulsoup4-4.9.3
326 + third_party/catapult/third_party/html5lib-1.1
327 + third_party/catapult/third_party/polymer
328 + third_party/catapult/third_party/six
329 + third_party/catapult/tracing/third_party/d3
330 + third_party/catapult/tracing/third_party/gl-matrix
331 + third_party/catapult/tracing/third_party/jpeg-js
332 + third_party/catapult/tracing/third_party/jszip
333 + third_party/catapult/tracing/third_party/mannwhitneyu
334 + third_party/catapult/tracing/third_party/oboe
335 + third_party/catapult/tracing/third_party/pako
336 + third_party/ced
337 + third_party/cld_3
338 + third_party/closure_compiler
339 + third_party/crashpad
340 + third_party/crashpad/crashpad/third_party/lss
341 + third_party/crashpad/crashpad/third_party/zlib
342 + third_party/crc32c
343 + third_party/cros_system_api
344 + third_party/dav1d
345 + third_party/dawn
346 + third_party/dawn/third_party/khronos
347 + third_party/dawn/third_party/tint
348 + third_party/depot_tools
349 + third_party/devscripts
350 + third_party/devtools-frontend
351 + third_party/devtools-frontend/src/front_end/third_party/acorn
352 + third_party/devtools-frontend/src/front_end/third_party/axe-core
353 + third_party/devtools-frontend/src/front_end/third_party/chromium
354 + third_party/devtools-frontend/src/front_end/third_party/codemirror
355 + third_party/devtools-frontend/src/front_end/third_party/diff
356 + third_party/devtools-frontend/src/front_end/third_party/i18n
357 + third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
358 + third_party/devtools-frontend/src/front_end/third_party/lighthouse
359 + third_party/devtools-frontend/src/front_end/third_party/lit-html
360 + third_party/devtools-frontend/src/front_end/third_party/lodash-isequal
361 + third_party/devtools-frontend/src/front_end/third_party/marked
362 + third_party/devtools-frontend/src/front_end/third_party/puppeteer
363 + third_party/devtools-frontend/src/front_end/third_party/wasmparser
364 + third_party/devtools-frontend/src/test/unittests/front_end/third_party/i18n
365 + third_party/devtools-frontend/src/third_party
366 + third_party/distributed_point_functions
367 + third_party/dom_distiller_js
368 + third_party/eigen3
369 + third_party/emoji-segmenter
370 + third_party/farmhash
371 + third_party/fdlibm
372 + third_party/fft2d
373 + third_party/flatbuffers
374 + third_party/freetype
375 + third_party/fusejs
376 + third_party/highway
377 + third_party/libgifcodec
378 + third_party/liburlpattern
379 + third_party/libzip
380 + third_party/gemmlowp
381 + third_party/google_input_tools
382 + third_party/google_input_tools/third_party/closure_library
383 + third_party/google_input_tools/third_party/closure_library/third_party/closure
384 + third_party/googletest
385 + third_party/hunspell
386 + third_party/iccjpeg
387 + third_party/inspector_protocol
388 + third_party/jinja2
389 + third_party/jsoncpp
390 + third_party/jstemplate
391 + third_party/khronos
392 + third_party/leveldatabase
393 + third_party/libXNVCtrl
394 + third_party/libaddressinput
395 + third_party/libaom
396 + third_party/libaom/source/libaom/third_party/fastfeat
397 + third_party/libaom/source/libaom/third_party/vector
398 + third_party/libaom/source/libaom/third_party/x86inc
399 + third_party/libavif
400 + third_party/libgav1
401 + third_party/libjingle
402 + third_party/libjxl
403 + third_party/libphonenumber
404 + third_party/libsecret
405 + third_party/libsrtp
406 + third_party/libsync
407 + third_party/libudev
408 + third_party/libva_protected_content
409 + third_party/libvpx
410 + third_party/libvpx/source/libvpx/third_party/x86inc
411 + third_party/libwebm
412 + third_party/libx11
413 + third_party/libxcb-keysyms
414 + third_party/libxml/chromium
415 + third_party/libyuv
416 + third_party/llvm
417 + third_party/lottie
418 + third_party/lss
419 + third_party/lzma_sdk
420 + third_party/mako
421 + third_party/maldoca
422 + third_party/maldoca/src/third_party/tensorflow_protos
423 + third_party/maldoca/src/third_party/zlibwrapper
424 + third_party/markupsafe
425 + third_party/mesa
426 + third_party/metrics_proto
427 + third_party/minigbm
428 + third_party/modp_b64
429 + third_party/nasm
430 + third_party/nearby
431 + third_party/neon_2_sse
432 + third_party/node
433 + third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2
434 + third_party/one_euro_filter
435 + third_party/opencv
436 + third_party/openscreen
437 + third_party/openscreen/src/third_party/mozilla
438 + third_party/openscreen/src/third_party/tinycbor/src/src
439 + third_party/ots
440 + third_party/pdfium
441 + third_party/pdfium/third_party/agg23
442 + third_party/pdfium/third_party/base
443 + third_party/pdfium/third_party/bigint
444 + third_party/pdfium/third_party/freetype
445 + third_party/pdfium/third_party/lcms
446 + third_party/pdfium/third_party/libopenjpeg20
447 + third_party/pdfium/third_party/libpng16
448 + third_party/pdfium/third_party/libtiff
449 + third_party/pdfium/third_party/skia_shared
450 + third_party/perfetto
451 + third_party/perfetto/protos/third_party/chromium
452 + third_party/pffft
453 + third_party/ply
454 + third_party/polymer
455 + third_party/private-join-and-compute
456 + third_party/private_membership
457 + third_party/protobuf
458 + third_party/protobuf/third_party/six
459 + third_party/pyjson5
460 + third_party/qcms
461 + third_party/rnnoise
462 + third_party/s2cellid
463 + third_party/securemessage
464 + third_party/shell-encryption
465 + third_party/simplejson
466 + third_party/skia
467 + third_party/skia/include/third_party/skcms
468 + third_party/skia/include/third_party/vulkan
469 + third_party/skia/third_party/skcms
470 + third_party/skia/third_party/vulkan
471 + third_party/smhasher
472 + third_party/snappy
473 + third_party/sqlite
474 + third_party/swiftshader
475 + third_party/swiftshader/third_party/astc-encoder
476 + third_party/swiftshader/third_party/llvm-subzero
477 + third_party/swiftshader/third_party/marl
478 + third_party/swiftshader/third_party/subzero
479 + third_party/swiftshader/third_party/SPIRV-Headers/include/spirv/unified1
480 + third_party/tcmalloc
481 + third_party/tensorflow-text
482 + third_party/tflite
483 + third_party/tflite/src/third_party/eigen3
484 + third_party/tflite/src/third_party/fft2d
485 + third_party/ruy
486 + third_party/six
487 + third_party/ukey2
488 + third_party/unrar
489 + third_party/usrsctp
490 + third_party/utf
491 + third_party/vulkan
492 + third_party/web-animations-js
493 + third_party/webdriver
494 + third_party/webgpu-cts
495 + third_party/webrtc
496 + third_party/webrtc/common_audio/third_party/ooura
497 + third_party/webrtc/common_audio/third_party/spl_sqrt_floor
498 + third_party/webrtc/modules/third_party/fft
499 + third_party/webrtc/modules/third_party/g711
500 + third_party/webrtc/modules/third_party/g722
501 + third_party/webrtc/rtc_base/third_party/base64
502 + third_party/webrtc/rtc_base/third_party/sigslot
503 + third_party/widevine
504 + third_party/woff2
505 + third_party/wuffs
506 + third_party/x11proto
507 + third_party/xcbproto
508 + third_party/zxcvbn-cpp
509 + third_party/zlib/google
510 + url/third_party/mozilla
511 + v8/src/third_party/siphash
512 + v8/src/third_party/valgrind
513 + v8/src/third_party/utf8-decoder
514 + v8/third_party/inspector_protocol
515 + v8/third_party/v8
516 +
517 + # gyp -> gn leftovers
518 + base/third_party/libevent
519 + third_party/speech-dispatcher
520 + third_party/usb_ids
521 + third_party/xdg-utils
522 + )
523 + if ! use system-ffmpeg; then
524 + keeplibs+=( third_party/ffmpeg third_party/opus )
525 + fi
526 + if ! use system-icu; then
527 + keeplibs+=( third_party/icu )
528 + fi
529 + if use system-harfbuzz; then
530 + keeplibs+=( third_party/harfbuzz-ng/utils )
531 + else
532 + keeplibs+=( third_party/harfbuzz-ng )
533 + fi
534 + if use wayland && ! use headless ; then
535 + keeplibs+=( third_party/wayland )
536 + fi
537 + if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
538 + keeplibs+=( third_party/libxml )
539 + keeplibs+=( third_party/libxslt )
540 + keeplibs+=( third_party/openh264 )
541 + keeplibs+=( third_party/re2 )
542 + if use system-icu; then
543 + keeplibs+=( third_party/icu )
544 + fi
545 + fi
546 + if use arm64 || use ppc64 ; then
547 + keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
548 + fi
549 + # we need to generate ppc64 stuff because upstream does not ship it yet
550 + # it has to be done before unbundling.
551 + if use ppc64; then
552 + pushd third_party/libvpx >/dev/null || die
553 + mkdir -p source/config/linux/ppc64 || die
554 + ./generate_gni.sh || die
555 + popd >/dev/null || die
556 + fi
557 +
558 + # Remove most bundled libraries. Some are still needed.
559 + build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
560 +
561 + if use js-type-check; then
562 + ln -s "${EPREFIX}"/usr/bin/java third_party/jdk/current/bin/java || die
563 + fi
564 +
565 + # bundled eu-strip is for amd64 only and we don't want to pre-stripped binaries
566 + mkdir -p buildtools/third_party/eu-strip/bin || die
567 + ln -s "${EPREFIX}"/bin/true buildtools/third_party/eu-strip/bin/eu-strip || die
568 +}
569 +
570 +src_configure() {
571 + # Calling this here supports resumption via FEATURES=keepwork
572 + python_setup
573 +
574 + local myconf_gn=""
575 +
576 + # Make sure the build system will use the right tools, bug #340795.
577 + tc-export AR CC CXX NM
578 +
579 + if [[ ${CHROMIUM_FORCE_CLANG} == yes ]] && ! tc-is-clang; then
580 + # Force clang since gcc is pretty broken at the moment.
581 + CC=${CHOST}-clang
582 + CXX=${CHOST}-clang++
583 + strip-unsupported-flags
584 + fi
585 +
586 + if tc-is-clang; then
587 + myconf_gn+=" is_clang=true clang_use_chrome_plugins=false"
588 + else
589 + if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
590 + die "Compiling with sys-libs/libcxx requires clang."
591 + fi
592 + myconf_gn+=" is_clang=false"
593 + fi
594 +
595 + # Define a custom toolchain for GN
596 + myconf_gn+=" custom_toolchain=\"//build/toolchain/linux/unbundle:default\""
597 +
598 + if tc-is-cross-compiler; then
599 + tc-export BUILD_{AR,CC,CXX,NM}
600 + myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:host\""
601 + myconf_gn+=" v8_snapshot_toolchain=\"//build/toolchain/linux/unbundle:host\""
602 + else
603 + myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:default\""
604 + fi
605 +
606 + # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
607 + myconf_gn+=" is_debug=false"
608 +
609 + # enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
610 + # DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
611 + myconf_gn+=" dcheck_always_on=$(usex debug true false)"
612 + myconf_gn+=" dcheck_is_configurable=$(usex debug true false)"
613 +
614 + # Component build isn't generally intended for use by end users. It's mostly useful
615 + # for development and debugging.
616 + myconf_gn+=" is_component_build=$(usex component-build true false)"
617 +
618 + # Disable nacl, we can't build without pnacl (http://crbug.com/269560).
619 + myconf_gn+=" enable_nacl=false"
620 +
621 + # Use system-provided libraries.
622 + # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
623 + # TODO: use_system_hunspell (upstream changes needed).
624 + # TODO: use_system_protobuf (bug #525560).
625 + # TODO: use_system_sqlite (http://crbug.com/22208).
626 +
627 + # libevent: https://bugs.gentoo.org/593458
628 + local gn_system_libraries=(
629 + flac
630 + fontconfig
631 + freetype
632 + # Need harfbuzz_from_pkgconfig target
633 + #harfbuzz-ng
634 + libdrm
635 + libjpeg
636 + libpng
637 + libwebp
638 + zlib
639 + )
640 + if use system-ffmpeg; then
641 + gn_system_libraries+=( ffmpeg opus )
642 + fi
643 + if use system-icu; then
644 + gn_system_libraries+=( icu )
645 + fi
646 + if [[ ${CHROMIUM_FORCE_LIBCXX} != yes ]]; then
647 + # unbundle only without libc++, because libc++ is not fully ABI compatible with libstdc++
648 + gn_system_libraries+=( libxml )
649 + gn_system_libraries+=( libxslt )
650 + gn_system_libraries+=( openh264 )
651 + gn_system_libraries+=( re2 )
652 + fi
653 + build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" || die
654 +
655 + # See dependency logic in third_party/BUILD.gn
656 + myconf_gn+=" use_system_harfbuzz=$(usex system-harfbuzz true false)"
657 +
658 + # Disable deprecated libgnome-keyring dependency, bug #713012
659 + myconf_gn+=" use_gnome_keyring=false"
660 +
661 + # Optional dependencies.
662 + myconf_gn+=" enable_js_type_check=$(usex js-type-check true false)"
663 + myconf_gn+=" enable_hangout_services_extension=$(usex hangouts true false)"
664 + myconf_gn+=" enable_widevine=$(usex widevine true false)"
665 + myconf_gn+=" use_cups=$(usex cups true false)"
666 + myconf_gn+=" use_kerberos=$(usex kerberos true false)"
667 + myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)"
668 + myconf_gn+=" use_vaapi=$(usex vaapi true false)"
669 + myconf_gn+=" rtc_use_pipewire=$(usex screencast true false)"
670 +
671 + # TODO: link_pulseaudio=true for GN.
672 +
673 + myconf_gn+=" disable_fieldtrial_testing_config=true"
674 +
675 + # Never use bundled gold binary. Disable gold linker flags for now.
676 + # Do not use bundled clang.
677 + # Trying to use gold results in linker crash.
678 + myconf_gn+=" use_gold=false use_sysroot=false use_custom_libcxx=false"
679 +
680 + # Disable forced lld, bug 641556
681 + myconf_gn+=" use_lld=false"
682 +
683 + # Disable pseudolocales, only used for testing
684 + myconf_gn+=" enable_pseudolocales=false"
685 +
686 + # Disable code formating of generated files
687 + myconf_gn+=" blink_enable_generated_code_formatting=false"
688 +
689 + ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)"
690 + myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)"
691 + myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\""
692 +
693 + # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys .
694 + # Note: these are for Gentoo use ONLY. For your own distribution,
695 + # please get your own set of keys. Feel free to contact chromium@g.o
696 + # for more info. The OAuth2 credentials, however, have been left out.
697 + # Those OAuth2 credentials have been broken for quite some time anyway.
698 + # Instead we apply a patch to use the --oauth2-client-id= and
699 + # --oauth2-client-secret= switches for setting GOOGLE_DEFAULT_CLIENT_ID and
700 + # GOOGLE_DEFAULT_CLIENT_SECRET at runtime. This allows signing into
701 + # Chromium without baked-in values.
702 + local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc"
703 + myconf_gn+=" google_api_key=\"${google_api_key}\""
704 + local myarch="$(tc-arch)"
705 +
706 + # Avoid CFLAGS problems, bug #352457, bug #390147.
707 + if ! use custom-cflags; then
708 + replace-flags "-Os" "-O2"
709 + strip-flags
710 +
711 + # Debug info section overflows without component build
712 + # Prevent linker from running out of address space, bug #471810 .
713 + if ! use component-build || use x86; then
714 + filter-flags "-g*"
715 + fi
716 +
717 + # Prevent libvpx build failures. Bug 530248, 544702, 546984.
718 + if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then
719 + filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2 -mno-fma -mno-fma4
720 + fi
721 + fi
722 +
723 + if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
724 + append-flags -stdlib=libc++
725 + append-ldflags -stdlib=libc++
726 + fi
727 +
728 + if [[ $myarch = amd64 ]] ; then
729 + myconf_gn+=" target_cpu=\"x64\""
730 + ffmpeg_target_arch=x64
731 + elif [[ $myarch = x86 ]] ; then
732 + myconf_gn+=" target_cpu=\"x86\""
733 + ffmpeg_target_arch=ia32
734 +
735 + # This is normally defined by compiler_cpu_abi in
736 + # build/config/compiler/BUILD.gn, but we patch that part out.
737 + append-flags -msse2 -mfpmath=sse -mmmx
738 + elif [[ $myarch = arm64 ]] ; then
739 + myconf_gn+=" target_cpu=\"arm64\""
740 + ffmpeg_target_arch=arm64
741 + elif [[ $myarch = arm ]] ; then
742 + myconf_gn+=" target_cpu=\"arm\""
743 + ffmpeg_target_arch=$(usex cpu_flags_arm_neon arm-neon arm)
744 + elif [[ $myarch = ppc64 ]] ; then
745 + myconf_gn+=" target_cpu=\"ppc64\""
746 + ffmpeg_target_arch=ppc64
747 + else
748 + die "Failed to determine target arch, got '$myarch'."
749 + fi
750 +
751 + # Make sure that -Werror doesn't get added to CFLAGS by the build system.
752 + # Depending on GCC version the warnings are different and we don't want
753 + # the build to fail because of that.
754 + myconf_gn+=" treat_warnings_as_errors=false"
755 +
756 + # Disable fatal linker warnings, bug 506268.
757 + myconf_gn+=" fatal_linker_warnings=false"
758 +
759 + # Bug 491582.
760 + export TMPDIR="${WORKDIR}/temp"
761 + mkdir -p -m 755 "${TMPDIR}" || die
762 +
763 + # https://bugs.gentoo.org/654216
764 + addpredict /dev/dri/ #nowarn
765 +
766 + #if ! use system-ffmpeg; then
767 + if false; then
768 + local build_ffmpeg_args=""
769 + if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then
770 + build_ffmpeg_args+=" --disable-asm"
771 + fi
772 +
773 + # Re-configure bundled ffmpeg. See bug #491378 for example reasons.
774 + einfo "Configuring bundled ffmpeg..."
775 + pushd third_party/ffmpeg > /dev/null || die
776 + chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \
777 + --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die
778 + chromium/scripts/copy_config.sh || die
779 + chromium/scripts/generate_gn.py || die
780 + popd > /dev/null || die
781 + fi
782 +
783 + # Chromium relies on this, but was disabled in >=clang-10, crbug.com/1042470
784 + append-cxxflags $(test-flags-CXX -flax-vector-conversions=all)
785 +
786 + # highway/libjxl fail on ppc64 without extra patches, disable for now.
787 + use ppc64 && myconf_gn+=" enable_jxl_decoder=false"
788 +
789 + # Disable unknown warning message from clang.
790 + tc-is-clang && append-flags -Wno-unknown-warning-option
791 +
792 + # Explicitly disable ICU data file support for system-icu builds.
793 + if use system-icu; then
794 + myconf_gn+=" icu_use_data_file=false"
795 + fi
796 +
797 + # Enable ozone wayland and/or headless support
798 + myconf_gn+=" use_ozone=true ozone_auto_platforms=false"
799 + myconf_gn+=" ozone_platform_headless=true"
800 + myconf_gn+=" ozone_platform_x11=$(usex headless false true)"
801 + if use wayland || use headless; then
802 + if use headless; then
803 + myconf_gn+=" ozone_platform=\"headless\""
804 + myconf_gn+=" use_x11=false"
805 + else
806 + myconf_gn+=" ozone_platform_wayland=true"
807 + myconf_gn+=" use_system_libdrm=true"
808 + myconf_gn+=" use_system_minigbm=true"
809 + myconf_gn+=" use_xkbcommon=true"
810 + myconf_gn+=" ozone_platform=\"wayland\""
811 + fi
812 + else
813 + myconf_gn+=" ozone_platform=\"x11\""
814 + fi
815 +
816 + # Enable official builds
817 + myconf_gn+=" is_official_build=$(usex official true false)"
818 + myconf_gn+=" use_thin_lto=false"
819 + if use official; then
820 + # Allow building against system libraries in official builds
821 + sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
822 + tools/generate_shim_headers/generate_shim_headers.py || die
823 + # Disable CFI: unsupported for GCC, requires clang+lto+lld
824 + myconf_gn+=" is_cfi=false"
825 + # Disable PGO, because profile data is only compatible with >=clang-11
826 + myconf_gn+=" chrome_pgo_phase=0"
827 + fi
828 +
829 + einfo "Configuring Chromium..."
830 + set -- gn gen --args="${myconf_gn} ${EXTRA_GN}" out/Release
831 + echo "$@"
832 + "$@" || die
833 +}
834 +
835 +src_compile() {
836 + # Final link uses lots of file descriptors.
837 + ulimit -n 2048
838 +
839 + # Calling this here supports resumption via FEATURES=keepwork
840 + python_setup
841 +
842 + # Don't inherit PYTHONPATH from environment, bug #789021, #812689
843 + local -x PYTHONPATH=
844 +
845 + #"${EPYTHON}" tools/clang/scripts/update.py --force-local-build --gcc-toolchain /usr --skip-checkout --use-system-cmake --without-android || die
846 +
847 + # Build mksnapshot and pax-mark it.
848 + local x
849 + for x in mksnapshot v8_context_snapshot_generator; do
850 + if tc-is-cross-compiler; then
851 + eninja -C out/Release "host/${x}"
852 + pax-mark m "out/Release/host/${x}"
853 + else
854 + eninja -C out/Release "${x}"
855 + pax-mark m "out/Release/${x}"
856 + fi
857 + done
858 +
859 + # Even though ninja autodetects number of CPUs, we respect
860 + # user's options, for debugging with -j 1 or any other reason.
861 + eninja -C out/Release chrome chromedriver
862 + use suid && eninja -C out/Release chrome_sandbox
863 +
864 + pax-mark m out/Release/chrome
865 +
866 + mv out/Release/chromedriver{.unstripped,} || die
867 +
868 + # Build manpage; bug #684550
869 + sed -e 's|@@PACKAGE@@|chromium-browser|g;
870 + s|@@MENUNAME@@|Chromium|g;' \
871 + chrome/app/resources/manpage.1.in > \
872 + out/Release/chromium-browser.1 || die
873 +
874 + # Build desktop file; bug #706786
875 + sed -e 's|@@MENUNAME@@|Chromium|g;
876 + s|@@USR_BIN_SYMLINK_NAME@@|chromium-browser|g;
877 + s|@@PACKAGE@@|chromium-browser|g;
878 + s|\(^Exec=\)/usr/bin/|\1|g;' \
879 + chrome/installer/linux/common/desktop.template > \
880 + out/Release/chromium-browser-chromium.desktop || die
881 +
882 + # Build vk_swiftshader_icd.json; bug #827861
883 + sed -e 's|${ICD_LIBRARY_PATH}|./libvk_swiftshader.so|g' \
884 + third_party/swiftshader/src/Vulkan/vk_swiftshader_icd.json.tmpl > \
885 + out/Release/vk_swiftshader_icd.json || die
886 +}
887 +
888 +src_install() {
889 + local CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser"
890 + exeinto "${CHROMIUM_HOME}"
891 + doexe out/Release/chrome
892 +
893 + if use suid; then
894 + newexe out/Release/chrome_sandbox chrome-sandbox
895 + fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
896 + fi
897 +
898 + doexe out/Release/chromedriver
899 + doexe out/Release/chrome_crashpad_handler
900 +
901 + ozone_auto_session () {
902 + use wayland && ! use headless && echo true || echo false
903 + }
904 + local sedargs=( -e
905 + "s:/usr/lib/:/usr/$(get_libdir)/:g;
906 + s:@@OZONE_AUTO_SESSION@@:$(ozone_auto_session):g"
907 + )
908 + sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r7.sh" > chromium-launcher.sh || die
909 + doexe chromium-launcher.sh
910 +
911 + # It is important that we name the target "chromium-browser",
912 + # xdg-utils expect it; bug #355517.
913 + dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser
914 + # keep the old symlink around for consistency
915 + dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium
916 +
917 + dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver
918 +
919 + # Allow users to override command-line options, bug #357629.
920 + insinto /etc/chromium
921 + newins "${FILESDIR}/chromium.default" "default"
922 +
923 + pushd out/Release/locales > /dev/null || die
924 + chromium_remove_language_paks
925 + popd
926 +
927 + insinto "${CHROMIUM_HOME}"
928 + doins out/Release/*.bin
929 + doins out/Release/*.pak
930 + (
931 + shopt -s nullglob
932 + local files=(out/Release/*.so out/Release/*.so.[0-9])
933 + [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
934 + )
935 +
936 + if ! use system-icu; then
937 + doins out/Release/icudtl.dat
938 + fi
939 +
940 + doins -r out/Release/locales
941 + doins -r out/Release/resources
942 + doins -r out/Release/MEIPreload
943 +
944 + # Install vk_swiftshader_icd.json; bug #827861
945 + doins out/Release/vk_swiftshader_icd.json
946 +
947 + if [[ -d out/Release/swiftshader ]]; then
948 + insinto "${CHROMIUM_HOME}/swiftshader"
949 + doins out/Release/swiftshader/*.so
950 + fi
951 +
952 + # Install icons
953 + local branding size
954 + for size in 16 24 32 48 64 128 256 ; do
955 + case ${size} in
956 + 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
957 + *) branding="chrome/app/theme/chromium" ;;
958 + esac
959 + newicon -s ${size} "${branding}/product_logo_${size}.png" \
960 + chromium-browser.png
961 + done
962 +
963 + # Install desktop entry
964 + domenu out/Release/chromium-browser-chromium.desktop
965 +
966 + # Install GNOME default application entry (bug #303100).
967 + insinto /usr/share/gnome-control-center/default-apps
968 + newins "${FILESDIR}"/chromium-browser.xml chromium-browser.xml
969 +
970 + # Install manpage; bug #684550
971 + doman out/Release/chromium-browser.1
972 + dosym chromium-browser.1 /usr/share/man/man1/chromium.1
973 +
974 + readme.gentoo_create_doc
975 +}
976 +
977 +pkg_postrm() {
978 + xdg_icon_cache_update
979 + xdg_desktop_database_update
980 +}
981 +
982 +pkg_postinst() {
983 + xdg_icon_cache_update
984 + xdg_desktop_database_update
985 + readme.gentoo_print_elog
986 +
987 + if use vaapi; then
988 + elog "VA-API is disabled by default at runtime. You have to enable it"
989 + elog "by adding --enable-features=VaapiVideoDecoder to CHROMIUM_FLAGS"
990 + elog "in /etc/chromium/default."
991 + fi
992 + if use screencast; then
993 + elog "Screencast is disabled by default at runtime. Either enable it"
994 + elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
995 + elog "inside Chromium or add --enable-webrtc-pipewire-capturer"
996 + elog "to CHROMIUM_FLAGS in /etc/chromium/default."
997 + fi
998 +}