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