Gentoo Archives: gentoo-commits

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