Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/chromium/
Date: Fri, 16 Jul 2021 19:13:57
Message-Id: 1626462698.ec8a50aa1f4f5f64f99adb85ac74208522aa1a11.floppym@gentoo
1 commit: ec8a50aa1f4f5f64f99adb85ac74208522aa1a11
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jul 16 19:11:38 2021 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Fri Jul 16 19:11:38 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec8a50aa
7
8 www-client/chromium: add 91.0.4472.164
9
10 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
11
12 www-client/chromium/Manifest | 1 +
13 www-client/chromium/chromium-91.0.4472.164.ebuild | 944 ++++++++++++++++++++++
14 2 files changed, 945 insertions(+)
15
16 diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest
17 index 40bd0dc6b52..5f0a166faf3 100644
18 --- a/www-client/chromium/Manifest
19 +++ b/www-client/chromium/Manifest
20 @@ -2,6 +2,7 @@ DIST chromium-91-patchset-6.tar.xz 4280 BLAKE2B 18887953453133589cfc5df58d247250
21 DIST chromium-91-ppc64le-6.tar.xz 28968 BLAKE2B 5153be672aec91899d9eabe3ddf4c3d0b4b2d307e396afa2a83bf3102bc540fa62d69df365057128227428bd3abfc8cab9203fae41e5150191025d8ecea935ab SHA512 78071d204bf04a13a132a63a3d268a0d6d05a895c1ee55a41176fb5cca975c502e69a83ca0388ecea92c041f24235c452abdfbf0ee557e93db6685589fb9428b
22 DIST chromium-91.0.4472.106.tar.xz 950214296 BLAKE2B 1c68c3d6ccb593b4516482ba8f18f3bf769fe90ca423692f8e8d9fabd36fa8cda7a66f870fc30478ea4e1f9bd147bb6cadb77df4d9e0ef846c30e653b15dcc98 SHA512 142507bbf5fcc47d7eeb5f890ed70eae403271a7f537903545ad09ac26501aae914f327c3287d5588ed4ab601012584f6204cca6896ed2705326b090df2fe00c
23 DIST chromium-91.0.4472.114.tar.xz 950268264 BLAKE2B e811ec3550434a5f5dcff3f5a0c07d2a951b0479ae8ef7de0dc82c60d63bb19a04ed065b2f8f12b0ba4786244fd0fdba9a38e1f0ae076a9be2fc50bc293453b5 SHA512 7a04d966e8c8b75b5fe063730cbc4734cc9a5a38a50a573193243301930719cef26e2b741f2f893350bb717261302e5d00b0b3264a3fdb8f80a5460223eac5de
24 +DIST chromium-91.0.4472.164.tar.xz 950253100 BLAKE2B 4de7222dbf8fb22115518625ebc8eb62eca281bd4a28ee9d4f4450545aa4155a5bf7478f56d9ba482c102deea5c7b3214299549480c19d972b1380931f7ba4df SHA512 3d15b7df6d6627084bc82cfb6f9c52f917cdb03cea73f85199e6d41eb9636db867e56ea60d69a8bbc92dd8cb59f13b4ae6c609d59f32fe04f88c33252225f8a5
25 DIST chromium-92-patchset-7.tar.xz 4004 BLAKE2B 8587663a072eb08abacbc2e54924855f29efefdbec46acf5cb8b0cc40b816b96ba7694c4ab1abe997572a6dbecf94ea27f368a7337263adfff44f2b4b042d862 SHA512 65c8267ab0921719c71d4b03a4315bbb1ceec35ce4794de9dcc6099b2c349baf4782b67316ebb8c9db233630b7fc89fa0baf719f9f0f41eb39972cdeb437e612
26 DIST chromium-92.0.4515.80.tar.xz 957805500 BLAKE2B 9c622d45fd62b58ff1c8f3cb8745502747e3a6ee8f453a35927212f2ff71cfeb216cc7fc1e78010e4f5178b18062ddc36aa74c1dcb3daf32ba8ef08285fb196f SHA512 04ba2c24c987e9885674e7efd2a2b9415673424f1f3a18e1d79afb2683d984927b15067003040e8fb92ff8be31cda042aac052e9369a1a3709d6b11bf9d1df7a
27 DIST chromium-93-patchset-5.tar.xz 4404 BLAKE2B f347a66c5767bb03dd6a0feda433f51f5110e0429c6f55494000bd1a61a4f3b6a218e7f12ce91a02adae94ee0a85d0aceb12aef5a0537e9362f23817edb662c0 SHA512 39d3bd5ad51e33d5d82a42d5289ab137bdb3280e4d2d647fce86eb59d14a01e9f31531cf82ba9055168c18d1fb96e3013e2d40dc89b30c725c89241d34b7b25d
28
29 diff --git a/www-client/chromium/chromium-91.0.4472.164.ebuild b/www-client/chromium/chromium-91.0.4472.164.ebuild
30 new file mode 100644
31 index 00000000000..cd69cc5880a
32 --- /dev/null
33 +++ b/www-client/chromium/chromium-91.0.4472.164.ebuild
34 @@ -0,0 +1,944 @@
35 +# Copyright 2009-2021 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=7
39 +PYTHON_COMPAT=( python2_7 )
40 +PYTHON_REQ_USE="xml"
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="6"
51 +PATCHSET_NAME="chromium-$(ver_cut 1)-patchset-${PATCHSET}"
52 +PPC64LE_PATCHSET="6"
53 +SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.xz
54 + https://files.pythonhosted.org/packages/ed/7b/bbf89ca71e722b7f9464ebffe4b5ee20a9e5c9a555a56e2d3914bb9119a6/setuptools-44.1.0.zip
55 + https://github.com/stha09/chromium-patches/releases/download/${PATCHSET_NAME}/${PATCHSET_NAME}.tar.xz
56 + arm64? ( https://github.com/google/highway/archive/refs/tags/0.12.1.tar.gz -> highway-0.12.1.tar.gz )
57 + ppc64? ( https://dev.gentoo.org/~gyakovlev/distfiles/${PN}-$(ver_cut 1)-ppc64le-${PPC64LE_PATCHSET}.tar.xz )"
58 +
59 +LICENSE="BSD"
60 +SLOT="0"
61 +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
62 +IUSE="component-build cups cpu_flags_arm_neon +hangouts headless +js-type-check kerberos official pic +proprietary-codecs pulseaudio screencast selinux +suid +system-ffmpeg +system-icu vaapi wayland widevine"
63 +REQUIRED_USE="
64 + component-build? ( !suid )
65 + screencast? ( wayland )
66 +"
67 +
68 +COMMON_X_DEPEND="
69 + media-libs/mesa:=[gbm]
70 + x11-libs/libX11:=
71 + x11-libs/libXcomposite:=
72 + x11-libs/libXcursor:=
73 + x11-libs/libXdamage:=
74 + x11-libs/libXext:=
75 + x11-libs/libXfixes:=
76 + >=x11-libs/libXi-1.6.0:=
77 + x11-libs/libXrandr:=
78 + x11-libs/libXrender:=
79 + x11-libs/libXtst:=
80 + x11-libs/libxcb:=
81 + x11-libs/libxshmfence:=
82 + vaapi? ( >=x11-libs/libva-2.7:=[X,drm] )
83 +"
84 +
85 +COMMON_DEPEND="
86 + app-arch/bzip2:=
87 + cups? ( >=net-print/cups-1.3.11:= )
88 + dev-libs/expat:=
89 + dev-libs/glib:2
90 + >=dev-libs/libxml2-2.9.4-r3:=[icu]
91 + dev-libs/nspr:=
92 + >=dev-libs/nss-3.26:=
93 + >=media-libs/alsa-lib-1.0.19:=
94 + media-libs/fontconfig:=
95 + media-libs/freetype:=
96 + >=media-libs/harfbuzz-2.4.0:0=[icu(-)]
97 + media-libs/libjpeg-turbo:=
98 + media-libs/libpng:=
99 + pulseaudio? ( media-sound/pulseaudio:= )
100 + system-ffmpeg? (
101 + >=media-video/ffmpeg-4.3:=
102 + || (
103 + media-video/ffmpeg[-samba]
104 + >=net-fs/samba-4.5.10-r1[-debug(-)]
105 + )
106 + >=media-libs/opus-1.3.1:=
107 + )
108 + sys-apps/dbus:=
109 + sys-apps/pciutils:=
110 + virtual/udev
111 + x11-libs/cairo:=
112 + x11-libs/gdk-pixbuf:2
113 + x11-libs/libxkbcommon:=
114 + x11-libs/pango:=
115 + media-libs/flac:=
116 + >=media-libs/libwebp-0.4.0:=
117 + sys-libs/zlib:=[minizip]
118 + kerberos? ( virtual/krb5 )
119 + !headless? (
120 + ${COMMON_X_DEPEND}
121 + >=app-accessibility/at-spi2-atk-2.26:2
122 + >=app-accessibility/at-spi2-core-2.26:2
123 + >=dev-libs/atk-2.26
124 + x11-libs/gtk+:3[X]
125 + wayland? (
126 + dev-libs/wayland:=
127 + screencast? ( media-video/pipewire:0/0.3 )
128 + x11-libs/gtk+:3[wayland,X]
129 + x11-libs/libdrm:=
130 + )
131 + )
132 +"
133 +RDEPEND="${COMMON_DEPEND}
134 + x11-misc/xdg-utils
135 + virtual/opengl
136 + virtual/ttf-fonts
137 + selinux? ( sec-policy/selinux-chromium )
138 +"
139 +DEPEND="${COMMON_DEPEND}
140 +"
141 +# dev-vcs/git - https://bugs.gentoo.org/593476
142 +BDEPEND="
143 + ${PYTHON_DEPS}
144 + >=app-arch/gzip-1.7
145 + app-arch/unzip
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 +pre_build_checks() {
216 + if [[ ${MERGE_TYPE} != binary ]]; then
217 + local -x CPP="$(tc-getCXX) -E"
218 + if tc-is-gcc && ! ver_test "$(gcc-version)" -ge 9.2; then
219 + die "At least gcc 9.2 is required"
220 + fi
221 + if [[ ${CHROMIUM_FORCE_CLANG} == yes ]] || tc-is-clang; then
222 + CPP="${CHOST}-clang++ -E"
223 + if ! ver_test "$(clang-major-version)" -ge 12; then
224 + die "At least clang 12 is required"
225 + fi
226 + fi
227 + fi
228 +
229 + # Check build requirements, bug #541816 and bug #471810 .
230 + CHECKREQS_MEMORY="3G"
231 + CHECKREQS_DISK_BUILD="8G"
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-89-EnumTable-crash.patch"
266 + "${FILESDIR}/chromium-91-ThemeService-crash.patch"
267 + "${FILESDIR}/chromium-91-system-icu.patch"
268 + "${FILESDIR}/chromium-shim_headers.patch"
269 + )
270 +
271 + # seccomp sandbox is broken if compiled against >=sys-libs/glibc-2.33, bug #769989
272 + if has_version -d ">=sys-libs/glibc-2.33"; then
273 + ewarn "Adding experimental glibc-2.33 sandbox patch. Seccomp sandbox might"
274 + ewarn "still not work correctly. In case of issues, try to disable seccomp"
275 + ewarn "sandbox by adding --disable-seccomp-filter-sandbox to CHROMIUM_FLAGS"
276 + ewarn "in /etc/chromium/default."
277 + PATCHES+=(
278 + "${FILESDIR}/chromium-glibc-2.33.patch"
279 + )
280 + fi
281 +
282 + use ppc64 && eapply -p0 "${WORKDIR}/${PN}"-ppc64le
283 +
284 + default
285 +
286 + mkdir -p third_party/node/linux/node-linux-x64/bin || die
287 + ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
288 +
289 + # bundled highway library does not support arm64 with GCC
290 + if use arm64; then
291 + rm -r third_party/highway/src || die
292 + ln -s "${WORKDIR}/highway-0.12.1" third_party/highway/src || die
293 + fi
294 +
295 + local keeplibs=(
296 + base/third_party/cityhash
297 + base/third_party/double_conversion
298 + base/third_party/dynamic_annotations
299 + base/third_party/icu
300 + base/third_party/nspr
301 + base/third_party/superfasthash
302 + base/third_party/symbolize
303 + base/third_party/valgrind
304 + base/third_party/xdg_mime
305 + base/third_party/xdg_user_dirs
306 + buildtools/third_party/libc++
307 + buildtools/third_party/libc++abi
308 + chrome/third_party/mozilla_security_manager
309 + courgette/third_party
310 + net/third_party/mozilla_security_manager
311 + net/third_party/nss
312 + net/third_party/quic
313 + net/third_party/uri_template
314 + third_party/abseil-cpp
315 + third_party/angle
316 + third_party/angle/src/common/third_party/base
317 + third_party/angle/src/common/third_party/smhasher
318 + third_party/angle/src/common/third_party/xxhash
319 + third_party/angle/src/third_party/compiler
320 + third_party/angle/src/third_party/libXNVCtrl
321 + third_party/angle/src/third_party/trace_event
322 + third_party/angle/src/third_party/volk
323 + third_party/apple_apsl
324 + third_party/axe-core
325 + third_party/blink
326 + third_party/boringssl
327 + third_party/boringssl/src/third_party/fiat
328 + third_party/breakpad
329 + third_party/breakpad/breakpad/src/third_party/curl
330 + third_party/brotli
331 + third_party/catapult
332 + third_party/catapult/common/py_vulcanize/third_party/rcssmin
333 + third_party/catapult/common/py_vulcanize/third_party/rjsmin
334 + third_party/catapult/third_party/beautifulsoup4
335 + third_party/catapult/third_party/html5lib-python
336 + third_party/catapult/third_party/polymer
337 + third_party/catapult/third_party/six
338 + third_party/catapult/tracing/third_party/d3
339 + third_party/catapult/tracing/third_party/gl-matrix
340 + third_party/catapult/tracing/third_party/jpeg-js
341 + third_party/catapult/tracing/third_party/jszip
342 + third_party/catapult/tracing/third_party/mannwhitneyu
343 + third_party/catapult/tracing/third_party/oboe
344 + third_party/catapult/tracing/third_party/pako
345 + third_party/ced
346 + third_party/cld_3
347 + third_party/closure_compiler
348 + third_party/crashpad
349 + third_party/crashpad/crashpad/third_party/lss
350 + third_party/crashpad/crashpad/third_party/zlib
351 + third_party/crc32c
352 + third_party/cros_system_api
353 + third_party/dav1d
354 + third_party/dawn
355 + third_party/dawn/third_party/khronos
356 + third_party/depot_tools
357 + third_party/devscripts
358 + third_party/devtools-frontend
359 + third_party/devtools-frontend/src/front_end/third_party/acorn
360 + third_party/devtools-frontend/src/front_end/third_party/axe-core
361 + third_party/devtools-frontend/src/front_end/third_party/chromium
362 + third_party/devtools-frontend/src/front_end/third_party/codemirror
363 + third_party/devtools-frontend/src/front_end/third_party/fabricjs
364 + third_party/devtools-frontend/src/front_end/third_party/i18n
365 + third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
366 + third_party/devtools-frontend/src/front_end/third_party/lighthouse
367 + third_party/devtools-frontend/src/front_end/third_party/lit-html
368 + third_party/devtools-frontend/src/front_end/third_party/lodash-isequal
369 + third_party/devtools-frontend/src/front_end/third_party/marked
370 + third_party/devtools-frontend/src/front_end/third_party/puppeteer
371 + third_party/devtools-frontend/src/front_end/third_party/wasmparser
372 + third_party/devtools-frontend/src/third_party
373 + third_party/dom_distiller_js
374 + third_party/eigen3
375 + third_party/emoji-segmenter
376 + third_party/farmhash
377 + third_party/fdlibm
378 + third_party/fft2d
379 + third_party/flatbuffers
380 + third_party/freetype
381 + third_party/fusejs
382 + third_party/highway
383 + third_party/libgifcodec
384 + third_party/liburlpattern
385 + third_party/libzip
386 + third_party/gemmlowp
387 + third_party/google_input_tools
388 + third_party/google_input_tools/third_party/closure_library
389 + third_party/google_input_tools/third_party/closure_library/third_party/closure
390 + third_party/googletest
391 + third_party/harfbuzz-ng/utils
392 + third_party/hunspell
393 + third_party/iccjpeg
394 + third_party/inspector_protocol
395 + third_party/jinja2
396 + third_party/jsoncpp
397 + third_party/jstemplate
398 + third_party/khronos
399 + third_party/leveldatabase
400 + third_party/libXNVCtrl
401 + third_party/libaddressinput
402 + third_party/libaom
403 + third_party/libaom/source/libaom/third_party/fastfeat
404 + third_party/libaom/source/libaom/third_party/vector
405 + third_party/libaom/source/libaom/third_party/x86inc
406 + third_party/libavif
407 + third_party/libgav1
408 + third_party/libjingle
409 + third_party/libjxl
410 + third_party/libphonenumber
411 + third_party/libsecret
412 + third_party/libsrtp
413 + third_party/libsync
414 + third_party/libudev
415 + third_party/libva_protected_content
416 + third_party/libvpx
417 + third_party/libvpx/source/libvpx/third_party/x86inc
418 + third_party/libwebm
419 + third_party/libx11
420 + third_party/libxcb-keysyms
421 + third_party/libxml/chromium
422 + third_party/libyuv
423 + third_party/llvm
424 + third_party/lottie
425 + third_party/lss
426 + third_party/lzma_sdk
427 + third_party/mako
428 + third_party/markupsafe
429 + third_party/mesa
430 + third_party/metrics_proto
431 + third_party/minigbm
432 + third_party/modp_b64
433 + third_party/nasm
434 + third_party/nearby
435 + third_party/neon_2_sse
436 + third_party/node
437 + third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2
438 + third_party/one_euro_filter
439 + third_party/opencv
440 + third_party/openscreen
441 + third_party/openscreen/src/third_party/mozilla
442 + third_party/openscreen/src/third_party/tinycbor/src/src
443 + third_party/ots
444 + third_party/pdfium
445 + third_party/pdfium/third_party/agg23
446 + third_party/pdfium/third_party/base
447 + third_party/pdfium/third_party/bigint
448 + third_party/pdfium/third_party/freetype
449 + third_party/pdfium/third_party/lcms
450 + third_party/pdfium/third_party/libopenjpeg20
451 + third_party/pdfium/third_party/libpng16
452 + third_party/pdfium/third_party/libtiff
453 + third_party/pdfium/third_party/skia_shared
454 + third_party/perfetto
455 + third_party/perfetto/protos/third_party/chromium
456 + third_party/pffft
457 + third_party/ply
458 + third_party/polymer
459 + third_party/private-join-and-compute
460 + third_party/private_membership
461 + third_party/protobuf
462 + third_party/protobuf/third_party/six
463 + third_party/pyjson5
464 + third_party/qcms
465 + third_party/rnnoise
466 + third_party/s2cellid
467 + third_party/securemessage
468 + third_party/shell-encryption
469 + third_party/simplejson
470 + third_party/skia
471 + third_party/skia/include/third_party/skcms
472 + third_party/skia/include/third_party/vulkan
473 + third_party/skia/third_party/skcms
474 + third_party/skia/third_party/vulkan
475 + third_party/smhasher
476 + third_party/sqlite
477 + third_party/swiftshader
478 + third_party/swiftshader/third_party/astc-encoder
479 + third_party/swiftshader/third_party/llvm-subzero
480 + third_party/swiftshader/third_party/marl
481 + third_party/swiftshader/third_party/subzero
482 + third_party/swiftshader/third_party/SPIRV-Headers/include/spirv/unified1
483 + third_party/tcmalloc
484 + third_party/tensorflow-text
485 + third_party/tflite
486 + third_party/tflite/src/third_party/eigen3
487 + third_party/tflite/src/third_party/fft2d
488 + third_party/tflite-support
489 + third_party/tint
490 + third_party/ruy
491 + third_party/ukey2
492 + third_party/unrar
493 + third_party/usrsctp
494 + third_party/utf
495 + third_party/vulkan
496 + third_party/web-animations-js
497 + third_party/webdriver
498 + third_party/webgpu-cts
499 + third_party/webrtc
500 + third_party/webrtc/common_audio/third_party/ooura
501 + third_party/webrtc/common_audio/third_party/spl_sqrt_floor
502 + third_party/webrtc/modules/third_party/fft
503 + third_party/webrtc/modules/third_party/g711
504 + third_party/webrtc/modules/third_party/g722
505 + third_party/webrtc/rtc_base/third_party/base64
506 + third_party/webrtc/rtc_base/third_party/sigslot
507 + third_party/widevine
508 + third_party/woff2
509 + third_party/wuffs
510 + third_party/x11proto
511 + third_party/xcbproto
512 + third_party/zxcvbn-cpp
513 + third_party/zlib/google
514 + tools/grit/third_party/six
515 + url/third_party/mozilla
516 + v8/src/third_party/siphash
517 + v8/src/third_party/valgrind
518 + v8/src/third_party/utf8-decoder
519 + v8/third_party/inspector_protocol
520 + v8/third_party/v8
521 +
522 + # gyp -> gn leftovers
523 + base/third_party/libevent
524 + third_party/speech-dispatcher
525 + third_party/usb_ids
526 + third_party/xdg-utils
527 + )
528 + if ! use system-ffmpeg; then
529 + keeplibs+=( third_party/ffmpeg third_party/opus )
530 + fi
531 + if ! use system-icu; then
532 + keeplibs+=( third_party/icu )
533 + fi
534 + if use wayland && ! use headless ; then
535 + keeplibs+=( third_party/wayland )
536 + fi
537 + if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
538 + keeplibs+=( third_party/libxml )
539 + keeplibs+=( third_party/libxslt )
540 + keeplibs+=( third_party/openh264 )
541 + keeplibs+=( third_party/re2 )
542 + keeplibs+=( third_party/snappy )
543 + if use system-icu; then
544 + keeplibs+=( third_party/icu )
545 + fi
546 + fi
547 + if use arm64 || use ppc64 ; then
548 + keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
549 + fi
550 + # we need to generate ppc64 stuff because upstream does not ship it yet
551 + # it has to be done before unbundling.
552 + if use ppc64; then
553 + pushd third_party/libvpx >/dev/null || die
554 + mkdir -p source/config/linux/ppc64 || die
555 + ./generate_gni.sh || die
556 + popd >/dev/null || die
557 + fi
558 +
559 + # Remove most bundled libraries. Some are still needed.
560 + build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
561 +
562 + if use js-type-check; then
563 + ln -s "${EPREFIX}"/usr/bin/java third_party/jdk/current/bin/java || die
564 + fi
565 +}
566 +
567 +src_configure() {
568 + # Calling this here supports resumption via FEATURES=keepwork
569 + python_setup
570 +
571 + local myconf_gn=""
572 +
573 + # Make sure the build system will use the right tools, bug #340795.
574 + tc-export AR CC CXX NM
575 +
576 + if [[ ${CHROMIUM_FORCE_CLANG} == yes ]] && ! tc-is-clang; then
577 + # Force clang since gcc is pretty broken at the moment.
578 + CC=${CHOST}-clang
579 + CXX=${CHOST}-clang++
580 + strip-unsupported-flags
581 + fi
582 +
583 + if tc-is-clang; then
584 + myconf_gn+=" is_clang=true clang_use_chrome_plugins=false"
585 + else
586 + if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
587 + die "Compiling with sys-libs/libcxx requires clang."
588 + fi
589 + myconf_gn+=" is_clang=false"
590 + fi
591 +
592 + # Define a custom toolchain for GN
593 + myconf_gn+=" custom_toolchain=\"//build/toolchain/linux/unbundle:default\""
594 +
595 + if tc-is-cross-compiler; then
596 + tc-export BUILD_{AR,CC,CXX,NM}
597 + myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:host\""
598 + myconf_gn+=" v8_snapshot_toolchain=\"//build/toolchain/linux/unbundle:host\""
599 + else
600 + myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:default\""
601 + fi
602 +
603 + # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
604 + myconf_gn+=" is_debug=false"
605 +
606 + # Component build isn't generally intended for use by end users. It's mostly useful
607 + # for development and debugging.
608 + myconf_gn+=" is_component_build=$(usex component-build true false)"
609 +
610 + # Disable nacl, we can't build without pnacl (http://crbug.com/269560).
611 + myconf_gn+=" enable_nacl=false"
612 +
613 + # Use system-provided libraries.
614 + # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
615 + # TODO: use_system_hunspell (upstream changes needed).
616 + # TODO: use_system_libsrtp (bug #459932).
617 + # TODO: use_system_protobuf (bug #525560).
618 + # TODO: use_system_ssl (http://crbug.com/58087).
619 + # TODO: use_system_sqlite (http://crbug.com/22208).
620 +
621 + # libevent: https://bugs.gentoo.org/593458
622 + local gn_system_libraries=(
623 + flac
624 + fontconfig
625 + freetype
626 + # Need harfbuzz_from_pkgconfig target
627 + #harfbuzz-ng
628 + libdrm
629 + libjpeg
630 + libpng
631 + libwebp
632 + zlib
633 + )
634 + if use system-ffmpeg; then
635 + gn_system_libraries+=( ffmpeg opus )
636 + fi
637 + if use system-icu; then
638 + gn_system_libraries+=( icu )
639 + fi
640 + if [[ ${CHROMIUM_FORCE_LIBCXX} != yes ]]; then
641 + # unbundle only without libc++, because libc++ is not fully ABI compatible with libstdc++
642 + gn_system_libraries+=( libxml )
643 + gn_system_libraries+=( libxslt )
644 + gn_system_libraries+=( openh264 )
645 + gn_system_libraries+=( re2 )
646 + gn_system_libraries+=( snappy )
647 + fi
648 + build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" || die
649 +
650 + # See dependency logic in third_party/BUILD.gn
651 + myconf_gn+=" use_system_harfbuzz=true"
652 +
653 + # Disable deprecated libgnome-keyring dependency, bug #713012
654 + myconf_gn+=" use_gnome_keyring=false"
655 +
656 + # Optional dependencies.
657 + myconf_gn+=" enable_js_type_check=$(usex js-type-check true false)"
658 + myconf_gn+=" enable_hangout_services_extension=$(usex hangouts true false)"
659 + myconf_gn+=" enable_widevine=$(usex widevine true false)"
660 + myconf_gn+=" use_cups=$(usex cups true false)"
661 + myconf_gn+=" use_kerberos=$(usex kerberos true false)"
662 + myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)"
663 + myconf_gn+=" use_vaapi=$(usex vaapi true false)"
664 + myconf_gn+=" rtc_use_pipewire=$(usex screencast true false) rtc_pipewire_version=\"0.3\""
665 +
666 + # TODO: link_pulseaudio=true for GN.
667 +
668 + myconf_gn+=" fieldtrial_testing_like_official_build=true"
669 +
670 + # Never use bundled gold binary. Disable gold linker flags for now.
671 + # Do not use bundled clang.
672 + # Trying to use gold results in linker crash.
673 + myconf_gn+=" use_gold=false use_sysroot=false use_custom_libcxx=false"
674 +
675 + # Disable forced lld, bug 641556
676 + myconf_gn+=" use_lld=false"
677 +
678 + # Disable pseudolocales, only used for testing
679 + myconf_gn+=" enable_pseudolocales=false"
680 +
681 + ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)"
682 + myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)"
683 + myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\""
684 +
685 + # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys .
686 + # Note: these are for Gentoo use ONLY. For your own distribution,
687 + # please get your own set of keys. Feel free to contact chromium@g.o
688 + # for more info.
689 + local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc"
690 + local google_default_client_id="329227923882.apps.googleusercontent.com"
691 + local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu"
692 + myconf_gn+=" google_api_key=\"${google_api_key}\""
693 + myconf_gn+=" google_default_client_id=\"${google_default_client_id}\""
694 + myconf_gn+=" google_default_client_secret=\"${google_default_client_secret}\""
695 + local myarch="$(tc-arch)"
696 +
697 + # Avoid CFLAGS problems, bug #352457, bug #390147.
698 + if ! use custom-cflags; then
699 + replace-flags "-Os" "-O2"
700 + strip-flags
701 +
702 + # Debug info section overflows without component build
703 + # Prevent linker from running out of address space, bug #471810 .
704 + if ! use component-build || use x86; then
705 + filter-flags "-g*"
706 + fi
707 +
708 + # Prevent libvpx build failures. Bug 530248, 544702, 546984.
709 + if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then
710 + filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2 -mno-fma -mno-fma4
711 + fi
712 + fi
713 +
714 + if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
715 + append-flags -stdlib=libc++
716 + append-ldflags -stdlib=libc++
717 + fi
718 +
719 + if [[ $myarch = amd64 ]] ; then
720 + myconf_gn+=" target_cpu=\"x64\""
721 + ffmpeg_target_arch=x64
722 + elif [[ $myarch = x86 ]] ; then
723 + myconf_gn+=" target_cpu=\"x86\""
724 + ffmpeg_target_arch=ia32
725 +
726 + # This is normally defined by compiler_cpu_abi in
727 + # build/config/compiler/BUILD.gn, but we patch that part out.
728 + append-flags -msse2 -mfpmath=sse -mmmx
729 + elif [[ $myarch = arm64 ]] ; then
730 + myconf_gn+=" target_cpu=\"arm64\""
731 + ffmpeg_target_arch=arm64
732 + elif [[ $myarch = arm ]] ; then
733 + myconf_gn+=" target_cpu=\"arm\""
734 + ffmpeg_target_arch=$(usex cpu_flags_arm_neon arm-neon arm)
735 + elif [[ $myarch = ppc64 ]] ; then
736 + myconf_gn+=" target_cpu=\"ppc64\""
737 + ffmpeg_target_arch=ppc64
738 + else
739 + die "Failed to determine target arch, got '$myarch'."
740 + fi
741 +
742 + # Make sure that -Werror doesn't get added to CFLAGS by the build system.
743 + # Depending on GCC version the warnings are different and we don't want
744 + # the build to fail because of that.
745 + myconf_gn+=" treat_warnings_as_errors=false"
746 +
747 + # Disable fatal linker warnings, bug 506268.
748 + myconf_gn+=" fatal_linker_warnings=false"
749 +
750 + # Bug 491582.
751 + export TMPDIR="${WORKDIR}/temp"
752 + mkdir -p -m 755 "${TMPDIR}" || die
753 +
754 + # https://bugs.gentoo.org/654216
755 + addpredict /dev/dri/ #nowarn
756 +
757 + #if ! use system-ffmpeg; then
758 + if false; then
759 + local build_ffmpeg_args=""
760 + if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then
761 + build_ffmpeg_args+=" --disable-asm"
762 + fi
763 +
764 + # Re-configure bundled ffmpeg. See bug #491378 for example reasons.
765 + einfo "Configuring bundled ffmpeg..."
766 + pushd third_party/ffmpeg > /dev/null || die
767 + chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \
768 + --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die
769 + chromium/scripts/copy_config.sh || die
770 + chromium/scripts/generate_gn.py || die
771 + popd > /dev/null || die
772 + fi
773 +
774 + # Chromium relies on this, but was disabled in >=clang-10, crbug.com/1042470
775 + append-cxxflags $(test-flags-CXX -flax-vector-conversions=all)
776 +
777 + # highway/libjxl relies on this with arm64
778 + if use arm64 && tc-is-gcc; then
779 + append-cxxflags -flax-vector-conversions
780 + fi
781 +
782 + # highway/libjxl fail on ppc64 without extra patches, disable for now.
783 + use ppc64 && myconf_gn+=" enable_jxl_decoder=false"
784 +
785 + # Disable unknown warning message from clang.
786 + tc-is-clang && append-flags -Wno-unknown-warning-option
787 +
788 + # Explicitly disable ICU data file support for system-icu builds.
789 + if use system-icu; then
790 + myconf_gn+=" icu_use_data_file=false"
791 + fi
792 +
793 + # Enable ozone wayland and/or headless support
794 + myconf_gn+=" use_ozone=true ozone_auto_platforms=false"
795 + myconf_gn+=" ozone_platform_headless=true"
796 + if use wayland || use headless; then
797 + if use headless; then
798 + myconf_gn+=" ozone_platform=\"headless\""
799 + myconf_gn+=" use_x11=false"
800 + else
801 + myconf_gn+=" ozone_platform_wayland=true"
802 + myconf_gn+=" use_system_libdrm=true"
803 + myconf_gn+=" use_system_minigbm=true"
804 + myconf_gn+=" use_xkbcommon=true"
805 + myconf_gn+=" ozone_platform=\"wayland\""
806 + fi
807 + fi
808 +
809 + # Enable official builds
810 + myconf_gn+=" is_official_build=$(usex official true false)"
811 + myconf_gn+=" use_thin_lto=false"
812 + if use official; then
813 + # Allow building against system libraries in official builds
814 + sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
815 + tools/generate_shim_headers/generate_shim_headers.py || die
816 + # Disable CFI: unsupported for GCC, requires clang+lto+lld
817 + myconf_gn+=" is_cfi=false"
818 + # Disable PGO, because profile data is only compatible with >=clang-11
819 + myconf_gn+=" chrome_pgo_phase=0"
820 + fi
821 +
822 + einfo "Configuring Chromium..."
823 + set -- gn gen --args="${myconf_gn} ${EXTRA_GN}" out/Release
824 + echo "$@"
825 + "$@" || die
826 +}
827 +
828 +src_compile() {
829 + # Final link uses lots of file descriptors.
830 + ulimit -n 2048
831 +
832 + # Calling this here supports resumption via FEATURES=keepwork
833 + python_setup
834 +
835 + # https://bugs.gentoo.org/717456
836 + # don't inherit PYTHONPATH from environment, bug #789021
837 + local -x PYTHONPATH="${WORKDIR}/setuptools-44.1.0"
838 +
839 + #"${EPYTHON}" tools/clang/scripts/update.py --force-local-build --gcc-toolchain /usr --skip-checkout --use-system-cmake --without-android || die
840 +
841 + # Build mksnapshot and pax-mark it.
842 + local x
843 + for x in mksnapshot v8_context_snapshot_generator; do
844 + if tc-is-cross-compiler; then
845 + eninja -C out/Release "host/${x}"
846 + pax-mark m "out/Release/host/${x}"
847 + else
848 + eninja -C out/Release "${x}"
849 + pax-mark m "out/Release/${x}"
850 + fi
851 + done
852 +
853 + # Even though ninja autodetects number of CPUs, we respect
854 + # user's options, for debugging with -j 1 or any other reason.
855 + eninja -C out/Release chrome chromedriver
856 + use suid && eninja -C out/Release chrome_sandbox
857 +
858 + pax-mark m out/Release/chrome
859 +
860 + # Build manpage; bug #684550
861 + sed -e 's|@@PACKAGE@@|chromium-browser|g;
862 + s|@@MENUNAME@@|Chromium|g;' \
863 + chrome/app/resources/manpage.1.in > \
864 + out/Release/chromium-browser.1 || die
865 +
866 + # Build desktop file; bug #706786
867 + sed -e 's|@@MENUNAME@@|Chromium|g;
868 + s|@@USR_BIN_SYMLINK_NAME@@|chromium-browser|g;
869 + s|@@PACKAGE@@|chromium-browser|g;
870 + s|\(^Exec=\)/usr/bin/|\1|g;' \
871 + chrome/installer/linux/common/desktop.template > \
872 + out/Release/chromium-browser-chromium.desktop || die
873 +}
874 +
875 +src_install() {
876 + local CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser"
877 + exeinto "${CHROMIUM_HOME}"
878 + doexe out/Release/chrome
879 +
880 + if use suid; then
881 + newexe out/Release/chrome_sandbox chrome-sandbox
882 + fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
883 + fi
884 +
885 + doexe out/Release/chromedriver
886 +
887 + local sedargs=( -e
888 + "s:/usr/lib/:/usr/$(get_libdir)/:g;
889 + s:@@OZONE_AUTO_SESSION@@:$(usex wayland true false):g;
890 + s:@@FORCE_OZONE_PLATFORM@@:$(usex headless true false):g"
891 + )
892 + sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r6.sh" > chromium-launcher.sh || die
893 + doexe chromium-launcher.sh
894 +
895 + # It is important that we name the target "chromium-browser",
896 + # xdg-utils expect it; bug #355517.
897 + dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser
898 + # keep the old symlink around for consistency
899 + dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium
900 +
901 + dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver
902 +
903 + # Allow users to override command-line options, bug #357629.
904 + insinto /etc/chromium
905 + newins "${FILESDIR}/chromium.default" "default"
906 +
907 + pushd out/Release/locales > /dev/null || die
908 + chromium_remove_language_paks
909 + popd
910 +
911 + insinto "${CHROMIUM_HOME}"
912 + doins out/Release/*.bin
913 + doins out/Release/*.pak
914 + (
915 + shopt -s nullglob
916 + local files=(out/Release/*.so out/Release/*.so.[0-9])
917 + [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
918 + )
919 +
920 + if ! use system-icu; then
921 + doins out/Release/icudtl.dat
922 + fi
923 +
924 + doins -r out/Release/locales
925 + doins -r out/Release/resources
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 +}