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