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: Sat, 01 Oct 2022 09:56:21
Message-Id: 1664618164.d4e444fcb49cbf64b628a4111410af97cb84452d.sultan@gentoo
1 commit: d4e444fcb49cbf64b628a4111410af97cb84452d
2 Author: Stephan Hartmann <sultan <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 1 09:56:04 2022 +0000
4 Commit: Stephan Hartmann <sultan <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 1 09:56:04 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4e444fc
7
8 www-client/chromium: drop 105.0.5195.102
9
10 Bug: https://bugs.gentoo.org/872407
11 Signed-off-by: Stephan Hartmann <sultan <AT> gentoo.org>
12
13 www-client/chromium/Manifest | 1 -
14 www-client/chromium/chromium-105.0.5195.102.ebuild | 1186 --------------------
15 2 files changed, 1187 deletions(-)
16
17 diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest
18 index 9c54bb5d1256..5be0bee51fb9 100644
19 --- a/www-client/chromium/Manifest
20 +++ b/www-client/chromium/Manifest
21 @@ -1,5 +1,4 @@
22 DIST chromium-105-patchset-1.tar.xz 9116 BLAKE2B 7728b83899e19b3c0ba4a69c660b68af7ea549a0144c15ab9fa972001441d9d145de20b7a1bafabf2b0667335b7436f6374c9934d4433160805c31bc743e867e SHA512 8f97aecf7b24c3f676bc74b88382dc4a5d967a090a4b4890971cb342973b0a20fd563c658b1c3fdaf036e830317d97470143ab78b28f336b315d491217368a81
23 -DIST chromium-105.0.5195.102.tar.xz 1597977496 BLAKE2B dada382717f8d48c87f586ba190aa4b4dff32929d70efe54dc091e42087b6f1744d3fdc16d9f601674fda28f5146808f0de419dec95f5ebfcd2b61fb62db0ef6 SHA512 a5b569e1a019863cd27e03b7e834ecef284e170a41f8ff29b9d22101a45474b5157720e52e7f7438a217b8b00707bd3c414c83257c18f2d9f4d5ee46e2e06e9e
24 DIST chromium-105.0.5195.125.tar.xz 1597584952 BLAKE2B 690c10de16bbb92b6b69950c378f16a469b29176ad57de6d1f0827358c1443c25c273b962c434bcca38f1868e4e762115b61ee292ada2d5be12e7d19fbbac0af SHA512 a8aaa24d779b69ee8173ed45006c9e7d6ada57de465cfa0a15720f3cd72d271f0560cedf8ae4aa0fde45ae6b750bb4577dcb23349d9cb49a036a7f0a4a5d68ac
25 DIST chromium-106-patchset-3.tar.xz 6672 BLAKE2B 4c56702e84c761b5b4e5ea84a3e9bed0c9c81cbf448998c51b149a5f3b745944e8c824384a879798fba284eb96d76ebbc22ce038971daf9a574ea02d52f204b5 SHA512 3e58bf2811a6674bbe04ab12c0404faad5e6b17c7a5de213e661a7cc34dd4c3329b8736e3b1ffd43a442eae4ad132ff05b042ef904d451bbe0c9a76554499b61
26 DIST chromium-106.0.5249.61.tar.xz 1621965008 BLAKE2B f15043eeefb898809adf580c6ef9258f9512ec29f9f0688865c226b13a47d6dd8733a51a64c6a0e5ba0b67e5d5b54419e5264401fa4ef96112dcbdfb70c4aa17 SHA512 472754e11472d4b6d7545d3dfb784b3ca6ecb951753e6e966b5a2ee18aab35e185872d55bece98a99d4d2c2d1ef38e07a29a4d6989e5a287046108100a799ac1
27
28 diff --git a/www-client/chromium/chromium-105.0.5195.102.ebuild b/www-client/chromium/chromium-105.0.5195.102.ebuild
29 deleted file mode 100644
30 index 7040b659ff17..000000000000
31 --- a/www-client/chromium/chromium-105.0.5195.102.ebuild
32 +++ /dev/null
33 @@ -1,1186 +0,0 @@
34 -# Copyright 2009-2022 Gentoo Authors
35 -# Distributed under the terms of the GNU General Public License v2
36 -
37 -EAPI=8
38 -PYTHON_COMPAT=( python3_{8..10} )
39 -PYTHON_REQ_USE="xml(+)"
40 -LLVM_MAX_SLOT=14
41 -
42 -CHROMIUM_LANGS="af 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 ur vi zh-CN zh-TW"
45 -
46 -VIRTUALX_REQUIRED="pgo"
47 -
48 -inherit check-reqs chromium-2 desktop flag-o-matic llvm ninja-utils pax-utils python-any-r1 readme.gentoo-r1 toolchain-funcs virtualx xdg-utils
49 -
50 -DESCRIPTION="Open-source version of Google Chrome web browser"
51 -HOMEPAGE="https://chromium.org/"
52 -PATCHSET="1"
53 -PATCHSET_NAME="chromium-$(ver_cut 1)-patchset-${PATCHSET}"
54 -SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.xz
55 - https://github.com/stha09/chromium-patches/releases/download/${PATCHSET_NAME}/${PATCHSET_NAME}.tar.xz
56 - pgo? ( https://blackhole.sk/~kabel/src/chromium-profiler-0.1.tar )"
57 -
58 -LICENSE="BSD"
59 -SLOT="0/stable"
60 -KEYWORDS="amd64 arm64"
61 -IUSE="+X component-build cups cpu_flags_arm_neon debug gtk4 +hangouts headless +js-type-check kerberos libcxx lto +official pgo pic +proprietary-codecs pulseaudio screencast selinux +suid +system-ffmpeg +system-harfbuzz +system-icu +system-png vaapi wayland widevine"
62 -REQUIRED_USE="
63 - component-build? ( !suid !libcxx )
64 - screencast? ( wayland )
65 - !headless? ( || ( X wayland ) )
66 - pgo? ( X !wayland )
67 -"
68 -
69 -COMMON_X_DEPEND="
70 - x11-libs/libXcomposite:=
71 - x11-libs/libXcursor:=
72 - x11-libs/libXdamage:=
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/libxshmfence:=
79 -"
80 -
81 -COMMON_SNAPSHOT_DEPEND="
82 - system-icu? ( >=dev-libs/icu-71.1:= )
83 - >=dev-libs/libxml2-2.9.4-r3:=[icu]
84 - dev-libs/nspr:=
85 - >=dev-libs/nss-3.26:=
86 - !libcxx? ( >=dev-libs/re2-0.2019.08.01:= )
87 - dev-libs/libxslt:=
88 - media-libs/fontconfig:=
89 - >=media-libs/freetype-2.11.0-r1:=
90 - system-harfbuzz? ( >=media-libs/harfbuzz-3:0=[icu(-)] )
91 - media-libs/libjpeg-turbo:=
92 - system-png? ( media-libs/libpng:=[-apng] )
93 - >=media-libs/libwebp-0.4.0:=
94 - media-libs/mesa:=[gbm(+)]
95 - >=media-libs/openh264-1.6.0:=
96 - sys-libs/zlib:=
97 - x11-libs/libdrm:=
98 - !headless? (
99 - dev-libs/glib:2
100 - >=media-libs/alsa-lib-1.0.19:=
101 - pulseaudio? ( media-sound/pulseaudio:= )
102 - sys-apps/pciutils:=
103 - kerberos? ( virtual/krb5 )
104 - vaapi? ( >=x11-libs/libva-2.7:=[X?,wayland?] )
105 - X? (
106 - x11-libs/libX11:=
107 - x11-libs/libXext:=
108 - x11-libs/libxcb:=
109 - )
110 - x11-libs/libxkbcommon:=
111 - wayland? (
112 - dev-libs/wayland:=
113 - screencast? ( media-video/pipewire:= )
114 - )
115 - )
116 -"
117 -
118 -COMMON_DEPEND="
119 - ${COMMON_SNAPSHOT_DEPEND}
120 - app-arch/bzip2:=
121 - dev-libs/expat:=
122 - system-ffmpeg? (
123 - >=media-video/ffmpeg-4.3:=
124 - || (
125 - media-video/ffmpeg[-samba]
126 - >=net-fs/samba-4.5.10-r1[-debug(-)]
127 - )
128 - >=media-libs/opus-1.3.1:=
129 - )
130 - net-misc/curl[ssl]
131 - sys-apps/dbus:=
132 - media-libs/flac:=
133 - sys-libs/zlib:=[minizip]
134 - !headless? (
135 - X? ( ${COMMON_X_DEPEND} )
136 - >=app-accessibility/at-spi2-atk-2.26:2
137 - >=app-accessibility/at-spi2-core-2.26:2
138 - >=dev-libs/atk-2.26
139 - media-libs/mesa:=[X?,wayland?]
140 - cups? ( >=net-print/cups-1.3.11:= )
141 - virtual/udev
142 - x11-libs/cairo:=
143 - x11-libs/gdk-pixbuf:2
144 - x11-libs/pango:=
145 - )
146 -"
147 -RDEPEND="${COMMON_DEPEND}
148 - !headless? (
149 - || (
150 - x11-libs/gtk+:3[X?,wayland?]
151 - gui-libs/gtk:4[X?,wayland?]
152 - )
153 - x11-misc/xdg-utils
154 - )
155 - virtual/ttf-fonts
156 - selinux? ( sec-policy/selinux-chromium )
157 -"
158 -DEPEND="${COMMON_DEPEND}
159 - !headless? (
160 - gtk4? ( gui-libs/gtk:4[X?,wayland?] )
161 - !gtk4? ( x11-libs/gtk+:3[X?,wayland?] )
162 - )
163 -"
164 -
165 -depend_clang_llvm_version() {
166 - echo "sys-devel/clang:$1"
167 - echo "sys-devel/llvm:$1"
168 - echo "=sys-devel/lld-$1*"
169 -}
170 -
171 -depend_clang_llvm_versions() {
172 - local _v
173 - if [[ $# -gt 1 ]]; then
174 - echo "|| ("
175 - for _v in "$@"; do
176 - echo "("
177 - depend_clang_llvm_version "${_v}"
178 - echo ")"
179 - done
180 - echo ")"
181 - elif [[ $# -eq 1 ]]; then
182 - depend_clang_llvm_version "$1"
183 - fi
184 -}
185 -
186 -BDEPEND="
187 - ${COMMON_SNAPSHOT_DEPEND}
188 - ${PYTHON_DEPS}
189 - $(python_gen_any_dep '
190 - dev-python/setuptools[${PYTHON_USEDEP}]
191 - ')
192 - >=app-arch/gzip-1.7
193 - libcxx? ( >=sys-devel/clang-12 )
194 - lto? ( $(depend_clang_llvm_versions 13 14 15) )
195 - pgo? (
196 - >=dev-python/selenium-3.141.0
197 - >=dev-util/web_page_replay_go-20220314
198 - $(depend_clang_llvm_versions 13 14 15)
199 - )
200 - dev-lang/perl
201 - >=dev-util/gn-0.1807
202 - >=dev-util/gperf-3.0.3
203 - >=dev-util/ninja-1.7.2
204 - dev-vcs/git
205 - >=net-libs/nodejs-7.6.0[inspector]
206 - >=sys-devel/bison-2.4.3
207 - sys-devel/flex
208 - virtual/pkgconfig
209 - js-type-check? ( virtual/jre )
210 -"
211 -
212 -# These are intended for ebuild maintainer use to force clang if GCC is broken.
213 -: ${CHROMIUM_FORCE_CLANG=no}
214 -
215 -if [[ ${CHROMIUM_FORCE_CLANG} == yes ]]; then
216 - BDEPEND+=" >=sys-devel/clang-12"
217 -fi
218 -
219 -if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
220 - EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
221 -fi
222 -
223 -DISABLE_AUTOFORMATTING="yes"
224 -DOC_CONTENTS="
225 -Some web pages may require additional fonts to display properly.
226 -Try installing some of the following packages if some characters
227 -are not displayed properly:
228 -- media-fonts/arphicfonts
229 -- media-fonts/droid
230 -- media-fonts/ipamonafont
231 -- media-fonts/noto
232 -- media-fonts/ja-ipafonts
233 -- media-fonts/takao-fonts
234 -- media-fonts/wqy-microhei
235 -- media-fonts/wqy-zenhei
236 -
237 -To fix broken icons on the Downloads page, you should install an icon
238 -theme that covers the appropriate MIME types, and configure this as your
239 -GTK+ icon theme.
240 -
241 -For native file dialogs in KDE, install kde-apps/kdialog.
242 -
243 -To make password storage work with your desktop environment you may
244 -have install one of the supported credentials management applications:
245 -- app-crypt/libsecret (GNOME)
246 -- kde-frameworks/kwallet (KDE)
247 -If you have one of above packages installed, but don't want to use
248 -them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
249 -in /etc/chromium/default.
250 -"
251 -
252 -python_check_deps() {
253 - python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
254 -}
255 -
256 -needs_clang() {
257 - [[ ${CHROMIUM_FORCE_CLANG} == yes ]] || use libcxx || use lto || use pgo
258 -}
259 -
260 -llvm_check_deps() {
261 - if ! has_version -b "sys-devel/clang:${LLVM_SLOT}" ; then
262 - einfo "sys-devel/clang:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
263 - return 1
264 - fi
265 -
266 - if ( use lto || use pgo ) && ! has_version -b "=sys-devel/lld-${LLVM_SLOT}*" ; then
267 - einfo "=sys-devel/lld-${LLVM_SLOT}* is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
268 - return 1
269 - fi
270 -
271 - einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2
272 -}
273 -
274 -pre_build_checks() {
275 - if [[ ${MERGE_TYPE} != binary ]]; then
276 - [[ ${EBUILD_PHASE_FUNC} == pkg_setup ]] && ( use lto || use pgo ) && llvm_pkg_setup
277 -
278 - local -x CPP="$(tc-getCXX) -E"
279 - if tc-is-gcc && ! ver_test "$(gcc-version)" -ge 9.2; then
280 - die "At least gcc 9.2 is required"
281 - fi
282 - if use pgo && tc-is-cross-compiler; then
283 - die "The pgo USE flag cannot be used when cross-compiling"
284 - fi
285 - if needs_clang || tc-is-clang; then
286 - tc-is-cross-compiler && CPP=${CBUILD}-clang++ || CPP=${CHOST}-clang++
287 - CPP+=" -E"
288 - if ! ver_test "$(clang-major-version)" -ge 12; then
289 - die "At least clang 12 is required"
290 - fi
291 - fi
292 - if [[ ${EBUILD_PHASE_FUNC} == pkg_setup ]] && use js-type-check; then
293 - "${BROOT}"/usr/bin/java -version 2>1 > /dev/null || die "Java VM not setup correctly"
294 - fi
295 - fi
296 -
297 - # Check build requirements, bug #541816 and bug #471810 .
298 - CHECKREQS_MEMORY="4G"
299 - CHECKREQS_DISK_BUILD="12G"
300 - tc-is-cross-compiler && CHECKREQS_DISK_BUILD="14G"
301 - if use lto || use pgo; then
302 - CHECKREQS_MEMORY="9G"
303 - CHECKREQS_DISK_BUILD="13G"
304 - tc-is-cross-compiler && CHECKREQS_DISK_BUILD="16G"
305 - use pgo && CHECKREQS_DISK_BUILD="20G"
306 - fi
307 - if is-flagq '-g?(gdb)?([1-9])'; then
308 - if use custom-cflags || use component-build; then
309 - CHECKREQS_DISK_BUILD="25G"
310 - fi
311 - if ! use component-build; then
312 - CHECKREQS_MEMORY="16G"
313 - fi
314 - fi
315 - check-reqs_${EBUILD_PHASE_FUNC}
316 -}
317 -
318 -pkg_pretend() {
319 - pre_build_checks
320 -
321 - if use headless; then
322 - local headless_unused_flags=("cups" "kerberos" "pulseaudio" "vaapi" "wayland")
323 - for myiuse in ${headless_unused_flags[@]}; do
324 - use ${myiuse} && ewarn "Ignoring USE=${myiuse} since USE=headless is set."
325 - done
326 - fi
327 -}
328 -
329 -pkg_setup() {
330 - pre_build_checks
331 -
332 - chromium_suid_sandbox_check_kernel_config
333 -
334 - # nvidia-drivers does not work correctly with Wayland due to unsupported EGLStreams
335 - if use wayland && ! use headless && has_version "x11-drivers/nvidia-drivers"; then
336 - ewarn "Proprietary nVidia driver does not work with Wayland. You can disable"
337 - ewarn "Wayland by setting DISABLE_OZONE_PLATFORM=true in /etc/chromium/default."
338 - fi
339 -}
340 -
341 -src_prepare() {
342 - # Calling this here supports resumption via FEATURES=keepwork
343 - python_setup
344 -
345 - local PATCHES=(
346 - "${WORKDIR}/patches"
347 - "${FILESDIR}/chromium-93-InkDropHost-crash.patch"
348 - "${FILESDIR}/chromium-98-EnumTable-crash.patch"
349 - "${FILESDIR}/chromium-98-gtk4-build.patch"
350 - "${FILESDIR}/chromium-104-tflite-system-zlib.patch"
351 - "${FILESDIR}/chromium-105-swiftshader-no-wayland.patch"
352 - "${FILESDIR}/chromium-use-oauth2-client-switches-as-default.patch"
353 - "${FILESDIR}/chromium-shim_headers.patch"
354 - "${FILESDIR}/chromium-cross-compile.patch"
355 - )
356 -
357 - default
358 -
359 - mkdir -p third_party/node/linux/node-linux-x64/bin || die
360 - ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
361 -
362 - # adjust python interpreter version
363 - sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
364 -
365 - local keeplibs=(
366 - base/third_party/cityhash
367 - base/third_party/double_conversion
368 - base/third_party/dynamic_annotations
369 - base/third_party/icu
370 - base/third_party/nspr
371 - base/third_party/superfasthash
372 - base/third_party/symbolize
373 - base/third_party/valgrind
374 - base/third_party/xdg_mime
375 - base/third_party/xdg_user_dirs
376 - buildtools/third_party/libc++
377 - buildtools/third_party/libc++abi
378 - chrome/third_party/mozilla_security_manager
379 - courgette/third_party
380 - net/third_party/mozilla_security_manager
381 - net/third_party/nss
382 - net/third_party/quic
383 - net/third_party/uri_template
384 - third_party/abseil-cpp
385 - third_party/angle
386 - third_party/angle/src/common/third_party/base
387 - third_party/angle/src/common/third_party/smhasher
388 - third_party/angle/src/common/third_party/xxhash
389 - third_party/angle/src/third_party/libXNVCtrl
390 - third_party/angle/src/third_party/trace_event
391 - third_party/angle/src/third_party/volk
392 - third_party/apple_apsl
393 - third_party/axe-core
394 - third_party/blink
395 - third_party/boringssl
396 - third_party/boringssl/src/third_party/fiat
397 - third_party/breakpad
398 - third_party/breakpad/breakpad/src/third_party/curl
399 - third_party/brotli
400 - third_party/catapult
401 - third_party/catapult/common/py_vulcanize/third_party/rcssmin
402 - third_party/catapult/common/py_vulcanize/third_party/rjsmin
403 - third_party/catapult/third_party/beautifulsoup4-4.9.3
404 - third_party/catapult/third_party/html5lib-1.1
405 - third_party/catapult/third_party/polymer
406 - third_party/catapult/third_party/six
407 - third_party/catapult/tracing/third_party/d3
408 - third_party/catapult/tracing/third_party/gl-matrix
409 - third_party/catapult/tracing/third_party/jpeg-js
410 - third_party/catapult/tracing/third_party/jszip
411 - third_party/catapult/tracing/third_party/mannwhitneyu
412 - third_party/catapult/tracing/third_party/oboe
413 - third_party/catapult/tracing/third_party/pako
414 - third_party/ced
415 - third_party/cld_3
416 - third_party/closure_compiler
417 - third_party/content_analysis_sdk
418 - third_party/cpuinfo
419 - third_party/crashpad
420 - third_party/crashpad/crashpad/third_party/lss
421 - third_party/crashpad/crashpad/third_party/zlib
422 - third_party/crc32c
423 - third_party/cros_system_api
424 - third_party/dav1d
425 - third_party/dawn
426 - third_party/dawn/third_party/gn/webgpu-cts
427 - third_party/dawn/third_party/khronos
428 - third_party/depot_tools
429 - third_party/devscripts
430 - third_party/devtools-frontend
431 - third_party/devtools-frontend/src/front_end/third_party/acorn
432 - third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
433 - third_party/devtools-frontend/src/front_end/third_party/axe-core
434 - third_party/devtools-frontend/src/front_end/third_party/chromium
435 - third_party/devtools-frontend/src/front_end/third_party/codemirror
436 - third_party/devtools-frontend/src/front_end/third_party/diff
437 - third_party/devtools-frontend/src/front_end/third_party/i18n
438 - third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
439 - third_party/devtools-frontend/src/front_end/third_party/lighthouse
440 - third_party/devtools-frontend/src/front_end/third_party/lit-html
441 - third_party/devtools-frontend/src/front_end/third_party/lodash-isequal
442 - third_party/devtools-frontend/src/front_end/third_party/marked
443 - third_party/devtools-frontend/src/front_end/third_party/puppeteer
444 - third_party/devtools-frontend/src/front_end/third_party/wasmparser
445 - third_party/devtools-frontend/src/test/unittests/front_end/third_party/i18n
446 - third_party/devtools-frontend/src/third_party
447 - third_party/distributed_point_functions
448 - third_party/dom_distiller_js
449 - third_party/eigen3
450 - third_party/emoji-segmenter
451 - third_party/farmhash
452 - third_party/fdlibm
453 - third_party/fft2d
454 - third_party/flatbuffers
455 - third_party/fp16
456 - third_party/freetype
457 - third_party/fusejs
458 - third_party/fxdiv
459 - third_party/highway
460 - third_party/libgifcodec
461 - third_party/liburlpattern
462 - third_party/libzip
463 - third_party/gemmlowp
464 - third_party/google_input_tools
465 - third_party/google_input_tools/third_party/closure_library
466 - third_party/google_input_tools/third_party/closure_library/third_party/closure
467 - third_party/googletest
468 - third_party/hunspell
469 - third_party/iccjpeg
470 - third_party/inspector_protocol
471 - third_party/jinja2
472 - third_party/jsoncpp
473 - third_party/jstemplate
474 - third_party/khronos
475 - third_party/leveldatabase
476 - third_party/libaddressinput
477 - third_party/libaom
478 - third_party/libaom/source/libaom/third_party/fastfeat
479 - third_party/libaom/source/libaom/third_party/vector
480 - third_party/libaom/source/libaom/third_party/x86inc
481 - third_party/libavif
482 - third_party/libevent
483 - third_party/libgav1
484 - third_party/libjingle
485 - third_party/libjxl
486 - third_party/libphonenumber
487 - third_party/libsecret
488 - third_party/libsrtp
489 - third_party/libsync
490 - third_party/libudev
491 - third_party/libva_protected_content
492 - third_party/libvpx
493 - third_party/libvpx/source/libvpx/third_party/x86inc
494 - third_party/libwebm
495 - third_party/libx11
496 - third_party/libxcb-keysyms
497 - third_party/libxml/chromium
498 - third_party/libyuv
499 - third_party/llvm
500 - third_party/lottie
501 - third_party/lss
502 - third_party/lzma_sdk
503 - third_party/mako
504 - third_party/maldoca
505 - third_party/maldoca/src/third_party/tensorflow_protos
506 - third_party/maldoca/src/third_party/zlibwrapper
507 - third_party/markupsafe
508 - third_party/mesa
509 - third_party/metrics_proto
510 - third_party/minigbm
511 - third_party/modp_b64
512 - third_party/nasm
513 - third_party/nearby
514 - third_party/neon_2_sse
515 - third_party/node
516 - third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2
517 - third_party/one_euro_filter
518 - third_party/openscreen
519 - third_party/openscreen/src/third_party/mozilla
520 - third_party/openscreen/src/third_party/tinycbor/src/src
521 - third_party/ots
522 - third_party/pdfium
523 - third_party/pdfium/third_party/agg23
524 - third_party/pdfium/third_party/base
525 - third_party/pdfium/third_party/bigint
526 - third_party/pdfium/third_party/freetype
527 - third_party/pdfium/third_party/lcms
528 - third_party/pdfium/third_party/libopenjpeg
529 - third_party/pdfium/third_party/libpng16
530 - third_party/pdfium/third_party/libtiff
531 - third_party/pdfium/third_party/skia_shared
532 - third_party/perfetto
533 - third_party/perfetto/protos/third_party/chromium
534 - third_party/pffft
535 - third_party/ply
536 - third_party/polymer
537 - third_party/private-join-and-compute
538 - third_party/private_membership
539 - third_party/protobuf
540 - third_party/protobuf/third_party/six
541 - third_party/pthreadpool
542 - third_party/pyjson5
543 - third_party/qcms
544 - third_party/rnnoise
545 - third_party/s2cellid
546 - third_party/securemessage
547 - third_party/shell-encryption
548 - third_party/simplejson
549 - third_party/skia
550 - third_party/skia/include/third_party/skcms
551 - third_party/skia/include/third_party/vulkan
552 - third_party/skia/third_party/skcms
553 - third_party/skia/third_party/vulkan
554 - third_party/smhasher
555 - third_party/snappy
556 - third_party/sqlite
557 - third_party/swiftshader
558 - third_party/swiftshader/third_party/astc-encoder
559 - third_party/swiftshader/third_party/llvm-subzero
560 - third_party/swiftshader/third_party/marl
561 - third_party/swiftshader/third_party/subzero
562 - third_party/swiftshader/third_party/SPIRV-Headers/include/spirv
563 - third_party/swiftshader/third_party/SPIRV-Tools
564 - third_party/tensorflow-text
565 - third_party/tflite
566 - third_party/tflite/src/third_party/eigen3
567 - third_party/tflite/src/third_party/fft2d
568 - third_party/ruy
569 - third_party/six
570 - third_party/ukey2
571 - third_party/unrar
572 - third_party/utf
573 - third_party/vulkan
574 - third_party/web-animations-js
575 - third_party/webdriver
576 - third_party/webgpu-cts
577 - third_party/webrtc
578 - third_party/webrtc/common_audio/third_party/ooura
579 - third_party/webrtc/common_audio/third_party/spl_sqrt_floor
580 - third_party/webrtc/modules/third_party/fft
581 - third_party/webrtc/modules/third_party/g711
582 - third_party/webrtc/modules/third_party/g722
583 - third_party/webrtc/rtc_base/third_party/base64
584 - third_party/webrtc/rtc_base/third_party/sigslot
585 - third_party/widevine
586 - third_party/woff2
587 - third_party/wuffs
588 - third_party/x11proto
589 - third_party/xcbproto
590 - third_party/xnnpack
591 - third_party/zxcvbn-cpp
592 - third_party/zlib/google
593 - url/third_party/mozilla
594 - v8/src/third_party/siphash
595 - v8/src/third_party/valgrind
596 - v8/src/third_party/utf8-decoder
597 - v8/third_party/inspector_protocol
598 - v8/third_party/v8
599 -
600 - # gyp -> gn leftovers
601 - third_party/speech-dispatcher
602 - third_party/usb_ids
603 - third_party/xdg-utils
604 - )
605 - if ! use system-ffmpeg; then
606 - keeplibs+=( third_party/ffmpeg third_party/opus )
607 - fi
608 - if ! use system-icu; then
609 - keeplibs+=( third_party/icu )
610 - fi
611 - if ! use system-png; then
612 - keeplibs+=( third_party/libpng )
613 - fi
614 - if use libcxx; then
615 - keeplibs+=( third_party/re2 )
616 - fi
617 - if use system-harfbuzz; then
618 - keeplibs+=( third_party/harfbuzz-ng/utils )
619 - else
620 - keeplibs+=( third_party/harfbuzz-ng )
621 - fi
622 - if use wayland && ! use headless ; then
623 - keeplibs+=( third_party/wayland )
624 - # only need the .gn files
625 - rm -r third_party/wayland/src || die
626 - fi
627 - if use arm64 || use ppc64 ; then
628 - keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
629 - fi
630 - # we need to generate ppc64 stuff because upstream does not ship it yet
631 - # it has to be done before unbundling.
632 - if use ppc64; then
633 - pushd third_party/libvpx >/dev/null || die
634 - mkdir -p source/config/linux/ppc64 || die
635 - # requires git and clang, bug #832803
636 - sed -i -e "s|^update_readme||g; s|clang-format|${EPREFIX}/bin/true|g" \
637 - generate_gni.sh || die
638 - ./generate_gni.sh || die
639 - popd >/dev/null || die
640 -
641 - pushd third_party/ffmpeg >/dev/null || die
642 - cp libavcodec/ppc/h264dsp.c libavcodec/ppc/h264dsp_ppc.c || die
643 - cp libavcodec/ppc/h264qpel.c libavcodec/ppc/h264qpel_ppc.c || die
644 - popd >/dev/null || die
645 - fi
646 -
647 - # Remove most bundled libraries. Some are still needed.
648 - build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
649 -
650 - if use js-type-check; then
651 - ln -s "${EPREFIX}"/usr/bin/java third_party/jdk/current/bin/java || die
652 - fi
653 -
654 - # bundled eu-strip is for amd64 only and we don't want to pre-stripped binaries
655 - mkdir -p buildtools/third_party/eu-strip/bin || die
656 - ln -s "${EPREFIX}"/bin/true buildtools/third_party/eu-strip/bin/eu-strip || die
657 -}
658 -
659 -chromium_configure() {
660 - # Calling this here supports resumption via FEATURES=keepwork
661 - python_setup
662 -
663 - local myconf_gn=""
664 -
665 - # Make sure the build system will use the right tools, bug #340795.
666 - tc-export AR CC CXX NM
667 -
668 - if needs_clang && ! tc-is-clang; then
669 - # Force clang since gcc is either broken or build is using libcxx.
670 - if tc-is-cross-compiler; then
671 - CC="${CBUILD}-clang -target ${CHOST} --sysroot ${ESYSROOT}"
672 - CXX="${CBUILD}-clang++ -target ${CHOST} --sysroot ${ESYSROOT}"
673 - BUILD_CC=${CBUILD}-clang
674 - BUILD_CXX=${CBUILD}-clang++
675 - else
676 - CC=${CHOST}-clang
677 - CXX=${CHOST}-clang++
678 - fi
679 - strip-unsupported-flags
680 - fi
681 -
682 - if tc-is-clang; then
683 - myconf_gn+=" is_clang=true clang_use_chrome_plugins=false"
684 - else
685 - myconf_gn+=" is_clang=false"
686 - fi
687 -
688 - # Force lld for lto or pgo builds only, otherwise disable, bug 641556
689 - if use lto || use pgo; then
690 - myconf_gn+=" use_lld=true"
691 - else
692 - myconf_gn+=" use_lld=false"
693 - fi
694 -
695 - if use lto || use pgo; then
696 - AR=llvm-ar
697 - NM=llvm-nm
698 - if tc-is-cross-compiler; then
699 - BUILD_AR=llvm-ar
700 - BUILD_NM=llvm-nm
701 - fi
702 - fi
703 -
704 - # Define a custom toolchain for GN
705 - myconf_gn+=" custom_toolchain=\"//build/toolchain/linux/unbundle:default\""
706 -
707 - if tc-is-cross-compiler; then
708 - tc-export BUILD_{AR,CC,CXX,NM}
709 - myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:host\""
710 - myconf_gn+=" v8_snapshot_toolchain=\"//build/toolchain/linux/unbundle:host\""
711 - myconf_gn+=" pkg_config=\"$(tc-getPKG_CONFIG)\""
712 - myconf_gn+=" host_pkg_config=\"$(tc-getBUILD_PKG_CONFIG)\""
713 -
714 - # setup cups-config, build system only uses --libs option
715 - if use cups; then
716 - mkdir "${T}/cups-config" || die
717 - cp "${ESYSROOT}/usr/bin/${CHOST}-cups-config" "${T}/cups-config/cups-config" || die
718 - export PATH="${PATH}:${T}/cups-config"
719 - fi
720 -
721 - # Don't inherit PKG_CONFIG_PATH from environment
722 - local -x PKG_CONFIG_PATH=
723 - else
724 - myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:default\""
725 - fi
726 -
727 - # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
728 - myconf_gn+=" is_debug=false"
729 -
730 - # enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
731 - # DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
732 - myconf_gn+=" dcheck_always_on=$(usex debug true false)"
733 - myconf_gn+=" dcheck_is_configurable=$(usex debug true false)"
734 -
735 - # Component build isn't generally intended for use by end users. It's mostly useful
736 - # for development and debugging.
737 - myconf_gn+=" is_component_build=$(usex component-build true false)"
738 -
739 - # Disable nacl, we can't build without pnacl (http://crbug.com/269560).
740 - myconf_gn+=" enable_nacl=false"
741 -
742 - # Use system-provided libraries.
743 - # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
744 - # TODO: use_system_hunspell (upstream changes needed).
745 - # TODO: use_system_protobuf (bug #525560).
746 - # TODO: use_system_sqlite (http://crbug.com/22208).
747 -
748 - # libevent: https://bugs.gentoo.org/593458
749 - local gn_system_libraries=(
750 - flac
751 - fontconfig
752 - freetype
753 - # Need harfbuzz_from_pkgconfig target
754 - #harfbuzz-ng
755 - libdrm
756 - libjpeg
757 - libwebp
758 - libxml
759 - libxslt
760 - openh264
761 - zlib
762 - )
763 - if use system-ffmpeg; then
764 - gn_system_libraries+=( ffmpeg opus )
765 - fi
766 - if use system-icu; then
767 - gn_system_libraries+=( icu )
768 - fi
769 - if use system-png; then
770 - gn_system_libraries+=( libpng )
771 - fi
772 - # re2 library interface relies on std::string and std::vector
773 - if ! use libcxx; then
774 - gn_system_libraries+=( re2 )
775 - fi
776 - build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" || die
777 -
778 - # See dependency logic in third_party/BUILD.gn
779 - myconf_gn+=" use_system_harfbuzz=$(usex system-harfbuzz true false)"
780 -
781 - # Disable deprecated libgnome-keyring dependency, bug #713012
782 - myconf_gn+=" use_gnome_keyring=false"
783 -
784 - # Optional dependencies.
785 - myconf_gn+=" enable_js_type_check=$(usex js-type-check true false)"
786 - myconf_gn+=" enable_hangout_services_extension=$(usex hangouts true false)"
787 - myconf_gn+=" enable_widevine=$(usex widevine true false)"
788 -
789 - if use headless; then
790 - myconf_gn+=" use_cups=false"
791 - myconf_gn+=" use_kerberos=false"
792 - myconf_gn+=" use_pulseaudio=false"
793 - myconf_gn+=" use_vaapi=false"
794 - myconf_gn+=" rtc_use_pipewire=false"
795 - else
796 - myconf_gn+=" use_cups=$(usex cups true false)"
797 - myconf_gn+=" use_kerberos=$(usex kerberos true false)"
798 - myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)"
799 - myconf_gn+=" use_vaapi=$(usex vaapi true false)"
800 - myconf_gn+=" rtc_use_pipewire=$(usex screencast true false)"
801 - myconf_gn+=" gtk_version=$(usex gtk4 4 3)"
802 - fi
803 -
804 - # TODO: link_pulseaudio=true for GN.
805 -
806 - myconf_gn+=" disable_fieldtrial_testing_config=true"
807 -
808 - # Never use bundled gold binary. Disable gold linker flags for now.
809 - # Do not use bundled clang.
810 - # Trying to use gold results in linker crash.
811 - myconf_gn+=" use_gold=false use_sysroot=false"
812 - myconf_gn+=" use_custom_libcxx=$(usex libcxx true false)"
813 -
814 - # Disable pseudolocales, only used for testing
815 - myconf_gn+=" enable_pseudolocales=false"
816 -
817 - # Disable code formating of generated files
818 - myconf_gn+=" blink_enable_generated_code_formatting=false"
819 -
820 - ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)"
821 - myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)"
822 - myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\""
823 -
824 - # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys .
825 - # Note: these are for Gentoo use ONLY. For your own distribution,
826 - # please get your own set of keys. Feel free to contact chromium@g.o
827 - # for more info. The OAuth2 credentials, however, have been left out.
828 - # Those OAuth2 credentials have been broken for quite some time anyway.
829 - # Instead we apply a patch to use the --oauth2-client-id= and
830 - # --oauth2-client-secret= switches for setting GOOGLE_DEFAULT_CLIENT_ID and
831 - # GOOGLE_DEFAULT_CLIENT_SECRET at runtime. This allows signing into
832 - # Chromium without baked-in values.
833 - local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc"
834 - myconf_gn+=" google_api_key=\"${google_api_key}\""
835 - local myarch="$(tc-arch)"
836 -
837 - # Avoid CFLAGS problems, bug #352457, bug #390147.
838 - if ! use custom-cflags; then
839 - replace-flags "-Os" "-O2"
840 - strip-flags
841 -
842 - # Debug info section overflows without component build
843 - # Prevent linker from running out of address space, bug #471810 .
844 - if ! use component-build || use x86; then
845 - filter-flags "-g*"
846 - fi
847 -
848 - # Prevent libvpx/xnnpack build failures. Bug 530248, 544702, 546984, 853646.
849 - if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then
850 - filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
851 - fi
852 - fi
853 -
854 - if [[ $myarch = amd64 ]] ; then
855 - myconf_gn+=" target_cpu=\"x64\""
856 - ffmpeg_target_arch=x64
857 - elif [[ $myarch = x86 ]] ; then
858 - myconf_gn+=" target_cpu=\"x86\""
859 - ffmpeg_target_arch=ia32
860 -
861 - # This is normally defined by compiler_cpu_abi in
862 - # build/config/compiler/BUILD.gn, but we patch that part out.
863 - append-flags -msse2 -mfpmath=sse -mmmx
864 - elif [[ $myarch = arm64 ]] ; then
865 - myconf_gn+=" target_cpu=\"arm64\""
866 - ffmpeg_target_arch=arm64
867 - elif [[ $myarch = arm ]] ; then
868 - myconf_gn+=" target_cpu=\"arm\""
869 - ffmpeg_target_arch=$(usex cpu_flags_arm_neon arm-neon arm)
870 - elif [[ $myarch = ppc64 ]] ; then
871 - myconf_gn+=" target_cpu=\"ppc64\""
872 - ffmpeg_target_arch=ppc64
873 - else
874 - die "Failed to determine target arch, got '$myarch'."
875 - fi
876 -
877 - # Make sure that -Werror doesn't get added to CFLAGS by the build system.
878 - # Depending on GCC version the warnings are different and we don't want
879 - # the build to fail because of that.
880 - myconf_gn+=" treat_warnings_as_errors=false"
881 -
882 - # Disable fatal linker warnings, bug 506268.
883 - myconf_gn+=" fatal_linker_warnings=false"
884 -
885 - # Disable external code space for V8 for ppc64. It is disabled for ppc64
886 - # by default, but cross-compiling on amd64 enables it again.
887 - if tc-is-cross-compiler; then
888 - if ! use amd64 && ! use arm64; then
889 - myconf_gn+=" v8_enable_external_code_space=false"
890 - fi
891 - fi
892 -
893 - # Bug 491582.
894 - export TMPDIR="${WORKDIR}/temp"
895 - mkdir -p -m 755 "${TMPDIR}" || die
896 -
897 - # https://bugs.gentoo.org/654216
898 - addpredict /dev/dri/ #nowarn
899 -
900 - #if ! use system-ffmpeg; then
901 - if false; then
902 - local build_ffmpeg_args=""
903 - if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then
904 - build_ffmpeg_args+=" --disable-asm"
905 - fi
906 -
907 - # Re-configure bundled ffmpeg. See bug #491378 for example reasons.
908 - einfo "Configuring bundled ffmpeg..."
909 - pushd third_party/ffmpeg > /dev/null || die
910 - chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \
911 - --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die
912 - chromium/scripts/copy_config.sh || die
913 - chromium/scripts/generate_gn.py || die
914 - popd > /dev/null || die
915 - fi
916 -
917 - # Disable unknown warning message from clang.
918 - if tc-is-clang; then
919 - append-flags -Wno-unknown-warning-option
920 - if tc-is-cross-compiler; then
921 - export BUILD_CXXFLAGS+=" -Wno-unknown-warning-option"
922 - export BUILD_CFLAGS+=" -Wno-unknown-warning-option"
923 - fi
924 - fi
925 -
926 - # Explicitly disable ICU data file support for system-icu/headless builds.
927 - if use system-icu || use headless; then
928 - myconf_gn+=" icu_use_data_file=false"
929 - fi
930 -
931 - # Enable ozone wayland and/or headless support
932 - myconf_gn+=" use_ozone=true ozone_auto_platforms=false"
933 - myconf_gn+=" ozone_platform_headless=true"
934 - if use headless; then
935 - myconf_gn+=" ozone_platform=\"headless\""
936 - myconf_gn+=" use_xkbcommon=false use_gtk=false"
937 - myconf_gn+=" use_glib=false use_gio=false"
938 - myconf_gn+=" use_pangocairo=false use_alsa=false"
939 - myconf_gn+=" use_libpci=false use_udev=false"
940 - myconf_gn+=" enable_print_preview=false"
941 - myconf_gn+=" enable_remoting=false"
942 - else
943 - myconf_gn+=" use_system_libdrm=true"
944 - myconf_gn+=" use_system_minigbm=true"
945 - myconf_gn+=" use_xkbcommon=true"
946 - myconf_gn+=" ozone_platform_x11=$(usex X true false)"
947 - myconf_gn+=" ozone_platform_wayland=$(usex wayland true false)"
948 - myconf_gn+=" ozone_platform=$(usex wayland \"wayland\" \"x11\")"
949 - use wayland && myconf_gn+=" use_system_wayland_scanner=true"
950 - fi
951 -
952 - # Results in undefined references in chrome linking, may require CFI to work
953 - if use arm64; then
954 - myconf_gn+=" arm_control_flow_integrity=\"none\""
955 - fi
956 -
957 - # Enable official builds
958 - myconf_gn+=" is_official_build=$(usex official true false)"
959 - myconf_gn+=" use_thin_lto=$(usex lto true false)"
960 - myconf_gn+=" thin_lto_enable_optimizations=$(usex lto true false)"
961 - if use official; then
962 - # Allow building against system libraries in official builds
963 - sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
964 - tools/generate_shim_headers/generate_shim_headers.py || die
965 - # Disable CFI: unsupported for GCC, requires clang+lto+lld
966 - myconf_gn+=" is_cfi=false"
967 - # Don't add symbols to build
968 - myconf_gn+=" symbol_level=0"
969 - fi
970 -
971 - if use pgo; then
972 - myconf_gn+=" chrome_pgo_phase=${1}"
973 - if [[ "$1" == "2" ]]; then
974 - myconf_gn+=" pgo_data_path=\"${2}\""
975 - fi
976 - else
977 - # Disable PGO, because profile data is only compatible with >=clang-11
978 - myconf_gn+=" chrome_pgo_phase=0"
979 - fi
980 -
981 - # user CXXFLAGS might overwrite -march=armv8-a+crc+crypto, bug #851639
982 - if use arm64 && tc-is-gcc; then
983 - sed -i '/^#if HAVE_ARM64_CRC32C/a #pragma GCC target ("+crc+crypto")' \
984 - third_party/crc32c/src/src/crc32c_arm64.cc || die
985 - fi
986 -
987 - einfo "Configuring Chromium..."
988 - set -- gn gen --args="${myconf_gn} ${EXTRA_GN}" out/Release
989 - echo "$@"
990 - "$@" || die
991 -}
992 -
993 -src_configure() {
994 - chromium_configure $(usex pgo 1 0)
995 -}
996 -
997 -chromium_compile() {
998 - # Final link uses lots of file descriptors.
999 - ulimit -n 2048
1000 -
1001 - # Calling this here supports resumption via FEATURES=keepwork
1002 - python_setup
1003 -
1004 - # Don't inherit PYTHONPATH from environment, bug #789021, #812689
1005 - local -x PYTHONPATH=
1006 -
1007 - #"${EPYTHON}" tools/clang/scripts/update.py --force-local-build --gcc-toolchain /usr --skip-checkout --use-system-cmake --without-android || die
1008 -
1009 - # Build mksnapshot and pax-mark it.
1010 - local x
1011 - for x in mksnapshot v8_context_snapshot_generator; do
1012 - if tc-is-cross-compiler; then
1013 - eninja -C out/Release "host/${x}"
1014 - pax-mark m "out/Release/host/${x}"
1015 - else
1016 - eninja -C out/Release "${x}"
1017 - pax-mark m "out/Release/${x}"
1018 - fi
1019 - done
1020 -
1021 - # Even though ninja autodetects number of CPUs, we respect
1022 - # user's options, for debugging with -j 1 or any other reason.
1023 - eninja -C out/Release chrome chromedriver
1024 - use suid && eninja -C out/Release chrome_sandbox
1025 -
1026 - pax-mark m out/Release/chrome
1027 -}
1028 -
1029 -# This function is called from virtx, and must always return so that Xvfb
1030 -# session isn't left running. If we return 1, virtx will call die().
1031 -chromium_profile() {
1032 - einfo "Profiling for PGO"
1033 -
1034 - pushd "${WORKDIR}/chromium-profiler-"* >/dev/null || return 1
1035 -
1036 - # Remove old profdata in case profiling was interrupted.
1037 - rm -rf "${1}" || return 1
1038 -
1039 - if ! "${EPYTHON}" ./chromium_profiler.py \
1040 - --chrome-executable "${S}/out/Release/chrome" \
1041 - --chromedriver-executable "${S}/out/Release/chromedriver.unstripped" \
1042 - --add-arg no-sandbox --add-arg disable-dev-shm-usage \
1043 - --profile-output "${1}"; then
1044 - eerror "Profiling failed"
1045 - return 1
1046 - fi
1047 -
1048 - popd >/dev/null || return 1
1049 -}
1050 -
1051 -src_compile() {
1052 - if use pgo; then
1053 - local profdata
1054 -
1055 - profdata="${WORKDIR}/chromium.profdata"
1056 -
1057 - if [[ ! -e "${WORKDIR}/.pgo-profiled" ]]; then
1058 - chromium_compile
1059 - virtx chromium_profile "$profdata"
1060 -
1061 - touch "${WORKDIR}/.pgo-profiled" || die
1062 - fi
1063 -
1064 - if [[ ! -e "${WORKDIR}/.pgo-phase-2-configured" ]]; then
1065 - # Remove phase 1 output
1066 - rm -r out/Release || die
1067 -
1068 - chromium_configure 2 "$profdata"
1069 -
1070 - touch "${WORKDIR}/.pgo-phase-2-configured" || die
1071 - fi
1072 -
1073 - if [[ ! -e "${WORKDIR}/.pgo-phase-2-compiled" ]]; then
1074 - chromium_compile
1075 - touch "${WORKDIR}/.pgo-phase-2-compiled" || die
1076 - fi
1077 - else
1078 - chromium_compile
1079 - fi
1080 -
1081 - mv out/Release/chromedriver{.unstripped,} || die
1082 -
1083 - # Build manpage; bug #684550
1084 - sed -e 's|@@PACKAGE@@|chromium-browser|g;
1085 - s|@@MENUNAME@@|Chromium|g;' \
1086 - chrome/app/resources/manpage.1.in > \
1087 - out/Release/chromium-browser.1 || die
1088 -
1089 - # Build desktop file; bug #706786
1090 - sed -e 's|@@MENUNAME@@|Chromium|g;
1091 - s|@@USR_BIN_SYMLINK_NAME@@|chromium-browser|g;
1092 - s|@@PACKAGE@@|chromium-browser|g;
1093 - s|\(^Exec=\)/usr/bin/|\1|g;' \
1094 - chrome/installer/linux/common/desktop.template > \
1095 - out/Release/chromium-browser-chromium.desktop || die
1096 -
1097 - # Build vk_swiftshader_icd.json; bug #827861
1098 - sed -e 's|${ICD_LIBRARY_PATH}|./libvk_swiftshader.so|g' \
1099 - third_party/swiftshader/src/Vulkan/vk_swiftshader_icd.json.tmpl > \
1100 - out/Release/vk_swiftshader_icd.json || die
1101 -}
1102 -
1103 -src_install() {
1104 - local CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser"
1105 - exeinto "${CHROMIUM_HOME}"
1106 - doexe out/Release/chrome
1107 -
1108 - if use suid; then
1109 - newexe out/Release/chrome_sandbox chrome-sandbox
1110 - fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
1111 - fi
1112 -
1113 - doexe out/Release/chromedriver
1114 - doexe out/Release/chrome_crashpad_handler
1115 -
1116 - ozone_auto_session () {
1117 - use X && use wayland && ! use headless && echo true || echo false
1118 - }
1119 - local sedargs=( -e
1120 - "s:/usr/lib/:/usr/$(get_libdir)/:g;
1121 - s:@@OZONE_AUTO_SESSION@@:$(ozone_auto_session):g"
1122 - )
1123 - sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r7.sh" > chromium-launcher.sh || die
1124 - doexe chromium-launcher.sh
1125 -
1126 - # It is important that we name the target "chromium-browser",
1127 - # xdg-utils expect it; bug #355517.
1128 - dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser
1129 - # keep the old symlink around for consistency
1130 - dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium
1131 -
1132 - dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver
1133 -
1134 - # Allow users to override command-line options, bug #357629.
1135 - insinto /etc/chromium
1136 - newins "${FILESDIR}/chromium.default" "default"
1137 -
1138 - pushd out/Release/locales > /dev/null || die
1139 - chromium_remove_language_paks
1140 - popd
1141 -
1142 - insinto "${CHROMIUM_HOME}"
1143 - doins out/Release/*.bin
1144 - doins out/Release/*.pak
1145 - (
1146 - shopt -s nullglob
1147 - local files=(out/Release/*.so out/Release/*.so.[0-9])
1148 - [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
1149 - )
1150 -
1151 - if ! use system-icu && ! use headless; then
1152 - doins out/Release/icudtl.dat
1153 - fi
1154 -
1155 - doins -r out/Release/locales
1156 - doins -r out/Release/MEIPreload
1157 -
1158 - # Install vk_swiftshader_icd.json; bug #827861
1159 - doins out/Release/vk_swiftshader_icd.json
1160 -
1161 - if [[ -d out/Release/swiftshader ]]; then
1162 - insinto "${CHROMIUM_HOME}/swiftshader"
1163 - doins out/Release/swiftshader/*.so
1164 - fi
1165 -
1166 - # Install icons
1167 - local branding size
1168 - for size in 16 24 32 48 64 128 256 ; do
1169 - case ${size} in
1170 - 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
1171 - *) branding="chrome/app/theme/chromium" ;;
1172 - esac
1173 - newicon -s ${size} "${branding}/product_logo_${size}.png" \
1174 - chromium-browser.png
1175 - done
1176 -
1177 - # Install desktop entry
1178 - domenu out/Release/chromium-browser-chromium.desktop
1179 -
1180 - # Install GNOME default application entry (bug #303100).
1181 - insinto /usr/share/gnome-control-center/default-apps
1182 - newins "${FILESDIR}"/chromium-browser.xml chromium-browser.xml
1183 -
1184 - # Install manpage; bug #684550
1185 - doman out/Release/chromium-browser.1
1186 - dosym chromium-browser.1 /usr/share/man/man1/chromium.1
1187 -
1188 - readme.gentoo_create_doc
1189 -}
1190 -
1191 -pkg_postrm() {
1192 - xdg_icon_cache_update
1193 - xdg_desktop_database_update
1194 -}
1195 -
1196 -pkg_postinst() {
1197 - xdg_icon_cache_update
1198 - xdg_desktop_database_update
1199 - readme.gentoo_print_elog
1200 -
1201 - if ! use headless; then
1202 - if use vaapi; then
1203 - elog "VA-API is disabled by default at runtime. You have to enable it"
1204 - elog "by adding --enable-features=VaapiVideoDecoder to CHROMIUM_FLAGS"
1205 - elog "in /etc/chromium/default."
1206 - fi
1207 - if use screencast; then
1208 - elog "Screencast is disabled by default at runtime. Either enable it"
1209 - elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
1210 - elog "inside Chromium or add --enable-features=WebRTCPipeWireCapturer"
1211 - elog "to CHROMIUM_FLAGS in /etc/chromium/default."
1212 - fi
1213 - if use gtk4; then
1214 - elog "Chromium prefers GTK3 over GTK4 at runtime. To override this"
1215 - elog "behavior you need to pass --gtk-version=4, e.g. by adding it"
1216 - elog "to CHROMIUM_FLAGS in /etc/chromium/default."
1217 - fi
1218 - fi
1219 -}