1 |
commit: e86cbfca6411e00af9599191c4ee67659f1b334b |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Apr 29 12:26:58 2020 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Apr 29 15:21:15 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e86cbfca |
7 |
|
8 |
www-client/chromium: security cleanup |
9 |
|
10 |
Bug: https://bugs.gentoo.org/719902 |
11 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
12 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
13 |
|
14 |
www-client/chromium/Manifest | 1 - |
15 |
www-client/chromium/chromium-81.0.4044.122.ebuild | 761 ---------------------- |
16 |
2 files changed, 762 deletions(-) |
17 |
|
18 |
diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest |
19 |
index 00b6f0f9946..c9f5ef3ccd4 100644 |
20 |
--- a/www-client/chromium/Manifest |
21 |
+++ b/www-client/chromium/Manifest |
22 |
@@ -1,4 +1,3 @@ |
23 |
-DIST chromium-81.0.4044.122.tar.xz 786010072 BLAKE2B bf9106aefb09d48a1e517840aab3e14d477275cb06d73b2400ff7414e61a7e13a420ee286a580922f7e3512da765bc7348ed714c4b8505bd2e778c5b50ea16da SHA512 483fe530d2d60032cd3c79731840f6387036bc87c1002544d57744eaefec187dd8d9e0dd903f057df826fd59b3bf307b88d1596047ee65f4f8c0172389c546f8 |
24 |
DIST chromium-81.0.4044.129.tar.xz 785978416 BLAKE2B 5af9ab9e17bbc237f5a254b98cb27b998021d5c95b5da4d6de25c3fb234fea609f8a9173f3ac75eee208b8c88c5d39d9cf1ec39ebc8d436cf8aafee31e8f32c1 SHA512 93dfc5c1050bc226b836721d422a8d98a183fff81e91f55477dce0c650d35a95aeb89c810bea6e07ffb948ee62e8e150c8b8c5bad4658fcc215de05a681b064a |
25 |
DIST chromium-83.0.4103.23.tar.xz 802566932 BLAKE2B 00c9105a9b5e9cebc8adeb8a61b4491f0ca7cc95da9595506c77d556c0ee07074da0da506831bec1b390a39c7535220ab5c6d06ce784e6b20d2694f94d3b0a76 SHA512 08a50372570aa9da5fb9ccc6dfc3d949e84cb401d62d650132aa4edea2b1658fb56a81854fde11690d040e3b36b9d20da1ad7f83e47ffca77893ab57620c2a3e |
26 |
DIST setuptools-44.1.0.zip 858569 BLAKE2B f59f154e121502a731e51294ccd293d60ffccadacf51e23b53bf7ceba38858948b86783238061136c827ac3373ea7ea8e6253d4bb53f3f1dd69284568ec65a68 SHA512 4dfb0f42d334b835758e865a26ecd1e725711fa2b9c38ddc273b8b3849fba04527bc97436d11ba1e98f1a42922aa0f0b9032e32998273c705fac6e10735eacbf |
27 |
|
28 |
diff --git a/www-client/chromium/chromium-81.0.4044.122.ebuild b/www-client/chromium/chromium-81.0.4044.122.ebuild |
29 |
deleted file mode 100644 |
30 |
index 551aed9bd1d..00000000000 |
31 |
--- a/www-client/chromium/chromium-81.0.4044.122.ebuild |
32 |
+++ /dev/null |
33 |
@@ -1,761 +0,0 @@ |
34 |
-# Copyright 2009-2020 Gentoo Authors |
35 |
-# Distributed under the terms of the GNU General Public License v2 |
36 |
- |
37 |
-EAPI=7 |
38 |
-PYTHON_COMPAT=( python2_7 ) |
39 |
- |
40 |
-CHROMIUM_LANGS="am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu he |
41 |
- hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr |
42 |
- sv sw ta te th tr uk vi zh-CN zh-TW" |
43 |
- |
44 |
-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 |
45 |
- |
46 |
-DESCRIPTION="Open-source version of Google Chrome web browser" |
47 |
-HOMEPAGE="https://chromium.org/" |
48 |
-SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.xz" |
49 |
- |
50 |
-LICENSE="BSD" |
51 |
-SLOT="0" |
52 |
-KEYWORDS="amd64 ~arm64 ~x86" |
53 |
-IUSE="+closure-compile component-build cups cpu_flags_arm_neon +hangouts kerberos pic +proprietary-codecs pulseaudio selinux +suid +system-ffmpeg +system-icu +system-libvpx +tcmalloc widevine" |
54 |
-RESTRICT="!system-ffmpeg? ( proprietary-codecs? ( bindist ) )" |
55 |
-REQUIRED_USE="component-build? ( !suid )" |
56 |
- |
57 |
-COMMON_DEPEND=" |
58 |
- >=app-accessibility/at-spi2-atk-2.26:2 |
59 |
- app-arch/bzip2:= |
60 |
- cups? ( >=net-print/cups-1.3.11:= ) |
61 |
- >=dev-libs/atk-2.26 |
62 |
- dev-libs/expat:= |
63 |
- dev-libs/glib:2 |
64 |
- system-icu? ( >=dev-libs/icu-65:= ) |
65 |
- >=dev-libs/libxml2-2.9.4-r3:=[icu] |
66 |
- dev-libs/libxslt:= |
67 |
- dev-libs/nspr:= |
68 |
- >=dev-libs/nss-3.26:= |
69 |
- >=dev-libs/re2-0.2019.08.01:= |
70 |
- >=media-libs/alsa-lib-1.0.19:= |
71 |
- media-libs/fontconfig:= |
72 |
- media-libs/freetype:= |
73 |
- >=media-libs/harfbuzz-2.4.0:0=[icu(-)] |
74 |
- media-libs/libjpeg-turbo:= |
75 |
- media-libs/libpng:= |
76 |
- system-libvpx? ( >=media-libs/libvpx-1.8.2:=[postproc,svc] ) |
77 |
- >=media-libs/openh264-1.6.0:= |
78 |
- pulseaudio? ( media-sound/pulseaudio:= ) |
79 |
- system-ffmpeg? ( |
80 |
- >=media-video/ffmpeg-4:= |
81 |
- || ( |
82 |
- media-video/ffmpeg[-samba] |
83 |
- >=net-fs/samba-4.5.10-r1[-debug(-)] |
84 |
- ) |
85 |
- >=media-libs/opus-1.3.1:= |
86 |
- ) |
87 |
- sys-apps/dbus:= |
88 |
- sys-apps/pciutils:= |
89 |
- virtual/udev |
90 |
- x11-libs/cairo:= |
91 |
- x11-libs/gdk-pixbuf:2 |
92 |
- x11-libs/gtk+:3[X] |
93 |
- x11-libs/libX11:= |
94 |
- x11-libs/libXcomposite:= |
95 |
- x11-libs/libXcursor:= |
96 |
- x11-libs/libXdamage:= |
97 |
- x11-libs/libXext:= |
98 |
- x11-libs/libXfixes:= |
99 |
- >=x11-libs/libXi-1.6.0:= |
100 |
- x11-libs/libXrandr:= |
101 |
- x11-libs/libXrender:= |
102 |
- x11-libs/libXScrnSaver:= |
103 |
- x11-libs/libXtst:= |
104 |
- x11-libs/pango:= |
105 |
- app-arch/snappy:= |
106 |
- media-libs/flac:= |
107 |
- >=media-libs/libwebp-0.4.0:= |
108 |
- sys-libs/zlib:=[minizip] |
109 |
- kerberos? ( virtual/krb5 ) |
110 |
-" |
111 |
-# For nvidia-drivers blocker, see bug #413637 . |
112 |
-RDEPEND="${COMMON_DEPEND} |
113 |
- x11-misc/xdg-utils |
114 |
- virtual/opengl |
115 |
- virtual/ttf-fonts |
116 |
- selinux? ( sec-policy/selinux-chromium ) |
117 |
- tcmalloc? ( !<x11-drivers/nvidia-drivers-331.20 ) |
118 |
-" |
119 |
-DEPEND="${COMMON_DEPEND} |
120 |
-" |
121 |
-# dev-vcs/git - https://bugs.gentoo.org/593476 |
122 |
-BDEPEND=" |
123 |
- ${PYTHON_DEPS} |
124 |
- >=app-arch/gzip-1.7 |
125 |
- dev-lang/perl |
126 |
- dev-util/gn |
127 |
- dev-vcs/git |
128 |
- >=dev-util/gperf-3.0.3 |
129 |
- >=dev-util/ninja-1.7.2 |
130 |
- >=net-libs/nodejs-7.6.0[inspector] |
131 |
- sys-apps/hwids[usb(+)] |
132 |
- >=sys-devel/bison-2.4.3 |
133 |
- sys-devel/flex |
134 |
- virtual/pkgconfig |
135 |
- closure-compile? ( virtual/jre ) |
136 |
- !system-libvpx? ( |
137 |
- amd64? ( dev-lang/yasm ) |
138 |
- x86? ( dev-lang/yasm ) |
139 |
- ) |
140 |
-" |
141 |
- |
142 |
-: ${CHROMIUM_FORCE_CLANG=no} |
143 |
- |
144 |
-if [[ ${CHROMIUM_FORCE_CLANG} == yes ]]; then |
145 |
- BDEPEND+=" >=sys-devel/clang-7" |
146 |
-fi |
147 |
- |
148 |
-if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then |
149 |
- EBUILD_DEATH_HOOKS+=" chromium_pkg_die"; |
150 |
-fi |
151 |
- |
152 |
-DISABLE_AUTOFORMATTING="yes" |
153 |
-DOC_CONTENTS=" |
154 |
-Some web pages may require additional fonts to display properly. |
155 |
-Try installing some of the following packages if some characters |
156 |
-are not displayed properly: |
157 |
-- media-fonts/arphicfonts |
158 |
-- media-fonts/droid |
159 |
-- media-fonts/ipamonafont |
160 |
-- media-fonts/noto |
161 |
-- media-fonts/ja-ipafonts |
162 |
-- media-fonts/takao-fonts |
163 |
-- media-fonts/wqy-microhei |
164 |
-- media-fonts/wqy-zenhei |
165 |
- |
166 |
-To fix broken icons on the Downloads page, you should install an icon |
167 |
-theme that covers the appropriate MIME types, and configure this as your |
168 |
-GTK+ icon theme. |
169 |
- |
170 |
-For native file dialogs in KDE, install kde-apps/kdialog. |
171 |
- |
172 |
-To make password storage work with your desktop environment you may |
173 |
-have install one of the supported credentials management applications: |
174 |
-- app-crypt/libsecret (GNOME) |
175 |
-- kde-frameworks/kwallet (KDE) |
176 |
-If you have one of above packages installed, but don't want to use |
177 |
-them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS |
178 |
-in /etc/chromium/default. |
179 |
-" |
180 |
- |
181 |
-PATCHES=( |
182 |
- "${FILESDIR}/chromium-compiler-r11.patch" |
183 |
- "${FILESDIR}/chromium-fix-char_traits.patch" |
184 |
- "${FILESDIR}/chromium-78-protobuf-export.patch" |
185 |
- "${FILESDIR}/chromium-79-gcc-alignas.patch" |
186 |
- "${FILESDIR}/chromium-80-gcc-quiche.patch" |
187 |
- "${FILESDIR}/chromium-80-gcc-blink.patch" |
188 |
- "${FILESDIR}/chromium-81-gcc-noexcept.patch" |
189 |
- "${FILESDIR}/chromium-81-gcc-constexpr.patch" |
190 |
- "${FILESDIR}/chromium-81-gcc-10.patch" |
191 |
-) |
192 |
- |
193 |
-pre_build_checks() { |
194 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
195 |
- local -x CPP="$(tc-getCXX) -E" |
196 |
- if tc-is-gcc && ! ver_test "$(gcc-version)" -ge 8.0; then |
197 |
- die "At least gcc 8.0 is required" |
198 |
- fi |
199 |
- # component build hangs with tcmalloc enabled due to sandbox issue, bug #695976. |
200 |
- if has usersandbox ${FEATURES} && use tcmalloc && use component-build; then |
201 |
- die "Component build with tcmalloc requires FEATURES=-usersandbox." |
202 |
- fi |
203 |
- if [[ ${CHROMIUM_FORCE_CLANG} == yes ]] || tc-is-clang; then |
204 |
- if use component-build; then |
205 |
- die "Component build with clang requires fuzzer headers." |
206 |
- fi |
207 |
- fi |
208 |
- fi |
209 |
- |
210 |
- # Check build requirements, bug #541816 and bug #471810 . |
211 |
- CHECKREQS_MEMORY="3G" |
212 |
- CHECKREQS_DISK_BUILD="7G" |
213 |
- if ( shopt -s extglob; is-flagq '-g?(gdb)?([1-9])' ); then |
214 |
- CHECKREQS_DISK_BUILD="25G" |
215 |
- if ! use component-build; then |
216 |
- CHECKREQS_MEMORY="16G" |
217 |
- fi |
218 |
- fi |
219 |
- check-reqs_pkg_setup |
220 |
-} |
221 |
- |
222 |
-pkg_pretend() { |
223 |
- pre_build_checks |
224 |
-} |
225 |
- |
226 |
-pkg_setup() { |
227 |
- pre_build_checks |
228 |
- |
229 |
- chromium_suid_sandbox_check_kernel_config |
230 |
-} |
231 |
- |
232 |
-src_prepare() { |
233 |
- # Calling this here supports resumption via FEATURES=keepwork |
234 |
- python_setup |
235 |
- |
236 |
- default |
237 |
- |
238 |
- mkdir -p third_party/node/linux/node-linux-x64/bin || die |
239 |
- ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die |
240 |
- |
241 |
- local keeplibs=( |
242 |
- base/third_party/cityhash |
243 |
- base/third_party/double_conversion |
244 |
- base/third_party/dynamic_annotations |
245 |
- base/third_party/icu |
246 |
- base/third_party/nspr |
247 |
- base/third_party/superfasthash |
248 |
- base/third_party/symbolize |
249 |
- base/third_party/valgrind |
250 |
- base/third_party/xdg_mime |
251 |
- base/third_party/xdg_user_dirs |
252 |
- buildtools/third_party/libc++ |
253 |
- buildtools/third_party/libc++abi |
254 |
- chrome/third_party/mozilla_security_manager |
255 |
- courgette/third_party |
256 |
- net/third_party/mozilla_security_manager |
257 |
- net/third_party/nss |
258 |
- net/third_party/quic |
259 |
- net/third_party/uri_template |
260 |
- third_party/abseil-cpp |
261 |
- third_party/angle |
262 |
- third_party/angle/src/common/third_party/base |
263 |
- third_party/angle/src/common/third_party/smhasher |
264 |
- third_party/angle/src/common/third_party/xxhash |
265 |
- third_party/angle/src/third_party/compiler |
266 |
- third_party/angle/src/third_party/libXNVCtrl |
267 |
- third_party/angle/src/third_party/trace_event |
268 |
- third_party/angle/src/third_party/volk |
269 |
- third_party/angle/third_party/glslang |
270 |
- third_party/angle/third_party/spirv-headers |
271 |
- third_party/angle/third_party/spirv-tools |
272 |
- third_party/angle/third_party/vulkan-headers |
273 |
- third_party/angle/third_party/vulkan-loader |
274 |
- third_party/angle/third_party/vulkan-tools |
275 |
- third_party/angle/third_party/vulkan-validation-layers |
276 |
- third_party/apple_apsl |
277 |
- third_party/axe-core |
278 |
- third_party/blink |
279 |
- third_party/boringssl |
280 |
- third_party/boringssl/src/third_party/fiat |
281 |
- third_party/breakpad |
282 |
- third_party/breakpad/breakpad/src/third_party/curl |
283 |
- third_party/brotli |
284 |
- third_party/cacheinvalidation |
285 |
- third_party/catapult |
286 |
- third_party/catapult/common/py_vulcanize/third_party/rcssmin |
287 |
- third_party/catapult/common/py_vulcanize/third_party/rjsmin |
288 |
- third_party/catapult/third_party/beautifulsoup4 |
289 |
- third_party/catapult/third_party/html5lib-python |
290 |
- third_party/catapult/third_party/polymer |
291 |
- third_party/catapult/third_party/six |
292 |
- third_party/catapult/tracing/third_party/d3 |
293 |
- third_party/catapult/tracing/third_party/gl-matrix |
294 |
- third_party/catapult/tracing/third_party/jpeg-js |
295 |
- third_party/catapult/tracing/third_party/jszip |
296 |
- third_party/catapult/tracing/third_party/mannwhitneyu |
297 |
- third_party/catapult/tracing/third_party/oboe |
298 |
- third_party/catapult/tracing/third_party/pako |
299 |
- third_party/ced |
300 |
- third_party/cld_3 |
301 |
- third_party/closure_compiler |
302 |
- third_party/crashpad |
303 |
- third_party/crashpad/crashpad/third_party/lss |
304 |
- third_party/crashpad/crashpad/third_party/zlib |
305 |
- third_party/crc32c |
306 |
- third_party/cros_system_api |
307 |
- third_party/dav1d |
308 |
- third_party/dawn |
309 |
- third_party/depot_tools |
310 |
- third_party/devscripts |
311 |
- third_party/devtools-frontend |
312 |
- third_party/devtools-frontend/src/front_end/third_party/fabricjs |
313 |
- third_party/devtools-frontend/src/front_end/third_party/wasmparser |
314 |
- third_party/devtools-frontend/src/third_party |
315 |
- third_party/dom_distiller_js |
316 |
- third_party/emoji-segmenter |
317 |
- third_party/flatbuffers |
318 |
- third_party/freetype |
319 |
- third_party/libgifcodec |
320 |
- third_party/glslang |
321 |
- third_party/google_input_tools |
322 |
- third_party/google_input_tools/third_party/closure_library |
323 |
- third_party/google_input_tools/third_party/closure_library/third_party/closure |
324 |
- third_party/googletest |
325 |
- third_party/hunspell |
326 |
- third_party/iccjpeg |
327 |
- third_party/inspector_protocol |
328 |
- third_party/jinja2 |
329 |
- third_party/jsoncpp |
330 |
- third_party/jstemplate |
331 |
- third_party/khronos |
332 |
- third_party/leveldatabase |
333 |
- third_party/libXNVCtrl |
334 |
- third_party/libaddressinput |
335 |
- third_party/libaom |
336 |
- third_party/libaom/source/libaom/third_party/vector |
337 |
- third_party/libaom/source/libaom/third_party/x86inc |
338 |
- third_party/libjingle |
339 |
- third_party/libphonenumber |
340 |
- third_party/libsecret |
341 |
- third_party/libsrtp |
342 |
- third_party/libsync |
343 |
- third_party/libudev |
344 |
- third_party/libwebm |
345 |
- third_party/libxml/chromium |
346 |
- third_party/libyuv |
347 |
- third_party/llvm |
348 |
- third_party/lss |
349 |
- third_party/lzma_sdk |
350 |
- third_party/markupsafe |
351 |
- third_party/mesa |
352 |
- third_party/metrics_proto |
353 |
- third_party/modp_b64 |
354 |
- third_party/nasm |
355 |
- third_party/node |
356 |
- third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2 |
357 |
- third_party/one_euro_filter |
358 |
- third_party/openscreen |
359 |
- third_party/openscreen/src/third_party/tinycbor/src/src |
360 |
- third_party/ots |
361 |
- third_party/pdfium |
362 |
- third_party/pdfium/third_party/agg23 |
363 |
- third_party/pdfium/third_party/base |
364 |
- third_party/pdfium/third_party/bigint |
365 |
- third_party/pdfium/third_party/freetype |
366 |
- third_party/pdfium/third_party/lcms |
367 |
- third_party/pdfium/third_party/libopenjpeg20 |
368 |
- third_party/pdfium/third_party/libpng16 |
369 |
- third_party/pdfium/third_party/libtiff |
370 |
- third_party/pdfium/third_party/skia_shared |
371 |
- third_party/perfetto |
372 |
- third_party/pffft |
373 |
- third_party/ply |
374 |
- third_party/polymer |
375 |
- third_party/private-join-and-compute |
376 |
- third_party/protobuf |
377 |
- third_party/protobuf/third_party/six |
378 |
- third_party/pyjson5 |
379 |
- third_party/qcms |
380 |
- third_party/rnnoise |
381 |
- third_party/s2cellid |
382 |
- third_party/simplejson |
383 |
- third_party/skia |
384 |
- third_party/skia/include/third_party/skcms |
385 |
- third_party/skia/include/third_party/vulkan |
386 |
- third_party/skia/third_party/skcms |
387 |
- third_party/skia/third_party/vulkan |
388 |
- third_party/smhasher |
389 |
- third_party/spirv-headers |
390 |
- third_party/SPIRV-Tools |
391 |
- third_party/sqlite |
392 |
- third_party/swiftshader |
393 |
- third_party/swiftshader/third_party/llvm-7.0 |
394 |
- third_party/swiftshader/third_party/llvm-subzero |
395 |
- third_party/swiftshader/third_party/marl |
396 |
- third_party/swiftshader/third_party/subzero |
397 |
- third_party/swiftshader/third_party/SPIRV-Headers/include/spirv/unified1 |
398 |
- third_party/unrar |
399 |
- third_party/usrsctp |
400 |
- third_party/vulkan |
401 |
- third_party/web-animations-js |
402 |
- third_party/webdriver |
403 |
- third_party/webrtc |
404 |
- third_party/webrtc/common_audio/third_party/fft4g |
405 |
- third_party/webrtc/common_audio/third_party/spl_sqrt_floor |
406 |
- third_party/webrtc/modules/third_party/fft |
407 |
- third_party/webrtc/modules/third_party/g711 |
408 |
- third_party/webrtc/modules/third_party/g722 |
409 |
- third_party/webrtc/rtc_base/third_party/base64 |
410 |
- third_party/webrtc/rtc_base/third_party/sigslot |
411 |
- third_party/widevine |
412 |
- third_party/woff2 |
413 |
- third_party/wuffs |
414 |
- third_party/zlib/google |
415 |
- tools/grit/third_party/six |
416 |
- url/third_party/mozilla |
417 |
- v8/src/third_party/siphash |
418 |
- v8/src/third_party/valgrind |
419 |
- v8/src/third_party/utf8-decoder |
420 |
- v8/third_party/inspector_protocol |
421 |
- v8/third_party/v8 |
422 |
- |
423 |
- # gyp -> gn leftovers |
424 |
- base/third_party/libevent |
425 |
- third_party/adobe |
426 |
- third_party/speech-dispatcher |
427 |
- third_party/usb_ids |
428 |
- third_party/xdg-utils |
429 |
- third_party/yasm/run_yasm.py |
430 |
- ) |
431 |
- if ! use system-ffmpeg; then |
432 |
- keeplibs+=( third_party/ffmpeg third_party/opus ) |
433 |
- fi |
434 |
- if ! use system-icu; then |
435 |
- keeplibs+=( third_party/icu ) |
436 |
- fi |
437 |
- if ! use system-libvpx; then |
438 |
- keeplibs+=( third_party/libvpx ) |
439 |
- keeplibs+=( third_party/libvpx/source/libvpx/third_party/x86inc ) |
440 |
- |
441 |
- # we need to generate ppc64 stuff because upstream does not ship it yet |
442 |
- # it has to be done before unbundling. |
443 |
- if use ppc64; then |
444 |
- pushd third_party/libvpx >/dev/null || die |
445 |
- mkdir -p source/config/linux/ppc64 || die |
446 |
- ./generate_gni.sh || die |
447 |
- popd >/dev/null || die |
448 |
- fi |
449 |
- fi |
450 |
- if use tcmalloc; then |
451 |
- keeplibs+=( third_party/tcmalloc ) |
452 |
- fi |
453 |
- |
454 |
- # Remove most bundled libraries. Some are still needed. |
455 |
- build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die |
456 |
-} |
457 |
- |
458 |
-src_configure() { |
459 |
- # Calling this here supports resumption via FEATURES=keepwork |
460 |
- python_setup |
461 |
- |
462 |
- local myconf_gn="" |
463 |
- |
464 |
- # Make sure the build system will use the right tools, bug #340795. |
465 |
- tc-export AR CC CXX NM |
466 |
- |
467 |
- if [[ ${CHROMIUM_FORCE_CLANG} == yes ]] && ! tc-is-clang; then |
468 |
- # Force clang since gcc is pretty broken at the moment. |
469 |
- CC=${CHOST}-clang |
470 |
- CXX=${CHOST}-clang++ |
471 |
- strip-unsupported-flags |
472 |
- fi |
473 |
- |
474 |
- if tc-is-clang; then |
475 |
- myconf_gn+=" is_clang=true clang_use_chrome_plugins=false" |
476 |
- else |
477 |
- myconf_gn+=" is_clang=false" |
478 |
- fi |
479 |
- |
480 |
- # Define a custom toolchain for GN |
481 |
- myconf_gn+=" custom_toolchain=\"//build/toolchain/linux/unbundle:default\"" |
482 |
- |
483 |
- if tc-is-cross-compiler; then |
484 |
- tc-export BUILD_{AR,CC,CXX,NM} |
485 |
- myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:host\"" |
486 |
- myconf_gn+=" v8_snapshot_toolchain=\"//build/toolchain/linux/unbundle:host\"" |
487 |
- else |
488 |
- myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:default\"" |
489 |
- fi |
490 |
- |
491 |
- # GN needs explicit config for Debug/Release as opposed to inferring it from build directory. |
492 |
- myconf_gn+=" is_debug=false" |
493 |
- |
494 |
- # Component build isn't generally intended for use by end users. It's mostly useful |
495 |
- # for development and debugging. |
496 |
- myconf_gn+=" is_component_build=$(usex component-build true false)" |
497 |
- |
498 |
- myconf_gn+=" use_allocator=$(usex tcmalloc \"tcmalloc\" \"none\")" |
499 |
- |
500 |
- # Disable nacl, we can't build without pnacl (http://crbug.com/269560). |
501 |
- myconf_gn+=" enable_nacl=false" |
502 |
- |
503 |
- # Use system-provided libraries. |
504 |
- # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733). |
505 |
- # TODO: use_system_hunspell (upstream changes needed). |
506 |
- # TODO: use_system_libsrtp (bug #459932). |
507 |
- # TODO: use_system_protobuf (bug #525560). |
508 |
- # TODO: use_system_ssl (http://crbug.com/58087). |
509 |
- # TODO: use_system_sqlite (http://crbug.com/22208). |
510 |
- |
511 |
- # libevent: https://bugs.gentoo.org/593458 |
512 |
- local gn_system_libraries=( |
513 |
- flac |
514 |
- fontconfig |
515 |
- freetype |
516 |
- # Need harfbuzz_from_pkgconfig target |
517 |
- #harfbuzz-ng |
518 |
- libdrm |
519 |
- libjpeg |
520 |
- libpng |
521 |
- libwebp |
522 |
- libxml |
523 |
- libxslt |
524 |
- openh264 |
525 |
- re2 |
526 |
- snappy |
527 |
- yasm |
528 |
- zlib |
529 |
- ) |
530 |
- if use system-ffmpeg; then |
531 |
- gn_system_libraries+=( ffmpeg opus ) |
532 |
- fi |
533 |
- if use system-icu; then |
534 |
- gn_system_libraries+=( icu ) |
535 |
- fi |
536 |
- if use system-libvpx; then |
537 |
- gn_system_libraries+=( libvpx ) |
538 |
- fi |
539 |
- build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" || die |
540 |
- |
541 |
- # See dependency logic in third_party/BUILD.gn |
542 |
- myconf_gn+=" use_system_harfbuzz=true" |
543 |
- |
544 |
- # Disable deprecated libgnome-keyring dependency, bug #713012 |
545 |
- myconf_gn+=" use_gnome_keyring=false" |
546 |
- |
547 |
- # Optional dependencies. |
548 |
- myconf_gn+=" closure_compile=$(usex closure-compile true false)" |
549 |
- myconf_gn+=" enable_hangout_services_extension=$(usex hangouts true false)" |
550 |
- myconf_gn+=" enable_widevine=$(usex widevine true false)" |
551 |
- myconf_gn+=" use_cups=$(usex cups true false)" |
552 |
- myconf_gn+=" use_kerberos=$(usex kerberos true false)" |
553 |
- myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)" |
554 |
- |
555 |
- # TODO: link_pulseaudio=true for GN. |
556 |
- |
557 |
- myconf_gn+=" fieldtrial_testing_like_official_build=true" |
558 |
- |
559 |
- # Never use bundled gold binary. Disable gold linker flags for now. |
560 |
- # Do not use bundled clang. |
561 |
- # Trying to use gold results in linker crash. |
562 |
- myconf_gn+=" use_gold=false use_sysroot=false linux_use_bundled_binutils=false use_custom_libcxx=false" |
563 |
- |
564 |
- # Disable forced lld, bug 641556 |
565 |
- myconf_gn+=" use_lld=false" |
566 |
- |
567 |
- ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)" |
568 |
- myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)" |
569 |
- myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\"" |
570 |
- |
571 |
- # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys . |
572 |
- # Note: these are for Gentoo use ONLY. For your own distribution, |
573 |
- # please get your own set of keys. Feel free to contact chromium@g.o |
574 |
- # for more info. |
575 |
- local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc" |
576 |
- local google_default_client_id="329227923882.apps.googleusercontent.com" |
577 |
- local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu" |
578 |
- myconf_gn+=" google_api_key=\"${google_api_key}\"" |
579 |
- myconf_gn+=" google_default_client_id=\"${google_default_client_id}\"" |
580 |
- myconf_gn+=" google_default_client_secret=\"${google_default_client_secret}\"" |
581 |
- local myarch="$(tc-arch)" |
582 |
- |
583 |
- # Avoid CFLAGS problems, bug #352457, bug #390147. |
584 |
- if ! use custom-cflags; then |
585 |
- replace-flags "-Os" "-O2" |
586 |
- strip-flags |
587 |
- |
588 |
- # Prevent linker from running out of address space, bug #471810 . |
589 |
- if use x86; then |
590 |
- filter-flags "-g*" |
591 |
- fi |
592 |
- |
593 |
- # Prevent libvpx build failures. Bug 530248, 544702, 546984. |
594 |
- if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then |
595 |
- filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2 |
596 |
- fi |
597 |
- fi |
598 |
- |
599 |
- if [[ $myarch = amd64 ]] ; then |
600 |
- myconf_gn+=" target_cpu=\"x64\"" |
601 |
- ffmpeg_target_arch=x64 |
602 |
- elif [[ $myarch = x86 ]] ; then |
603 |
- myconf_gn+=" target_cpu=\"x86\"" |
604 |
- ffmpeg_target_arch=ia32 |
605 |
- |
606 |
- # This is normally defined by compiler_cpu_abi in |
607 |
- # build/config/compiler/BUILD.gn, but we patch that part out. |
608 |
- append-flags -msse2 -mfpmath=sse -mmmx |
609 |
- elif [[ $myarch = arm64 ]] ; then |
610 |
- myconf_gn+=" target_cpu=\"arm64\"" |
611 |
- ffmpeg_target_arch=arm64 |
612 |
- elif [[ $myarch = arm ]] ; then |
613 |
- myconf_gn+=" target_cpu=\"arm\"" |
614 |
- ffmpeg_target_arch=$(usex cpu_flags_arm_neon arm-neon arm) |
615 |
- elif [[ $myarch = ppc64 ]] ; then |
616 |
- myconf_gn+=" target_cpu=\"ppc64\"" |
617 |
- ffmpeg_target_arch=ppc64 |
618 |
- else |
619 |
- die "Failed to determine target arch, got '$myarch'." |
620 |
- fi |
621 |
- |
622 |
- # Make sure that -Werror doesn't get added to CFLAGS by the build system. |
623 |
- # Depending on GCC version the warnings are different and we don't want |
624 |
- # the build to fail because of that. |
625 |
- myconf_gn+=" treat_warnings_as_errors=false" |
626 |
- |
627 |
- # Disable fatal linker warnings, bug 506268. |
628 |
- myconf_gn+=" fatal_linker_warnings=false" |
629 |
- |
630 |
- # Bug 491582. |
631 |
- export TMPDIR="${WORKDIR}/temp" |
632 |
- mkdir -p -m 755 "${TMPDIR}" || die |
633 |
- |
634 |
- # https://bugs.gentoo.org/654216 |
635 |
- addpredict /dev/dri/ #nowarn |
636 |
- |
637 |
- #if ! use system-ffmpeg; then |
638 |
- if false; then |
639 |
- local build_ffmpeg_args="" |
640 |
- if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then |
641 |
- build_ffmpeg_args+=" --disable-asm" |
642 |
- fi |
643 |
- |
644 |
- # Re-configure bundled ffmpeg. See bug #491378 for example reasons. |
645 |
- einfo "Configuring bundled ffmpeg..." |
646 |
- pushd third_party/ffmpeg > /dev/null || die |
647 |
- chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \ |
648 |
- --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die |
649 |
- chromium/scripts/copy_config.sh || die |
650 |
- chromium/scripts/generate_gn.py || die |
651 |
- popd > /dev/null || die |
652 |
- fi |
653 |
- |
654 |
- # Chromium relies on this, but was disabled in >=clang-10, crbug.com/1042470 |
655 |
- append-cxxflags $(test-flags-CXX -flax-vector-conversions=all) |
656 |
- |
657 |
- # Explicitly disable ICU data file support for system-icu builds. |
658 |
- if use system-icu; then |
659 |
- myconf_gn+=" icu_use_data_file=false" |
660 |
- fi |
661 |
- |
662 |
- einfo "Configuring Chromium..." |
663 |
- set -- gn gen --args="${myconf_gn} ${EXTRA_GN}" out/Release |
664 |
- echo "$@" |
665 |
- "$@" || die |
666 |
-} |
667 |
- |
668 |
-src_compile() { |
669 |
- # Final link uses lots of file descriptors. |
670 |
- ulimit -n 2048 |
671 |
- |
672 |
- # Calling this here supports resumption via FEATURES=keepwork |
673 |
- python_setup |
674 |
- |
675 |
- #"${EPYTHON}" tools/clang/scripts/update.py --force-local-build --gcc-toolchain /usr --skip-checkout --use-system-cmake --without-android || die |
676 |
- |
677 |
- # Build mksnapshot and pax-mark it. |
678 |
- local x |
679 |
- for x in mksnapshot v8_context_snapshot_generator; do |
680 |
- if tc-is-cross-compiler; then |
681 |
- eninja -C out/Release "host/${x}" |
682 |
- pax-mark m "out/Release/host/${x}" |
683 |
- else |
684 |
- eninja -C out/Release "${x}" |
685 |
- pax-mark m "out/Release/${x}" |
686 |
- fi |
687 |
- done |
688 |
- |
689 |
- # Even though ninja autodetects number of CPUs, we respect |
690 |
- # user's options, for debugging with -j 1 or any other reason. |
691 |
- eninja -C out/Release chrome chromedriver |
692 |
- use suid && eninja -C out/Release chrome_sandbox |
693 |
- |
694 |
- pax-mark m out/Release/chrome |
695 |
- |
696 |
- # Build manpage; bug #684550 |
697 |
- sed -e 's|@@PACKAGE@@|chromium-browser|g; |
698 |
- s|@@MENUNAME@@|Chromium|g;' \ |
699 |
- chrome/app/resources/manpage.1.in > \ |
700 |
- out/Release/chromium-browser.1 || die |
701 |
- |
702 |
- # Build desktop file; bug #706786 |
703 |
- sed -e 's|@@MENUNAME@@|Chromium|g; |
704 |
- s|@@USR_BIN_SYMLINK_NAME@@|chromium-browser|g; |
705 |
- s|@@PACKAGE@@|chromium-browser|g; |
706 |
- s|\(^Exec=\)/usr/bin/|\1|g;' \ |
707 |
- chrome/installer/linux/common/desktop.template > \ |
708 |
- out/Release/chromium-browser-chromium.desktop || die |
709 |
-} |
710 |
- |
711 |
-src_install() { |
712 |
- local CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser" |
713 |
- exeinto "${CHROMIUM_HOME}" |
714 |
- doexe out/Release/chrome |
715 |
- |
716 |
- if use suid; then |
717 |
- newexe out/Release/chrome_sandbox chrome-sandbox |
718 |
- fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox" |
719 |
- fi |
720 |
- |
721 |
- doexe out/Release/chromedriver |
722 |
- |
723 |
- local sedargs=( -e "s:/usr/lib/:/usr/$(get_libdir)/:g" ) |
724 |
- sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r3.sh" > chromium-launcher.sh || die |
725 |
- doexe chromium-launcher.sh |
726 |
- |
727 |
- # It is important that we name the target "chromium-browser", |
728 |
- # xdg-utils expect it; bug #355517. |
729 |
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser |
730 |
- # keep the old symlink around for consistency |
731 |
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium |
732 |
- |
733 |
- dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver |
734 |
- |
735 |
- # Allow users to override command-line options, bug #357629. |
736 |
- insinto /etc/chromium |
737 |
- newins "${FILESDIR}/chromium.default" "default" |
738 |
- |
739 |
- pushd out/Release/locales > /dev/null || die |
740 |
- chromium_remove_language_paks |
741 |
- popd |
742 |
- |
743 |
- insinto "${CHROMIUM_HOME}" |
744 |
- doins out/Release/*.bin |
745 |
- doins out/Release/*.pak |
746 |
- doins out/Release/*.so |
747 |
- |
748 |
- if ! use system-icu; then |
749 |
- doins out/Release/icudtl.dat |
750 |
- fi |
751 |
- |
752 |
- doins -r out/Release/locales |
753 |
- doins -r out/Release/resources |
754 |
- |
755 |
- if [[ -d out/Release/swiftshader ]]; then |
756 |
- insinto "${CHROMIUM_HOME}/swiftshader" |
757 |
- doins out/Release/swiftshader/*.so |
758 |
- fi |
759 |
- |
760 |
- # Install icons |
761 |
- local branding size |
762 |
- for size in 16 24 32 48 64 128 256 ; do |
763 |
- case ${size} in |
764 |
- 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;; |
765 |
- *) branding="chrome/app/theme/chromium" ;; |
766 |
- esac |
767 |
- newicon -s ${size} "${branding}/product_logo_${size}.png" \ |
768 |
- chromium-browser.png |
769 |
- done |
770 |
- |
771 |
- # Install desktop entry |
772 |
- domenu out/Release/chromium-browser-chromium.desktop |
773 |
- |
774 |
- # Install GNOME default application entry (bug #303100). |
775 |
- insinto /usr/share/gnome-control-center/default-apps |
776 |
- newins "${FILESDIR}"/chromium-browser.xml chromium-browser.xml |
777 |
- |
778 |
- # Install manpage; bug #684550 |
779 |
- doman out/Release/chromium-browser.1 |
780 |
- dosym chromium-browser.1 /usr/share/man/man1/chromium.1 |
781 |
- |
782 |
- readme.gentoo_create_doc |
783 |
-} |
784 |
- |
785 |
-pkg_postrm() { |
786 |
- xdg_icon_cache_update |
787 |
- xdg_desktop_database_update |
788 |
-} |
789 |
- |
790 |
-pkg_postinst() { |
791 |
- xdg_icon_cache_update |
792 |
- xdg_desktop_database_update |
793 |
- readme.gentoo_print_elog |
794 |
-} |