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