Gentoo Archives: gentoo-commits

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