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