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