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