Gentoo Archives: gentoo-commits

From: "Paweł Hajdan" <phajdan.jr@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/chromium/files/, www-client/chromium/
Date: Fri, 03 Jun 2016 18:58:55
Message-Id: 1464980289.53bd2b6994bbd70c4d26c5a665138788bf89790c.phajdan.jr@gentoo
1 commit: 53bd2b6994bbd70c4d26c5a665138788bf89790c
2 Author: Pawel Hajdan, Jr <phajdan.jr <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jun 3 18:58:09 2016 +0000
4 Commit: Paweł Hajdan <phajdan.jr <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 3 18:58:09 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53bd2b69
7
8 www-client/chromium: dev channel bump (53.0.2756.0)
9
10 Package-Manager: portage-2.2.26
11
12 www-client/chromium/Manifest | 1 +
13 www-client/chromium/chromium-53.0.2756.0.ebuild | 713 +++++++++++++++++++++
14 .../chromium/files/chromium-system-jinja-r10.patch | 91 +++
15 3 files changed, 805 insertions(+)
16
17 diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest
18 index 0213d4a..af3f23a 100644
19 --- a/www-client/chromium/Manifest
20 +++ b/www-client/chromium/Manifest
21 @@ -2,3 +2,4 @@ DIST chromium-50.0.2661.102.tar.xz 531505652 SHA256 12135ef890c2bd13b653a06e2a44
22 DIST chromium-51.0.2704.63.tar.xz 448628724 SHA256 b243e46e0ebaf8f60d1c37a0d99f1fdd80e1597667be4776a1862bb004e4eee9 SHA512 d85b6adcf2be5082ec8dc51f62849b3a2d84104d225188b7c5441cd3f9bb1e639b8d9b8cfb069b4a42d2f44128111649982fd20ca99b4f4ed5208c2c2c1a9560 WHIRLPOOL 0b3047c1c38386dbc20ef8fd6992e3c1cfc4e92986f5cbbd3e640671763ff5023427d0d8b5a6a6f6604aaeea4e2fa57e4b3f88d8e47e20684e5c774e8407c8fb
23 DIST chromium-52.0.2743.10.tar.xz 457933176 SHA256 9c27e642590a86123bc6abd4d61528927eb982c1ed22f5a7bb22bfad815d7cad SHA512 60302b834702434bff11966dcd5c7a6b7d1c1178a0ca5d65d58051ec0cafd6be301c8f2741298a48c1607466bcec6eb4f5d254480cce25ea3e5742a58d51bd93 WHIRLPOOL b9546216019aa7119f36ce42d873f6882cf3d1198e82134aa5ca4614959f365c7c1b4cf6d500c6637bf4cbe0b08923d1462c22c0a2115854da797c0af0c14ffb
24 DIST chromium-52.0.2743.19.tar.xz 457854724 SHA256 e4149f479bea32142214b07b14912a011278917077e97819fb17fa83540eac16 SHA512 d29638959b8f36e70ce60bffc65b58878e5d607959062847b625d9d6acccfba14e96fbc0cd757b28283dd90bbc1ab336f8da65d4564df26bd86e260aa92cfd7c WHIRLPOOL f48864c796f6a98731de5253daf3d281d6613ada18528358dba9c1de9e86cc14a42f6bd60a5c05c3ddfb826a6eb371c1e5353b9b8e206b24d379225bb439fdbd
25 +DIST chromium-53.0.2756.0.tar.xz 457232644 SHA256 fc5e54267a857277a08653c95ea6a04c012ac92a5f2c2848b7715536e902c107 SHA512 a93dd06100b846eb3222cc9e7b1841798de02fee2eb70807ed68bc7c2da5422e5259f31d5a3741dbc18c9ed34f3d9cd389b078554fc38cf13183d147266e3efd WHIRLPOOL f9ac5cb89c93b5221c8a036751a2fda35ca5bfaed0d1a7c5e142bfea590a35421109e2ee8965e7fb63eecf6fedae373812dcaeafe95e8acba60630246c9482f7
26
27 diff --git a/www-client/chromium/chromium-53.0.2756.0.ebuild b/www-client/chromium/chromium-53.0.2756.0.ebuild
28 new file mode 100644
29 index 0000000..8744ec3
30 --- /dev/null
31 +++ b/www-client/chromium/chromium-53.0.2756.0.ebuild
32 @@ -0,0 +1,713 @@
33 +# Copyright 1999-2016 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +# $Id$
36 +
37 +EAPI="5"
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 eutils flag-o-matic multilib multiprocessing pax-utils \
45 + portability python-any-r1 readme.gentoo-r1 toolchain-funcs versionator virtualx
46 +
47 +DESCRIPTION="Open-source version of Google Chrome web browser"
48 +HOMEPAGE="http://chromium.org/"
49 +SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.xz"
50 +
51 +LICENSE="BSD"
52 +SLOT="0"
53 +KEYWORDS="~amd64 ~arm ~arm64 ~x86"
54 +IUSE="cups gn gnome gnome-keyring gtk3 +hangouts kerberos neon pic +proprietary-codecs pulseaudio selinux +system-ffmpeg +tcmalloc widevine"
55 +RESTRICT="!system-ffmpeg? ( proprietary-codecs? ( bindist ) )"
56 +
57 +# TODO: bootstrapped gn binary hangs when using tcmalloc with portage's sandbox.
58 +REQUIRED_USE="gn? ( gnome-keyring !tcmalloc )"
59 +
60 +# Native Client binaries are compiled with different set of flags, bug #452066.
61 +QA_FLAGS_IGNORED=".*\.nexe"
62 +
63 +# Native Client binaries may be stripped by the build system, which uses the
64 +# right tools for it, bug #469144 .
65 +QA_PRESTRIPPED=".*\.nexe"
66 +
67 +RDEPEND="
68 + app-arch/bzip2:=
69 + cups? ( >=net-print/cups-1.3.11:= )
70 + >=dev-libs/elfutils-0.149
71 + dev-libs/expat:=
72 + dev-libs/glib:=
73 + >=dev-libs/jsoncpp-0.5.0-r1:=
74 + dev-libs/nspr:=
75 + >=dev-libs/nss-3.14.3:=
76 + gnome? ( >=gnome-base/gconf-2.24.0:= )
77 + gnome-keyring? ( >=gnome-base/libgnome-keyring-3.12:= )
78 + >=media-libs/alsa-lib-1.0.19:=
79 + media-libs/fontconfig:=
80 + media-libs/freetype:=
81 + media-libs/libexif:=
82 + media-libs/speex:=
83 + pulseaudio? ( media-sound/pulseaudio:= )
84 + system-ffmpeg? ( >=media-video/ffmpeg-2.7.2:= )
85 + sys-apps/dbus:=
86 + sys-apps/pciutils:=
87 + >=sys-libs/libcap-2.22:=
88 + virtual/udev
89 + x11-libs/cairo:=
90 + x11-libs/gdk-pixbuf:=
91 + gtk3? ( x11-libs/gtk+:3= )
92 + !gtk3? ( x11-libs/gtk+:2= )
93 + x11-libs/libdrm
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/libXinerama:=
102 + x11-libs/libXrandr:=
103 + x11-libs/libXrender:=
104 + x11-libs/libXScrnSaver:=
105 + x11-libs/libXtst:=
106 + x11-libs/pango:=
107 + kerberos? ( virtual/krb5 )
108 + !gn? (
109 + >=app-accessibility/speech-dispatcher-0.8:=
110 + app-arch/snappy:=
111 + >=dev-libs/libevent-1.4.13:=
112 + dev-libs/libxml2:=[icu]
113 + dev-libs/libxslt:=
114 + media-libs/flac:=
115 + >=media-libs/harfbuzz-0.9.41:=[icu(+)]
116 + >=media-libs/libwebp-0.4.0:=
117 + sys-libs/zlib:=[minizip]
118 + )"
119 +DEPEND="${RDEPEND}
120 + !arm? (
121 + dev-lang/yasm
122 + )
123 + dev-lang/perl
124 + dev-perl/JSON
125 + >=dev-util/gperf-3.0.3
126 + dev-util/ninja
127 + sys-apps/hwids[usb(+)]
128 + >=sys-devel/bison-2.4.3
129 + sys-devel/flex
130 + virtual/pkgconfig"
131 +
132 +# For nvidia-drivers blocker, see bug #413637 .
133 +RDEPEND+="
134 + !=www-client/chromium-9999
135 + !<www-plugins/chrome-binary-plugins-37
136 + x11-misc/xdg-utils
137 + virtual/opengl
138 + virtual/ttf-fonts
139 + selinux? ( sec-policy/selinux-chromium )
140 + tcmalloc? ( !<x11-drivers/nvidia-drivers-331.20 )
141 + widevine? ( www-plugins/chrome-binary-plugins[widevine(-)] )"
142 +
143 +# Python dependencies. The DEPEND part needs to be kept in sync
144 +# with python_check_deps.
145 +DEPEND+=" $(python_gen_any_dep '
146 + dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]
147 + dev-python/beautifulsoup:4[${PYTHON_USEDEP}]
148 + dev-python/html5lib[${PYTHON_USEDEP}]
149 + dev-python/jinja[${PYTHON_USEDEP}]
150 + dev-python/ply[${PYTHON_USEDEP}]
151 + dev-python/simplejson[${PYTHON_USEDEP}]
152 +')"
153 +python_check_deps() {
154 + has_version --host-root "dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]" &&
155 + has_version --host-root "dev-python/beautifulsoup:4[${PYTHON_USEDEP}]" &&
156 + has_version --host-root "dev-python/html5lib[${PYTHON_USEDEP}]" &&
157 + has_version --host-root "dev-python/jinja[${PYTHON_USEDEP}]" &&
158 + has_version --host-root "dev-python/ply[${PYTHON_USEDEP}]" &&
159 + has_version --host-root "dev-python/simplejson[${PYTHON_USEDEP}]"
160 +}
161 +
162 +if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
163 + EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
164 +fi
165 +
166 +DISABLE_AUTOFORMATTING="yes"
167 +DOC_CONTENTS="
168 +Some web pages may require additional fonts to display properly.
169 +Try installing some of the following packages if some characters
170 +are not displayed properly:
171 +- media-fonts/arphicfonts
172 +- media-fonts/bitstream-cyberbit
173 +- media-fonts/droid
174 +- media-fonts/ipamonafont
175 +- media-fonts/ja-ipafonts
176 +- media-fonts/takao-fonts
177 +- media-fonts/wqy-microhei
178 +- media-fonts/wqy-zenhei
179 +
180 +Depending on your desktop environment, you may need
181 +to install additional packages to get icons on the Downloads page.
182 +
183 +For KDE, the required package is kde-frameworks/oxygen-icons.
184 +
185 +For other desktop environments, try one of the following:
186 +- x11-themes/gnome-icon-theme
187 +- x11-themes/tango-icon-theme
188 +"
189 +
190 +pkg_pretend() {
191 + if [[ $(tc-getCC)$ == *gcc* ]] && \
192 + [[ $(gcc-major-version)$(gcc-minor-version) -lt 48 ]]; then
193 + die 'At least gcc 4.8 is required, see bugs: #535730, #525374, #518668.'
194 + fi
195 +
196 + # Check build requirements, bug #541816 and bug #471810 .
197 + CHECKREQS_MEMORY="3G"
198 + CHECKREQS_DISK_BUILD="5G"
199 + eshopts_push -s extglob
200 + if is-flagq '-g?(gdb)?([1-9])'; then
201 + CHECKREQS_DISK_BUILD="25G"
202 + fi
203 + eshopts_pop
204 + check-reqs_pkg_pretend
205 +}
206 +
207 +pkg_setup() {
208 + if [[ "${SLOT}" == "0" ]]; then
209 + CHROMIUM_SUFFIX=""
210 + else
211 + CHROMIUM_SUFFIX="-${SLOT}"
212 + fi
213 + CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser${CHROMIUM_SUFFIX}"
214 +
215 + # Make sure the build system will use the right python, bug #344367.
216 + python-any-r1_pkg_setup
217 +
218 + chromium_suid_sandbox_check_kernel_config
219 +}
220 +
221 +src_prepare() {
222 + epatch "${FILESDIR}/${PN}-system-ffmpeg-r2.patch"
223 + epatch "${FILESDIR}/${PN}-system-jinja-r10.patch"
224 + epatch "${FILESDIR}/${PN}-widevine-r1.patch"
225 + epatch "${FILESDIR}/${PN}-last-commit-position-r0.patch"
226 + epatch "${FILESDIR}/${PN}-system-zlib-r0.patch"
227 + epatch "${FILESDIR}/${PN}-linker-warnings-r0.patch"
228 +
229 + epatch_user
230 +
231 + local conditional_bundled_libraries=""
232 + if ! use system-ffmpeg; then
233 + conditional_bundled_libraries+=" third_party/ffmpeg"
234 + fi
235 + if use gn; then
236 + conditional_bundled_libraries+="
237 + base/third_party/libevent
238 + third_party/adobe
239 + third_party/speech-dispatcher
240 + third_party/usb_ids
241 + third_party/xdg-utils
242 + third_party/yasm/run_yasm.py
243 + "
244 + fi
245 +
246 + # Remove most bundled libraries. Some are still needed.
247 + build/linux/unbundle/remove_bundled_libraries.py \
248 + ${conditional_bundled_libraries} \
249 + 'base/third_party/dmg_fp' \
250 + 'base/third_party/dynamic_annotations' \
251 + 'base/third_party/icu' \
252 + 'base/third_party/nspr' \
253 + 'base/third_party/superfasthash' \
254 + 'base/third_party/symbolize' \
255 + 'base/third_party/valgrind' \
256 + 'base/third_party/xdg_mime' \
257 + 'base/third_party/xdg_user_dirs' \
258 + 'breakpad/src/third_party/curl' \
259 + 'chrome/third_party/mozilla_security_manager' \
260 + 'courgette/third_party' \
261 + 'net/third_party/mozilla_security_manager' \
262 + 'net/third_party/nss' \
263 + 'third_party/WebKit' \
264 + 'third_party/analytics' \
265 + 'third_party/angle' \
266 + 'third_party/angle/src/third_party/compiler' \
267 + 'third_party/angle/src/third_party/libXNVCtrl' \
268 + 'third_party/angle/src/third_party/murmurhash' \
269 + 'third_party/angle/src/third_party/trace_event' \
270 + 'third_party/boringssl' \
271 + 'third_party/brotli' \
272 + 'third_party/cacheinvalidation' \
273 + 'third_party/catapult' \
274 + 'third_party/catapult/third_party/py_vulcanize' \
275 + 'third_party/catapult/third_party/py_vulcanize/third_party/rcssmin' \
276 + 'third_party/catapult/third_party/py_vulcanize/third_party/rjsmin' \
277 + 'third_party/catapult/tracing/third_party/components/polymer' \
278 + 'third_party/catapult/tracing/third_party/d3' \
279 + 'third_party/catapult/tracing/third_party/gl-matrix' \
280 + 'third_party/catapult/tracing/third_party/jszip' \
281 + 'third_party/cld_2' \
282 + 'third_party/cros_system_api' \
283 + 'third_party/cython/python_flags.py' \
284 + 'third_party/devscripts' \
285 + 'third_party/dom_distiller_js' \
286 + 'third_party/dom_distiller_js/dist/proto_gen/third_party/dom_distiller_js' \
287 + 'third_party/fips181' \
288 + 'third_party/flot' \
289 + 'third_party/google_input_tools' \
290 + 'third_party/google_input_tools/third_party/closure_library' \
291 + 'third_party/google_input_tools/third_party/closure_library/third_party/closure' \
292 + 'third_party/hunspell' \
293 + 'third_party/iccjpeg' \
294 + 'third_party/icu' \
295 + 'third_party/jstemplate' \
296 + 'third_party/khronos' \
297 + 'third_party/leveldatabase' \
298 + 'third_party/libXNVCtrl' \
299 + 'third_party/libaddressinput' \
300 + 'third_party/libjingle' \
301 + 'third_party/libjpeg_turbo' \
302 + 'third_party/libphonenumber' \
303 + 'third_party/libpng' \
304 + 'third_party/libsecret' \
305 + 'third_party/libsrtp' \
306 + 'third_party/libudev' \
307 + 'third_party/libusb' \
308 + 'third_party/libvpx' \
309 + 'third_party/libvpx/source/libvpx/third_party/x86inc' \
310 + 'third_party/libwebm' \
311 + 'third_party/libxml/chromium' \
312 + 'third_party/libyuv' \
313 + 'third_party/lss' \
314 + 'third_party/lzma_sdk' \
315 + 'third_party/mesa' \
316 + 'third_party/modp_b64' \
317 + 'third_party/mt19937ar' \
318 + 'third_party/openh264' \
319 + 'third_party/openmax_dl' \
320 + 'third_party/opus' \
321 + 'third_party/ots' \
322 + 'third_party/pdfium' \
323 + 'third_party/pdfium/third_party/agg23' \
324 + 'third_party/pdfium/third_party/base' \
325 + 'third_party/pdfium/third_party/bigint' \
326 + 'third_party/pdfium/third_party/freetype' \
327 + 'third_party/pdfium/third_party/lcms2-2.6' \
328 + 'third_party/pdfium/third_party/libjpeg' \
329 + 'third_party/pdfium/third_party/libopenjpeg20' \
330 + 'third_party/pdfium/third_party/libpng16' \
331 + 'third_party/pdfium/third_party/libtiff' \
332 + 'third_party/pdfium/third_party/zlib_v128' \
333 + 'third_party/polymer' \
334 + 'third_party/protobuf' \
335 + 'third_party/protobuf/third_party/six' \
336 + 'third_party/qcms' \
337 + 'third_party/re2' \
338 + 'third_party/sfntly' \
339 + 'third_party/skia' \
340 + 'third_party/smhasher' \
341 + 'third_party/sqlite' \
342 + 'third_party/tcmalloc' \
343 + 'third_party/usrsctp' \
344 + 'third_party/web-animations-js' \
345 + 'third_party/webdriver' \
346 + 'third_party/webrtc' \
347 + 'third_party/widevine' \
348 + 'third_party/woff2' \
349 + 'third_party/x86inc' \
350 + 'third_party/zlib/google' \
351 + 'url/third_party/mozilla' \
352 + 'v8/src/third_party/fdlibm' \
353 + 'v8/src/third_party/valgrind' \
354 + --do-remove || die
355 +}
356 +
357 +src_configure() {
358 + local myconf_gyp=""
359 + local myconf_gn=""
360 +
361 + # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
362 + myconf_gn+=" is_debug=false"
363 +
364 + # Never tell the build system to "enable" SSE2, it has a few unexpected
365 + # additions, bug #336871.
366 + myconf_gyp+=" -Ddisable_sse2=1"
367 +
368 + # Disable nacl, we can't build without pnacl (http://crbug.com/269560).
369 + myconf_gyp+=" -Ddisable_nacl=1"
370 + myconf_gn+=" enable_nacl=false"
371 +
372 + # Make it possible to remove third_party/adobe.
373 + echo > "${T}/flapper_version.h" || die
374 + myconf_gyp+=" -Dflapper_version_h_file=${T}/flapper_version.h"
375 +
376 + # Use system-provided libraries.
377 + # TODO: use_system_hunspell (upstream changes needed).
378 + # TODO: use_system_icu (bug #576370).
379 + # TODO: use_system_libjpeg (bug #584518).
380 + # TODO: use_system_libpng (bug #578212).
381 + # TODO: use_system_libsrtp (bug #459932).
382 + # TODO: use_system_libusb (http://crbug.com/266149).
383 + # TODO: use_system_libvpx (http://crbug.com/494939).
384 + # TODO: use_system_opus (https://code.google.com/p/webrtc/issues/detail?id=3077).
385 + # TODO: use_system_protobuf (bug #525560).
386 + # TODO: use_system_re2 (bug #571156).
387 + # TODO: use_system_ssl (http://crbug.com/58087).
388 + # TODO: use_system_sqlite (http://crbug.com/22208).
389 + myconf_gyp+="
390 + -Duse_system_bzip2=1
391 + -Duse_system_ffmpeg=$(usex system-ffmpeg 1 0)
392 + -Duse_system_flac=1
393 + -Duse_system_harfbuzz=1
394 + -Duse_system_jsoncpp=1
395 + -Duse_system_libevent=1
396 + -Duse_system_libwebp=1
397 + -Duse_system_libxml=1
398 + -Duse_system_libxslt=1
399 + -Duse_system_minizip=1
400 + -Duse_system_nspr=1
401 + -Duse_system_snappy=1
402 + -Duse_system_speex=1
403 + -Duse_system_xdg_utils=1
404 + -Duse_system_zlib=1"
405 +
406 + local gn_system_libraries="
407 + flac
408 + harfbuzz-ng
409 + libevent
410 + libwebp
411 + libxml
412 + libxslt
413 + snappy
414 + yasm
415 + zlib"
416 + if use system-ffmpeg; then
417 + gn_system_libraries+=" ffmpeg"
418 + fi
419 + build/linux/unbundle/replace_gn_files.py --system-libraries ${gn_system_libraries} || die
420 +
421 + # Needed for system icu - we don't need additional data files.
422 + # myconf_gyp+=" -Dicu_use_data_file_flag=0"
423 +
424 + # TODO: patch gyp so that this arm conditional is not needed.
425 + if ! use arm; then
426 + myconf_gyp+="
427 + -Duse_system_yasm=1"
428 + fi
429 +
430 + # Optional dependencies.
431 + # TODO: linux_link_kerberos, bug #381289.
432 + myconf_gyp+="
433 + $(gyp_use cups)
434 + $(gyp_use gnome use_gconf)
435 + $(gyp_use gnome-keyring use_gnome_keyring)
436 + $(gyp_use gnome-keyring linux_link_gnome_keyring)
437 + $(gyp_use gtk3)
438 + $(gyp_use hangouts enable_hangout_services_extension)
439 + $(gyp_use kerberos)
440 + $(gyp_use pulseaudio)
441 + $(gyp_use tcmalloc use_allocator tcmalloc none)
442 + $(gyp_use widevine enable_widevine)"
443 +
444 + # TODO: support USE=gnome-keyring for GN
445 + myconf_gn+=" enable_hangout_services_extension=$(usex hangouts true false)"
446 + myconf_gn+=" enable_widevine=$(usex widevine true false)"
447 + myconf_gn+=" use_allocator=$(usex tcmalloc \"tcmalloc\" \"none\")"
448 + myconf_gn+=" use_cups=$(usex cups true false)"
449 + myconf_gn+=" use_gconf=$(usex gnome true false)"
450 + myconf_gn+=" use_gtk3=$(usex gtk3 true false)"
451 + myconf_gn+=" use_kerberos=$(usex kerberos true false)"
452 + myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)"
453 +
454 + # Use explicit library dependencies instead of dlopen.
455 + # This makes breakages easier to detect by revdep-rebuild.
456 + myconf_gyp+="
457 + -Dlinux_link_gsettings=1
458 + -Dlinux_link_libpci=1
459 + -Dlinux_link_libspeechd=1
460 + -Dlibspeechd_h_prefix=speech-dispatcher/"
461 +
462 + # TODO: link_pulseaudio=true for GN.
463 +
464 + # TODO: use the file at run time instead of effectively compiling it in.
465 + myconf_gyp+="
466 + -Dusb_ids_path=/usr/share/misc/usb.ids"
467 +
468 + myconf_gyp+=" -Dfieldtrial_testing_like_official_build=1"
469 + myconf_gn+=" fieldtrial_testing_like_official_build=true"
470 +
471 + if [[ $(tc-getCC) == *clang* ]]; then
472 + myconf_gyp+=" -Dclang=1"
473 + myconf_gn+=" is_clang=true"
474 + else
475 + myconf_gyp+=" -Dclang=0"
476 + myconf_gn+=" is_clang=false"
477 + fi
478 +
479 + # Never use bundled gold binary. Disable gold linker flags for now.
480 + # Do not use bundled clang.
481 + myconf_gyp+="
482 + -Dclang_use_chrome_plugins=0
483 + -Dhost_clang=0
484 + -Dlinux_use_bundled_binutils=0
485 + -Dlinux_use_bundled_gold=0
486 + -Dlinux_use_gold_flags=0
487 + -Dsysroot="
488 + myconf_gn+=" use_sysroot=false"
489 +
490 + ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)"
491 + myconf_gyp+=" -Dproprietary_codecs=1 -Dffmpeg_branding=${ffmpeg_branding}"
492 + myconf_gn+=" proprietary_codecs=true ffmpeg_branding=\"${ffmpeg_branding}\""
493 +
494 + # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys .
495 + # Note: these are for Gentoo use ONLY. For your own distribution,
496 + # please get your own set of keys. Feel free to contact chromium@g.o
497 + # for more info.
498 + local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc"
499 + local google_default_client_id="329227923882.apps.googleusercontent.com"
500 + local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu"
501 + myconf_gyp+=" -Dgoogle_api_key=${google_api_key}
502 + -Dgoogle_default_client_id=${google_default_client_id}
503 + -Dgoogle_default_client_secret=${google_default_client_secret}"
504 + myconf_gn+=" google_api_key=\"${google_api_key}\""
505 + myconf_gn+=" google_default_client_id=\"${google_default_client_id}\""
506 + myconf_gn+=" google_default_client_secret=\"${google_default_client_secret}\""
507 +
508 + local myarch="$(tc-arch)"
509 + if [[ $myarch = amd64 ]] ; then
510 + target_arch=x64
511 + ffmpeg_target_arch=x64
512 + elif [[ $myarch = x86 ]] ; then
513 + target_arch=ia32
514 + ffmpeg_target_arch=ia32
515 + elif [[ $myarch = arm64 ]] ; then
516 + target_arch=arm64
517 + ffmpeg_target_arch=arm64
518 + elif [[ $myarch = arm ]] ; then
519 + target_arch=arm
520 + ffmpeg_target_arch=$(usex neon arm-neon arm)
521 + # TODO: re-enable NaCl (NativeClient).
522 + local CTARGET=${CTARGET:-${CHOST}}
523 + if [[ $(tc-is-softfloat) == "no" ]]; then
524 +
525 + myconf_gyp+=" -Darm_float_abi=hard"
526 + fi
527 + filter-flags "-mfpu=*"
528 + use neon || myconf_gyp+=" -Darm_fpu=${ARM_FPU:-vfpv3-d16}"
529 +
530 + if [[ ${CTARGET} == armv[78]* ]]; then
531 + myconf_gyp+=" -Darmv7=1"
532 + else
533 + myconf_gyp+=" -Darmv7=0"
534 + fi
535 + myconf_gyp+=" -Dsysroot=
536 + $(gyp_use neon arm_neon)
537 + -Ddisable_nacl=1"
538 + else
539 + die "Failed to determine target arch, got '$myarch'."
540 + fi
541 +
542 + myconf_gyp+=" -Dtarget_arch=${target_arch}"
543 +
544 + # Make sure that -Werror doesn't get added to CFLAGS by the build system.
545 + # Depending on GCC version the warnings are different and we don't want
546 + # the build to fail because of that.
547 + myconf_gyp+=" -Dwerror="
548 + myconf_gn+=" treat_warnings_as_errors=false"
549 +
550 + # Disable fatal linker warnings, bug 506268.
551 + myconf_gyp+=" -Ddisable_fatal_linker_warnings=1"
552 +
553 + # Avoid CFLAGS problems, bug #352457, bug #390147.
554 + if ! use custom-cflags; then
555 + replace-flags "-Os" "-O2"
556 + strip-flags
557 +
558 + # Prevent linker from running out of address space, bug #471810 .
559 + if use x86; then
560 + filter-flags "-g*"
561 + fi
562 +
563 + # Prevent libvpx build failures. Bug 530248, 544702, 546984.
564 + if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then
565 + filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2
566 + fi
567 + fi
568 +
569 + # Make sure the build system will use the right tools, bug #340795.
570 + tc-export AR CC CXX NM
571 +
572 + # Tools for building programs to be executed on the build system, bug #410883.
573 + if tc-is-cross-compiler; then
574 + export AR_host=$(tc-getBUILD_AR)
575 + export CC_host=$(tc-getBUILD_CC)
576 + export CXX_host=$(tc-getBUILD_CXX)
577 + export NM_host=$(tc-getBUILD_NM)
578 + fi
579 +
580 + # Bug 491582.
581 + export TMPDIR="${WORKDIR}/temp"
582 + mkdir -p -m 755 "${TMPDIR}" || die
583 +
584 + if ! use system-ffmpeg; then
585 + local build_ffmpeg_args=""
586 + if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then
587 + build_ffmpeg_args+=" --disable-asm"
588 + fi
589 +
590 + # Re-configure bundled ffmpeg. See bug #491378 for example reasons.
591 + einfo "Configuring bundled ffmpeg..."
592 + pushd third_party/ffmpeg > /dev/null || die
593 + chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \
594 + --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die
595 + chromium/scripts/copy_config.sh || die
596 + chromium/scripts/generate_gyp.py || die
597 + popd > /dev/null || die
598 + fi
599 +
600 + third_party/libaddressinput/chromium/tools/update-strings.py || die
601 +
602 + touch chrome/test/data/webui/i18n_process_css_test.html || die
603 +
604 + einfo "Configuring Chromium..."
605 + if use gn; then
606 + tools/gn/bootstrap/bootstrap.py -v --gn-gen-args "${myconf_gn}" || die
607 + out/Release/gn gen --args="${myconf_gn}" out/Release || die
608 + else
609 + build/linux/unbundle/replace_gyp_files.py ${myconf_gyp} || die
610 + egyp_chromium ${myconf_gyp} || die
611 + fi
612 +}
613 +
614 +eninja() {
615 + if [[ -z ${NINJAOPTS+set} ]]; then
616 + local jobs=$(makeopts_jobs)
617 + local loadavg=$(makeopts_loadavg)
618 +
619 + if [[ ${MAKEOPTS} == *-j* && ${jobs} != 999 ]]; then
620 + NINJAOPTS+=" -j ${jobs}"
621 + fi
622 + if [[ ${MAKEOPTS} == *-l* && ${loadavg} != 999 ]]; then
623 + NINJAOPTS+=" -l ${loadavg}"
624 + fi
625 + fi
626 + set -- ninja -v ${NINJAOPTS} "$@"
627 + echo "$@"
628 + "$@"
629 +}
630 +
631 +src_compile() {
632 + local ninja_targets="chrome chrome_sandbox chromedriver"
633 +
634 + if ! use gn; then
635 + # Build mksnapshot and pax-mark it.
636 + eninja -C out/Release mksnapshot || die
637 + pax-mark m out/Release/mksnapshot
638 + fi
639 +
640 + # Even though ninja autodetects number of CPUs, we respect
641 + # user's options, for debugging with -j 1 or any other reason.
642 + eninja -C out/Release ${ninja_targets} || die
643 +
644 + pax-mark m out/Release/chrome
645 +}
646 +
647 +src_install() {
648 + exeinto "${CHROMIUM_HOME}"
649 + doexe out/Release/chrome || die
650 +
651 + newexe out/Release/chrome_sandbox chrome-sandbox || die
652 + fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
653 +
654 + doexe out/Release/chromedriver || die
655 + use widevine && doexe out/Release/libwidevinecdmadapter.so
656 +
657 + # if ! use arm; then
658 + # doexe out/Release/nacl_helper{,_bootstrap} || die
659 + # insinto "${CHROMIUM_HOME}"
660 + # doins out/Release/nacl_irt_*.nexe || die
661 + # doins out/Release/libppGoogleNaClPluginChrome.so || die
662 + # fi
663 +
664 + local sedargs=( -e "s:/usr/lib/:/usr/$(get_libdir)/:g" )
665 + if [[ -n ${CHROMIUM_SUFFIX} ]]; then
666 + sedargs+=(
667 + -e "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g"
668 + -e "s:chromium.desktop:chromium${CHROMIUM_SUFFIX}.desktop:g"
669 + -e "s:plugins:plugins --user-data-dir=\${HOME}/.config/chromium${CHROMIUM_SUFFIX}:"
670 + )
671 + fi
672 + sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r3.sh" > chromium-launcher.sh || die
673 + doexe chromium-launcher.sh
674 +
675 + # It is important that we name the target "chromium-browser",
676 + # xdg-utils expect it; bug #355517.
677 + dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser${CHROMIUM_SUFFIX} || die
678 + # keep the old symlink around for consistency
679 + dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium${CHROMIUM_SUFFIX} || die
680 +
681 + dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver${CHROMIUM_SUFFIX} || die
682 +
683 + # Allow users to override command-line options, bug #357629.
684 + dodir /etc/chromium || die
685 + insinto /etc/chromium
686 + newins "${FILESDIR}/chromium.default" "default" || die
687 +
688 + pushd out/Release/locales > /dev/null || die
689 + chromium_remove_language_paks
690 + popd
691 +
692 + insinto "${CHROMIUM_HOME}"
693 + doins out/Release/*.bin || die
694 + doins out/Release/*.pak || die
695 +
696 + doins out/Release/icudtl.dat || die
697 +
698 + doins -r out/Release/locales || die
699 + doins -r out/Release/resources || die
700 +
701 + newman out/Release/chrome.1 chromium${CHROMIUM_SUFFIX}.1 || die
702 + newman out/Release/chrome.1 chromium-browser${CHROMIUM_SUFFIX}.1 || die
703 +
704 + # Install icons and desktop entry.
705 + local branding size
706 + for size in 16 22 24 32 48 64 128 256 ; do
707 + case ${size} in
708 + 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
709 + *) branding="chrome/app/theme/chromium" ;;
710 + esac
711 + newicon -s ${size} "${branding}/product_logo_${size}.png" \
712 + chromium-browser${CHROMIUM_SUFFIX}.png
713 + done
714 +
715 + local mime_types="text/html;text/xml;application/xhtml+xml;"
716 + mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797
717 + mime_types+="x-scheme-handler/ftp;" # bug #412185
718 + mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393
719 + make_desktop_entry \
720 + chromium-browser${CHROMIUM_SUFFIX} \
721 + "Chromium${CHROMIUM_SUFFIX}" \
722 + chromium-browser${CHROMIUM_SUFFIX} \
723 + "Network;WebBrowser" \
724 + "MimeType=${mime_types}\nStartupWMClass=chromium-browser"
725 + sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die
726 +
727 + # Install GNOME default application entry (bug #303100).
728 + if use gnome; then
729 + dodir /usr/share/gnome-control-center/default-apps || die
730 + insinto /usr/share/gnome-control-center/default-apps
731 + newins "${FILESDIR}"/chromium-browser.xml chromium-browser${CHROMIUM_SUFFIX}.xml || die
732 + if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then
733 + sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" -i \
734 + "${ED}"/usr/share/gnome-control-center/default-apps/chromium-browser${CHROMIUM_SUFFIX}.xml
735 + fi
736 + fi
737 +
738 + readme.gentoo_create_doc
739 +}
740 +
741 +pkg_postinst() {
742 + fdo-mime_desktop_database_update
743 + gnome2_icon_cache_update
744 + readme.gentoo_print_elog
745 +}
746
747 diff --git a/www-client/chromium/files/chromium-system-jinja-r10.patch b/www-client/chromium/files/chromium-system-jinja-r10.patch
748 new file mode 100644
749 index 0000000..ee00b60
750 --- /dev/null
751 +++ b/www-client/chromium/files/chromium-system-jinja-r10.patch
752 @@ -0,0 +1,91 @@
753 +--- third_party/WebKit/Source/bindings/scripts/scripts.gyp.orig 2014-08-19 09:55:10.330972228 +0000
754 ++++ third_party/WebKit/Source/bindings/scripts/scripts.gyp 2014-08-19 09:55:26.387286232 +0000
755 +@@ -54,7 +54,6 @@
756 + 'actions': [{
757 + 'action_name': 'cache_jinja_templates',
758 + 'inputs': [
759 +- '<@(jinja_module_files)',
760 + 'code_generator_v8.py',
761 + '<@(code_generator_template_files)',
762 + ],
763 +--- third_party/WebKit/Source/build/scripts/scripts.gypi.orig 2014-08-19 10:00:00.216521733 +0000
764 ++++ third_party/WebKit/Source/build/scripts/scripts.gypi 2014-08-19 10:00:11.464735099 +0000
765 +@@ -2,10 +2,6 @@
766 + {
767 + 'variables': {
768 + 'scripts_for_in_files': [
769 +- # jinja2/__init__.py contains version string, so sufficient as
770 +- # dependency for whole jinja2 package
771 +- '<(DEPTH)/third_party/jinja2/__init__.py',
772 +- '<(DEPTH)/third_party/markupsafe/__init__.py', # jinja2 dep
773 + 'hasher.py',
774 + 'in_file.py',
775 + 'in_generator.py',
776 +--- third_party/WebKit/Source/bindings/scripts/scripts.gypi.orig 2014-08-19 10:53:02.824618979 +0000
777 ++++ third_party/WebKit/Source/bindings/scripts/scripts.gypi 2014-08-19 10:53:20.784957370 +0000
778 +@@ -12,9 +12,6 @@
779 + '<(DEPTH)/third_party/markupsafe/__init__.py', # jinja2 dep
780 + ],
781 + 'idl_lexer_parser_files': [
782 +- # PLY (Python Lex-Yacc)
783 +- '<(DEPTH)/third_party/ply/lex.py',
784 +- '<(DEPTH)/third_party/ply/yacc.py',
785 + # Web IDL lexer/parser (base parser)
786 + '<(DEPTH)/tools/idl_parser/idl_lexer.py',
787 + '<(DEPTH)/tools/idl_parser/idl_node.py',
788 +--- third_party/WebKit/Source/platform/inspector_protocol/protocol.gyp.orig 2016-03-23 15:10:41.522637837 +0000
789 ++++ third_party/WebKit/Source/platform/inspector_protocol/protocol.gyp 2016-03-23 15:10:56.938953740 +0000
790 +@@ -6,9 +6,6 @@
791 + 'variables': {
792 + 'blink_platform_output_dir': '<(SHARED_INTERMEDIATE_DIR)/blink/platform',
793 + 'jinja_module_files': [
794 +- # jinja2/__init__.py contains version string, so sufficient for package
795 +- '<(DEPTH)/third_party/jinja2/__init__.py',
796 +- '<(DEPTH)/third_party/markupsafe/__init__.py', # jinja2 dep
797 + ],
798 + },
799 +
800 +--- third_party/WebKit/Source/build/scripts/scripts.gni.orig 2016-06-02 09:54:28.510152077 +0000
801 ++++ third_party/WebKit/Source/build/scripts/scripts.gni 2016-06-02 09:54:50.966612510 +0000
802 +@@ -9,10 +9,6 @@
803 + _scripts_dir = "//third_party/WebKit/Source/build/scripts"
804 +
805 + scripts_for_in_files = [
806 +- # jinja2/__init__.py contains version string, so sufficient as
807 +- # dependency for whole jinja2 package
808 +- "//third_party/jinja2/__init__.py",
809 +- "//third_party/markupsafe/__init__.py", # jinja2 dep
810 + "$_scripts_dir/hasher.py",
811 + "$_scripts_dir/in_file.py",
812 + "$_scripts_dir/in_generator.py",
813 +--- third_party/WebKit/Source/bindings/scripts/BUILD.gn.orig 2016-06-02 10:03:01.100658943 +0000
814 ++++ third_party/WebKit/Source/bindings/scripts/BUILD.gn 2016-06-02 10:03:13.240907715 +0000
815 +@@ -36,7 +36,7 @@
816 + action("cached_jinja_templates") {
817 + script = "code_generator_v8.py"
818 +
819 +- inputs = jinja_module_files + [ "code_generator_v8.py" ] +
820 ++ inputs = [ "code_generator_v8.py" ] +
821 + code_generator_template_files
822 +
823 + # Dummy file to track dependency.
824 +--- third_party/WebKit/Source/platform/v8_inspector/v8_inspector.gyp.orig 2016-06-03 12:31:49.844954196 +0000
825 ++++ third_party/WebKit/Source/platform/v8_inspector/v8_inspector.gyp 2016-06-03 12:32:01.869198425 +0000
826 +@@ -60,7 +60,6 @@
827 + {
828 + 'action_name': 'generateV8InspectorProtocolBackendSources',
829 + 'inputs': [
830 +- '<@(jinja_module_files)',
831 + # The python script in action below.
832 + '../inspector_protocol/CodeGenerator.py',
833 + # Input files for the script.
834 +--- third_party/WebKit/Source/core/inspector/inspector.gyp.orig 2016-06-03 12:38:20.712891692 +0000
835 ++++ third_party/WebKit/Source/core/inspector/inspector.gyp 2016-06-03 12:38:31.197104557 +0000
836 +@@ -52,7 +52,6 @@
837 + {
838 + 'action_name': 'generateInspectorProtocolBackendSources',
839 + 'inputs': [
840 +- '<@(jinja_module_files)',
841 + # The python script in action below.
842 + '../../platform/inspector_protocol/CodeGenerator.py',
843 + # Input files for the script.