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