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