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: Sat, 04 Nov 2017 22:17:22
Message-Id: 1509833829.c3dcda24f479c1b8ddc1183cf76f70e6e34cec15.floppym@gentoo
1 commit: c3dcda24f479c1b8ddc1183cf76f70e6e34cec15
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Sat Nov 4 22:16:21 2017 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Sat Nov 4 22:17:09 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3dcda24
7
8 www-client/chromium: dev channel bump (64.0.3253.3)
9
10 Package-Manager: Portage-2.3.13_p1, Repoman-2.3.3_p81
11
12 www-client/chromium/Manifest | 1 +
13 www-client/chromium/chromium-64.0.3253.3.ebuild | 657 +++++++++++++++++++++
14 .../chromium-64.0.3253.3-gpu_lists_version.h.patch | 11 +
15 .../chromium/files/chromium-math-includes-r0.patch | 31 +
16 4 files changed, 700 insertions(+)
17
18 diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest
19 index f8c252bc881..e967e14dfe8 100644
20 --- a/www-client/chromium/Manifest
21 +++ b/www-client/chromium/Manifest
22 @@ -1,3 +1,4 @@
23 DIST chromium-62.0.3202.75.tar.xz 517136048 SHA256 49cdfe457bcb941b56c13a75bbe2ff394fcb5baa8a49c9b470835fad60dd904c SHA512 1108ac0b383ac654b5b6fb42faee76621d3c476fcf1b6469f498023be7272668f46f7081f74b2a4079ff45dc3c77b225cea7758a11677b0ba5a478e1d8bac87b WHIRLPOOL 0bcb844ec55469ff293672e075dc8bbf4b93809048fc8e5235334dea06e087c91286ba023831ac5254b27241146a06fd33360ef540f6a37cd7092763cc55ab09
24 DIST chromium-63.0.3230.0.tar.xz 558852780 SHA256 97daa90a6f0ba7dc49a168cbf9c40896e621fb0352ab6de1d2fa428bb63ab64a SHA512 b0aa9a42df303bc7ff412dec30b3bfed292ae39cb5e0f705f28eeb7a60d6125b9cecef7e3ab7798b2ca091ec71215fa5639def6b867c9fdb7a9a85c9b42323b3 WHIRLPOOL 1b9e346018c7056fce3f844d37b69e98529c9dc3ae04bdf07378c7de568d295814a42aa133c463a3be8d22a39b5f62ec69f679ea5dca3fe7e37a15215932c794
25 DIST chromium-63.0.3239.30.tar.xz 561111084 SHA256 ab210326029213eda0290db71f6ddbdf5c42e2d94c3461dee094637a34571219 SHA512 b6b89e3464b4dbef54cfe5971255bf4cf96b8c984a2a82d7f4f66e3aecaf5a0a3c72ad827127223b3448c2c2ffad3fe1b1546266ec9544838b758ac3d9b454c8 WHIRLPOOL 1a673b4060cc757e190ea376bb0cff2e8222c91f30a3627ba39b3fed0c534bced213fa3bba06614aacf2814996fb949bb55bd06d549e74f70af7002aa5796ee7
26 +DIST chromium-64.0.3253.3.tar.xz 567976356 SHA256 6abe5b8ea147953c9d8bae72e52b4984f1a0f718e97bc578f0250055815ec4cd SHA512 fd0307337eec5513d73c14a0d8bf494d87e1a658c48585afbf7d0c08314297bf28825ee99bbeab95ccaae8a0e5b1536794c3b4c94f996ba0a4a217cdbc224267 WHIRLPOOL 78a44979475fda90087a164a5fa7e082576d344a103536c4c62cc4f1e4d3b6a4681005b9165ff020aff179bd3b58195c518c1fa32fb5f1e7b95548c5ae28e9cb
27
28 diff --git a/www-client/chromium/chromium-64.0.3253.3.ebuild b/www-client/chromium/chromium-64.0.3253.3.ebuild
29 new file mode 100644
30 index 00000000000..06dc23d68c9
31 --- /dev/null
32 +++ b/www-client/chromium/chromium-64.0.3253.3.ebuild
33 @@ -0,0 +1,657 @@
34 +# Copyright 1999-2017 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 ~arm ~arm64 ~x86"
53 +IUSE="component-build cups gnome-keyring +hangouts kerberos neon pic +proprietary-codecs pulseaudio selinux +suid +system-ffmpeg +system-icu +system-libvpx +tcmalloc widevine"
54 +RESTRICT="!system-ffmpeg? ( proprietary-codecs? ( bindist ) )"
55 +
56 +COMMON_DEPEND="
57 + app-arch/bzip2:=
58 + cups? ( >=net-print/cups-1.3.11:= )
59 + dev-libs/expat:=
60 + dev-libs/glib:2
61 + system-icu? ( >=dev-libs/icu-59:= )
62 + >=dev-libs/libxml2-2.9.4-r3:=[icu]
63 + dev-libs/libxslt:=
64 + dev-libs/nspr:=
65 + >=dev-libs/nss-3.14.3:=
66 + >=dev-libs/re2-0.2016.05.01:=
67 + gnome-keyring? ( >=gnome-base/libgnome-keyring-3.12:= )
68 + >=media-libs/alsa-lib-1.0.19:=
69 + media-libs/fontconfig:=
70 + media-libs/freetype:=
71 + >=media-libs/harfbuzz-1.5.0:=[icu(-)]
72 + media-libs/libjpeg-turbo:=
73 + media-libs/libpng:=
74 + system-libvpx? ( media-libs/libvpx:=[postproc,svc] )
75 + >=media-libs/openh264-1.6.0:=
76 + pulseaudio? ( media-sound/pulseaudio:= )
77 + system-ffmpeg? (
78 + >=media-video/ffmpeg-3:=
79 + || (
80 + media-video/ffmpeg[-samba]
81 + >=net-fs/samba-4.5.10-r1[-debug(-)]
82 + )
83 + !=net-fs/samba-4.5.12
84 + media-libs/opus:=
85 + )
86 + sys-apps/dbus:=
87 + sys-apps/pciutils:=
88 + virtual/udev
89 + x11-libs/cairo:=
90 + x11-libs/gdk-pixbuf:2
91 + x11-libs/gtk+:3[X]
92 + x11-libs/libX11:=
93 + x11-libs/libXcomposite:=
94 + x11-libs/libXcursor:=
95 + x11-libs/libXdamage:=
96 + x11-libs/libXext:=
97 + x11-libs/libXfixes:=
98 + >=x11-libs/libXi-1.6.0:=
99 + x11-libs/libXrandr:=
100 + x11-libs/libXrender:=
101 + x11-libs/libXScrnSaver:=
102 + x11-libs/libXtst:=
103 + x11-libs/pango:=
104 + app-arch/snappy:=
105 + media-libs/flac:=
106 + >=media-libs/libwebp-0.4.0:=
107 + sys-libs/zlib:=[minizip]
108 + kerberos? ( virtual/krb5 )
109 +"
110 +# For nvidia-drivers blocker, see bug #413637 .
111 +RDEPEND="${COMMON_DEPEND}
112 + !=www-client/chromium-9999
113 + !<www-plugins/chrome-binary-plugins-57
114 + x11-misc/xdg-utils
115 + virtual/opengl
116 + virtual/ttf-fonts
117 + selinux? ( sec-policy/selinux-chromium )
118 + tcmalloc? ( !<x11-drivers/nvidia-drivers-331.20 )
119 + widevine? ( www-plugins/chrome-binary-plugins[widevine(-)] )
120 +"
121 +# dev-vcs/git - https://bugs.gentoo.org/593476
122 +# sys-apps/sandbox - https://crbug.com/586444
123 +DEPEND="${COMMON_DEPEND}
124 + >=app-arch/gzip-1.7
125 + !arm? (
126 + dev-lang/yasm
127 + )
128 + dev-lang/perl
129 + >=dev-util/gperf-3.0.3
130 + >=dev-util/ninja-1.7.2
131 + >=net-libs/nodejs-4.6.1
132 + sys-apps/hwids[usb(+)]
133 + >=sys-devel/bison-2.4.3
134 + sys-devel/flex
135 + virtual/pkgconfig
136 + dev-vcs/git
137 + $(python_gen_any_dep '
138 + dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]
139 + >=dev-python/beautifulsoup-4.3.2:4[${PYTHON_USEDEP}]
140 + dev-python/html5lib[${PYTHON_USEDEP}]
141 + dev-python/simplejson[${PYTHON_USEDEP}]
142 + ')
143 +"
144 +
145 +# Keep this in sync with the python_gen_any_dep call.
146 +python_check_deps() {
147 + has_version --host-root "dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]" &&
148 + has_version --host-root ">=dev-python/beautifulsoup-4.3.2:4[${PYTHON_USEDEP}]" &&
149 + has_version --host-root "dev-python/html5lib[${PYTHON_USEDEP}]" &&
150 + has_version --host-root "dev-python/simplejson[${PYTHON_USEDEP}]"
151 +}
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/bitstream-cyberbit
164 +- media-fonts/droid
165 +- media-fonts/ipamonafont
166 +- media-fonts/noto
167 +- media-fonts/ja-ipafonts
168 +- media-fonts/takao-fonts
169 +- media-fonts/wqy-microhei
170 +- media-fonts/wqy-zenhei
171 +
172 +To fix broken icons on the Downloads page, you should install an icon
173 +theme that covers the appropriate MIME types, and configure this as your
174 +GTK+ icon theme.
175 +"
176 +
177 +PATCHES=(
178 + "${FILESDIR}/chromium-widevine-r1.patch"
179 + "${FILESDIR}/chromium-FORTIFY_SOURCE-r2.patch"
180 + "${FILESDIR}/chromium-webrtc-r0.patch"
181 + "${FILESDIR}/chromium-math-includes-r0.patch"
182 + "${FILESDIR}/chromium-${PV}-gpu_lists_version.h.patch"
183 +)
184 +
185 +pre_build_checks() {
186 + if [[ ${MERGE_TYPE} != binary ]]; then
187 + local -x CPP="$(tc-getCXX) -E"
188 + if tc-is-clang && ! version_is_at_least "3.9.1" "$(clang-fullversion)"; then
189 + # bugs: #601654
190 + die "At least clang 3.9.1 is required"
191 + fi
192 + if tc-is-gcc && ! version_is_at_least 5.0 "$(gcc-version)"; then
193 + # bugs: #535730, #525374, #518668, #600288, #627356
194 + die "At least gcc 5.0 is required"
195 + fi
196 + fi
197 +
198 + # Check build requirements, bug #541816 and bug #471810 .
199 + CHECKREQS_MEMORY="3G"
200 + CHECKREQS_DISK_BUILD="5G"
201 + eshopts_push -s extglob
202 + if is-flagq '-g?(gdb)?([1-9])'; then
203 + CHECKREQS_DISK_BUILD="25G"
204 + if ! use component-build; then
205 + CHECKREQS_MEMORY="16G"
206 + fi
207 + fi
208 + eshopts_pop
209 + check-reqs_pkg_setup
210 +}
211 +
212 +pkg_pretend() {
213 + pre_build_checks
214 +}
215 +
216 +pkg_setup() {
217 + pre_build_checks
218 +
219 + # Make sure the build system will use the right python, bug #344367.
220 + python-any-r1_pkg_setup
221 +
222 + chromium_suid_sandbox_check_kernel_config
223 +}
224 +
225 +src_prepare() {
226 + default
227 +
228 + mkdir -p third_party/node/linux/node-linux-x64/bin || die
229 + ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
230 +
231 + local keeplibs=(
232 + base/third_party/dmg_fp
233 + base/third_party/dynamic_annotations
234 + base/third_party/icu
235 + base/third_party/nspr
236 + base/third_party/superfasthash
237 + base/third_party/symbolize
238 + base/third_party/valgrind
239 + base/third_party/xdg_mime
240 + base/third_party/xdg_user_dirs
241 + chrome/third_party/mozilla_security_manager
242 + courgette/third_party
243 + net/third_party/mozilla_security_manager
244 + net/third_party/nss
245 + third_party/WebKit
246 + third_party/analytics
247 + third_party/angle
248 + third_party/angle/src/common/third_party/base
249 + third_party/angle/src/common/third_party/smhasher
250 + third_party/angle/src/third_party/compiler
251 + third_party/angle/src/third_party/libXNVCtrl
252 + third_party/angle/src/third_party/trace_event
253 + third_party/blink
254 + third_party/boringssl
255 + third_party/breakpad
256 + third_party/breakpad/breakpad/src/third_party/curl
257 + third_party/brotli
258 + third_party/cacheinvalidation
259 + third_party/catapult
260 + third_party/catapult/common/py_vulcanize/third_party/rcssmin
261 + third_party/catapult/common/py_vulcanize/third_party/rjsmin
262 + third_party/catapult/third_party/polymer
263 + third_party/catapult/tracing/third_party/d3
264 + third_party/catapult/tracing/third_party/gl-matrix
265 + third_party/catapult/tracing/third_party/jszip
266 + third_party/catapult/tracing/third_party/mannwhitneyu
267 + third_party/catapult/tracing/third_party/oboe
268 + third_party/catapult/tracing/third_party/pako
269 + third_party/ced
270 + third_party/cld_2
271 + third_party/cld_3
272 + third_party/crc32c
273 + third_party/cros_system_api
274 + third_party/devscripts
275 + third_party/dom_distiller_js
276 + third_party/fips181
277 + third_party/flatbuffers
278 + third_party/flot
279 + third_party/freetype
280 + third_party/glslang-angle
281 + third_party/google_input_tools
282 + third_party/google_input_tools/third_party/closure_library
283 + third_party/google_input_tools/third_party/closure_library/third_party/closure
284 + third_party/googletest
285 + third_party/hunspell
286 + third_party/iccjpeg
287 + third_party/inspector_protocol
288 + third_party/jinja2
289 + third_party/jstemplate
290 + third_party/khronos
291 + third_party/leveldatabase
292 + third_party/libXNVCtrl
293 + third_party/libaddressinput
294 + third_party/libjingle
295 + third_party/libphonenumber
296 + third_party/libsecret
297 + third_party/libsrtp
298 + third_party/libudev
299 + third_party/libwebm
300 + third_party/libxml/chromium
301 + third_party/libyuv
302 + third_party/lss
303 + third_party/lzma_sdk
304 + third_party/markupsafe
305 + third_party/mesa
306 + third_party/metrics_proto
307 + third_party/modp_b64
308 + third_party/mt19937ar
309 + third_party/node
310 + third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2
311 + third_party/openmax_dl
312 + third_party/ots
313 + third_party/pdfium
314 + third_party/pdfium/third_party/agg23
315 + third_party/pdfium/third_party/base
316 + third_party/pdfium/third_party/build
317 + third_party/pdfium/third_party/bigint
318 + third_party/pdfium/third_party/freetype
319 + third_party/pdfium/third_party/lcms
320 + third_party/pdfium/third_party/libopenjpeg20
321 + third_party/pdfium/third_party/libpng16
322 + third_party/pdfium/third_party/libtiff
323 + third_party/ply
324 + third_party/polymer
325 + third_party/protobuf
326 + third_party/protobuf/third_party/six
327 + third_party/qcms
328 + third_party/sfntly
329 + third_party/skia
330 + third_party/skia/third_party/gif
331 + third_party/skia/third_party/vulkan
332 + third_party/smhasher
333 + third_party/spirv-headers
334 + third_party/spirv-tools-angle
335 + third_party/sqlite
336 + third_party/swiftshader
337 + third_party/swiftshader/third_party/llvm-subzero
338 + third_party/swiftshader/third_party/subzero
339 + third_party/usrsctp
340 + third_party/vulkan
341 + third_party/vulkan-validation-layers
342 + third_party/web-animations-js
343 + third_party/webdriver
344 + third_party/webrtc
345 + third_party/widevine
346 + third_party/woff2
347 + third_party/zlib/google
348 + url/third_party/mozilla
349 + v8/src/third_party/valgrind
350 + v8/third_party/inspector_protocol
351 +
352 + # gyp -> gn leftovers
353 + base/third_party/libevent
354 + third_party/adobe
355 + third_party/speech-dispatcher
356 + third_party/usb_ids
357 + third_party/xdg-utils
358 + third_party/yasm/run_yasm.py
359 + )
360 + if ! use system-ffmpeg; then
361 + keeplibs+=( third_party/ffmpeg third_party/opus )
362 + fi
363 + if ! use system-icu; then
364 + keeplibs+=( third_party/icu )
365 + fi
366 + if ! use system-libvpx; then
367 + keeplibs+=( third_party/libvpx )
368 + keeplibs+=( third_party/libvpx/source/libvpx/third_party/x86inc )
369 + fi
370 + if use tcmalloc; then
371 + keeplibs+=( third_party/tcmalloc )
372 + fi
373 +
374 + # Remove most bundled libraries. Some are still needed.
375 + build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
376 +}
377 +
378 +bootstrap_gn() {
379 + if tc-is-cross-compiler; then
380 + local -x AR=${BUILD_AR}
381 + local -x CC=${BUILD_CC}
382 + local -x CXX=${BUILD_CXX}
383 + local -x NM=${BUILD_NM}
384 + local -x CFLAGS=${BUILD_CFLAGS}
385 + local -x CXXFLAGS=${BUILD_CXXFLAGS}
386 + local -x LDFLAGS=${BUILD_LDFLAGS}
387 + fi
388 + einfo "Building GN..."
389 + set -- tools/gn/bootstrap/bootstrap.py -s -v --no-clean
390 + echo "$@"
391 + "$@" || die
392 +}
393 +
394 +src_configure() {
395 + local myconf_gn=""
396 +
397 + # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
398 + myconf_gn+=" is_debug=false"
399 +
400 + # Component build isn't generally intended for use by end users. It's mostly useful
401 + # for development and debugging.
402 + myconf_gn+=" is_component_build=$(usex component-build true false)"
403 +
404 + myconf_gn+=" use_allocator=$(usex tcmalloc \"tcmalloc\" \"none\")"
405 +
406 + # Disable nacl, we can't build without pnacl (http://crbug.com/269560).
407 + myconf_gn+=" enable_nacl=false"
408 +
409 + # Use system-provided libraries.
410 + # TODO: freetype (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
411 + # TODO: use_system_hunspell (upstream changes needed).
412 + # TODO: use_system_libsrtp (bug #459932).
413 + # TODO: use_system_protobuf (bug #525560).
414 + # TODO: use_system_ssl (http://crbug.com/58087).
415 + # TODO: use_system_sqlite (http://crbug.com/22208).
416 +
417 + # libevent: https://bugs.gentoo.org/593458
418 + local gn_system_libraries=(
419 + flac
420 + # Need harfbuzz_from_pkgconfig target
421 + #harfbuzz-ng
422 + libdrm
423 + libjpeg
424 + libpng
425 + libwebp
426 + libxml
427 + libxslt
428 + openh264
429 + re2
430 + snappy
431 + yasm
432 + zlib
433 + )
434 + if use system-ffmpeg; then
435 + gn_system_libraries+=( ffmpeg opus )
436 + fi
437 + if use system-icu; then
438 + gn_system_libraries+=( icu )
439 + fi
440 + if use system-libvpx; then
441 + gn_system_libraries+=( libvpx )
442 + fi
443 + build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" || die
444 +
445 + # See dependency logic in third_party/BUILD.gn
446 + myconf_gn+=" use_system_harfbuzz=true"
447 +
448 + # Optional dependencies.
449 + myconf_gn+=" enable_hangout_services_extension=$(usex hangouts true false)"
450 + myconf_gn+=" enable_widevine=$(usex widevine true false)"
451 + myconf_gn+=" use_cups=$(usex cups true false)"
452 + myconf_gn+=" use_gconf=false"
453 + myconf_gn+=" use_gnome_keyring=$(usex gnome-keyring true false)"
454 + myconf_gn+=" use_kerberos=$(usex kerberos true false)"
455 + myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)"
456 +
457 + # TODO: link_pulseaudio=true for GN.
458 +
459 + myconf_gn+=" fieldtrial_testing_like_official_build=true"
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 + # Never use bundled gold binary. Disable gold linker flags for now.
468 + # Do not use bundled clang.
469 + # Trying to use gold results in linker crash.
470 + myconf_gn+=" use_gold=false use_sysroot=false linux_use_bundled_binutils=false use_custom_libcxx=false"
471 +
472 + ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)"
473 + myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)"
474 + myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\""
475 +
476 + # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys .
477 + # Note: these are for Gentoo use ONLY. For your own distribution,
478 + # please get your own set of keys. Feel free to contact chromium@g.o
479 + # for more info.
480 + local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc"
481 + local google_default_client_id="329227923882.apps.googleusercontent.com"
482 + local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu"
483 + myconf_gn+=" google_api_key=\"${google_api_key}\""
484 + myconf_gn+=" google_default_client_id=\"${google_default_client_id}\""
485 + myconf_gn+=" google_default_client_secret=\"${google_default_client_secret}\""
486 +
487 + local myarch="$(tc-arch)"
488 + if [[ $myarch = amd64 ]] ; then
489 + myconf_gn+=" target_cpu=\"x64\""
490 + ffmpeg_target_arch=x64
491 + elif [[ $myarch = x86 ]] ; then
492 + myconf_gn+=" target_cpu=\"x86\""
493 + ffmpeg_target_arch=ia32
494 + elif [[ $myarch = arm64 ]] ; then
495 + myconf_gn+=" target_cpu=\"arm64\""
496 + ffmpeg_target_arch=arm64
497 + elif [[ $myarch = arm ]] ; then
498 + myconf_gn+=" target_cpu=\"arm\""
499 + ffmpeg_target_arch=$(usex neon arm-neon arm)
500 + else
501 + die "Failed to determine target arch, got '$myarch'."
502 + fi
503 +
504 + # Make sure that -Werror doesn't get added to CFLAGS by the build system.
505 + # Depending on GCC version the warnings are different and we don't want
506 + # the build to fail because of that.
507 + myconf_gn+=" treat_warnings_as_errors=false"
508 +
509 + # Disable fatal linker warnings, bug 506268.
510 + myconf_gn+=" fatal_linker_warnings=false"
511 +
512 + # Avoid CFLAGS problems, bug #352457, bug #390147.
513 + if ! use custom-cflags; then
514 + replace-flags "-Os" "-O2"
515 + strip-flags
516 +
517 + # Prevent linker from running out of address space, bug #471810 .
518 + if use x86; then
519 + filter-flags "-g*"
520 + fi
521 +
522 + # Prevent libvpx build failures. Bug 530248, 544702, 546984.
523 + if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then
524 + filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2
525 + fi
526 + fi
527 +
528 + # Make sure the build system will use the right tools, bug #340795.
529 + tc-export AR CC CXX NM
530 +
531 + # Define a custom toolchain for GN
532 + myconf_gn+=" custom_toolchain=\"//build/toolchain/linux/unbundle:default\""
533 +
534 + if tc-is-cross-compiler; then
535 + tc-export BUILD_{AR,CC,CXX,NM}
536 + myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:host\""
537 + myconf_gn+=" v8_snapshot_toolchain=\"//build/toolchain/linux/unbundle:host\""
538 + else
539 + myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:default\""
540 + fi
541 +
542 + # https://bugs.gentoo.org/588596
543 + append-cxxflags $(test-flags-CXX -fno-delete-null-pointer-checks)
544 +
545 + # Bug 491582.
546 + export TMPDIR="${WORKDIR}/temp"
547 + mkdir -p -m 755 "${TMPDIR}" || die
548 +
549 + if ! use system-ffmpeg; then
550 + local build_ffmpeg_args=""
551 + if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then
552 + build_ffmpeg_args+=" --disable-asm"
553 + fi
554 +
555 + # Re-configure bundled ffmpeg. See bug #491378 for example reasons.
556 + einfo "Configuring bundled ffmpeg..."
557 + pushd third_party/ffmpeg > /dev/null || die
558 + chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \
559 + --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die
560 + chromium/scripts/copy_config.sh || die
561 + chromium/scripts/generate_gn.py || die
562 + popd > /dev/null || die
563 + fi
564 +
565 + bootstrap_gn
566 +
567 + einfo "Configuring Chromium..."
568 + set -- out/Release/gn gen --args="${myconf_gn}" out/Release
569 + echo "$@"
570 + "$@" || die
571 +}
572 +
573 +src_compile() {
574 + local ninja_targets="chrome chromedriver"
575 + if use suid; then
576 + ninja_targets+=" chrome_sandbox"
577 + fi
578 +
579 + # Build mksnapshot and pax-mark it.
580 + if tc-is-cross-compiler; then
581 + eninja -C out/Release host/mksnapshot || die
582 + pax-mark m out/Release/host/mksnapshot
583 + else
584 + eninja -C out/Release mksnapshot || die
585 + pax-mark m out/Release/mksnapshot
586 + fi
587 +
588 + # Even though ninja autodetects number of CPUs, we respect
589 + # user's options, for debugging with -j 1 or any other reason.
590 + eninja -C out/Release ${ninja_targets} || die
591 +
592 + pax-mark m out/Release/chrome
593 +}
594 +
595 +src_install() {
596 + local CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser"
597 + exeinto "${CHROMIUM_HOME}"
598 + doexe out/Release/chrome
599 +
600 + if use suid; then
601 + newexe out/Release/chrome_sandbox chrome-sandbox
602 + fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
603 + fi
604 +
605 + doexe out/Release/chromedriver
606 +
607 + local sedargs=( -e "s:/usr/lib/:/usr/$(get_libdir)/:g" )
608 + sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r3.sh" > chromium-launcher.sh || die
609 + doexe chromium-launcher.sh
610 +
611 + # It is important that we name the target "chromium-browser",
612 + # xdg-utils expect it; bug #355517.
613 + dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser
614 + # keep the old symlink around for consistency
615 + dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium
616 +
617 + dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver
618 +
619 + # Allow users to override command-line options, bug #357629.
620 + insinto /etc/chromium
621 + newins "${FILESDIR}/chromium.default" "default"
622 +
623 + pushd out/Release/locales > /dev/null || die
624 + chromium_remove_language_paks
625 + popd
626 +
627 + if use widevine; then
628 + # These will be provided by chrome-binary-plugins
629 + rm out/Release/libwidevinecdm*.so || die
630 + fi
631 +
632 + insinto "${CHROMIUM_HOME}"
633 + doins out/Release/*.bin
634 + doins out/Release/*.pak
635 + doins out/Release/*.so
636 +
637 + if ! use system-icu; then
638 + doins out/Release/icudtl.dat
639 + fi
640 +
641 + doins -r out/Release/locales
642 + doins -r out/Release/resources
643 +
644 + insinto "${CHROMIUM_HOME}/swiftshader"
645 + doins out/Release/swiftshader/*.so
646 +
647 + # Install icons and desktop entry.
648 + local branding size
649 + for size in 16 22 24 32 48 64 128 256 ; do
650 + case ${size} in
651 + 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
652 + *) branding="chrome/app/theme/chromium" ;;
653 + esac
654 + newicon -s ${size} "${branding}/product_logo_${size}.png" \
655 + chromium-browser.png
656 + done
657 +
658 + local mime_types="text/html;text/xml;application/xhtml+xml;"
659 + mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797
660 + mime_types+="x-scheme-handler/ftp;" # bug #412185
661 + mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393
662 + make_desktop_entry \
663 + chromium-browser \
664 + "Chromium" \
665 + chromium-browser \
666 + "Network;WebBrowser" \
667 + "MimeType=${mime_types}\nStartupWMClass=chromium-browser"
668 + sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die
669 +
670 + # Install GNOME default application entry (bug #303100).
671 + insinto /usr/share/gnome-control-center/default-apps
672 + newins "${FILESDIR}"/chromium-browser.xml chromium-browser.xml
673 +
674 + readme.gentoo_create_doc
675 +}
676 +
677 +pkg_preinst() {
678 + gnome2_icon_savelist
679 +}
680 +
681 +pkg_postrm() {
682 + gnome2_icon_cache_update
683 + xdg_desktop_database_update
684 +}
685 +
686 +pkg_postinst() {
687 + gnome2_icon_cache_update
688 + xdg_desktop_database_update
689 + readme.gentoo_print_elog
690 +}
691
692 diff --git a/www-client/chromium/files/chromium-64.0.3253.3-gpu_lists_version.h.patch b/www-client/chromium/files/chromium-64.0.3253.3-gpu_lists_version.h.patch
693 new file mode 100644
694 index 00000000000..c961cb6eaf5
695 --- /dev/null
696 +++ b/www-client/chromium/files/chromium-64.0.3253.3-gpu_lists_version.h.patch
697 @@ -0,0 +1,11 @@
698 +--- /dev/null
699 ++++ a/gpu/config/gpu_lists_version.h
700 +@@ -0,0 +1,8 @@
701 ++/* Generated by lastchange.py, do not edit.*/
702 ++
703 ++#ifndef GPU_CONFIG_GPU_LISTS_VERSION_H_
704 ++#define GPU_CONFIG_GPU_LISTS_VERSION_H_
705 ++
706 ++#define GPU_LISTS_VERSION "0a025c20792ce26a88112a00c936f463f190d394"
707 ++
708 ++#endif // GPU_CONFIG_GPU_LISTS_VERSION_H_
709
710 diff --git a/www-client/chromium/files/chromium-math-includes-r0.patch b/www-client/chromium/files/chromium-math-includes-r0.patch
711 new file mode 100644
712 index 00000000000..4d2cd324c2a
713 --- /dev/null
714 +++ b/www-client/chromium/files/chromium-math-includes-r0.patch
715 @@ -0,0 +1,31 @@
716 +From c6cb5c835e12ffa75e26eaefeef631d125c4e04d Mon Sep 17 00:00:00 2001
717 +From: Philippe Hamel <hamelphi@××××××××.org>
718 +Date: Wed, 1 Nov 2017 18:41:59 +0000
719 +Subject: [PATCH] Fix GenericLogisticRegressionInference includes.
720 +
721 +Bug: 759161
722 +Change-Id: I199c7604eb38fc5a1b8107710eeaa27f8e71b299
723 +Reviewed-on: https://chromium-review.googlesource.com/743690
724 +Commit-Queue: Philippe Hamel <hamelphi@××××××××.org>
725 +Reviewed-by: Roger McFarlane <rogerm@××××××××.org>
726 +Cr-Commit-Position: refs/heads/master@{#513195}
727 +---
728 + .../machine_intelligence/generic_logistic_regression_inference.cc | 2 ++
729 + 1 file changed, 2 insertions(+)
730 +
731 +diff --git a/components/machine_intelligence/generic_logistic_regression_inference.cc b/components/machine_intelligence/generic_logistic_regression_inference.cc
732 +index cf6420b85113..d085f6d1f537 100644
733 +--- a/components/machine_intelligence/generic_logistic_regression_inference.cc
734 ++++ b/components/machine_intelligence/generic_logistic_regression_inference.cc
735 +@@ -4,6 +4,8 @@
736 +
737 + #include "components/machine_intelligence/generic_logistic_regression_inference.h"
738 +
739 ++#include <cmath>
740 ++
741 + #include "base/logging.h"
742 + #include "components/machine_intelligence/ranker_example_util.h"
743 +
744 +--
745 +2.15.0
746 +