1 |
commit: 4864f73611be3ad9c1d6f3d61ae5def31d84299b |
2 |
Author: Stephan Hartmann <sultan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 8 19:31:05 2021 +0000 |
4 |
Commit: Stephan Hartmann <sultan <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 8 19:31:43 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4864f736 |
7 |
|
8 |
www-client/chromium: stable channel bump to 94.0.4606.81 |
9 |
|
10 |
Enable official build by default. |
11 |
|
12 |
Bug: https://bugs.gentoo.org/816984 |
13 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
14 |
Signed-off-by: Stephan Hartmann <sultan <AT> gentoo.org> |
15 |
|
16 |
www-client/chromium/Manifest | 1 + |
17 |
www-client/chromium/chromium-94.0.4606.81.ebuild | 943 +++++++++++++++++++++++ |
18 |
2 files changed, 944 insertions(+) |
19 |
|
20 |
diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest |
21 |
index da6a43fc0cf..709f243ac8b 100644 |
22 |
--- a/www-client/chromium/Manifest |
23 |
+++ b/www-client/chromium/Manifest |
24 |
@@ -1,5 +1,6 @@ |
25 |
DIST chromium-94-patchset-3.tar.xz 5052 BLAKE2B 3946b555d22792023696e85dbdb02a5fc43e39819c3a1a25c782d12771a608b068a7d11f757fa6390e7d295fe9c2b3b8085c31bd79d35edcd882a3f9f66df8dd SHA512 42f7beb412a7e691f35603625cbb316223706891f2a289301e4786ab92cfd4414d2f4a365f7637ba49a28508e18523670e59ae88512bc56afdd79d22f62f407e |
26 |
DIST chromium-94.0.4606.71.tar.xz 1039867644 BLAKE2B fca167a133b417554e22a4868a4826dc7ffeb1b5e30a7d3ecc877d1db74a61e7ef238b09b58c53b05d2bacae545927f942784425ae740074b087d26541facbcc SHA512 07ea0be22c8e42958d9fa53fbe310b7977f9423d7e043287a7b9f27d82f3ed2b088435708b511763b4a7ce039863a37db0adc9daa470349466da1d903e4d8135 |
27 |
+DIST chromium-94.0.4606.81.tar.xz 1039841108 BLAKE2B ff7cead6f4d12e31d48458f5307d2d6055041493f95bee38e1481aa3f16360dbcee6484fc4441dc0bec26313139786c04735cff8f29e410ad23586da10626f8c SHA512 59bde106e41da1daa1e806f790cbeea8623e5b5a191222981981f2722da97a26c7f70cbe3a9108e5d84e411712627657a86b3931ec940121c7e61bdb09b5bee8 |
28 |
DIST chromium-95-patchset-4.tar.xz 4308 BLAKE2B e91cb78d2357af8c0dfc66e4d148c5e6ef20cf9a811bcebf411e07cc5af73f30760d889842923afb2945e57b0f67330deac3f9068b6ce7c487482a6434e5c672 SHA512 152657e13afab3caca6a9ff6c0b51203f5bc8b0a4075a4396794d7a85caddce1b26f989c7dede5fa9a54316334099d21889e6767885fbf974260a6e9bd90df9d |
29 |
DIST chromium-95.0.4638.40.tar.xz 1213280408 BLAKE2B 29421623b9adf95608574226a5ddf3666c0d8e51225c047f9978fee34b7460324bf31785c1b68213e5264e8b9c77ed3c496b8cdc327af5e8afaec5af92074e16 SHA512 3ccd24a93d4a68f7646d44862127746c78766451071790cb541dbe1e1eeb959ee5e2bf31859ae139971f70ca1680e15e3cbaed95303473f0bbd857a6fe28dcb7 |
30 |
DIST chromium-96-patchset-2.tar.xz 4208 BLAKE2B a5b1c9eafb7a6807bc28ba9f6f1136adc73337c7964c22c4a245ab7c622fb9f6daa28eb46292cbc80d5fd8ac827d733f36929e620327d637f8bae60e3e41b27a SHA512 d8b5e94f95e3b57313fa5e132940056f73fb4f0ea922db0b40c6c41f0ee51e0c9043c816b378a9e5bf3a151d4cdf293c6a33c98ab2248b2b9e8109f8b4317bfd |
31 |
|
32 |
diff --git a/www-client/chromium/chromium-94.0.4606.81.ebuild b/www-client/chromium/chromium-94.0.4606.81.ebuild |
33 |
new file mode 100644 |
34 |
index 00000000000..31b7beee49c |
35 |
--- /dev/null |
36 |
+++ b/www-client/chromium/chromium-94.0.4606.81.ebuild |
37 |
@@ -0,0 +1,943 @@ |
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 ninja-utils pax-utils 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="3" |
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 |
+ |
58 |
+LICENSE="BSD" |
59 |
+SLOT="0" |
60 |
+KEYWORDS="~amd64 ~arm64 ~x86" |
61 |
+IUSE="component-build cups cpu_flags_arm_neon debug +hangouts headless +js-type-check kerberos +official pic +proprietary-codecs pulseaudio screencast selinux +suid +system-ffmpeg +system-harfbuzz +system-icu vaapi wayland widevine" |
62 |
+REQUIRED_USE=" |
63 |
+ component-build? ( !suid ) |
64 |
+ screencast? ( wayland ) |
65 |
+" |
66 |
+ |
67 |
+COMMON_X_DEPEND=" |
68 |
+ media-libs/mesa:=[gbm(+)] |
69 |
+ x11-libs/libX11:= |
70 |
+ x11-libs/libXcomposite:= |
71 |
+ x11-libs/libXcursor:= |
72 |
+ x11-libs/libXdamage:= |
73 |
+ x11-libs/libXext:= |
74 |
+ x11-libs/libXfixes:= |
75 |
+ >=x11-libs/libXi-1.6.0:= |
76 |
+ x11-libs/libXrandr:= |
77 |
+ x11-libs/libXrender:= |
78 |
+ x11-libs/libXtst:= |
79 |
+ x11-libs/libxcb:= |
80 |
+ x11-libs/libxshmfence:= |
81 |
+ vaapi? ( >=x11-libs/libva-2.7:=[X,drm] ) |
82 |
+" |
83 |
+ |
84 |
+COMMON_DEPEND=" |
85 |
+ app-arch/bzip2:= |
86 |
+ cups? ( >=net-print/cups-1.3.11:= ) |
87 |
+ dev-libs/expat:= |
88 |
+ dev-libs/glib:2 |
89 |
+ >=dev-libs/libxml2-2.9.4-r3:=[icu] |
90 |
+ dev-libs/nspr:= |
91 |
+ >=dev-libs/nss-3.26:= |
92 |
+ >=media-libs/alsa-lib-1.0.19:= |
93 |
+ media-libs/fontconfig:= |
94 |
+ >=media-libs/freetype-2.11.0-r1:= |
95 |
+ system-harfbuzz? ( >=media-libs/harfbuzz-2.9.0:0=[icu(-)] ) |
96 |
+ media-libs/libjpeg-turbo:= |
97 |
+ media-libs/libpng:= |
98 |
+ pulseaudio? ( media-sound/pulseaudio:= ) |
99 |
+ system-ffmpeg? ( |
100 |
+ >=media-video/ffmpeg-4.3:= |
101 |
+ || ( |
102 |
+ media-video/ffmpeg[-samba] |
103 |
+ >=net-fs/samba-4.5.10-r1[-debug(-)] |
104 |
+ ) |
105 |
+ >=media-libs/opus-1.3.1:= |
106 |
+ ) |
107 |
+ net-misc/curl[ssl] |
108 |
+ sys-apps/dbus:= |
109 |
+ sys-apps/pciutils:= |
110 |
+ virtual/udev |
111 |
+ x11-libs/cairo:= |
112 |
+ x11-libs/gdk-pixbuf:2 |
113 |
+ x11-libs/libxkbcommon:= |
114 |
+ x11-libs/pango:= |
115 |
+ media-libs/flac:= |
116 |
+ >=media-libs/libwebp-0.4.0:= |
117 |
+ sys-libs/zlib:=[minizip] |
118 |
+ kerberos? ( virtual/krb5 ) |
119 |
+ !headless? ( |
120 |
+ ${COMMON_X_DEPEND} |
121 |
+ >=app-accessibility/at-spi2-atk-2.26:2 |
122 |
+ >=app-accessibility/at-spi2-core-2.26:2 |
123 |
+ >=dev-libs/atk-2.26 |
124 |
+ x11-libs/gtk+:3[X] |
125 |
+ wayland? ( |
126 |
+ dev-libs/wayland:= |
127 |
+ screencast? ( media-video/pipewire:0/0.3 ) |
128 |
+ x11-libs/gtk+:3[wayland,X] |
129 |
+ x11-libs/libdrm:= |
130 |
+ ) |
131 |
+ ) |
132 |
+" |
133 |
+RDEPEND="${COMMON_DEPEND} |
134 |
+ x11-misc/xdg-utils |
135 |
+ virtual/opengl |
136 |
+ virtual/ttf-fonts |
137 |
+ selinux? ( sec-policy/selinux-chromium ) |
138 |
+" |
139 |
+DEPEND="${COMMON_DEPEND} |
140 |
+" |
141 |
+# dev-vcs/git - https://bugs.gentoo.org/593476 |
142 |
+BDEPEND=" |
143 |
+ ${PYTHON_DEPS} |
144 |
+ $(python_gen_any_dep ' |
145 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
146 |
+ ') |
147 |
+ >=app-arch/gzip-1.7 |
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 |
+python_check_deps() { |
218 |
+ has_version -b "dev-python/setuptools[${PYTHON_USEDEP}]" |
219 |
+} |
220 |
+ |
221 |
+pre_build_checks() { |
222 |
+ if [[ ${MERGE_TYPE} != binary ]]; then |
223 |
+ local -x CPP="$(tc-getCXX) -E" |
224 |
+ if tc-is-gcc && ! ver_test "$(gcc-version)" -ge 9.2; then |
225 |
+ die "At least gcc 9.2 is required" |
226 |
+ fi |
227 |
+ if [[ ${CHROMIUM_FORCE_CLANG} == yes ]] || tc-is-clang; then |
228 |
+ CPP="${CHOST}-clang++ -E" |
229 |
+ if ! ver_test "$(clang-major-version)" -ge 12; then |
230 |
+ die "At least clang 12 is required" |
231 |
+ fi |
232 |
+ fi |
233 |
+ fi |
234 |
+ |
235 |
+ # Check build requirements, bug #541816 and bug #471810 . |
236 |
+ CHECKREQS_MEMORY="4G" |
237 |
+ CHECKREQS_DISK_BUILD="9G" |
238 |
+ if ( shopt -s extglob; is-flagq '-g?(gdb)?([1-9])' ); then |
239 |
+ if use custom-cflags || use component-build; then |
240 |
+ CHECKREQS_DISK_BUILD="25G" |
241 |
+ fi |
242 |
+ if ! use component-build; then |
243 |
+ CHECKREQS_MEMORY="16G" |
244 |
+ fi |
245 |
+ fi |
246 |
+ check-reqs_pkg_setup |
247 |
+} |
248 |
+ |
249 |
+pkg_pretend() { |
250 |
+ pre_build_checks |
251 |
+} |
252 |
+ |
253 |
+pkg_setup() { |
254 |
+ pre_build_checks |
255 |
+ |
256 |
+ chromium_suid_sandbox_check_kernel_config |
257 |
+ |
258 |
+ # nvidia-drivers does not work correctly with Wayland due to unsupported EGLStreams |
259 |
+ if use wayland && ! use headless && has_version "x11-drivers/nvidia-drivers"; then |
260 |
+ ewarn "Proprietary nVidia driver does not work with Wayland. You can disable" |
261 |
+ ewarn "Wayland by setting DISABLE_OZONE_PLATFORM=true in /etc/chromium/default." |
262 |
+ fi |
263 |
+} |
264 |
+ |
265 |
+src_prepare() { |
266 |
+ # Calling this here supports resumption via FEATURES=keepwork |
267 |
+ python_setup |
268 |
+ |
269 |
+ local PATCHES=( |
270 |
+ "${WORKDIR}/patches" |
271 |
+ "${FILESDIR}/chromium-93-EnumTable-crash.patch" |
272 |
+ "${FILESDIR}/chromium-93-InkDropHost-crash.patch" |
273 |
+ "${FILESDIR}/chromium-use-oauth2-client-switches-as-default.patch" |
274 |
+ "${FILESDIR}/chromium-shim_headers.patch" |
275 |
+ ) |
276 |
+ |
277 |
+ default |
278 |
+ |
279 |
+ mkdir -p third_party/node/linux/node-linux-x64/bin || die |
280 |
+ ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die |
281 |
+ |
282 |
+ # adjust python interpreter version |
283 |
+ sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die |
284 |
+ |
285 |
+ local keeplibs=( |
286 |
+ base/third_party/cityhash |
287 |
+ base/third_party/double_conversion |
288 |
+ base/third_party/dynamic_annotations |
289 |
+ base/third_party/icu |
290 |
+ base/third_party/nspr |
291 |
+ base/third_party/superfasthash |
292 |
+ base/third_party/symbolize |
293 |
+ base/third_party/valgrind |
294 |
+ base/third_party/xdg_mime |
295 |
+ base/third_party/xdg_user_dirs |
296 |
+ buildtools/third_party/libc++ |
297 |
+ buildtools/third_party/libc++abi |
298 |
+ chrome/third_party/mozilla_security_manager |
299 |
+ courgette/third_party |
300 |
+ net/third_party/mozilla_security_manager |
301 |
+ net/third_party/nss |
302 |
+ net/third_party/quic |
303 |
+ net/third_party/uri_template |
304 |
+ third_party/abseil-cpp |
305 |
+ third_party/angle |
306 |
+ third_party/angle/src/common/third_party/base |
307 |
+ third_party/angle/src/common/third_party/smhasher |
308 |
+ third_party/angle/src/common/third_party/xxhash |
309 |
+ third_party/angle/src/third_party/libXNVCtrl |
310 |
+ third_party/angle/src/third_party/trace_event |
311 |
+ third_party/angle/src/third_party/volk |
312 |
+ third_party/apple_apsl |
313 |
+ third_party/axe-core |
314 |
+ third_party/blink |
315 |
+ third_party/boringssl |
316 |
+ third_party/boringssl/src/third_party/fiat |
317 |
+ third_party/breakpad |
318 |
+ third_party/breakpad/breakpad/src/third_party/curl |
319 |
+ third_party/brotli |
320 |
+ third_party/catapult |
321 |
+ third_party/catapult/common/py_vulcanize/third_party/rcssmin |
322 |
+ third_party/catapult/common/py_vulcanize/third_party/rjsmin |
323 |
+ third_party/catapult/third_party/beautifulsoup4-4.9.3 |
324 |
+ third_party/catapult/third_party/html5lib-1.1 |
325 |
+ third_party/catapult/third_party/polymer |
326 |
+ third_party/catapult/third_party/six |
327 |
+ third_party/catapult/tracing/third_party/d3 |
328 |
+ third_party/catapult/tracing/third_party/gl-matrix |
329 |
+ third_party/catapult/tracing/third_party/jpeg-js |
330 |
+ third_party/catapult/tracing/third_party/jszip |
331 |
+ third_party/catapult/tracing/third_party/mannwhitneyu |
332 |
+ third_party/catapult/tracing/third_party/oboe |
333 |
+ third_party/catapult/tracing/third_party/pako |
334 |
+ third_party/ced |
335 |
+ third_party/cld_3 |
336 |
+ third_party/closure_compiler |
337 |
+ third_party/crashpad |
338 |
+ third_party/crashpad/crashpad/third_party/lss |
339 |
+ third_party/crashpad/crashpad/third_party/zlib |
340 |
+ third_party/crc32c |
341 |
+ third_party/cros_system_api |
342 |
+ third_party/dav1d |
343 |
+ third_party/dawn |
344 |
+ third_party/dawn/third_party/khronos |
345 |
+ third_party/dawn/third_party/tint |
346 |
+ third_party/depot_tools |
347 |
+ third_party/devscripts |
348 |
+ third_party/devtools-frontend |
349 |
+ third_party/devtools-frontend/src/front_end/third_party/acorn |
350 |
+ third_party/devtools-frontend/src/front_end/third_party/axe-core |
351 |
+ third_party/devtools-frontend/src/front_end/third_party/chromium |
352 |
+ third_party/devtools-frontend/src/front_end/third_party/codemirror |
353 |
+ third_party/devtools-frontend/src/front_end/third_party/diff |
354 |
+ third_party/devtools-frontend/src/front_end/third_party/i18n |
355 |
+ third_party/devtools-frontend/src/front_end/third_party/intl-messageformat |
356 |
+ third_party/devtools-frontend/src/front_end/third_party/lighthouse |
357 |
+ third_party/devtools-frontend/src/front_end/third_party/lit-html |
358 |
+ third_party/devtools-frontend/src/front_end/third_party/lodash-isequal |
359 |
+ third_party/devtools-frontend/src/front_end/third_party/marked |
360 |
+ third_party/devtools-frontend/src/front_end/third_party/puppeteer |
361 |
+ third_party/devtools-frontend/src/front_end/third_party/wasmparser |
362 |
+ third_party/devtools-frontend/src/test/unittests/front_end/third_party/i18n |
363 |
+ third_party/devtools-frontend/src/third_party |
364 |
+ third_party/dom_distiller_js |
365 |
+ third_party/eigen3 |
366 |
+ third_party/emoji-segmenter |
367 |
+ third_party/farmhash |
368 |
+ third_party/fdlibm |
369 |
+ third_party/fft2d |
370 |
+ third_party/flatbuffers |
371 |
+ third_party/freetype |
372 |
+ third_party/fusejs |
373 |
+ third_party/highway |
374 |
+ third_party/libgifcodec |
375 |
+ third_party/liburlpattern |
376 |
+ third_party/libzip |
377 |
+ third_party/gemmlowp |
378 |
+ third_party/google_input_tools |
379 |
+ third_party/google_input_tools/third_party/closure_library |
380 |
+ third_party/google_input_tools/third_party/closure_library/third_party/closure |
381 |
+ third_party/googletest |
382 |
+ third_party/hunspell |
383 |
+ third_party/iccjpeg |
384 |
+ third_party/inspector_protocol |
385 |
+ third_party/jinja2 |
386 |
+ third_party/jsoncpp |
387 |
+ third_party/jstemplate |
388 |
+ third_party/khronos |
389 |
+ third_party/leveldatabase |
390 |
+ third_party/libXNVCtrl |
391 |
+ third_party/libaddressinput |
392 |
+ third_party/libaom |
393 |
+ third_party/libaom/source/libaom/third_party/fastfeat |
394 |
+ third_party/libaom/source/libaom/third_party/vector |
395 |
+ third_party/libaom/source/libaom/third_party/x86inc |
396 |
+ third_party/libavif |
397 |
+ third_party/libgav1 |
398 |
+ third_party/libjingle |
399 |
+ third_party/libjxl |
400 |
+ third_party/libphonenumber |
401 |
+ third_party/libsecret |
402 |
+ third_party/libsrtp |
403 |
+ third_party/libsync |
404 |
+ third_party/libudev |
405 |
+ third_party/libva_protected_content |
406 |
+ third_party/libvpx |
407 |
+ third_party/libvpx/source/libvpx/third_party/x86inc |
408 |
+ third_party/libwebm |
409 |
+ third_party/libx11 |
410 |
+ third_party/libxcb-keysyms |
411 |
+ third_party/libxml/chromium |
412 |
+ third_party/libyuv |
413 |
+ third_party/llvm |
414 |
+ third_party/lottie |
415 |
+ third_party/lss |
416 |
+ third_party/lzma_sdk |
417 |
+ third_party/mako |
418 |
+ third_party/markupsafe |
419 |
+ third_party/mesa |
420 |
+ third_party/metrics_proto |
421 |
+ third_party/minigbm |
422 |
+ third_party/modp_b64 |
423 |
+ third_party/nasm |
424 |
+ third_party/nearby |
425 |
+ third_party/neon_2_sse |
426 |
+ third_party/node |
427 |
+ third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2 |
428 |
+ third_party/one_euro_filter |
429 |
+ third_party/opencv |
430 |
+ third_party/openscreen |
431 |
+ third_party/openscreen/src/third_party/mozilla |
432 |
+ third_party/openscreen/src/third_party/tinycbor/src/src |
433 |
+ third_party/ots |
434 |
+ third_party/pdfium |
435 |
+ third_party/pdfium/third_party/agg23 |
436 |
+ third_party/pdfium/third_party/base |
437 |
+ third_party/pdfium/third_party/bigint |
438 |
+ third_party/pdfium/third_party/freetype |
439 |
+ third_party/pdfium/third_party/lcms |
440 |
+ third_party/pdfium/third_party/libopenjpeg20 |
441 |
+ third_party/pdfium/third_party/libpng16 |
442 |
+ third_party/pdfium/third_party/libtiff |
443 |
+ third_party/pdfium/third_party/skia_shared |
444 |
+ third_party/perfetto |
445 |
+ third_party/perfetto/protos/third_party/chromium |
446 |
+ third_party/pffft |
447 |
+ third_party/ply |
448 |
+ third_party/polymer |
449 |
+ third_party/private-join-and-compute |
450 |
+ third_party/private_membership |
451 |
+ third_party/protobuf |
452 |
+ third_party/protobuf/third_party/six |
453 |
+ third_party/pyjson5 |
454 |
+ third_party/qcms |
455 |
+ third_party/rnnoise |
456 |
+ third_party/s2cellid |
457 |
+ third_party/securemessage |
458 |
+ third_party/shell-encryption |
459 |
+ third_party/simplejson |
460 |
+ third_party/skia |
461 |
+ third_party/skia/include/third_party/skcms |
462 |
+ third_party/skia/include/third_party/vulkan |
463 |
+ third_party/skia/third_party/skcms |
464 |
+ third_party/skia/third_party/vulkan |
465 |
+ third_party/smhasher |
466 |
+ third_party/sqlite |
467 |
+ third_party/swiftshader |
468 |
+ third_party/swiftshader/third_party/astc-encoder |
469 |
+ third_party/swiftshader/third_party/llvm-subzero |
470 |
+ third_party/swiftshader/third_party/marl |
471 |
+ third_party/swiftshader/third_party/subzero |
472 |
+ third_party/swiftshader/third_party/SPIRV-Headers/include/spirv/unified1 |
473 |
+ third_party/tcmalloc |
474 |
+ third_party/tensorflow-text |
475 |
+ third_party/tflite |
476 |
+ third_party/tflite/src/third_party/eigen3 |
477 |
+ third_party/tflite/src/third_party/fft2d |
478 |
+ third_party/tflite-support |
479 |
+ third_party/ruy |
480 |
+ third_party/six |
481 |
+ third_party/ukey2 |
482 |
+ third_party/unrar |
483 |
+ third_party/usrsctp |
484 |
+ third_party/utf |
485 |
+ third_party/vulkan |
486 |
+ third_party/web-animations-js |
487 |
+ third_party/webdriver |
488 |
+ third_party/webgpu-cts |
489 |
+ third_party/webrtc |
490 |
+ third_party/webrtc/common_audio/third_party/ooura |
491 |
+ third_party/webrtc/common_audio/third_party/spl_sqrt_floor |
492 |
+ third_party/webrtc/modules/third_party/fft |
493 |
+ third_party/webrtc/modules/third_party/g711 |
494 |
+ third_party/webrtc/modules/third_party/g722 |
495 |
+ third_party/webrtc/rtc_base/third_party/base64 |
496 |
+ third_party/webrtc/rtc_base/third_party/sigslot |
497 |
+ third_party/widevine |
498 |
+ third_party/woff2 |
499 |
+ third_party/wuffs |
500 |
+ third_party/x11proto |
501 |
+ third_party/xcbproto |
502 |
+ third_party/zxcvbn-cpp |
503 |
+ third_party/zlib/google |
504 |
+ url/third_party/mozilla |
505 |
+ v8/src/third_party/siphash |
506 |
+ v8/src/third_party/valgrind |
507 |
+ v8/src/third_party/utf8-decoder |
508 |
+ v8/third_party/inspector_protocol |
509 |
+ v8/third_party/v8 |
510 |
+ |
511 |
+ # gyp -> gn leftovers |
512 |
+ base/third_party/libevent |
513 |
+ third_party/speech-dispatcher |
514 |
+ third_party/usb_ids |
515 |
+ third_party/xdg-utils |
516 |
+ ) |
517 |
+ if ! use system-ffmpeg; then |
518 |
+ keeplibs+=( third_party/ffmpeg third_party/opus ) |
519 |
+ fi |
520 |
+ if ! use system-icu; then |
521 |
+ keeplibs+=( third_party/icu ) |
522 |
+ fi |
523 |
+ if use system-harfbuzz; then |
524 |
+ keeplibs+=( third_party/harfbuzz-ng/utils ) |
525 |
+ else |
526 |
+ keeplibs+=( third_party/harfbuzz-ng ) |
527 |
+ fi |
528 |
+ if use wayland && ! use headless ; then |
529 |
+ keeplibs+=( third_party/wayland ) |
530 |
+ fi |
531 |
+ if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then |
532 |
+ keeplibs+=( third_party/libxml ) |
533 |
+ keeplibs+=( third_party/libxslt ) |
534 |
+ keeplibs+=( third_party/openh264 ) |
535 |
+ keeplibs+=( third_party/re2 ) |
536 |
+ keeplibs+=( third_party/snappy ) |
537 |
+ if use system-icu; then |
538 |
+ keeplibs+=( third_party/icu ) |
539 |
+ fi |
540 |
+ fi |
541 |
+ if use arm64 || use ppc64 ; then |
542 |
+ keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 ) |
543 |
+ fi |
544 |
+ # we need to generate ppc64 stuff because upstream does not ship it yet |
545 |
+ # it has to be done before unbundling. |
546 |
+ if use ppc64; then |
547 |
+ pushd third_party/libvpx >/dev/null || die |
548 |
+ mkdir -p source/config/linux/ppc64 || die |
549 |
+ ./generate_gni.sh || die |
550 |
+ popd >/dev/null || die |
551 |
+ fi |
552 |
+ |
553 |
+ # Remove most bundled libraries. Some are still needed. |
554 |
+ build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die |
555 |
+ |
556 |
+ if use js-type-check; then |
557 |
+ ln -s "${EPREFIX}"/usr/bin/java third_party/jdk/current/bin/java || die |
558 |
+ fi |
559 |
+ |
560 |
+ # bundled eu-strip is for amd64 only and we don't want to pre-stripped binaries |
561 |
+ mkdir -p buildtools/third_party/eu-strip/bin || die |
562 |
+ ln -s "${EPREFIX}"/bin/true buildtools/third_party/eu-strip/bin/eu-strip || die |
563 |
+} |
564 |
+ |
565 |
+src_configure() { |
566 |
+ # Calling this here supports resumption via FEATURES=keepwork |
567 |
+ python_setup |
568 |
+ |
569 |
+ local myconf_gn="" |
570 |
+ |
571 |
+ # Make sure the build system will use the right tools, bug #340795. |
572 |
+ tc-export AR CC CXX NM |
573 |
+ |
574 |
+ if [[ ${CHROMIUM_FORCE_CLANG} == yes ]] && ! tc-is-clang; then |
575 |
+ # Force clang since gcc is pretty broken at the moment. |
576 |
+ CC=${CHOST}-clang |
577 |
+ CXX=${CHOST}-clang++ |
578 |
+ strip-unsupported-flags |
579 |
+ fi |
580 |
+ |
581 |
+ if tc-is-clang; then |
582 |
+ myconf_gn+=" is_clang=true clang_use_chrome_plugins=false" |
583 |
+ else |
584 |
+ if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then |
585 |
+ die "Compiling with sys-libs/libcxx requires clang." |
586 |
+ fi |
587 |
+ myconf_gn+=" is_clang=false" |
588 |
+ fi |
589 |
+ |
590 |
+ # Define a custom toolchain for GN |
591 |
+ myconf_gn+=" custom_toolchain=\"//build/toolchain/linux/unbundle:default\"" |
592 |
+ |
593 |
+ if tc-is-cross-compiler; then |
594 |
+ tc-export BUILD_{AR,CC,CXX,NM} |
595 |
+ myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:host\"" |
596 |
+ myconf_gn+=" v8_snapshot_toolchain=\"//build/toolchain/linux/unbundle:host\"" |
597 |
+ else |
598 |
+ myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:default\"" |
599 |
+ fi |
600 |
+ |
601 |
+ # GN needs explicit config for Debug/Release as opposed to inferring it from build directory. |
602 |
+ myconf_gn+=" is_debug=false" |
603 |
+ |
604 |
+ # enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138. |
605 |
+ # DCHECK is fatal by default, make it configurable at runtime, #bug 807881. |
606 |
+ myconf_gn+=" dcheck_always_on=$(usex debug true false)" |
607 |
+ myconf_gn+=" dcheck_is_configurable=$(usex debug true false)" |
608 |
+ |
609 |
+ # Component build isn't generally intended for use by end users. It's mostly useful |
610 |
+ # for development and debugging. |
611 |
+ myconf_gn+=" is_component_build=$(usex component-build true false)" |
612 |
+ |
613 |
+ # Disable nacl, we can't build without pnacl (http://crbug.com/269560). |
614 |
+ myconf_gn+=" enable_nacl=false" |
615 |
+ |
616 |
+ # Use system-provided libraries. |
617 |
+ # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733). |
618 |
+ # TODO: use_system_hunspell (upstream changes needed). |
619 |
+ # TODO: use_system_libsrtp (bug #459932). |
620 |
+ # TODO: use_system_protobuf (bug #525560). |
621 |
+ # TODO: use_system_ssl (http://crbug.com/58087). |
622 |
+ # TODO: use_system_sqlite (http://crbug.com/22208). |
623 |
+ |
624 |
+ # libevent: https://bugs.gentoo.org/593458 |
625 |
+ local gn_system_libraries=( |
626 |
+ flac |
627 |
+ fontconfig |
628 |
+ freetype |
629 |
+ # Need harfbuzz_from_pkgconfig target |
630 |
+ #harfbuzz-ng |
631 |
+ libdrm |
632 |
+ libjpeg |
633 |
+ libpng |
634 |
+ libwebp |
635 |
+ zlib |
636 |
+ ) |
637 |
+ if use system-ffmpeg; then |
638 |
+ gn_system_libraries+=( ffmpeg opus ) |
639 |
+ fi |
640 |
+ if use system-icu; then |
641 |
+ gn_system_libraries+=( icu ) |
642 |
+ fi |
643 |
+ if [[ ${CHROMIUM_FORCE_LIBCXX} != yes ]]; then |
644 |
+ # unbundle only without libc++, because libc++ is not fully ABI compatible with libstdc++ |
645 |
+ gn_system_libraries+=( libxml ) |
646 |
+ gn_system_libraries+=( libxslt ) |
647 |
+ gn_system_libraries+=( openh264 ) |
648 |
+ gn_system_libraries+=( re2 ) |
649 |
+ gn_system_libraries+=( snappy ) |
650 |
+ fi |
651 |
+ build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" || die |
652 |
+ |
653 |
+ # See dependency logic in third_party/BUILD.gn |
654 |
+ myconf_gn+=" use_system_harfbuzz=$(usex system-harfbuzz true false)" |
655 |
+ |
656 |
+ # Disable deprecated libgnome-keyring dependency, bug #713012 |
657 |
+ myconf_gn+=" use_gnome_keyring=false" |
658 |
+ |
659 |
+ # Optional dependencies. |
660 |
+ myconf_gn+=" enable_js_type_check=$(usex js-type-check true false)" |
661 |
+ myconf_gn+=" enable_hangout_services_extension=$(usex hangouts true false)" |
662 |
+ myconf_gn+=" enable_widevine=$(usex widevine true false)" |
663 |
+ myconf_gn+=" use_cups=$(usex cups true false)" |
664 |
+ myconf_gn+=" use_kerberos=$(usex kerberos true false)" |
665 |
+ myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)" |
666 |
+ myconf_gn+=" use_vaapi=$(usex vaapi true false)" |
667 |
+ myconf_gn+=" rtc_use_pipewire=$(usex screencast true false) rtc_pipewire_version=\"0.3\"" |
668 |
+ |
669 |
+ # TODO: link_pulseaudio=true for GN. |
670 |
+ |
671 |
+ myconf_gn+=" disable_fieldtrial_testing_config=true" |
672 |
+ |
673 |
+ # Never use bundled gold binary. Disable gold linker flags for now. |
674 |
+ # Do not use bundled clang. |
675 |
+ # Trying to use gold results in linker crash. |
676 |
+ myconf_gn+=" use_gold=false use_sysroot=false use_custom_libcxx=false" |
677 |
+ |
678 |
+ # Disable forced lld, bug 641556 |
679 |
+ myconf_gn+=" use_lld=false" |
680 |
+ |
681 |
+ # Disable pseudolocales, only used for testing |
682 |
+ myconf_gn+=" enable_pseudolocales=false" |
683 |
+ |
684 |
+ # Disable code formating of generated files |
685 |
+ myconf_gn+=" blink_enable_generated_code_formatting=false" |
686 |
+ |
687 |
+ ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)" |
688 |
+ myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)" |
689 |
+ myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\"" |
690 |
+ |
691 |
+ # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys . |
692 |
+ # Note: these are for Gentoo use ONLY. For your own distribution, |
693 |
+ # please get your own set of keys. Feel free to contact chromium@g.o |
694 |
+ # for more info. The OAuth2 credentials, however, have been left out. |
695 |
+ # Those OAuth2 credentials have been broken for quite some time anyway. |
696 |
+ # Instead we apply a patch to use the --oauth2-client-id= and |
697 |
+ # --oauth2-client-secret= switches for setting GOOGLE_DEFAULT_CLIENT_ID and |
698 |
+ # GOOGLE_DEFAULT_CLIENT_SECRET at runtime. This allows signing into |
699 |
+ # Chromium without baked-in values. |
700 |
+ local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc" |
701 |
+ myconf_gn+=" google_api_key=\"${google_api_key}\"" |
702 |
+ local myarch="$(tc-arch)" |
703 |
+ |
704 |
+ # Avoid CFLAGS problems, bug #352457, bug #390147. |
705 |
+ if ! use custom-cflags; then |
706 |
+ replace-flags "-Os" "-O2" |
707 |
+ strip-flags |
708 |
+ |
709 |
+ # Debug info section overflows without component build |
710 |
+ # Prevent linker from running out of address space, bug #471810 . |
711 |
+ if ! use component-build || use x86; then |
712 |
+ filter-flags "-g*" |
713 |
+ fi |
714 |
+ |
715 |
+ # Prevent libvpx build failures. Bug 530248, 544702, 546984. |
716 |
+ if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then |
717 |
+ filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2 -mno-fma -mno-fma4 |
718 |
+ fi |
719 |
+ fi |
720 |
+ |
721 |
+ if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then |
722 |
+ append-flags -stdlib=libc++ |
723 |
+ append-ldflags -stdlib=libc++ |
724 |
+ fi |
725 |
+ |
726 |
+ if [[ $myarch = amd64 ]] ; then |
727 |
+ myconf_gn+=" target_cpu=\"x64\"" |
728 |
+ ffmpeg_target_arch=x64 |
729 |
+ elif [[ $myarch = x86 ]] ; then |
730 |
+ myconf_gn+=" target_cpu=\"x86\"" |
731 |
+ ffmpeg_target_arch=ia32 |
732 |
+ |
733 |
+ # This is normally defined by compiler_cpu_abi in |
734 |
+ # build/config/compiler/BUILD.gn, but we patch that part out. |
735 |
+ append-flags -msse2 -mfpmath=sse -mmmx |
736 |
+ elif [[ $myarch = arm64 ]] ; then |
737 |
+ myconf_gn+=" target_cpu=\"arm64\"" |
738 |
+ ffmpeg_target_arch=arm64 |
739 |
+ elif [[ $myarch = arm ]] ; then |
740 |
+ myconf_gn+=" target_cpu=\"arm\"" |
741 |
+ ffmpeg_target_arch=$(usex cpu_flags_arm_neon arm-neon arm) |
742 |
+ elif [[ $myarch = ppc64 ]] ; then |
743 |
+ myconf_gn+=" target_cpu=\"ppc64\"" |
744 |
+ ffmpeg_target_arch=ppc64 |
745 |
+ else |
746 |
+ die "Failed to determine target arch, got '$myarch'." |
747 |
+ fi |
748 |
+ |
749 |
+ # Make sure that -Werror doesn't get added to CFLAGS by the build system. |
750 |
+ # Depending on GCC version the warnings are different and we don't want |
751 |
+ # the build to fail because of that. |
752 |
+ myconf_gn+=" treat_warnings_as_errors=false" |
753 |
+ |
754 |
+ # Disable fatal linker warnings, bug 506268. |
755 |
+ myconf_gn+=" fatal_linker_warnings=false" |
756 |
+ |
757 |
+ # Bug 491582. |
758 |
+ export TMPDIR="${WORKDIR}/temp" |
759 |
+ mkdir -p -m 755 "${TMPDIR}" || die |
760 |
+ |
761 |
+ # https://bugs.gentoo.org/654216 |
762 |
+ addpredict /dev/dri/ #nowarn |
763 |
+ |
764 |
+ #if ! use system-ffmpeg; then |
765 |
+ if false; then |
766 |
+ local build_ffmpeg_args="" |
767 |
+ if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then |
768 |
+ build_ffmpeg_args+=" --disable-asm" |
769 |
+ fi |
770 |
+ |
771 |
+ # Re-configure bundled ffmpeg. See bug #491378 for example reasons. |
772 |
+ einfo "Configuring bundled ffmpeg..." |
773 |
+ pushd third_party/ffmpeg > /dev/null || die |
774 |
+ chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \ |
775 |
+ --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die |
776 |
+ chromium/scripts/copy_config.sh || die |
777 |
+ chromium/scripts/generate_gn.py || die |
778 |
+ popd > /dev/null || die |
779 |
+ fi |
780 |
+ |
781 |
+ # Chromium relies on this, but was disabled in >=clang-10, crbug.com/1042470 |
782 |
+ append-cxxflags $(test-flags-CXX -flax-vector-conversions=all) |
783 |
+ |
784 |
+ # Disable unknown warning message from clang. |
785 |
+ tc-is-clang && append-flags -Wno-unknown-warning-option |
786 |
+ |
787 |
+ # Explicitly disable ICU data file support for system-icu builds. |
788 |
+ if use system-icu; then |
789 |
+ myconf_gn+=" icu_use_data_file=false" |
790 |
+ fi |
791 |
+ |
792 |
+ # Enable ozone wayland and/or headless support |
793 |
+ myconf_gn+=" use_ozone=true ozone_auto_platforms=false" |
794 |
+ myconf_gn+=" ozone_platform_headless=true" |
795 |
+ if use wayland || use headless; then |
796 |
+ if use headless; then |
797 |
+ myconf_gn+=" ozone_platform=\"headless\"" |
798 |
+ myconf_gn+=" use_x11=false" |
799 |
+ else |
800 |
+ myconf_gn+=" ozone_platform_wayland=true" |
801 |
+ myconf_gn+=" use_system_libdrm=true" |
802 |
+ myconf_gn+=" use_system_minigbm=true" |
803 |
+ myconf_gn+=" use_xkbcommon=true" |
804 |
+ myconf_gn+=" ozone_platform=\"wayland\"" |
805 |
+ fi |
806 |
+ fi |
807 |
+ |
808 |
+ # Enable official builds |
809 |
+ myconf_gn+=" is_official_build=$(usex official true false)" |
810 |
+ myconf_gn+=" use_thin_lto=false" |
811 |
+ if use official; then |
812 |
+ # Allow building against system libraries in official builds |
813 |
+ sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \ |
814 |
+ tools/generate_shim_headers/generate_shim_headers.py || die |
815 |
+ # Disable CFI: unsupported for GCC, requires clang+lto+lld |
816 |
+ myconf_gn+=" is_cfi=false" |
817 |
+ # Disable PGO, because profile data is only compatible with >=clang-11 |
818 |
+ myconf_gn+=" chrome_pgo_phase=0" |
819 |
+ fi |
820 |
+ |
821 |
+ einfo "Configuring Chromium..." |
822 |
+ set -- gn gen --args="${myconf_gn} ${EXTRA_GN}" out/Release |
823 |
+ echo "$@" |
824 |
+ "$@" || die |
825 |
+} |
826 |
+ |
827 |
+src_compile() { |
828 |
+ # Final link uses lots of file descriptors. |
829 |
+ ulimit -n 2048 |
830 |
+ |
831 |
+ # Calling this here supports resumption via FEATURES=keepwork |
832 |
+ python_setup |
833 |
+ |
834 |
+ # Don't inherit PYTHONPATH from environment, bug #789021, #812689 |
835 |
+ local -x PYTHONPATH= |
836 |
+ |
837 |
+ #"${EPYTHON}" tools/clang/scripts/update.py --force-local-build --gcc-toolchain /usr --skip-checkout --use-system-cmake --without-android || die |
838 |
+ |
839 |
+ # Build mksnapshot and pax-mark it. |
840 |
+ local x |
841 |
+ for x in mksnapshot v8_context_snapshot_generator; do |
842 |
+ if tc-is-cross-compiler; then |
843 |
+ eninja -C out/Release "host/${x}" |
844 |
+ pax-mark m "out/Release/host/${x}" |
845 |
+ else |
846 |
+ eninja -C out/Release "${x}" |
847 |
+ pax-mark m "out/Release/${x}" |
848 |
+ fi |
849 |
+ done |
850 |
+ |
851 |
+ # Even though ninja autodetects number of CPUs, we respect |
852 |
+ # user's options, for debugging with -j 1 or any other reason. |
853 |
+ eninja -C out/Release chrome chromedriver |
854 |
+ use suid && eninja -C out/Release chrome_sandbox |
855 |
+ |
856 |
+ pax-mark m out/Release/chrome |
857 |
+ |
858 |
+ mv out/Release/chromedriver{.unstripped,} || die |
859 |
+ |
860 |
+ # Build manpage; bug #684550 |
861 |
+ sed -e 's|@@PACKAGE@@|chromium-browser|g; |
862 |
+ s|@@MENUNAME@@|Chromium|g;' \ |
863 |
+ chrome/app/resources/manpage.1.in > \ |
864 |
+ out/Release/chromium-browser.1 || die |
865 |
+ |
866 |
+ # Build desktop file; bug #706786 |
867 |
+ sed -e 's|@@MENUNAME@@|Chromium|g; |
868 |
+ s|@@USR_BIN_SYMLINK_NAME@@|chromium-browser|g; |
869 |
+ s|@@PACKAGE@@|chromium-browser|g; |
870 |
+ s|\(^Exec=\)/usr/bin/|\1|g;' \ |
871 |
+ chrome/installer/linux/common/desktop.template > \ |
872 |
+ out/Release/chromium-browser-chromium.desktop || die |
873 |
+} |
874 |
+ |
875 |
+src_install() { |
876 |
+ local CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser" |
877 |
+ exeinto "${CHROMIUM_HOME}" |
878 |
+ doexe out/Release/chrome |
879 |
+ |
880 |
+ if use suid; then |
881 |
+ newexe out/Release/chrome_sandbox chrome-sandbox |
882 |
+ fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox" |
883 |
+ fi |
884 |
+ |
885 |
+ doexe out/Release/chromedriver |
886 |
+ doexe out/Release/chrome_crashpad_handler |
887 |
+ |
888 |
+ local sedargs=( -e |
889 |
+ "s:/usr/lib/:/usr/$(get_libdir)/:g; |
890 |
+ s:@@OZONE_AUTO_SESSION@@:$(usex wayland true false):g; |
891 |
+ s:@@FORCE_OZONE_PLATFORM@@:$(usex headless true false):g" |
892 |
+ ) |
893 |
+ sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r6.sh" > chromium-launcher.sh || die |
894 |
+ doexe chromium-launcher.sh |
895 |
+ |
896 |
+ # It is important that we name the target "chromium-browser", |
897 |
+ # xdg-utils expect it; bug #355517. |
898 |
+ dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser |
899 |
+ # keep the old symlink around for consistency |
900 |
+ dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium |
901 |
+ |
902 |
+ dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver |
903 |
+ |
904 |
+ # Allow users to override command-line options, bug #357629. |
905 |
+ insinto /etc/chromium |
906 |
+ newins "${FILESDIR}/chromium.default" "default" |
907 |
+ |
908 |
+ pushd out/Release/locales > /dev/null || die |
909 |
+ chromium_remove_language_paks |
910 |
+ popd |
911 |
+ |
912 |
+ insinto "${CHROMIUM_HOME}" |
913 |
+ doins out/Release/*.bin |
914 |
+ doins out/Release/*.pak |
915 |
+ ( |
916 |
+ shopt -s nullglob |
917 |
+ local files=(out/Release/*.so out/Release/*.so.[0-9]) |
918 |
+ [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}" |
919 |
+ ) |
920 |
+ |
921 |
+ if ! use system-icu; then |
922 |
+ doins out/Release/icudtl.dat |
923 |
+ fi |
924 |
+ |
925 |
+ doins -r out/Release/locales |
926 |
+ doins -r out/Release/resources |
927 |
+ doins -r out/Release/MEIPreload |
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 |
+} |