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