Gentoo Archives: gentoo-commits

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