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