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