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