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