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