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