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