Gentoo Archives: gentoo-commits

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