Gentoo Archives: gentoo-commits

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