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