1 |
commit: 1da21fb69280b30ae6083c8ea80657a1a58c6dea |
2 |
Author: Stephan Hartmann <sultan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jun 17 07:22:57 2021 +0000 |
4 |
Commit: Stephan Hartmann <sultan <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jun 17 07:23:17 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1da21fb6 |
7 |
|
8 |
www-client/chromium: security cleanup |
9 |
|
10 |
Bug: https://bugs.gentoo.org/796338 |
11 |
Package-Manager: Portage-3.0.18, Repoman-3.0.2 |
12 |
Signed-off-by: Stephan Hartmann <sultan <AT> gentoo.org> |
13 |
|
14 |
www-client/chromium/Manifest | 2 - |
15 |
www-client/chromium/chromium-91.0.4472.101.ebuild | 944 ---------------------- |
16 |
2 files changed, 946 deletions(-) |
17 |
|
18 |
diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest |
19 |
index 18e984aa070..c32bef61bcb 100644 |
20 |
--- a/www-client/chromium/Manifest |
21 |
+++ b/www-client/chromium/Manifest |
22 |
@@ -1,7 +1,5 @@ |
23 |
DIST chromium-91-patchset-6.tar.xz 4280 BLAKE2B 18887953453133589cfc5df58d24725047235fac3652cc7af7bd117fbc94aa9a2e1b1dd3147f772f84d8fa3e7b5b77159abc1e408d7b24b065bb1f12cebbfb2f SHA512 49b4aaedfbb1fa5629dbb453bb74f5735c05b14407ea3d2bb1eaee9686e03661a3c471357d085ab839dff16df92d71dae3a6f17486c017a79a836c1d8780a250 |
24 |
-DIST chromium-91-ppc64le-5.tar.xz 28988 BLAKE2B 7c574626546c9b8c67879277a9b06b95b51111fef7697b7edab5548b4372a73c56a5771dc3ab6126535477493d7415e3e9b3b446cb4faa7b095a56cafaaab2fb SHA512 637433ce28b9f1e41696d1027f1bb5858fc5bdef94121deb34a9eafd58c651af4b84c103f3319151c0b708ad8da1756eff14025979dc46797d20cc95afb3d3bc |
25 |
DIST chromium-91-ppc64le-6.tar.xz 28968 BLAKE2B 5153be672aec91899d9eabe3ddf4c3d0b4b2d307e396afa2a83bf3102bc540fa62d69df365057128227428bd3abfc8cab9203fae41e5150191025d8ecea935ab SHA512 78071d204bf04a13a132a63a3d268a0d6d05a895c1ee55a41176fb5cca975c502e69a83ca0388ecea92c041f24235c452abdfbf0ee557e93db6685589fb9428b |
26 |
-DIST chromium-91.0.4472.101.tar.xz 950228560 BLAKE2B 441ef6106c09e24ae5b0ebbcebc016bafe46a3064c1b8e44065c63850c1155fd3247357ea6371da6fe226032ac250dc8664ec7ea912916493c705fd0ff02fefe SHA512 d779888d4b6e16c2dcdc18d008d3a5ed755926e9ab2ad1586167c45200d4074b74ab19258c2f6d7515d705cd51815a7601feb0bfab133b4b40d062fd1697525a |
27 |
DIST chromium-91.0.4472.106.tar.xz 950214296 BLAKE2B 1c68c3d6ccb593b4516482ba8f18f3bf769fe90ca423692f8e8d9fabd36fa8cda7a66f870fc30478ea4e1f9bd147bb6cadb77df4d9e0ef846c30e653b15dcc98 SHA512 142507bbf5fcc47d7eeb5f890ed70eae403271a7f537903545ad09ac26501aae914f327c3287d5588ed4ab601012584f6204cca6896ed2705326b090df2fe00c |
28 |
DIST chromium-92-patchset-6.tar.xz 3764 BLAKE2B a7149940b1371e4bd295e6038b87cc13f4edf8d8ed286d9d8d0e63144c2546de39564fc203a4b2e185267e46398efd0414c1f695ee31c78d33a6cd8d7b434016 SHA512 2f104901271d42762ea27f7c8a017307bde7348ec6b84d0c85875a07bf3783ba43bdb886fb3c6376753b6a14102b495a28bdc7adc611992440d2c1345aea035b |
29 |
DIST chromium-92.0.4515.51.tar.xz 957598564 BLAKE2B 5b911148153cae7058522d155b671c96f94a42621b9e0c371a82acb953de5bfa0baa1c6fe410a8e23d1ff77756437c39bab809cee1f95634ab1abb87ff5456b7 SHA512 63bb8012b7f0cec81bdb13e0acf1ef43e996cb3c66f2374933741c21fd906a6e0ce88e16b4772d4f14cb197c3e35f99235b56021780e405d245b5721096ae732 |
30 |
|
31 |
diff --git a/www-client/chromium/chromium-91.0.4472.101.ebuild b/www-client/chromium/chromium-91.0.4472.101.ebuild |
32 |
deleted file mode 100644 |
33 |
index 9598116abbb..00000000000 |
34 |
--- a/www-client/chromium/chromium-91.0.4472.101.ebuild |
35 |
+++ /dev/null |
36 |
@@ -1,944 +0,0 @@ |
37 |
-# Copyright 2009-2021 Gentoo Authors |
38 |
-# Distributed under the terms of the GNU General Public License v2 |
39 |
- |
40 |
-EAPI=7 |
41 |
-PYTHON_COMPAT=( python2_7 ) |
42 |
-PYTHON_REQ_USE="xml" |
43 |
- |
44 |
-CHROMIUM_LANGS="am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu he |
45 |
- hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr |
46 |
- sv sw ta te th tr uk vi zh-CN zh-TW" |
47 |
- |
48 |
-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 |
49 |
- |
50 |
-DESCRIPTION="Open-source version of Google Chrome web browser" |
51 |
-HOMEPAGE="https://chromium.org/" |
52 |
-PATCHSET="6" |
53 |
-PATCHSET_NAME="chromium-$(ver_cut 1)-patchset-${PATCHSET}" |
54 |
-PPC64LE_PATCHSET="5" |
55 |
-SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.xz |
56 |
- https://files.pythonhosted.org/packages/ed/7b/bbf89ca71e722b7f9464ebffe4b5ee20a9e5c9a555a56e2d3914bb9119a6/setuptools-44.1.0.zip |
57 |
- https://github.com/stha09/chromium-patches/releases/download/${PATCHSET_NAME}/${PATCHSET_NAME}.tar.xz |
58 |
- arm64? ( https://github.com/google/highway/archive/refs/tags/0.12.1.tar.gz -> highway-0.12.1.tar.gz ) |
59 |
- ppc64? ( https://dev.gentoo.org/~gyakovlev/distfiles/${PN}-$(ver_cut 1)-ppc64le-${PPC64LE_PATCHSET}.tar.xz )" |
60 |
- |
61 |
-LICENSE="BSD" |
62 |
-SLOT="0" |
63 |
-KEYWORDS="amd64 arm64 ~ppc64 ~x86" |
64 |
-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" |
65 |
-REQUIRED_USE=" |
66 |
- component-build? ( !suid ) |
67 |
- screencast? ( wayland ) |
68 |
-" |
69 |
- |
70 |
-COMMON_X_DEPEND=" |
71 |
- media-libs/mesa:=[gbm] |
72 |
- x11-libs/libX11:= |
73 |
- x11-libs/libXcomposite:= |
74 |
- x11-libs/libXcursor:= |
75 |
- x11-libs/libXdamage:= |
76 |
- x11-libs/libXext:= |
77 |
- x11-libs/libXfixes:= |
78 |
- >=x11-libs/libXi-1.6.0:= |
79 |
- x11-libs/libXrandr:= |
80 |
- x11-libs/libXrender:= |
81 |
- x11-libs/libXtst:= |
82 |
- x11-libs/libxcb:= |
83 |
- x11-libs/libxshmfence:= |
84 |
- vaapi? ( >=x11-libs/libva-2.7:=[X,drm] ) |
85 |
-" |
86 |
- |
87 |
-COMMON_DEPEND=" |
88 |
- app-arch/bzip2:= |
89 |
- cups? ( >=net-print/cups-1.3.11:= ) |
90 |
- dev-libs/expat:= |
91 |
- dev-libs/glib:2 |
92 |
- >=dev-libs/libxml2-2.9.4-r3:=[icu] |
93 |
- dev-libs/nspr:= |
94 |
- >=dev-libs/nss-3.26:= |
95 |
- >=media-libs/alsa-lib-1.0.19:= |
96 |
- media-libs/fontconfig:= |
97 |
- media-libs/freetype:= |
98 |
- >=media-libs/harfbuzz-2.4.0:0=[icu(-)] |
99 |
- media-libs/libjpeg-turbo:= |
100 |
- media-libs/libpng:= |
101 |
- pulseaudio? ( media-sound/pulseaudio:= ) |
102 |
- system-ffmpeg? ( |
103 |
- >=media-video/ffmpeg-4.3:= |
104 |
- || ( |
105 |
- media-video/ffmpeg[-samba] |
106 |
- >=net-fs/samba-4.5.10-r1[-debug(-)] |
107 |
- ) |
108 |
- >=media-libs/opus-1.3.1:= |
109 |
- ) |
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 |
- >=app-arch/gzip-1.7 |
147 |
- app-arch/unzip |
148 |
- dev-lang/perl |
149 |
- >=dev-util/gn-0.1807 |
150 |
- dev-vcs/git |
151 |
- >=dev-util/gperf-3.0.3 |
152 |
- >=dev-util/ninja-1.7.2 |
153 |
- >=net-libs/nodejs-7.6.0[inspector] |
154 |
- sys-apps/hwids[usb(+)] |
155 |
- >=sys-devel/bison-2.4.3 |
156 |
- sys-devel/flex |
157 |
- virtual/pkgconfig |
158 |
- js-type-check? ( virtual/jre ) |
159 |
-" |
160 |
- |
161 |
-# These are intended for ebuild maintainer use to force clang if GCC is broken. |
162 |
-: ${CHROMIUM_FORCE_CLANG=no} |
163 |
-: ${CHROMIUM_FORCE_LIBCXX=no} |
164 |
- |
165 |
-if [[ ${CHROMIUM_FORCE_CLANG} == yes ]]; then |
166 |
- BDEPEND+=" >=sys-devel/clang-12" |
167 |
-fi |
168 |
- |
169 |
-if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then |
170 |
- RDEPEND+=" >=sys-libs/libcxx-12" |
171 |
- DEPEND+=" >=sys-libs/libcxx-12" |
172 |
-else |
173 |
- COMMON_DEPEND=" |
174 |
- app-arch/snappy:= |
175 |
- dev-libs/libxslt:= |
176 |
- >=dev-libs/re2-0.2019.08.01:= |
177 |
- >=media-libs/openh264-1.6.0:= |
178 |
- system-icu? ( >=dev-libs/icu-69.1:= ) |
179 |
- " |
180 |
- RDEPEND+="${COMMON_DEPEND}" |
181 |
- DEPEND+="${COMMON_DEPEND}" |
182 |
-fi |
183 |
- |
184 |
-if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then |
185 |
- EBUILD_DEATH_HOOKS+=" chromium_pkg_die"; |
186 |
-fi |
187 |
- |
188 |
-DISABLE_AUTOFORMATTING="yes" |
189 |
-DOC_CONTENTS=" |
190 |
-Some web pages may require additional fonts to display properly. |
191 |
-Try installing some of the following packages if some characters |
192 |
-are not displayed properly: |
193 |
-- media-fonts/arphicfonts |
194 |
-- media-fonts/droid |
195 |
-- media-fonts/ipamonafont |
196 |
-- media-fonts/noto |
197 |
-- media-fonts/ja-ipafonts |
198 |
-- media-fonts/takao-fonts |
199 |
-- media-fonts/wqy-microhei |
200 |
-- media-fonts/wqy-zenhei |
201 |
- |
202 |
-To fix broken icons on the Downloads page, you should install an icon |
203 |
-theme that covers the appropriate MIME types, and configure this as your |
204 |
-GTK+ icon theme. |
205 |
- |
206 |
-For native file dialogs in KDE, install kde-apps/kdialog. |
207 |
- |
208 |
-To make password storage work with your desktop environment you may |
209 |
-have install one of the supported credentials management applications: |
210 |
-- app-crypt/libsecret (GNOME) |
211 |
-- kde-frameworks/kwallet (KDE) |
212 |
-If you have one of above packages installed, but don't want to use |
213 |
-them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS |
214 |
-in /etc/chromium/default. |
215 |
-" |
216 |
- |
217 |
-pre_build_checks() { |
218 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
219 |
- local -x CPP="$(tc-getCXX) -E" |
220 |
- if tc-is-gcc && ! ver_test "$(gcc-version)" -ge 9.2; then |
221 |
- die "At least gcc 9.2 is required" |
222 |
- fi |
223 |
- if [[ ${CHROMIUM_FORCE_CLANG} == yes ]] || tc-is-clang; then |
224 |
- CPP="${CHOST}-clang++ -E" |
225 |
- if ! ver_test "$(clang-major-version)" -ge 12; then |
226 |
- die "At least clang 12 is required" |
227 |
- fi |
228 |
- fi |
229 |
- fi |
230 |
- |
231 |
- # Check build requirements, bug #541816 and bug #471810 . |
232 |
- CHECKREQS_MEMORY="3G" |
233 |
- CHECKREQS_DISK_BUILD="8G" |
234 |
- if ( shopt -s extglob; is-flagq '-g?(gdb)?([1-9])' ); then |
235 |
- if use custom-cflags || use component-build; then |
236 |
- CHECKREQS_DISK_BUILD="25G" |
237 |
- fi |
238 |
- if ! use component-build; then |
239 |
- CHECKREQS_MEMORY="16G" |
240 |
- fi |
241 |
- fi |
242 |
- check-reqs_pkg_setup |
243 |
-} |
244 |
- |
245 |
-pkg_pretend() { |
246 |
- pre_build_checks |
247 |
-} |
248 |
- |
249 |
-pkg_setup() { |
250 |
- pre_build_checks |
251 |
- |
252 |
- chromium_suid_sandbox_check_kernel_config |
253 |
- |
254 |
- # nvidia-drivers does not work correctly with Wayland due to unsupported EGLStreams |
255 |
- if use wayland && ! use headless && has_version "x11-drivers/nvidia-drivers"; then |
256 |
- ewarn "Proprietary nVidia driver does not work with Wayland. You can disable" |
257 |
- ewarn "Wayland by setting DISABLE_OZONE_PLATFORM=true in /etc/chromium/default." |
258 |
- fi |
259 |
-} |
260 |
- |
261 |
-src_prepare() { |
262 |
- # Calling this here supports resumption via FEATURES=keepwork |
263 |
- python_setup |
264 |
- |
265 |
- local PATCHES=( |
266 |
- "${WORKDIR}/patches" |
267 |
- "${FILESDIR}/chromium-89-EnumTable-crash.patch" |
268 |
- "${FILESDIR}/chromium-91-ThemeService-crash.patch" |
269 |
- "${FILESDIR}/chromium-91-system-icu.patch" |
270 |
- "${FILESDIR}/chromium-shim_headers.patch" |
271 |
- ) |
272 |
- |
273 |
- # seccomp sandbox is broken if compiled against >=sys-libs/glibc-2.33, bug #769989 |
274 |
- if has_version -d ">=sys-libs/glibc-2.33"; then |
275 |
- ewarn "Adding experimental glibc-2.33 sandbox patch. Seccomp sandbox might" |
276 |
- ewarn "still not work correctly. In case of issues, try to disable seccomp" |
277 |
- ewarn "sandbox by adding --disable-seccomp-filter-sandbox to CHROMIUM_FLAGS" |
278 |
- ewarn "in /etc/chromium/default." |
279 |
- PATCHES+=( |
280 |
- "${FILESDIR}/chromium-glibc-2.33.patch" |
281 |
- ) |
282 |
- fi |
283 |
- |
284 |
- use ppc64 && eapply -p0 "${WORKDIR}/${PN}"-ppc64le |
285 |
- |
286 |
- default |
287 |
- |
288 |
- mkdir -p third_party/node/linux/node-linux-x64/bin || die |
289 |
- ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die |
290 |
- |
291 |
- # bundled highway library does not support arm64 with GCC |
292 |
- if use arm64; then |
293 |
- rm -r third_party/highway/src || die |
294 |
- ln -s "${WORKDIR}/highway-0.12.1" third_party/highway/src || die |
295 |
- fi |
296 |
- |
297 |
- local keeplibs=( |
298 |
- base/third_party/cityhash |
299 |
- base/third_party/double_conversion |
300 |
- base/third_party/dynamic_annotations |
301 |
- base/third_party/icu |
302 |
- base/third_party/nspr |
303 |
- base/third_party/superfasthash |
304 |
- base/third_party/symbolize |
305 |
- base/third_party/valgrind |
306 |
- base/third_party/xdg_mime |
307 |
- base/third_party/xdg_user_dirs |
308 |
- buildtools/third_party/libc++ |
309 |
- buildtools/third_party/libc++abi |
310 |
- chrome/third_party/mozilla_security_manager |
311 |
- courgette/third_party |
312 |
- net/third_party/mozilla_security_manager |
313 |
- net/third_party/nss |
314 |
- net/third_party/quic |
315 |
- net/third_party/uri_template |
316 |
- third_party/abseil-cpp |
317 |
- third_party/angle |
318 |
- third_party/angle/src/common/third_party/base |
319 |
- third_party/angle/src/common/third_party/smhasher |
320 |
- third_party/angle/src/common/third_party/xxhash |
321 |
- third_party/angle/src/third_party/compiler |
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 |
337 |
- third_party/catapult/third_party/html5lib-python |
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/depot_tools |
359 |
- third_party/devscripts |
360 |
- third_party/devtools-frontend |
361 |
- third_party/devtools-frontend/src/front_end/third_party/acorn |
362 |
- third_party/devtools-frontend/src/front_end/third_party/axe-core |
363 |
- third_party/devtools-frontend/src/front_end/third_party/chromium |
364 |
- third_party/devtools-frontend/src/front_end/third_party/codemirror |
365 |
- third_party/devtools-frontend/src/front_end/third_party/fabricjs |
366 |
- third_party/devtools-frontend/src/front_end/third_party/i18n |
367 |
- third_party/devtools-frontend/src/front_end/third_party/intl-messageformat |
368 |
- third_party/devtools-frontend/src/front_end/third_party/lighthouse |
369 |
- third_party/devtools-frontend/src/front_end/third_party/lit-html |
370 |
- third_party/devtools-frontend/src/front_end/third_party/lodash-isequal |
371 |
- third_party/devtools-frontend/src/front_end/third_party/marked |
372 |
- third_party/devtools-frontend/src/front_end/third_party/puppeteer |
373 |
- third_party/devtools-frontend/src/front_end/third_party/wasmparser |
374 |
- third_party/devtools-frontend/src/third_party |
375 |
- third_party/dom_distiller_js |
376 |
- third_party/eigen3 |
377 |
- third_party/emoji-segmenter |
378 |
- third_party/farmhash |
379 |
- third_party/fdlibm |
380 |
- third_party/fft2d |
381 |
- third_party/flatbuffers |
382 |
- third_party/freetype |
383 |
- third_party/fusejs |
384 |
- third_party/highway |
385 |
- third_party/libgifcodec |
386 |
- third_party/liburlpattern |
387 |
- third_party/libzip |
388 |
- third_party/gemmlowp |
389 |
- third_party/google_input_tools |
390 |
- third_party/google_input_tools/third_party/closure_library |
391 |
- third_party/google_input_tools/third_party/closure_library/third_party/closure |
392 |
- third_party/googletest |
393 |
- third_party/harfbuzz-ng/utils |
394 |
- third_party/hunspell |
395 |
- third_party/iccjpeg |
396 |
- third_party/inspector_protocol |
397 |
- third_party/jinja2 |
398 |
- third_party/jsoncpp |
399 |
- third_party/jstemplate |
400 |
- third_party/khronos |
401 |
- third_party/leveldatabase |
402 |
- third_party/libXNVCtrl |
403 |
- third_party/libaddressinput |
404 |
- third_party/libaom |
405 |
- third_party/libaom/source/libaom/third_party/fastfeat |
406 |
- third_party/libaom/source/libaom/third_party/vector |
407 |
- third_party/libaom/source/libaom/third_party/x86inc |
408 |
- third_party/libavif |
409 |
- third_party/libgav1 |
410 |
- third_party/libjingle |
411 |
- third_party/libjxl |
412 |
- third_party/libphonenumber |
413 |
- third_party/libsecret |
414 |
- third_party/libsrtp |
415 |
- third_party/libsync |
416 |
- third_party/libudev |
417 |
- third_party/libva_protected_content |
418 |
- third_party/libvpx |
419 |
- third_party/libvpx/source/libvpx/third_party/x86inc |
420 |
- third_party/libwebm |
421 |
- third_party/libx11 |
422 |
- third_party/libxcb-keysyms |
423 |
- third_party/libxml/chromium |
424 |
- third_party/libyuv |
425 |
- third_party/llvm |
426 |
- third_party/lottie |
427 |
- third_party/lss |
428 |
- third_party/lzma_sdk |
429 |
- third_party/mako |
430 |
- third_party/markupsafe |
431 |
- third_party/mesa |
432 |
- third_party/metrics_proto |
433 |
- third_party/minigbm |
434 |
- third_party/modp_b64 |
435 |
- third_party/nasm |
436 |
- third_party/nearby |
437 |
- third_party/neon_2_sse |
438 |
- third_party/node |
439 |
- third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2 |
440 |
- third_party/one_euro_filter |
441 |
- third_party/opencv |
442 |
- third_party/openscreen |
443 |
- third_party/openscreen/src/third_party/mozilla |
444 |
- third_party/openscreen/src/third_party/tinycbor/src/src |
445 |
- third_party/ots |
446 |
- third_party/pdfium |
447 |
- third_party/pdfium/third_party/agg23 |
448 |
- third_party/pdfium/third_party/base |
449 |
- third_party/pdfium/third_party/bigint |
450 |
- third_party/pdfium/third_party/freetype |
451 |
- third_party/pdfium/third_party/lcms |
452 |
- third_party/pdfium/third_party/libopenjpeg20 |
453 |
- third_party/pdfium/third_party/libpng16 |
454 |
- third_party/pdfium/third_party/libtiff |
455 |
- third_party/pdfium/third_party/skia_shared |
456 |
- third_party/perfetto |
457 |
- third_party/perfetto/protos/third_party/chromium |
458 |
- third_party/pffft |
459 |
- third_party/ply |
460 |
- third_party/polymer |
461 |
- third_party/private-join-and-compute |
462 |
- third_party/private_membership |
463 |
- third_party/protobuf |
464 |
- third_party/protobuf/third_party/six |
465 |
- third_party/pyjson5 |
466 |
- third_party/qcms |
467 |
- third_party/rnnoise |
468 |
- third_party/s2cellid |
469 |
- third_party/securemessage |
470 |
- third_party/shell-encryption |
471 |
- third_party/simplejson |
472 |
- third_party/skia |
473 |
- third_party/skia/include/third_party/skcms |
474 |
- third_party/skia/include/third_party/vulkan |
475 |
- third_party/skia/third_party/skcms |
476 |
- third_party/skia/third_party/vulkan |
477 |
- third_party/smhasher |
478 |
- third_party/sqlite |
479 |
- third_party/swiftshader |
480 |
- third_party/swiftshader/third_party/astc-encoder |
481 |
- third_party/swiftshader/third_party/llvm-subzero |
482 |
- third_party/swiftshader/third_party/marl |
483 |
- third_party/swiftshader/third_party/subzero |
484 |
- third_party/swiftshader/third_party/SPIRV-Headers/include/spirv/unified1 |
485 |
- third_party/tcmalloc |
486 |
- third_party/tensorflow-text |
487 |
- third_party/tflite |
488 |
- third_party/tflite/src/third_party/eigen3 |
489 |
- third_party/tflite/src/third_party/fft2d |
490 |
- third_party/tflite-support |
491 |
- third_party/tint |
492 |
- third_party/ruy |
493 |
- third_party/ukey2 |
494 |
- third_party/unrar |
495 |
- third_party/usrsctp |
496 |
- third_party/utf |
497 |
- third_party/vulkan |
498 |
- third_party/web-animations-js |
499 |
- third_party/webdriver |
500 |
- third_party/webgpu-cts |
501 |
- third_party/webrtc |
502 |
- third_party/webrtc/common_audio/third_party/ooura |
503 |
- third_party/webrtc/common_audio/third_party/spl_sqrt_floor |
504 |
- third_party/webrtc/modules/third_party/fft |
505 |
- third_party/webrtc/modules/third_party/g711 |
506 |
- third_party/webrtc/modules/third_party/g722 |
507 |
- third_party/webrtc/rtc_base/third_party/base64 |
508 |
- third_party/webrtc/rtc_base/third_party/sigslot |
509 |
- third_party/widevine |
510 |
- third_party/woff2 |
511 |
- third_party/wuffs |
512 |
- third_party/x11proto |
513 |
- third_party/xcbproto |
514 |
- third_party/zxcvbn-cpp |
515 |
- third_party/zlib/google |
516 |
- tools/grit/third_party/six |
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 |
- |
569 |
-src_configure() { |
570 |
- # Calling this here supports resumption via FEATURES=keepwork |
571 |
- python_setup |
572 |
- |
573 |
- local myconf_gn="" |
574 |
- |
575 |
- # Make sure the build system will use the right tools, bug #340795. |
576 |
- tc-export AR CC CXX NM |
577 |
- |
578 |
- if [[ ${CHROMIUM_FORCE_CLANG} == yes ]] && ! tc-is-clang; then |
579 |
- # Force clang since gcc is pretty broken at the moment. |
580 |
- CC=${CHOST}-clang |
581 |
- CXX=${CHOST}-clang++ |
582 |
- strip-unsupported-flags |
583 |
- fi |
584 |
- |
585 |
- if tc-is-clang; then |
586 |
- myconf_gn+=" is_clang=true clang_use_chrome_plugins=false" |
587 |
- else |
588 |
- if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then |
589 |
- die "Compiling with sys-libs/libcxx requires clang." |
590 |
- fi |
591 |
- myconf_gn+=" is_clang=false" |
592 |
- fi |
593 |
- |
594 |
- # Define a custom toolchain for GN |
595 |
- myconf_gn+=" custom_toolchain=\"//build/toolchain/linux/unbundle:default\"" |
596 |
- |
597 |
- if tc-is-cross-compiler; then |
598 |
- tc-export BUILD_{AR,CC,CXX,NM} |
599 |
- myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:host\"" |
600 |
- myconf_gn+=" v8_snapshot_toolchain=\"//build/toolchain/linux/unbundle:host\"" |
601 |
- else |
602 |
- myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:default\"" |
603 |
- fi |
604 |
- |
605 |
- # GN needs explicit config for Debug/Release as opposed to inferring it from build directory. |
606 |
- myconf_gn+=" is_debug=false" |
607 |
- |
608 |
- # Component build isn't generally intended for use by end users. It's mostly useful |
609 |
- # for development and debugging. |
610 |
- myconf_gn+=" is_component_build=$(usex component-build true false)" |
611 |
- |
612 |
- # Disable nacl, we can't build without pnacl (http://crbug.com/269560). |
613 |
- myconf_gn+=" enable_nacl=false" |
614 |
- |
615 |
- # Use system-provided libraries. |
616 |
- # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733). |
617 |
- # TODO: use_system_hunspell (upstream changes needed). |
618 |
- # TODO: use_system_libsrtp (bug #459932). |
619 |
- # TODO: use_system_protobuf (bug #525560). |
620 |
- # TODO: use_system_ssl (http://crbug.com/58087). |
621 |
- # TODO: use_system_sqlite (http://crbug.com/22208). |
622 |
- |
623 |
- # libevent: https://bugs.gentoo.org/593458 |
624 |
- local gn_system_libraries=( |
625 |
- flac |
626 |
- fontconfig |
627 |
- freetype |
628 |
- # Need harfbuzz_from_pkgconfig target |
629 |
- #harfbuzz-ng |
630 |
- libdrm |
631 |
- libjpeg |
632 |
- libpng |
633 |
- libwebp |
634 |
- zlib |
635 |
- ) |
636 |
- if use system-ffmpeg; then |
637 |
- gn_system_libraries+=( ffmpeg opus ) |
638 |
- fi |
639 |
- if use system-icu; then |
640 |
- gn_system_libraries+=( icu ) |
641 |
- fi |
642 |
- if [[ ${CHROMIUM_FORCE_LIBCXX} != yes ]]; then |
643 |
- # unbundle only without libc++, because libc++ is not fully ABI compatible with libstdc++ |
644 |
- gn_system_libraries+=( libxml ) |
645 |
- gn_system_libraries+=( libxslt ) |
646 |
- gn_system_libraries+=( openh264 ) |
647 |
- gn_system_libraries+=( re2 ) |
648 |
- gn_system_libraries+=( snappy ) |
649 |
- fi |
650 |
- build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" || die |
651 |
- |
652 |
- # See dependency logic in third_party/BUILD.gn |
653 |
- myconf_gn+=" use_system_harfbuzz=true" |
654 |
- |
655 |
- # Disable deprecated libgnome-keyring dependency, bug #713012 |
656 |
- myconf_gn+=" use_gnome_keyring=false" |
657 |
- |
658 |
- # Optional dependencies. |
659 |
- myconf_gn+=" enable_js_type_check=$(usex js-type-check true false)" |
660 |
- myconf_gn+=" enable_hangout_services_extension=$(usex hangouts true false)" |
661 |
- myconf_gn+=" enable_widevine=$(usex widevine true false)" |
662 |
- myconf_gn+=" use_cups=$(usex cups true false)" |
663 |
- myconf_gn+=" use_kerberos=$(usex kerberos true false)" |
664 |
- myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)" |
665 |
- myconf_gn+=" use_vaapi=$(usex vaapi true false)" |
666 |
- myconf_gn+=" rtc_use_pipewire=$(usex screencast true false) rtc_pipewire_version=\"0.3\"" |
667 |
- |
668 |
- # TODO: link_pulseaudio=true for GN. |
669 |
- |
670 |
- myconf_gn+=" fieldtrial_testing_like_official_build=true" |
671 |
- |
672 |
- # Never use bundled gold binary. Disable gold linker flags for now. |
673 |
- # Do not use bundled clang. |
674 |
- # Trying to use gold results in linker crash. |
675 |
- myconf_gn+=" use_gold=false use_sysroot=false use_custom_libcxx=false" |
676 |
- |
677 |
- # Disable forced lld, bug 641556 |
678 |
- myconf_gn+=" use_lld=false" |
679 |
- |
680 |
- # Disable pseudolocales, only used for testing |
681 |
- myconf_gn+=" enable_pseudolocales=false" |
682 |
- |
683 |
- ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)" |
684 |
- myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)" |
685 |
- myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\"" |
686 |
- |
687 |
- # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys . |
688 |
- # Note: these are for Gentoo use ONLY. For your own distribution, |
689 |
- # please get your own set of keys. Feel free to contact chromium@g.o |
690 |
- # for more info. |
691 |
- local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc" |
692 |
- local google_default_client_id="329227923882.apps.googleusercontent.com" |
693 |
- local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu" |
694 |
- myconf_gn+=" google_api_key=\"${google_api_key}\"" |
695 |
- myconf_gn+=" google_default_client_id=\"${google_default_client_id}\"" |
696 |
- myconf_gn+=" google_default_client_secret=\"${google_default_client_secret}\"" |
697 |
- local myarch="$(tc-arch)" |
698 |
- |
699 |
- # Avoid CFLAGS problems, bug #352457, bug #390147. |
700 |
- if ! use custom-cflags; then |
701 |
- replace-flags "-Os" "-O2" |
702 |
- strip-flags |
703 |
- |
704 |
- # Debug info section overflows without component build |
705 |
- # Prevent linker from running out of address space, bug #471810 . |
706 |
- if ! use component-build || use x86; then |
707 |
- filter-flags "-g*" |
708 |
- fi |
709 |
- |
710 |
- # Prevent libvpx build failures. Bug 530248, 544702, 546984. |
711 |
- if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then |
712 |
- filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2 -mno-fma -mno-fma4 |
713 |
- fi |
714 |
- fi |
715 |
- |
716 |
- if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then |
717 |
- append-flags -stdlib=libc++ |
718 |
- append-ldflags -stdlib=libc++ |
719 |
- fi |
720 |
- |
721 |
- if [[ $myarch = amd64 ]] ; then |
722 |
- myconf_gn+=" target_cpu=\"x64\"" |
723 |
- ffmpeg_target_arch=x64 |
724 |
- elif [[ $myarch = x86 ]] ; then |
725 |
- myconf_gn+=" target_cpu=\"x86\"" |
726 |
- ffmpeg_target_arch=ia32 |
727 |
- |
728 |
- # This is normally defined by compiler_cpu_abi in |
729 |
- # build/config/compiler/BUILD.gn, but we patch that part out. |
730 |
- append-flags -msse2 -mfpmath=sse -mmmx |
731 |
- elif [[ $myarch = arm64 ]] ; then |
732 |
- myconf_gn+=" target_cpu=\"arm64\"" |
733 |
- ffmpeg_target_arch=arm64 |
734 |
- elif [[ $myarch = arm ]] ; then |
735 |
- myconf_gn+=" target_cpu=\"arm\"" |
736 |
- ffmpeg_target_arch=$(usex cpu_flags_arm_neon arm-neon arm) |
737 |
- elif [[ $myarch = ppc64 ]] ; then |
738 |
- myconf_gn+=" target_cpu=\"ppc64\"" |
739 |
- ffmpeg_target_arch=ppc64 |
740 |
- else |
741 |
- die "Failed to determine target arch, got '$myarch'." |
742 |
- fi |
743 |
- |
744 |
- # Make sure that -Werror doesn't get added to CFLAGS by the build system. |
745 |
- # Depending on GCC version the warnings are different and we don't want |
746 |
- # the build to fail because of that. |
747 |
- myconf_gn+=" treat_warnings_as_errors=false" |
748 |
- |
749 |
- # Disable fatal linker warnings, bug 506268. |
750 |
- myconf_gn+=" fatal_linker_warnings=false" |
751 |
- |
752 |
- # Bug 491582. |
753 |
- export TMPDIR="${WORKDIR}/temp" |
754 |
- mkdir -p -m 755 "${TMPDIR}" || die |
755 |
- |
756 |
- # https://bugs.gentoo.org/654216 |
757 |
- addpredict /dev/dri/ #nowarn |
758 |
- |
759 |
- #if ! use system-ffmpeg; then |
760 |
- if false; then |
761 |
- local build_ffmpeg_args="" |
762 |
- if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then |
763 |
- build_ffmpeg_args+=" --disable-asm" |
764 |
- fi |
765 |
- |
766 |
- # Re-configure bundled ffmpeg. See bug #491378 for example reasons. |
767 |
- einfo "Configuring bundled ffmpeg..." |
768 |
- pushd third_party/ffmpeg > /dev/null || die |
769 |
- chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \ |
770 |
- --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die |
771 |
- chromium/scripts/copy_config.sh || die |
772 |
- chromium/scripts/generate_gn.py || die |
773 |
- popd > /dev/null || die |
774 |
- fi |
775 |
- |
776 |
- # Chromium relies on this, but was disabled in >=clang-10, crbug.com/1042470 |
777 |
- append-cxxflags $(test-flags-CXX -flax-vector-conversions=all) |
778 |
- |
779 |
- # highway/libjxl relies on this with arm64 |
780 |
- if use arm64 && tc-is-gcc; then |
781 |
- append-cxxflags -flax-vector-conversions |
782 |
- fi |
783 |
- |
784 |
- # highway/libjxl fail on ppc64 without extra patches, disable for now. |
785 |
- use ppc64 && myconf_gn+=" enable_jxl_decoder=false" |
786 |
- |
787 |
- # Disable unknown warning message from clang. |
788 |
- tc-is-clang && append-flags -Wno-unknown-warning-option |
789 |
- |
790 |
- # Explicitly disable ICU data file support for system-icu builds. |
791 |
- if use system-icu; then |
792 |
- myconf_gn+=" icu_use_data_file=false" |
793 |
- fi |
794 |
- |
795 |
- # Enable ozone wayland and/or headless support |
796 |
- myconf_gn+=" use_ozone=true ozone_auto_platforms=false" |
797 |
- myconf_gn+=" ozone_platform_headless=true" |
798 |
- if use wayland || use headless; then |
799 |
- if use headless; then |
800 |
- myconf_gn+=" ozone_platform=\"headless\"" |
801 |
- myconf_gn+=" use_x11=false" |
802 |
- else |
803 |
- myconf_gn+=" ozone_platform_wayland=true" |
804 |
- myconf_gn+=" use_system_libdrm=true" |
805 |
- myconf_gn+=" use_system_minigbm=true" |
806 |
- myconf_gn+=" use_xkbcommon=true" |
807 |
- myconf_gn+=" ozone_platform=\"wayland\"" |
808 |
- fi |
809 |
- fi |
810 |
- |
811 |
- # Enable official builds |
812 |
- myconf_gn+=" is_official_build=$(usex official true false)" |
813 |
- myconf_gn+=" use_thin_lto=false" |
814 |
- if use official; then |
815 |
- # Allow building against system libraries in official builds |
816 |
- sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \ |
817 |
- tools/generate_shim_headers/generate_shim_headers.py || die |
818 |
- # Disable CFI: unsupported for GCC, requires clang+lto+lld |
819 |
- myconf_gn+=" is_cfi=false" |
820 |
- # Disable PGO, because profile data is only compatible with >=clang-11 |
821 |
- myconf_gn+=" chrome_pgo_phase=0" |
822 |
- fi |
823 |
- |
824 |
- einfo "Configuring Chromium..." |
825 |
- set -- gn gen --args="${myconf_gn} ${EXTRA_GN}" out/Release |
826 |
- echo "$@" |
827 |
- "$@" || die |
828 |
-} |
829 |
- |
830 |
-src_compile() { |
831 |
- # Final link uses lots of file descriptors. |
832 |
- ulimit -n 2048 |
833 |
- |
834 |
- # Calling this here supports resumption via FEATURES=keepwork |
835 |
- python_setup |
836 |
- |
837 |
- # https://bugs.gentoo.org/717456 |
838 |
- # don't inherit PYTHONPATH from environment, bug #789021 |
839 |
- local -x PYTHONPATH="${WORKDIR}/setuptools-44.1.0" |
840 |
- |
841 |
- #"${EPYTHON}" tools/clang/scripts/update.py --force-local-build --gcc-toolchain /usr --skip-checkout --use-system-cmake --without-android || die |
842 |
- |
843 |
- # Build mksnapshot and pax-mark it. |
844 |
- local x |
845 |
- for x in mksnapshot v8_context_snapshot_generator; do |
846 |
- if tc-is-cross-compiler; then |
847 |
- eninja -C out/Release "host/${x}" |
848 |
- pax-mark m "out/Release/host/${x}" |
849 |
- else |
850 |
- eninja -C out/Release "${x}" |
851 |
- pax-mark m "out/Release/${x}" |
852 |
- fi |
853 |
- done |
854 |
- |
855 |
- # Even though ninja autodetects number of CPUs, we respect |
856 |
- # user's options, for debugging with -j 1 or any other reason. |
857 |
- eninja -C out/Release chrome chromedriver |
858 |
- use suid && eninja -C out/Release chrome_sandbox |
859 |
- |
860 |
- pax-mark m out/Release/chrome |
861 |
- |
862 |
- # Build manpage; bug #684550 |
863 |
- sed -e 's|@@PACKAGE@@|chromium-browser|g; |
864 |
- s|@@MENUNAME@@|Chromium|g;' \ |
865 |
- chrome/app/resources/manpage.1.in > \ |
866 |
- out/Release/chromium-browser.1 || die |
867 |
- |
868 |
- # Build desktop file; bug #706786 |
869 |
- sed -e 's|@@MENUNAME@@|Chromium|g; |
870 |
- s|@@USR_BIN_SYMLINK_NAME@@|chromium-browser|g; |
871 |
- s|@@PACKAGE@@|chromium-browser|g; |
872 |
- s|\(^Exec=\)/usr/bin/|\1|g;' \ |
873 |
- chrome/installer/linux/common/desktop.template > \ |
874 |
- out/Release/chromium-browser-chromium.desktop || die |
875 |
-} |
876 |
- |
877 |
-src_install() { |
878 |
- local CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser" |
879 |
- exeinto "${CHROMIUM_HOME}" |
880 |
- doexe out/Release/chrome |
881 |
- |
882 |
- if use suid; then |
883 |
- newexe out/Release/chrome_sandbox chrome-sandbox |
884 |
- fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox" |
885 |
- fi |
886 |
- |
887 |
- doexe out/Release/chromedriver |
888 |
- |
889 |
- local sedargs=( -e |
890 |
- "s:/usr/lib/:/usr/$(get_libdir)/:g; |
891 |
- s:@@OZONE_AUTO_SESSION@@:$(usex wayland true false):g; |
892 |
- s:@@FORCE_OZONE_PLATFORM@@:$(usex headless true false):g" |
893 |
- ) |
894 |
- sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r6.sh" > chromium-launcher.sh || die |
895 |
- doexe chromium-launcher.sh |
896 |
- |
897 |
- # It is important that we name the target "chromium-browser", |
898 |
- # xdg-utils expect it; bug #355517. |
899 |
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser |
900 |
- # keep the old symlink around for consistency |
901 |
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium |
902 |
- |
903 |
- dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver |
904 |
- |
905 |
- # Allow users to override command-line options, bug #357629. |
906 |
- insinto /etc/chromium |
907 |
- newins "${FILESDIR}/chromium.default" "default" |
908 |
- |
909 |
- pushd out/Release/locales > /dev/null || die |
910 |
- chromium_remove_language_paks |
911 |
- popd |
912 |
- |
913 |
- insinto "${CHROMIUM_HOME}" |
914 |
- doins out/Release/*.bin |
915 |
- doins out/Release/*.pak |
916 |
- ( |
917 |
- shopt -s nullglob |
918 |
- local files=(out/Release/*.so out/Release/*.so.[0-9]) |
919 |
- [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}" |
920 |
- ) |
921 |
- |
922 |
- if ! use system-icu; then |
923 |
- doins out/Release/icudtl.dat |
924 |
- fi |
925 |
- |
926 |
- doins -r out/Release/locales |
927 |
- doins -r out/Release/resources |
928 |
- |
929 |
- if [[ -d out/Release/swiftshader ]]; then |
930 |
- insinto "${CHROMIUM_HOME}/swiftshader" |
931 |
- doins out/Release/swiftshader/*.so |
932 |
- fi |
933 |
- |
934 |
- # Install icons |
935 |
- local branding size |
936 |
- for size in 16 24 32 48 64 128 256 ; do |
937 |
- case ${size} in |
938 |
- 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;; |
939 |
- *) branding="chrome/app/theme/chromium" ;; |
940 |
- esac |
941 |
- newicon -s ${size} "${branding}/product_logo_${size}.png" \ |
942 |
- chromium-browser.png |
943 |
- done |
944 |
- |
945 |
- # Install desktop entry |
946 |
- domenu out/Release/chromium-browser-chromium.desktop |
947 |
- |
948 |
- # Install GNOME default application entry (bug #303100). |
949 |
- insinto /usr/share/gnome-control-center/default-apps |
950 |
- newins "${FILESDIR}"/chromium-browser.xml chromium-browser.xml |
951 |
- |
952 |
- # Install manpage; bug #684550 |
953 |
- doman out/Release/chromium-browser.1 |
954 |
- dosym chromium-browser.1 /usr/share/man/man1/chromium.1 |
955 |
- |
956 |
- readme.gentoo_create_doc |
957 |
-} |
958 |
- |
959 |
-pkg_postrm() { |
960 |
- xdg_icon_cache_update |
961 |
- xdg_desktop_database_update |
962 |
-} |
963 |
- |
964 |
-pkg_postinst() { |
965 |
- xdg_icon_cache_update |
966 |
- xdg_desktop_database_update |
967 |
- readme.gentoo_print_elog |
968 |
- |
969 |
- if use vaapi; then |
970 |
- elog "VA-API is disabled by default at runtime. You have to enable it" |
971 |
- elog "by adding --enable-features=VaapiVideoDecoder to CHROMIUM_FLAGS" |
972 |
- elog "in /etc/chromium/default." |
973 |
- fi |
974 |
- if use screencast; then |
975 |
- elog "Screencast is disabled by default at runtime. Either enable it" |
976 |
- elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer" |
977 |
- elog "inside Chromium or add --enable-webrtc-pipewire-capturer" |
978 |
- elog "to CHROMIUM_FLAGS in /etc/chromium/default." |
979 |
- fi |
980 |
-} |