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