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