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