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