Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/chromium/files/, www-client/chromium/
Date: Mon, 30 Apr 2018 23:26:59
Message-Id: 1525130786.ba6e7372f34d1760309b03615ad069fda5d916a7.floppym@gentoo
1 commit: ba6e7372f34d1760309b03615ad069fda5d916a7
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Mon Apr 30 23:26:26 2018 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 30 23:26:26 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba6e7372
7
8 www-client/chromium: dev channel bump (68.0.3409.2)
9
10 Package-Manager: Portage-2.3.31_p60, Repoman-2.3.9_p116
11
12 www-client/chromium/Manifest | 1 +
13 www-client/chromium/chromium-68.0.3409.2.ebuild | 697 +++++++++++++++++++++
14 .../chromium/files/chromium-compiler-r1.patch | 174 +++++
15 .../chromium/files/chromium-gn-bootstrap-r23.patch | 56 ++
16 4 files changed, 928 insertions(+)
17
18 diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest
19 index 5e4c84f9ee3..8552eecaf51 100644
20 --- a/www-client/chromium/Manifest
21 +++ b/www-client/chromium/Manifest
22 @@ -3,3 +3,4 @@ DIST chromium-66.0.3359.117.tar.xz 583947452 BLAKE2B b9e860f0f966ec9aaa2ab5627bb
23 DIST chromium-66.0.3359.139.tar.xz 583978636 BLAKE2B 0727ba9f87a738b691b2120dee7f45f7b16b234e871988b1257f01589a6a5ec2cd2470e8d95fc3087be2ab140f71afce63c7fccc851e87a932f69326966c3303 SHA512 9fe78fb6970fc5a3455e6545a4869d3a73075329ccd26719f503fd9bbfbdd6aec4f3db4cc748e8f12abb81adb318b8f8b42c7ab5c289a1f698536e81b7d2f14f
24 DIST chromium-67.0.3377.1.tar.xz 585310180 BLAKE2B 9e543ad2796c617e9c6237a938600ddd4fd7f7245f78e7aec25e2160ed8ab128e70c97d5a7d70021fd7b79707ceaf1e5e0a836e25474ad5e2999bc1f6b7e43b1 SHA512 e0e5c092895d676551ad75cf18595a641676cde0a6a414180a7e23046cb47fe61256634ac50fa6b3f05153a75125e88417bada12f662ee3fa71aad3ba7cf7684
25 DIST chromium-67.0.3396.18.tar.xz 589707412 BLAKE2B 925d258b388b9c28c64db8a423139d52ff4bada2a3971c1c3735e8caf9c9f6991e44153ae57650285f76f5b185046259d6305abaa2bf6ed9ff00c87a91162da2 SHA512 38e19697d4386fc0497312f2dd408f0e950fabb58f78572509caa68cbdbc7f5c5e54bb945c1afe17c64ef5180711759735d5cacb61fb8847b4fe3ac1a4485066
26 +DIST chromium-68.0.3409.2.tar.xz 595647380 BLAKE2B 3f3ebb7de759ae92b8feca74a931c10c4bdf4f75a0a7aeb2f56b59e635e1f03becccdf2b26d306e5753d9379eadede6ef50ec4e44338a3a6bdfb960b74003770 SHA512 2ce35251392570bcfe0cc02813bf6cee1761b2227888a135491828bfdfa9eafa4538e8fb981165503f901eecbf91cc8ce17cebab1681c63a43f0625dae7a2dd8
27
28 diff --git a/www-client/chromium/chromium-68.0.3409.2.ebuild b/www-client/chromium/chromium-68.0.3409.2.ebuild
29 new file mode 100644
30 index 00000000000..58724a4a0e6
31 --- /dev/null
32 +++ b/www-client/chromium/chromium-68.0.3409.2.ebuild
33 @@ -0,0 +1,697 @@
34 +# Copyright 1999-2018 Gentoo Foundation
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI="6"
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 eutils gnome2-utils flag-o-matic multilib ninja-utils pax-utils portability python-any-r1 readme.gentoo-r1 toolchain-funcs versionator xdg-utils
45 +
46 +DESCRIPTION="Open-source version of Google Chrome web browser"
47 +HOMEPAGE="http://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="component-build cups gnome-keyring +hangouts jumbo-build kerberos neon pic +proprietary-codecs pulseaudio selinux +suid +system-ffmpeg +system-icu +system-libvpx +tcmalloc"
54 +RESTRICT="!system-ffmpeg? ( proprietary-codecs? ( bindist ) )"
55 +
56 +COMMON_DEPEND="
57 + app-accessibility/at-spi2-atk:2
58 + app-arch/bzip2:=
59 + cups? ( >=net-print/cups-1.3.11:= )
60 + dev-libs/atk
61 + dev-libs/expat:=
62 + dev-libs/glib:2
63 + system-icu? ( >=dev-libs/icu-59:= )
64 + >=dev-libs/libxml2-2.9.4-r3:=[icu]
65 + dev-libs/libxslt:=
66 + dev-libs/nspr:=
67 + >=dev-libs/nss-3.26:=
68 + >=dev-libs/re2-0.2016.05.01:=
69 + gnome-keyring? ( >=gnome-base/libgnome-keyring-3.12:= )
70 + >=media-libs/alsa-lib-1.0.19:=
71 + media-libs/fontconfig:=
72 + media-libs/freetype:=
73 + >=media-libs/harfbuzz-1.6.0:=[icu(-)]
74 + media-libs/libjpeg-turbo:=
75 + media-libs/libpng:=
76 + system-libvpx? ( media-libs/libvpx:=[postproc,svc] )
77 + >=media-libs/openh264-1.6.0:=
78 + pulseaudio? ( media-sound/pulseaudio:= )
79 + system-ffmpeg? (
80 + >=media-video/ffmpeg-3:=
81 + || (
82 + media-video/ffmpeg[-samba]
83 + >=net-fs/samba-4.5.10-r1[-debug(-)]
84 + )
85 + !=net-fs/samba-4.5.12
86 + media-libs/opus:=
87 + )
88 + sys-apps/dbus:=
89 + sys-apps/pciutils:=
90 + virtual/udev
91 + x11-libs/cairo:=
92 + x11-libs/gdk-pixbuf:2
93 + x11-libs/gtk+:3[X]
94 + x11-libs/libX11:=
95 + x11-libs/libXcomposite:=
96 + x11-libs/libXcursor:=
97 + x11-libs/libXdamage:=
98 + x11-libs/libXext:=
99 + x11-libs/libXfixes:=
100 + >=x11-libs/libXi-1.6.0:=
101 + x11-libs/libXrandr:=
102 + x11-libs/libXrender:=
103 + x11-libs/libXScrnSaver:=
104 + x11-libs/libXtst:=
105 + x11-libs/pango:=
106 + app-arch/snappy:=
107 + media-libs/flac:=
108 + >=media-libs/libwebp-0.4.0:=
109 + sys-libs/zlib:=[minizip]
110 + kerberos? ( virtual/krb5 )
111 +"
112 +# For nvidia-drivers blocker, see bug #413637 .
113 +RDEPEND="${COMMON_DEPEND}
114 + !=www-client/chromium-9999
115 + !<www-plugins/chrome-binary-plugins-57
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 +# dev-vcs/git - https://bugs.gentoo.org/593476
123 +# sys-apps/sandbox - https://crbug.com/586444
124 +DEPEND="${COMMON_DEPEND}
125 + >=app-arch/gzip-1.7
126 + !arm? (
127 + dev-lang/yasm
128 + )
129 + dev-lang/perl
130 + >=dev-util/gperf-3.0.3
131 + >=dev-util/ninja-1.7.2
132 + >=net-libs/nodejs-6.9.4
133 + sys-apps/hwids[usb(+)]
134 + >=sys-devel/bison-2.4.3
135 + sys-devel/flex
136 + >=sys-devel/clang-5
137 + virtual/pkgconfig
138 + dev-vcs/git
139 + $(python_gen_any_dep '
140 + dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]
141 + >=dev-python/beautifulsoup-4.3.2:4[${PYTHON_USEDEP}]
142 + dev-python/html5lib[${PYTHON_USEDEP}]
143 + dev-python/simplejson[${PYTHON_USEDEP}]
144 + ')
145 +"
146 +
147 +# Keep this in sync with the python_gen_any_dep call.
148 +python_check_deps() {
149 + has_version --host-root "dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]" &&
150 + has_version --host-root ">=dev-python/beautifulsoup-4.3.2:4[${PYTHON_USEDEP}]" &&
151 + has_version --host-root "dev-python/html5lib[${PYTHON_USEDEP}]" &&
152 + has_version --host-root "dev-python/simplejson[${PYTHON_USEDEP}]"
153 +}
154 +
155 +if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
156 + EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
157 +fi
158 +
159 +DISABLE_AUTOFORMATTING="yes"
160 +DOC_CONTENTS="
161 +Some web pages may require additional fonts to display properly.
162 +Try installing some of the following packages if some characters
163 +are not displayed properly:
164 +- media-fonts/arphicfonts
165 +- media-fonts/bitstream-cyberbit
166 +- media-fonts/droid
167 +- media-fonts/ipamonafont
168 +- media-fonts/noto
169 +- media-fonts/ja-ipafonts
170 +- media-fonts/takao-fonts
171 +- media-fonts/wqy-microhei
172 +- media-fonts/wqy-zenhei
173 +
174 +To fix broken icons on the Downloads page, you should install an icon
175 +theme that covers the appropriate MIME types, and configure this as your
176 +GTK+ icon theme.
177 +"
178 +
179 +PATCHES=(
180 + "${FILESDIR}/chromium-compiler-r1.patch"
181 + "${FILESDIR}/chromium-webrtc-r0.patch"
182 + "${FILESDIR}/chromium-memcpy-r0.patch"
183 + "${FILESDIR}/chromium-math.h-r0.patch"
184 + "${FILESDIR}/chromium-stdint.patch"
185 + "${FILESDIR}/chromium-ffmpeg-r1.patch"
186 + "${FILESDIR}/chromium-ffmpeg-clang.patch"
187 + "${FILESDIR}/chromium-gn-bootstrap-r23.patch"
188 +)
189 +
190 +pre_build_checks() {
191 + #if [[ ${MERGE_TYPE} != binary ]]; then
192 + # local -x CPP="$(tc-getCXX) -E"
193 + # if tc-is-clang && ! version_is_at_least "3.9.1" "$(clang-fullversion)"; then
194 + # # bugs: #601654
195 + # die "At least clang 3.9.1 is required"
196 + # fi
197 + # if tc-is-gcc && ! version_is_at_least 5.0 "$(gcc-version)"; then
198 + # # bugs: #535730, #525374, #518668, #600288, #627356
199 + # die "At least gcc 5.0 is required"
200 + # fi
201 + #fi
202 +
203 + # Check build requirements, bug #541816 and bug #471810 .
204 + CHECKREQS_MEMORY="3G"
205 + CHECKREQS_DISK_BUILD="5G"
206 + eshopts_push -s extglob
207 + if is-flagq '-g?(gdb)?([1-9])'; then
208 + CHECKREQS_DISK_BUILD="25G"
209 + if ! use component-build; then
210 + CHECKREQS_MEMORY="16G"
211 + fi
212 + fi
213 + eshopts_pop
214 + check-reqs_pkg_setup
215 +}
216 +
217 +pkg_pretend() {
218 + pre_build_checks
219 +}
220 +
221 +pkg_setup() {
222 + pre_build_checks
223 +
224 + chromium_suid_sandbox_check_kernel_config
225 +}
226 +
227 +src_prepare() {
228 + # Calling this here supports resumption via FEATURES=keepwork
229 + python_setup
230 +
231 + default
232 +
233 + mkdir -p third_party/node/linux/node-linux-x64/bin || die
234 + ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
235 +
236 + local keeplibs=(
237 + base/third_party/dmg_fp
238 + base/third_party/dynamic_annotations
239 + base/third_party/icu
240 + base/third_party/nspr
241 + base/third_party/superfasthash
242 + base/third_party/symbolize
243 + base/third_party/valgrind
244 + base/third_party/xdg_mime
245 + base/third_party/xdg_user_dirs
246 + buildtools/third_party/libc++
247 + buildtools/third_party/libc++abi
248 + chrome/third_party/mozilla_security_manager
249 + courgette/third_party
250 + net/third_party/http2
251 + net/third_party/mozilla_security_manager
252 + net/third_party/nss
253 + third_party/WebKit
254 + third_party/analytics
255 + third_party/angle
256 + third_party/angle/src/common/third_party/base
257 + third_party/angle/src/common/third_party/smhasher
258 + third_party/angle/src/third_party/compiler
259 + third_party/angle/src/third_party/libXNVCtrl
260 + third_party/angle/src/third_party/trace_event
261 + third_party/angle/third_party/glslang
262 + third_party/angle/third_party/spirv-headers
263 + third_party/angle/third_party/spirv-tools
264 + third_party/angle/third_party/vulkan-validation-layers
265 + third_party/apple_apsl
266 + third_party/blink
267 + third_party/boringssl
268 + third_party/boringssl/src/third_party/fiat
269 + third_party/breakpad
270 + third_party/breakpad/breakpad/src/third_party/curl
271 + third_party/brotli
272 + third_party/cacheinvalidation
273 + third_party/catapult
274 + third_party/catapult/common/py_vulcanize/third_party/rcssmin
275 + third_party/catapult/common/py_vulcanize/third_party/rjsmin
276 + third_party/catapult/third_party/polymer
277 + third_party/catapult/tracing/third_party/d3
278 + third_party/catapult/tracing/third_party/gl-matrix
279 + third_party/catapult/tracing/third_party/jszip
280 + third_party/catapult/tracing/third_party/mannwhitneyu
281 + third_party/catapult/tracing/third_party/oboe
282 + third_party/catapult/tracing/third_party/pako
283 + third_party/ced
284 + third_party/cld_3
285 + third_party/crashpad
286 + third_party/crashpad/crashpad/third_party/zlib
287 + third_party/crc32c
288 + third_party/cros_system_api
289 + third_party/devscripts
290 + third_party/dom_distiller_js
291 + third_party/fips181
292 + third_party/flatbuffers
293 + third_party/flot
294 + third_party/freetype
295 + third_party/glslang-angle
296 + third_party/google_input_tools
297 + third_party/google_input_tools/third_party/closure_library
298 + third_party/google_input_tools/third_party/closure_library/third_party/closure
299 + third_party/googletest
300 + third_party/hunspell
301 + third_party/iccjpeg
302 + third_party/inspector_protocol
303 + third_party/jinja2
304 + third_party/jstemplate
305 + third_party/khronos
306 + third_party/leveldatabase
307 + third_party/libXNVCtrl
308 + third_party/libaddressinput
309 + third_party/libaom
310 + third_party/libaom/source/libaom/third_party/x86inc
311 + third_party/libjingle
312 + third_party/libphonenumber
313 + third_party/libsecret
314 + third_party/libsrtp
315 + third_party/libudev
316 + third_party/libwebm
317 + third_party/libxml/chromium
318 + third_party/libyuv
319 + third_party/llvm
320 + third_party/lss
321 + third_party/lzma_sdk
322 + third_party/markupsafe
323 + third_party/mesa
324 + third_party/metrics_proto
325 + third_party/modp_b64
326 + third_party/node
327 + third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2
328 + third_party/openmax_dl
329 + third_party/ots
330 + third_party/pdfium
331 + third_party/pdfium/third_party/agg23
332 + third_party/pdfium/third_party/base
333 + third_party/pdfium/third_party/bigint
334 + third_party/pdfium/third_party/freetype
335 + third_party/pdfium/third_party/lcms
336 + third_party/pdfium/third_party/libopenjpeg20
337 + third_party/pdfium/third_party/libpng16
338 + third_party/pdfium/third_party/libtiff
339 + third_party/pdfium/third_party/skia_shared
340 + third_party/perfetto
341 + third_party/ply
342 + third_party/polymer
343 + third_party/protobuf
344 + third_party/protobuf/third_party/six
345 + third_party/qcms
346 + third_party/s2cellid
347 + third_party/sfntly
348 + third_party/skia
349 + third_party/skia/third_party/gif
350 + third_party/skia/third_party/skcms
351 + third_party/skia/third_party/vulkan
352 + third_party/smhasher
353 + third_party/spirv-headers
354 + third_party/spirv-tools-angle
355 + third_party/sqlite
356 + third_party/swiftshader
357 + third_party/swiftshader/third_party/llvm-subzero
358 + third_party/swiftshader/third_party/subzero
359 + third_party/unrar
360 + third_party/usrsctp
361 + third_party/vulkan
362 + third_party/vulkan-validation-layers
363 + third_party/web-animations-js
364 + third_party/webdriver
365 + third_party/webrtc
366 + third_party/widevine
367 + third_party/woff2
368 + third_party/zlib/google
369 + url/third_party/mozilla
370 + v8/src/third_party/valgrind
371 + v8/src/third_party/utf8-decoder
372 + v8/third_party/antlr4
373 + v8/third_party/inspector_protocol
374 +
375 + # gyp -> gn leftovers
376 + base/third_party/libevent
377 + third_party/adobe
378 + third_party/speech-dispatcher
379 + third_party/usb_ids
380 + third_party/xdg-utils
381 + third_party/yasm/run_yasm.py
382 + )
383 + if ! use system-ffmpeg; then
384 + keeplibs+=( third_party/ffmpeg third_party/opus )
385 + fi
386 + if ! use system-icu; then
387 + keeplibs+=( third_party/icu )
388 + fi
389 + if ! use system-libvpx; then
390 + keeplibs+=( third_party/libvpx )
391 + keeplibs+=( third_party/libvpx/source/libvpx/third_party/x86inc )
392 + fi
393 + if use tcmalloc; then
394 + keeplibs+=( third_party/tcmalloc )
395 + fi
396 +
397 + # Remove most bundled libraries. Some are still needed.
398 + build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
399 +}
400 +
401 +bootstrap_gn() {
402 + if tc-is-cross-compiler; then
403 + local -x AR=${BUILD_AR}
404 + local -x CC=${BUILD_CC}
405 + local -x CXX=${BUILD_CXX}
406 + local -x NM=${BUILD_NM}
407 + local -x CFLAGS=${BUILD_CFLAGS}
408 + local -x CXXFLAGS=${BUILD_CXXFLAGS}
409 + local -x LDFLAGS=${BUILD_LDFLAGS}
410 + fi
411 + einfo "Building GN..."
412 + set -- tools/gn/bootstrap/bootstrap.py -s -v --no-clean
413 + echo "$@"
414 + "$@" || die
415 +}
416 +
417 +src_configure() {
418 + # Calling this here supports resumption via FEATURES=keepwork
419 + python_setup
420 +
421 + local myconf_gn=""
422 +
423 + # Make sure the build system will use the right tools, bug #340795.
424 + tc-export AR CC CXX NM
425 +
426 + if ! tc-is-clang; then
427 + # Force clang since gcc is pretty broken at the moment.
428 + CC=${CHOST}-clang
429 + CXX=${CHOST}-clang++
430 + strip-unsupported-flags
431 + fi
432 +
433 + if tc-is-clang; then
434 + myconf_gn+=" is_clang=true clang_use_chrome_plugins=false"
435 + else
436 + myconf_gn+=" is_clang=false"
437 + fi
438 +
439 + # Define a custom toolchain for GN
440 + myconf_gn+=" custom_toolchain=\"//build/toolchain/linux/unbundle:default\""
441 +
442 + if tc-is-cross-compiler; then
443 + tc-export BUILD_{AR,CC,CXX,NM}
444 + myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:host\""
445 + myconf_gn+=" v8_snapshot_toolchain=\"//build/toolchain/linux/unbundle:host\""
446 + else
447 + myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:default\""
448 + fi
449 +
450 + # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
451 + myconf_gn+=" is_debug=false"
452 +
453 + # Component build isn't generally intended for use by end users. It's mostly useful
454 + # for development and debugging.
455 + myconf_gn+=" is_component_build=$(usex component-build true false)"
456 +
457 + # https://chromium.googlesource.com/chromium/src/+/lkcr/docs/jumbo.md
458 + myconf_gn+=" use_jumbo_build=$(usex jumbo-build true false)"
459 +
460 + myconf_gn+=" use_allocator=$(usex tcmalloc \"tcmalloc\" \"none\")"
461 +
462 + # Disable nacl, we can't build without pnacl (http://crbug.com/269560).
463 + myconf_gn+=" enable_nacl=false"
464 +
465 + # Use system-provided libraries.
466 + # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
467 + # TODO: use_system_hunspell (upstream changes needed).
468 + # TODO: use_system_libsrtp (bug #459932).
469 + # TODO: use_system_protobuf (bug #525560).
470 + # TODO: use_system_ssl (http://crbug.com/58087).
471 + # TODO: use_system_sqlite (http://crbug.com/22208).
472 +
473 + # libevent: https://bugs.gentoo.org/593458
474 + local gn_system_libraries=(
475 + flac
476 + fontconfig
477 + freetype
478 + # Need harfbuzz_from_pkgconfig target
479 + #harfbuzz-ng
480 + libdrm
481 + libjpeg
482 + libpng
483 + libwebp
484 + libxml
485 + libxslt
486 + openh264
487 + re2
488 + snappy
489 + yasm
490 + zlib
491 + )
492 + if use system-ffmpeg; then
493 + gn_system_libraries+=( ffmpeg opus )
494 + fi
495 + if use system-icu; then
496 + gn_system_libraries+=( icu )
497 + fi
498 + if use system-libvpx; then
499 + gn_system_libraries+=( libvpx )
500 + fi
501 + build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" || die
502 +
503 + # See dependency logic in third_party/BUILD.gn
504 + myconf_gn+=" use_system_harfbuzz=true"
505 +
506 + # Optional dependencies.
507 + myconf_gn+=" enable_hangout_services_extension=$(usex hangouts true false)"
508 + myconf_gn+=" use_cups=$(usex cups true false)"
509 + myconf_gn+=" use_gnome_keyring=$(usex gnome-keyring true false)"
510 + myconf_gn+=" use_kerberos=$(usex kerberos true false)"
511 + myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)"
512 +
513 + # TODO: link_pulseaudio=true for GN.
514 +
515 + myconf_gn+=" fieldtrial_testing_like_official_build=true"
516 +
517 + # Never use bundled gold binary. Disable gold linker flags for now.
518 + # Do not use bundled clang.
519 + # Trying to use gold results in linker crash.
520 + myconf_gn+=" use_gold=false use_sysroot=false linux_use_bundled_binutils=false use_custom_libcxx=false"
521 +
522 + # Disable forced lld, bug 641556
523 + myconf_gn+=" use_lld=false"
524 +
525 + ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)"
526 + myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)"
527 + myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\""
528 +
529 + # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys .
530 + # Note: these are for Gentoo use ONLY. For your own distribution,
531 + # please get your own set of keys. Feel free to contact chromium@g.o
532 + # for more info.
533 + local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc"
534 + local google_default_client_id="329227923882.apps.googleusercontent.com"
535 + local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu"
536 + myconf_gn+=" google_api_key=\"${google_api_key}\""
537 + myconf_gn+=" google_default_client_id=\"${google_default_client_id}\""
538 + myconf_gn+=" google_default_client_secret=\"${google_default_client_secret}\""
539 +
540 + local myarch="$(tc-arch)"
541 + if [[ $myarch = amd64 ]] ; then
542 + myconf_gn+=" target_cpu=\"x64\""
543 + ffmpeg_target_arch=x64
544 + elif [[ $myarch = x86 ]] ; then
545 + myconf_gn+=" target_cpu=\"x86\""
546 + ffmpeg_target_arch=ia32
547 + elif [[ $myarch = arm64 ]] ; then
548 + myconf_gn+=" target_cpu=\"arm64\""
549 + ffmpeg_target_arch=arm64
550 + elif [[ $myarch = arm ]] ; then
551 + myconf_gn+=" target_cpu=\"arm\""
552 + ffmpeg_target_arch=$(usex neon arm-neon arm)
553 + else
554 + die "Failed to determine target arch, got '$myarch'."
555 + fi
556 +
557 + # Make sure that -Werror doesn't get added to CFLAGS by the build system.
558 + # Depending on GCC version the warnings are different and we don't want
559 + # the build to fail because of that.
560 + myconf_gn+=" treat_warnings_as_errors=false"
561 +
562 + # Disable fatal linker warnings, bug 506268.
563 + myconf_gn+=" fatal_linker_warnings=false"
564 +
565 + # Avoid CFLAGS problems, bug #352457, bug #390147.
566 + if ! use custom-cflags; then
567 + replace-flags "-Os" "-O2"
568 + strip-flags
569 +
570 + # Prevent linker from running out of address space, bug #471810 .
571 + if use x86; then
572 + filter-flags "-g*"
573 + fi
574 +
575 + # Prevent libvpx build failures. Bug 530248, 544702, 546984.
576 + if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then
577 + filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2
578 + fi
579 + fi
580 +
581 + # https://bugs.gentoo.org/588596
582 + #append-cxxflags $(test-flags-CXX -fno-delete-null-pointer-checks)
583 +
584 + # Bug 491582.
585 + export TMPDIR="${WORKDIR}/temp"
586 + mkdir -p -m 755 "${TMPDIR}" || die
587 +
588 + if ! use system-ffmpeg; then
589 + local build_ffmpeg_args=""
590 + if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then
591 + build_ffmpeg_args+=" --disable-asm"
592 + fi
593 +
594 + # Re-configure bundled ffmpeg. See bug #491378 for example reasons.
595 + einfo "Configuring bundled ffmpeg..."
596 + pushd third_party/ffmpeg > /dev/null || die
597 + chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \
598 + --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die
599 + chromium/scripts/copy_config.sh || die
600 + chromium/scripts/generate_gn.py || die
601 + popd > /dev/null || die
602 + fi
603 +
604 + bootstrap_gn
605 +
606 + einfo "Configuring Chromium..."
607 + set -- out/Release/gn gen --args="${myconf_gn} ${EXTRA_GN}" out/Release
608 + echo "$@"
609 + "$@" || die
610 +}
611 +
612 +src_compile() {
613 + # Calling this here supports resumption via FEATURES=keepwork
614 + python_setup
615 +
616 + #"${EPYTHON}" tools/clang/scripts/update.py --force-local-build --gcc-toolchain /usr --skip-checkout --use-system-cmake --without-android || die
617 +
618 + # Build mksnapshot and pax-mark it.
619 + local x
620 + for x in mksnapshot v8_context_snapshot_generator; do
621 + if tc-is-cross-compiler; then
622 + eninja -C out/Release "host/${x}"
623 + pax-mark m "out/Release/host/${x}"
624 + else
625 + eninja -C out/Release "${x}"
626 + pax-mark m "out/Release/${x}"
627 + fi
628 + done
629 +
630 + # Even though ninja autodetects number of CPUs, we respect
631 + # user's options, for debugging with -j 1 or any other reason.
632 + eninja -C out/Release chrome chromedriver
633 + use suid && eninja -C out/Release chrome_sandbox
634 +
635 + pax-mark m out/Release/chrome
636 +}
637 +
638 +src_install() {
639 + local CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser"
640 + exeinto "${CHROMIUM_HOME}"
641 + doexe out/Release/chrome
642 +
643 + if use suid; then
644 + newexe out/Release/chrome_sandbox chrome-sandbox
645 + fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
646 + fi
647 +
648 + doexe out/Release/chromedriver
649 +
650 + local sedargs=( -e "s:/usr/lib/:/usr/$(get_libdir)/:g" )
651 + sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r3.sh" > chromium-launcher.sh || die
652 + doexe chromium-launcher.sh
653 +
654 + # It is important that we name the target "chromium-browser",
655 + # xdg-utils expect it; bug #355517.
656 + dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser
657 + # keep the old symlink around for consistency
658 + dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium
659 +
660 + dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver
661 +
662 + # Allow users to override command-line options, bug #357629.
663 + insinto /etc/chromium
664 + newins "${FILESDIR}/chromium.default" "default"
665 +
666 + pushd out/Release/locales > /dev/null || die
667 + chromium_remove_language_paks
668 + popd
669 +
670 + insinto "${CHROMIUM_HOME}"
671 + doins out/Release/*.bin
672 + doins out/Release/*.pak
673 + doins out/Release/*.so
674 +
675 + if ! use system-icu; then
676 + doins out/Release/icudtl.dat
677 + fi
678 +
679 + doins -r out/Release/locales
680 + doins -r out/Release/resources
681 +
682 + if [[ -d out/Release/swiftshader ]]; then
683 + insinto "${CHROMIUM_HOME}/swiftshader"
684 + doins out/Release/swiftshader/*.so
685 + fi
686 +
687 + # Install icons and desktop entry.
688 + local branding size
689 + for size in 16 22 24 32 48 64 128 256 ; do
690 + case ${size} in
691 + 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
692 + *) branding="chrome/app/theme/chromium" ;;
693 + esac
694 + newicon -s ${size} "${branding}/product_logo_${size}.png" \
695 + chromium-browser.png
696 + done
697 +
698 + local mime_types="text/html;text/xml;application/xhtml+xml;"
699 + mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797
700 + mime_types+="x-scheme-handler/ftp;" # bug #412185
701 + mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393
702 + make_desktop_entry \
703 + chromium-browser \
704 + "Chromium" \
705 + chromium-browser \
706 + "Network;WebBrowser" \
707 + "MimeType=${mime_types}\nStartupWMClass=chromium-browser"
708 + sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die
709 +
710 + # Install GNOME default application entry (bug #303100).
711 + insinto /usr/share/gnome-control-center/default-apps
712 + newins "${FILESDIR}"/chromium-browser.xml chromium-browser.xml
713 +
714 + readme.gentoo_create_doc
715 +}
716 +
717 +pkg_preinst() {
718 + gnome2_icon_savelist
719 +}
720 +
721 +pkg_postrm() {
722 + gnome2_icon_cache_update
723 + xdg_desktop_database_update
724 +}
725 +
726 +pkg_postinst() {
727 + gnome2_icon_cache_update
728 + xdg_desktop_database_update
729 + readme.gentoo_print_elog
730 +}
731
732 diff --git a/www-client/chromium/files/chromium-compiler-r1.patch b/www-client/chromium/files/chromium-compiler-r1.patch
733 new file mode 100644
734 index 00000000000..3c75c1d96df
735 --- /dev/null
736 +++ b/www-client/chromium/files/chromium-compiler-r1.patch
737 @@ -0,0 +1,174 @@
738 +From f1e0c5fc3b81053c8851efde9ca77e04c77d4563 Mon Sep 17 00:00:00 2001
739 +From: Mike Gilbert <floppym@g.o>
740 +Date: Wed, 25 Apr 2018 13:22:49 -0400
741 +Subject: [PATCH] Disable various compiler configs
742 +
743 +---
744 + build/config/compiler/BUILD.gn | 67 +++++++++-------------------------
745 + 1 file changed, 18 insertions(+), 49 deletions(-)
746 +
747 +diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
748 +index 3dbf872f7038..f8b2dcc9b026 100644
749 +--- a/build/config/compiler/BUILD.gn
750 ++++ b/build/config/compiler/BUILD.gn
751 +@@ -222,8 +222,6 @@ config("compiler") {
752 +
753 + configs += [
754 + # See the definitions below.
755 +- ":clang_revision",
756 +- ":compiler_cpu_abi",
757 + ":compiler_codegen",
758 + ]
759 +
760 +@@ -474,24 +472,6 @@ config("compiler") {
761 + cflags += [ "-fcolor-diagnostics" ]
762 + }
763 +
764 +- if (is_clang && !is_nacl && current_toolchain == host_toolchain &&
765 +- target_os != "chromeos") {
766 +- cflags += [
767 +- # TODO(hans): Remove this once Clang generates better optimized debug info
768 +- # by default. https://crbug.com/765793
769 +- "-Xclang",
770 +- "-mllvm",
771 +- "-Xclang",
772 +- "-instcombine-lower-dbg-declare=0",
773 +-
774 +- # TODO(rnk): Remove this once it's the default. https://crbug.com/793819
775 +- "-Xclang",
776 +- "-mllvm",
777 +- "-Xclang",
778 +- "-fast-isel-sink-local-values=1",
779 +- ]
780 +- }
781 +-
782 + # Print absolute paths in diagnostics. There is no precedent for doing this
783 + # on Linux/Mac (GCC doesn't support it), but MSVC does this with /FC and
784 + # Windows developers rely on it (crbug.com/636109) so only do this on Windows.
785 +@@ -1403,10 +1383,6 @@ config("default_warnings") {
786 +
787 + # TODO(hans): https://crbug.com/766891
788 + "-Wno-null-pointer-arithmetic",
789 +-
790 +- # Ignore warnings about MSVC optimization pragmas.
791 +- # TODO(thakis): Only for no_chromium_code? http://crbug.com/505314
792 +- "-Wno-ignored-pragma-optimize",
793 + ]
794 + } else if (use_xcode_clang) {
795 + cflags += [
796 +@@ -1450,22 +1426,6 @@ config("chromium_code") {
797 + "__STDC_FORMAT_MACROS",
798 + ]
799 +
800 +- if (!is_debug && !using_sanitizer &&
801 +- (!is_linux || !is_clang || is_official_build) &&
802 +- current_cpu != "s390x" && current_cpu != "s390" &&
803 +- current_cpu != "ppc64" && current_cpu != "ppc64" &&
804 +- current_cpu != "mips" && current_cpu != "mips64") {
805 +- # _FORTIFY_SOURCE isn't really supported by Clang now, see
806 +- # http://llvm.org/bugs/show_bug.cgi?id=16821.
807 +- # It seems to work fine with Ubuntu 12 headers though, so use it in
808 +- # official builds.
809 +- #
810 +- # Non-chromium code is not guaranteed to compile cleanly with
811 +- # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are
812 +- # disabled, so only do that for Release build.
813 +- defines += [ "_FORTIFY_SOURCE=2" ]
814 +- }
815 +-
816 + if (is_mac || is_ios) {
817 + cflags_objc = [ "-Wobjc-missing-property-synthesis" ]
818 + cflags_objcc = [ "-Wobjc-missing-property-synthesis" ]
819 +@@ -1799,7 +1759,8 @@ config("default_stack_frames") {
820 + }
821 +
822 + # Default "optimization on" config.
823 +-config("optimize") {
824 ++config("optimize") { }
825 ++config("xoptimize") {
826 + if (is_win) {
827 + # TODO(thakis): Remove is_clang here, https://crbug.com/598772
828 + if (is_official_build && full_wpo_on_official && !is_clang) {
829 +@@ -1833,7 +1794,8 @@ config("optimize") {
830 + }
831 +
832 + # Same config as 'optimize' but without the WPO flag.
833 +-config("optimize_no_wpo") {
834 ++config("optimize_no_wpo") { }
835 ++config("xoptimize_no_wpo") {
836 + if (is_win) {
837 + # Favor size over speed, /O1 must be before the common flags. The GYP
838 + # build also specifies /Os and /GF but these are implied by /O1.
839 +@@ -1856,7 +1818,8 @@ config("optimize_no_wpo") {
840 + }
841 +
842 + # Turn off optimizations.
843 +-config("no_optimize") {
844 ++config("no_optimize") { }
845 ++config("xno_optimize") {
846 + if (is_win) {
847 + cflags = [
848 + "/Od", # Disable optimization.
849 +@@ -1880,7 +1843,8 @@ config("no_optimize") {
850 + # Turns up the optimization level. On Windows, this implies whole program
851 + # optimization and link-time code generation which is very expensive and should
852 + # be used sparingly.
853 +-config("optimize_max") {
854 ++config("optimize_max") { }
855 ++config("xoptimize_max") {
856 + if (is_nacl && is_nacl_irt) {
857 + # The NaCl IRT is a special case and always wants its own config.
858 + # Various components do:
859 +@@ -1927,7 +1891,8 @@ config("optimize_max") {
860 + #
861 + # TODO(crbug.com/621335) - rework how all of these configs are related
862 + # so that we don't need this disclaimer.
863 +-config("optimize_speed") {
864 ++config("optimize_speed") { }
865 ++config("xoptimize_speed") {
866 + if (is_nacl && is_nacl_irt) {
867 + # The NaCl IRT is a special case and always wants its own config.
868 + # Various components do:
869 +@@ -1965,7 +1930,8 @@ config("optimize_speed") {
870 + }
871 + }
872 +
873 +-config("optimize_fuzzing") {
874 ++config("optimize_fuzzing") { }
875 ++config("xoptimize_fuzzing") {
876 + cflags = [ "-O1" ] + common_optimize_on_cflags
877 + ldflags = common_optimize_on_ldflags
878 + visibility = [ ":default_optimization" ]
879 +@@ -2047,7 +2013,8 @@ config("afdo") {
880 + # configs += [ "//build/config/compiler:symbols" ]
881 +
882 + # Full symbols.
883 +-config("symbols") {
884 ++config("symbols") { }
885 ++config("xsymbols") {
886 + if (is_win) {
887 + if (use_goma || is_clang) {
888 + # Note that with VC++ this requires is_win_fastlink, enforced elsewhere.
889 +@@ -2139,7 +2106,8 @@ config("symbols") {
890 + # Minimal symbols.
891 + # This config guarantees to hold symbol for stack trace which are shown to user
892 + # when crash happens in unittests running on buildbot.
893 +-config("minimal_symbols") {
894 ++config("minimal_symbols") { }
895 ++config("xminimal_symbols") {
896 + if (is_win) {
897 + # Linker symbols for backtraces only.
898 + cflags = []
899 +@@ -2170,7 +2138,8 @@ config("minimal_symbols") {
900 + }
901 +
902 + # No symbols.
903 +-config("no_symbols") {
904 ++config("no_symbols") { }
905 ++config("xno_symbols") {
906 + if (!is_win) {
907 + cflags = [ "-g0" ]
908 + asmflags = cflags
909 +--
910 +2.17.0
911 +
912
913 diff --git a/www-client/chromium/files/chromium-gn-bootstrap-r23.patch b/www-client/chromium/files/chromium-gn-bootstrap-r23.patch
914 new file mode 100644
915 index 00000000000..e826a4dfc37
916 --- /dev/null
917 +++ b/www-client/chromium/files/chromium-gn-bootstrap-r23.patch
918 @@ -0,0 +1,56 @@
919 +From 0d3bbfb6b8ba05af199b49f5dd71d842f6acffda Mon Sep 17 00:00:00 2001
920 +From: Tom Anderson <thomasanderson@××××××××.org>
921 +Date: Fri, 27 Apr 2018 18:07:35 +0000
922 +Subject: [PATCH] Fix gn bootstrap
923 +
924 +BUG=837312
925 +R=dpranke
926 +
927 +Change-Id: Ia5c57f596388a4ba325208c638fac558984202f0
928 +Reviewed-on: https://chromium-review.googlesource.com/1030895
929 +Reviewed-by: Dirk Pranke <dpranke@××××××××.org>
930 +Commit-Queue: Dirk Pranke <dpranke@××××××××.org>
931 +Cr-Commit-Position: refs/heads/master@{#554419}
932 +---
933 + tools/gn/bootstrap/bootstrap.py | 16 ++++++++++++++++
934 + 1 file changed, 16 insertions(+)
935 +
936 +diff --git a/tools/gn/bootstrap/bootstrap.py b/tools/gn/bootstrap/bootstrap.py
937 +index 7fa9f0489f5b..ebc32371acc3 100755
938 +--- a/tools/gn/bootstrap/bootstrap.py
939 ++++ b/tools/gn/bootstrap/bootstrap.py
940 +@@ -525,8 +525,11 @@ def write_gn_ninja(path, root_gen_dir, options, windows_x64_toolchain):
941 + 'base/location.cc',
942 + 'base/logging.cc',
943 + 'base/md5.cc',
944 ++ 'base/memory/platform_shared_memory_region.cc',
945 ++ 'base/memory/read_only_shared_memory_region.cc',
946 + 'base/memory/ref_counted.cc',
947 + 'base/memory/ref_counted_memory.cc',
948 ++ 'base/memory/shared_memory_mapping.cc',
949 + 'base/memory/shared_memory_handle.cc',
950 + 'base/memory/shared_memory_tracker.cc',
951 + 'base/memory/weak_ptr.cc',
952 +@@ -663,6 +666,19 @@ def write_gn_ninja(path, root_gen_dir, options, windows_x64_toolchain):
953 + 'base/vlog.cc',
954 + ])
955 +
956 ++ if is_win:
957 ++ static_libraries['base']['sources'].extend([
958 ++ 'base/memory/platform_shared_memory_region_win.cc'
959 ++ ])
960 ++ elif is_mac:
961 ++ static_libraries['base']['sources'].extend([
962 ++ 'base/memory/platform_shared_memory_region_mac.cc'
963 ++ ])
964 ++ elif is_posix:
965 ++ static_libraries['base']['sources'].extend([
966 ++ 'base/memory/platform_shared_memory_region_posix.cc'
967 ++ ])
968 ++
969 + if is_posix:
970 + static_libraries['base']['sources'].extend([
971 + 'base/base_paths_posix.cc',
972 +--
973 +2.17.0
974 +