Gentoo Archives: gentoo-commits

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