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