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/, www-client/chromium/files/
Date: Fri, 23 Dec 2016 21:24:06
Message-Id: 1482528239.408c8fde8025efb9ac2df6b9e8f7bf8a2facf919.floppym@gentoo
1 commit: 408c8fde8025efb9ac2df6b9e8f7bf8a2facf919
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 23 21:22:22 2016 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 23 21:23:59 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=408c8fde
7
8 www-client/chromium: dev channel bump (57.0.2950.4)
9
10 Package-Manager: Portage-2.3.3_p9, Repoman-2.3.1_p2
11
12 www-client/chromium/Manifest | 1 +
13 www-client/chromium/chromium-57.0.2950.4.ebuild | 632 ++++++++++++++++++++++++
14 www-client/chromium/files/chromium-gn-r11.patch | 50 ++
15 3 files changed, 683 insertions(+)
16
17 diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest
18 index a04d090..c53cfa8 100644
19 --- a/www-client/chromium/Manifest
20 +++ b/www-client/chromium/Manifest
21 @@ -2,3 +2,4 @@ DIST chromium-55.0.2883.75.tar.xz 511256096 SHA256 5bcf7180935bebc7648f7e2577f61
22 DIST chromium-56.0.2924.18.tar.xz 513374276 SHA256 c68089d563348f41f40a606f583489853994adcd6b3329f24a10bf7a3ff292bc SHA512 fac070b0874f334cd874cea4b631f6701766c1bc30b5455daee9284f233fde1ed4f17f0666dc30c7dd6b4116a740a4e146dfdb15708a335a7701dc453c1df392 WHIRLPOOL a707a503daef0b43431ad11944597daabace44f3237ce22342b5f4b2d80c1a0724cbdf8e2fcbef3d7f2d111c4f4130189a423c2764071a7d4cba039225d8f712
23 DIST chromium-56.0.2924.21.tar.xz 513324284 SHA256 08330d147a9340c593ac0255adac30e189e1e9ed99c43d148891058365b4182a SHA512 acfc81177e5fdacc954cdc94b705079b8fdf19a7d90573b38b9a297eeb2d169325f460ce1ec14ea52cfa57782f818d733ece62c8ff313610730881efeba5afb7 WHIRLPOOL cc2ed9362aa5f88d05e884e46897b919020044d7556c5c4217ddd527cf198d84c87d9d48281aa4d4dae94dc06490657fdcf2d9c5653f9eea3a33767e5383eac6
24 DIST chromium-57.0.2946.0.tar.xz 521168352 SHA256 4dc48ad4cd580ab25af4b73d8dff2e9dc1c628f76e4a7c02eb9566829e6289b5 SHA512 846cbba0b7185f9ed766f36922e146bb152173c4d647e87b267074c518974201e158e5dc14c9651ac50189e6fc91653fff08e37bad76c6185cd9c1bd622d2fdc WHIRLPOOL 48ec2028454cf762adfb1d2f44d183772d6267897f3140fbff971c96b5db3dd3722b889d57c28524b335b8e02bae22e7d4d8f945f3cd48caa37c6f0af5b1be5c
25 +DIST chromium-57.0.2950.4.tar.xz 521653320 SHA256 41a56ce7a89bfa0ee47039d18be1889781b78dfde88ad93ef19cabde20c5d8b6 SHA512 333848375a8fbeee0bb9249a1f978caea9800f40a84c149a20263a668a3921eb74ced2d2563bc67ba902838e8865a3b552f9c03e88ff2ce87e6d88807d3fcbaf WHIRLPOOL b9b9e06f766315d17c7414813312fd54fd223a4ab5a0d0ba21604a4e808cb5ad8d63d445fdf879d0f7ab82ebaa83fda0bf6f46433ed5055b999d09ae287d9044
26
27 diff --git a/www-client/chromium/chromium-57.0.2950.4.ebuild b/www-client/chromium/chromium-57.0.2950.4.ebuild
28 new file mode 100644
29 index 00000000..6d58d5c
30 --- /dev/null
31 +++ b/www-client/chromium/chromium-57.0.2950.4.ebuild
32 @@ -0,0 +1,632 @@
33 +# Copyright 1999-2016 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +# $Id$
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 multiprocessing pax-utils portability python-any-r1 readme.gentoo-r1 toolchain-funcs versionator virtualx 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="cups gnome gnome-keyring gtk3 +hangouts kerberos neon pic +proprietary-codecs pulseaudio selinux +suid +system-ffmpeg +tcmalloc widevine"
54 +RESTRICT="!system-ffmpeg? ( proprietary-codecs? ( bindist ) )"
55 +
56 +# Native Client binaries are compiled with different set of flags, bug #452066.
57 +QA_FLAGS_IGNORED=".*\.nexe"
58 +
59 +# Native Client binaries may be stripped by the build system, which uses the
60 +# right tools for it, bug #469144 .
61 +QA_PRESTRIPPED=".*\.nexe"
62 +
63 +# Bundled:
64 +# dev-libs/icu:=
65 +# dev-libs/libxml2:=[icu]
66 +# dev-libs/libxslt:=
67 +# >=media-libs/harfbuzz-1.3.1:=[icu(+)]
68 +COMMON_DEPEND="
69 + app-arch/bzip2:=
70 + cups? ( >=net-print/cups-1.3.11:= )
71 + >=dev-libs/elfutils-0.149
72 + dev-libs/expat:=
73 + dev-libs/glib:=
74 + >=dev-libs/jsoncpp-0.5.0-r1:=
75 + dev-libs/nspr:=
76 + >=dev-libs/nss-3.14.3:=
77 + >=dev-libs/re2-0.2016.05.01:=
78 + gnome? ( >=gnome-base/gconf-2.24.0:= )
79 + gnome-keyring? ( >=gnome-base/libgnome-keyring-3.12:= )
80 + >=media-libs/alsa-lib-1.0.19:=
81 + media-libs/fontconfig:=
82 + media-libs/freetype:=
83 + media-libs/libexif:=
84 + media-libs/libjpeg-turbo:=
85 + media-libs/libpng:=
86 + media-libs/libvpx:=[svc]
87 + media-libs/speex:=
88 + pulseaudio? ( media-sound/pulseaudio:= )
89 + system-ffmpeg? ( >=media-video/ffmpeg-3:= )
90 + sys-apps/dbus:=
91 + sys-apps/pciutils:=
92 + >=sys-libs/libcap-2.22:=
93 + virtual/udev
94 + x11-libs/cairo:=
95 + x11-libs/gdk-pixbuf:=
96 + x11-libs/libdrm
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/libXinerama:=
105 + x11-libs/libXrandr:=
106 + x11-libs/libXrender:=
107 + x11-libs/libXScrnSaver:=
108 + x11-libs/libXtst:=
109 + x11-libs/pango:=
110 + app-arch/snappy:=
111 + media-libs/flac:=
112 + >=media-libs/libwebp-0.4.0:=
113 + sys-libs/zlib:=[minizip]
114 + kerberos? ( virtual/krb5 )
115 +"
116 +# For nvidia-drivers blocker, see bug #413637 .
117 +RDEPEND="${COMMON_DEPEND}
118 + !=www-client/chromium-9999
119 + !<www-plugins/chrome-binary-plugins-37
120 + x11-misc/xdg-utils
121 + virtual/opengl
122 + virtual/ttf-fonts
123 + !gtk3? ( x11-libs/gtk+:2 )
124 + gtk3? ( x11-libs/gtk+:3 )
125 + selinux? ( sec-policy/selinux-chromium )
126 + tcmalloc? ( !<x11-drivers/nvidia-drivers-331.20 )
127 + widevine? ( www-plugins/chrome-binary-plugins[widevine(-)] )
128 +"
129 +# dev-vcs/git - https://bugs.gentoo.org/593476
130 +DEPEND="${COMMON_DEPEND}
131 + >=app-arch/gzip-1.7
132 + !arm? (
133 + dev-lang/yasm
134 + )
135 + dev-lang/perl
136 + dev-perl/JSON
137 + >=dev-util/gperf-3.0.3
138 + dev-util/ninja
139 + sys-apps/hwids[usb(+)]
140 + >=sys-devel/bison-2.4.3
141 + sys-devel/flex
142 + virtual/pkgconfig
143 + dev-vcs/git
144 + x11-libs/gtk+:2
145 + x11-libs/gtk+:3
146 + $(python_gen_any_dep '
147 + dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]
148 + >=dev-python/beautifulsoup-4.3.2:4[${PYTHON_USEDEP}]
149 + dev-python/html5lib[${PYTHON_USEDEP}]
150 + dev-python/jinja[${PYTHON_USEDEP}]
151 + dev-python/ply[${PYTHON_USEDEP}]
152 + dev-python/simplejson[${PYTHON_USEDEP}]
153 + ')
154 +"
155 +
156 +# Keep this in sync with the python_gen_any_dep call.
157 +python_check_deps() {
158 + has_version --host-root "dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]" &&
159 + has_version --host-root ">=dev-python/beautifulsoup-4.3.2:4[${PYTHON_USEDEP}]" &&
160 + has_version --host-root "dev-python/html5lib[${PYTHON_USEDEP}]" &&
161 + has_version --host-root "dev-python/jinja[${PYTHON_USEDEP}]" &&
162 + has_version --host-root "dev-python/ply[${PYTHON_USEDEP}]" &&
163 + has_version --host-root "dev-python/simplejson[${PYTHON_USEDEP}]"
164 +}
165 +
166 +if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
167 + EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
168 +fi
169 +
170 +DISABLE_AUTOFORMATTING="yes"
171 +DOC_CONTENTS="
172 +Some web pages may require additional fonts to display properly.
173 +Try installing some of the following packages if some characters
174 +are not displayed properly:
175 +- media-fonts/arphicfonts
176 +- media-fonts/bitstream-cyberbit
177 +- media-fonts/droid
178 +- media-fonts/ipamonafont
179 +- media-fonts/noto
180 +- media-fonts/ja-ipafonts
181 +- media-fonts/takao-fonts
182 +- media-fonts/wqy-microhei
183 +- media-fonts/wqy-zenhei
184 +
185 +Depending on your desktop environment, you may need
186 +to install additional packages to get icons on the Downloads page.
187 +
188 +For KDE, the required package is kde-frameworks/oxygen-icons.
189 +
190 +For other desktop environments, try one of the following:
191 +- x11-themes/gnome-icon-theme
192 +- x11-themes/tango-icon-theme
193 +"
194 +
195 +PATCHES=(
196 + "${FILESDIR}/${PN}-system-ffmpeg-r4.patch"
197 + "${FILESDIR}/${PN}-system-jinja-r14.patch"
198 + "${FILESDIR}/${PN}-widevine-r1.patch"
199 + "${FILESDIR}/${PN}-gn-r11.patch"
200 +)
201 +
202 +pre_build_checks() {
203 + if [[ ${MERGE_TYPE} != binary ]]; then
204 + if tc-is-gcc && ! version_is_at_least 5 "$(gcc-major-version)"; then
205 + # bugs: #535730, #525374, #518668
206 + die "At least gcc 5 is required"
207 + fi
208 + fi
209 +
210 + # Check build requirements, bug #541816 and bug #471810 .
211 + CHECKREQS_MEMORY="3G"
212 + CHECKREQS_DISK_BUILD="5G"
213 + eshopts_push -s extglob
214 + if is-flagq '-g?(gdb)?([1-9])'; then
215 + CHECKREQS_DISK_BUILD="25G"
216 + fi
217 + eshopts_pop
218 + check-reqs_pkg_setup
219 +}
220 +
221 +pkg_pretend() {
222 + pre_build_checks
223 +}
224 +
225 +pkg_setup() {
226 + pre_build_checks
227 +
228 + # Make sure the build system will use the right python, bug #344367.
229 + python-any-r1_pkg_setup
230 +
231 + chromium_suid_sandbox_check_kernel_config
232 +}
233 +
234 +src_prepare() {
235 + default
236 +
237 + local keeplibs=(
238 + base/third_party/dmg_fp
239 + base/third_party/dynamic_annotations
240 + base/third_party/icu
241 + base/third_party/nspr
242 + base/third_party/superfasthash
243 + base/third_party/symbolize
244 + base/third_party/valgrind
245 + base/third_party/xdg_mime
246 + base/third_party/xdg_user_dirs
247 + breakpad/src/third_party/curl
248 + chrome/third_party/mozilla_security_manager
249 + courgette/third_party
250 + net/third_party/mozilla_security_manager
251 + net/third_party/nss
252 + third_party/WebKit
253 + third_party/analytics
254 + third_party/angle
255 + third_party/angle/src/common/third_party/numerics
256 + third_party/angle/src/third_party/compiler
257 + third_party/angle/src/third_party/libXNVCtrl
258 + third_party/angle/src/third_party/murmurhash
259 + third_party/angle/src/third_party/trace_event
260 + third_party/boringssl
261 + third_party/brotli
262 + third_party/cacheinvalidation
263 + third_party/catapult
264 + third_party/catapult/third_party/polymer
265 + third_party/catapult/third_party/py_vulcanize
266 + third_party/catapult/third_party/py_vulcanize/third_party/rcssmin
267 + third_party/catapult/third_party/py_vulcanize/third_party/rjsmin
268 + third_party/catapult/tracing/third_party/d3
269 + third_party/catapult/tracing/third_party/gl-matrix
270 + third_party/catapult/tracing/third_party/jszip
271 + third_party/catapult/tracing/third_party/mannwhitneyu
272 + third_party/ced
273 + third_party/cld_2
274 + third_party/cld_3
275 + third_party/cros_system_api
276 + third_party/devscripts
277 + third_party/dom_distiller_js
278 + third_party/fips181
279 + third_party/flatbuffers
280 + third_party/flot
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/hunspell
285 + third_party/iccjpeg
286 + third_party/inspector_protocol
287 + third_party/jstemplate
288 + third_party/khronos
289 + third_party/leveldatabase
290 + third_party/libXNVCtrl
291 + third_party/libaddressinput
292 + third_party/libjingle
293 + third_party/libphonenumber
294 + third_party/libsecret
295 + third_party/libsrtp
296 + third_party/libudev
297 + third_party/libusb
298 + third_party/libwebm
299 + third_party/libxml/chromium
300 + third_party/libyuv
301 + third_party/lss
302 + third_party/lzma_sdk
303 + third_party/mesa
304 + third_party/modp_b64
305 + third_party/mt19937ar
306 + third_party/openh264
307 + third_party/openmax_dl
308 + third_party/opus
309 + third_party/ots
310 + third_party/pdfium
311 + third_party/pdfium/third_party/agg23
312 + third_party/pdfium/third_party/base
313 + third_party/pdfium/third_party/bigint
314 + third_party/pdfium/third_party/freetype
315 + third_party/pdfium/third_party/lcms2-2.6
316 + third_party/pdfium/third_party/libjpeg
317 + third_party/pdfium/third_party/libopenjpeg20
318 + third_party/pdfium/third_party/libpng16
319 + third_party/pdfium/third_party/libtiff
320 + third_party/pdfium/third_party/zlib_v128
321 + third_party/polymer
322 + third_party/protobuf
323 + third_party/protobuf/third_party/six
324 + third_party/qcms
325 + third_party/sfntly
326 + third_party/skia
327 + third_party/smhasher
328 + third_party/sqlite
329 + third_party/tcmalloc
330 + third_party/usrsctp
331 + third_party/web-animations-js
332 + third_party/webdriver
333 + third_party/webrtc
334 + third_party/widevine
335 + third_party/woff2
336 + third_party/x86inc
337 + third_party/zlib/google
338 + url/third_party/mozilla
339 + v8/src/third_party/valgrind
340 + v8/third_party/inspector_protocol
341 +
342 + # gyp -> gn leftovers
343 + base/third_party/libevent
344 + third_party/adobe
345 + third_party/speech-dispatcher
346 + third_party/usb_ids
347 + third_party/xdg-utils
348 + third_party/yasm/run_yasm.py
349 +
350 + # M57 bundled
351 + third_party/harfbuzz-ng
352 + third_party/icu
353 + third_party/libxslt
354 + third_party/libxml
355 + )
356 + if ! use system-ffmpeg; then
357 + keeplibs+=( third_party/ffmpeg )
358 + fi
359 +
360 + # Remove most bundled libraries. Some are still needed.
361 + build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
362 +}
363 +
364 +src_configure() {
365 + local myconf_gn=""
366 +
367 + # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
368 + myconf_gn+=" is_debug=false"
369 +
370 + # Disable nacl, we can't build without pnacl (http://crbug.com/269560).
371 + myconf_gn+=" enable_nacl=false"
372 +
373 + # Use system-provided libraries.
374 + # TODO: use_system_hunspell (upstream changes needed).
375 + # TODO: use_system_libsrtp (bug #459932).
376 + # TODO: use_system_libusb (http://crbug.com/266149).
377 + # TODO: use_system_opus (https://code.google.com/p/webrtc/issues/detail?id=3077).
378 + # TODO: use_system_protobuf (bug #525560).
379 + # TODO: use_system_ssl (http://crbug.com/58087).
380 + # TODO: use_system_sqlite (http://crbug.com/22208).
381 +
382 + # libevent: https://bugs.gentoo.org/593458
383 + local gn_system_libraries=(
384 + flac
385 + #harfbuzz-ng
386 + #icu
387 + libjpeg
388 + libpng
389 + libvpx
390 + libwebp
391 + #libxml
392 + #libxslt
393 + re2
394 + snappy
395 + yasm
396 + zlib
397 + )
398 + if use system-ffmpeg; then
399 + gn_system_libraries+=( ffmpeg )
400 + fi
401 + build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" || die
402 +
403 + # Optional dependencies.
404 + myconf_gn+=" enable_hangout_services_extension=$(usex hangouts true false)"
405 + myconf_gn+=" enable_widevine=$(usex widevine true false)"
406 + myconf_gn+=" use_cups=$(usex cups true false)"
407 + myconf_gn+=" use_gconf=$(usex gnome true false)"
408 + myconf_gn+=" use_gnome_keyring=$(usex gnome-keyring true false)"
409 + myconf_gn+=" use_gtk3=$(usex gtk3 true false)"
410 + myconf_gn+=" use_kerberos=$(usex kerberos true false)"
411 + myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)"
412 +
413 + # TODO: link_pulseaudio=true for GN.
414 +
415 + myconf_gn+=" fieldtrial_testing_like_official_build=true"
416 +
417 + if tc-is-clang; then
418 + myconf_gn+=" is_clang=true clang_base_path=\"/usr\" clang_use_chrome_plugins=false"
419 + else
420 + myconf_gn+=" is_clang=false"
421 + fi
422 +
423 + # Never use bundled gold binary. Disable gold linker flags for now.
424 + # Do not use bundled clang.
425 + # Trying to use gold results in linker crash.
426 + myconf_gn+=" use_gold=false use_sysroot=false linux_use_bundled_binutils=false"
427 +
428 + ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)"
429 + myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)"
430 + myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\""
431 +
432 + # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys .
433 + # Note: these are for Gentoo use ONLY. For your own distribution,
434 + # please get your own set of keys. Feel free to contact chromium@g.o
435 + # for more info.
436 + local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc"
437 + local google_default_client_id="329227923882.apps.googleusercontent.com"
438 + local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu"
439 + myconf_gn+=" google_api_key=\"${google_api_key}\""
440 + myconf_gn+=" google_default_client_id=\"${google_default_client_id}\""
441 + myconf_gn+=" google_default_client_secret=\"${google_default_client_secret}\""
442 +
443 + local myarch="$(tc-arch)"
444 + if [[ $myarch = amd64 ]] ; then
445 + target_arch=x64
446 + ffmpeg_target_arch=x64
447 + elif [[ $myarch = x86 ]] ; then
448 + target_arch=ia32
449 + ffmpeg_target_arch=ia32
450 + elif [[ $myarch = arm64 ]] ; then
451 + target_arch=arm64
452 + ffmpeg_target_arch=arm64
453 + elif [[ $myarch = arm ]] ; then
454 + target_arch=arm
455 + ffmpeg_target_arch=$(usex neon arm-neon arm)
456 + else
457 + die "Failed to determine target arch, got '$myarch'."
458 + fi
459 +
460 + # Make sure that -Werror doesn't get added to CFLAGS by the build system.
461 + # Depending on GCC version the warnings are different and we don't want
462 + # the build to fail because of that.
463 + myconf_gn+=" treat_warnings_as_errors=false"
464 +
465 + # Disable fatal linker warnings, bug 506268.
466 + myconf_gn+=" fatal_linker_warnings=false"
467 +
468 + # Avoid CFLAGS problems, bug #352457, bug #390147.
469 + if ! use custom-cflags; then
470 + replace-flags "-Os" "-O2"
471 + strip-flags
472 +
473 + # Prevent linker from running out of address space, bug #471810 .
474 + if use x86; then
475 + filter-flags "-g*"
476 + fi
477 +
478 + # Prevent libvpx build failures. Bug 530248, 544702, 546984.
479 + if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then
480 + filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2
481 + fi
482 + fi
483 +
484 + # Make sure the build system will use the right tools, bug #340795.
485 + tc-export AR CC CXX NM
486 +
487 + # https://bugs.gentoo.org/588596
488 + append-cxxflags $(test-flags-CXX -fno-delete-null-pointer-checks)
489 +
490 + # Define a custom toolchain for GN
491 + myconf_gn+=" custom_toolchain=\"${FILESDIR}/toolchain:default\""
492 +
493 + # Tools for building programs to be executed on the build system, bug #410883.
494 + if tc-is-cross-compiler; then
495 + export AR_host=$(tc-getBUILD_AR)
496 + export CC_host=$(tc-getBUILD_CC)
497 + export CXX_host=$(tc-getBUILD_CXX)
498 + export NM_host=$(tc-getBUILD_NM)
499 + fi
500 +
501 + # Bug 491582.
502 + export TMPDIR="${WORKDIR}/temp"
503 + mkdir -p -m 755 "${TMPDIR}" || die
504 +
505 + if ! use system-ffmpeg; then
506 + local build_ffmpeg_args=""
507 + if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then
508 + build_ffmpeg_args+=" --disable-asm"
509 + fi
510 +
511 + # Re-configure bundled ffmpeg. See bug #491378 for example reasons.
512 + einfo "Configuring bundled ffmpeg..."
513 + pushd third_party/ffmpeg > /dev/null || die
514 + chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \
515 + --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die
516 + chromium/scripts/copy_config.sh || die
517 + chromium/scripts/generate_gn.py || die
518 + popd > /dev/null || die
519 + fi
520 +
521 + third_party/libaddressinput/chromium/tools/update-strings.py || die
522 +
523 + touch chrome/test/data/webui/i18n_process_css_test.html || die
524 +
525 + einfo "Configuring Chromium..."
526 + # TODO: bootstrapped gn binary hangs when using tcmalloc with portage's sandbox.
527 + tools/gn/bootstrap/bootstrap.py -v --gn-gen-args "${myconf_gn} use_allocator=\"none\"" || die
528 + myconf_gn+=" use_allocator=$(usex tcmalloc \"tcmalloc\" \"none\")"
529 + out/Release/gn gen --args="${myconf_gn}" out/Release || die
530 +}
531 +
532 +eninja() {
533 + if [[ -z ${NINJAOPTS+set} ]]; then
534 + local jobs=$(makeopts_jobs)
535 + local loadavg=$(makeopts_loadavg)
536 +
537 + if [[ ${MAKEOPTS} == *-j* && ${jobs} != 999 ]]; then
538 + NINJAOPTS+=" -j ${jobs}"
539 + fi
540 + if [[ ${MAKEOPTS} == *-l* && ${loadavg} != 999 ]]; then
541 + NINJAOPTS+=" -l ${loadavg}"
542 + fi
543 + fi
544 + set -- ninja -v ${NINJAOPTS} "$@"
545 + echo "$@"
546 + "$@"
547 +}
548 +
549 +src_compile() {
550 + local ninja_targets="chrome chromedriver"
551 + if use suid; then
552 + ninja_targets+=" chrome_sandbox"
553 + fi
554 +
555 + # Build mksnapshot and pax-mark it.
556 + eninja -C out/Release mksnapshot || die
557 + pax-mark m out/Release/mksnapshot
558 +
559 + # Even though ninja autodetects number of CPUs, we respect
560 + # user's options, for debugging with -j 1 or any other reason.
561 + eninja -C out/Release ${ninja_targets} || die
562 +
563 + pax-mark m out/Release/chrome
564 +}
565 +
566 +src_install() {
567 + local CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser"
568 + exeinto "${CHROMIUM_HOME}"
569 + doexe out/Release/chrome
570 +
571 + if use suid; then
572 + newexe out/Release/chrome_sandbox chrome-sandbox
573 + fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
574 + fi
575 +
576 + doexe out/Release/chromedriver
577 + use widevine && doexe out/Release/libwidevinecdmadapter.so
578 +
579 + # if ! use arm; then
580 + # doexe out/Release/nacl_helper{,_bootstrap} || die
581 + # insinto "${CHROMIUM_HOME}"
582 + # doins out/Release/nacl_irt_*.nexe || die
583 + # doins out/Release/libppGoogleNaClPluginChrome.so || die
584 + # fi
585 +
586 + local sedargs=( -e "s:/usr/lib/:/usr/$(get_libdir)/:g" )
587 + sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r3.sh" > chromium-launcher.sh || die
588 + doexe chromium-launcher.sh
589 +
590 + # It is important that we name the target "chromium-browser",
591 + # xdg-utils expect it; bug #355517.
592 + dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser
593 + # keep the old symlink around for consistency
594 + dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium
595 +
596 + dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver
597 +
598 + # Allow users to override command-line options, bug #357629.
599 + insinto /etc/chromium
600 + newins "${FILESDIR}/chromium.default" "default"
601 +
602 + pushd out/Release/locales > /dev/null || die
603 + chromium_remove_language_paks
604 + popd
605 +
606 + insinto "${CHROMIUM_HOME}"
607 + doins out/Release/*.bin
608 + doins out/Release/*.pak
609 +
610 + # Needed by bundled icu
611 + doins out/Release/icudtl.dat
612 +
613 + doins -r out/Release/locales
614 + doins -r out/Release/resources
615 +
616 + newman out/Release/chrome.1 chromium.1
617 + newman out/Release/chrome.1 chromium-browser.1
618 +
619 + # Install icons and desktop entry.
620 + local branding size
621 + for size in 16 22 24 32 48 64 128 256 ; do
622 + case ${size} in
623 + 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
624 + *) branding="chrome/app/theme/chromium" ;;
625 + esac
626 + newicon -s ${size} "${branding}/product_logo_${size}.png" \
627 + chromium-browser.png
628 + done
629 +
630 + local mime_types="text/html;text/xml;application/xhtml+xml;"
631 + mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797
632 + mime_types+="x-scheme-handler/ftp;" # bug #412185
633 + mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393
634 + make_desktop_entry \
635 + chromium-browser \
636 + "Chromium" \
637 + chromium-browser \
638 + "Network;WebBrowser" \
639 + "MimeType=${mime_types}\nStartupWMClass=chromium-browser"
640 + sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die
641 +
642 + # Install GNOME default application entry (bug #303100).
643 + if use gnome; then
644 + insinto /usr/share/gnome-control-center/default-apps
645 + newins "${FILESDIR}"/chromium-browser.xml chromium-browser.xml
646 + fi
647 +
648 + readme.gentoo_create_doc
649 +}
650 +
651 +pkg_preinst() {
652 + gnome2_icon_savelist
653 +}
654 +
655 +pkg_postrm() {
656 + gnome2_icon_cache_update
657 + xdg_desktop_database_update
658 +}
659 +
660 +pkg_postinst() {
661 + gnome2_icon_cache_update
662 + xdg_desktop_database_update
663 + readme.gentoo_print_elog
664 +}
665
666 diff --git a/www-client/chromium/files/chromium-gn-r11.patch b/www-client/chromium/files/chromium-gn-r11.patch
667 new file mode 100644
668 index 00000000..af1216e
669 --- /dev/null
670 +++ b/www-client/chromium/files/chromium-gn-r11.patch
671 @@ -0,0 +1,50 @@
672 +From 615f852746f6a8c1331eec32e8352d7cfcd63f76 Mon Sep 17 00:00:00 2001
673 +From: saiarcot895 <saiarcot895@×××××.com>
674 +Date: Mon, 19 Dec 2016 10:35:14 -0800
675 +Subject: [PATCH] Fix GN bootstrap.
676 +
677 +Update list of required files and compile flags.
678 +
679 +BUG=None
680 +
681 +Review-Url: https://codereview.chromium.org/2588003002
682 +Cr-Commit-Position: refs/heads/master@{#439509}
683 +---
684 + tools/gn/bootstrap/bootstrap.py | 7 ++++++-
685 + 1 file changed, 6 insertions(+), 1 deletion(-)
686 +
687 +diff --git a/tools/gn/bootstrap/bootstrap.py b/tools/gn/bootstrap/bootstrap.py
688 +index bfdf0fc1ce64..c3642e8f487c 100755
689 +--- a/tools/gn/bootstrap/bootstrap.py
690 ++++ b/tools/gn/bootstrap/bootstrap.py
691 +@@ -162,7 +162,10 @@ def build_gn_with_ninja_manually(tempdir, options):
692 + {'USE_EXPERIMENTAL_ALLOCATOR_SHIM': 'true' if is_linux else 'false'})
693 +
694 + write_buildflag_header_manually(root_gen_dir, 'base/debug/debugging_flags.h',
695 +- {'ENABLE_PROFILING': 'false'})
696 ++ {
697 ++ 'ENABLE_PROFILING': 'false',
698 ++ 'ENABLE_MEMORY_TASK_PROFILER': 'false'
699 ++ })
700 +
701 + if is_mac:
702 + # //base/build_time.cc needs base/generated_build_date.h,
703 +@@ -402,6 +405,7 @@ def write_gn_ninja(path, root_gen_dir, options):
704 + 'base/memory/ref_counted.cc',
705 + 'base/memory/ref_counted_memory.cc',
706 + 'base/memory/singleton.cc',
707 ++ 'base/memory/shared_memory_helper.cc',
708 + 'base/memory/weak_ptr.cc',
709 + 'base/message_loop/incoming_task_queue.cc',
710 + 'base/message_loop/message_loop.cc',
711 +@@ -456,6 +460,7 @@ def write_gn_ninja(path, root_gen_dir, options):
712 + 'base/task_scheduler/scheduler_worker_pool_impl.cc',
713 + 'base/task_scheduler/scheduler_worker_pool_params.cc',
714 + 'base/task_scheduler/scheduler_worker_stack.cc',
715 ++ 'base/task_scheduler/scoped_set_task_priority_for_current_thread.cc',
716 + 'base/task_scheduler/sequence.cc',
717 + 'base/task_scheduler/sequence_sort_key.cc',
718 + 'base/task_scheduler/task.cc',
719 +--
720 +2.11.0
721 +