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/
Date: Sat, 15 Sep 2018 21:16:45
Message-Id: 1537046192.5c500a7cc32e93cbab346d22ab000ef6c4ec94b3.floppym@gentoo
1 commit: 5c500a7cc32e93cbab346d22ab000ef6c4ec94b3
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 15 21:16:32 2018 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 15 21:16:32 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c500a7c
7
8 www-client/chromium: stable channel bump (69.0.3497.92)
9
10 Package-Manager: Portage-2.3.49_p2, Repoman-2.3.10_p48
11
12 www-client/chromium/Manifest | 1 +
13 www-client/chromium/chromium-69.0.3497.92.ebuild | 680 +++++++++++++++++++++++
14 2 files changed, 681 insertions(+)
15
16 diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest
17 index 34fd0866b71..60a2c70dcbb 100644
18 --- a/www-client/chromium/Manifest
19 +++ b/www-client/chromium/Manifest
20 @@ -1,5 +1,6 @@
21 DIST chromium-68.0.3440.106.tar.xz 630289544 BLAKE2B 9278244aed5a01dac5ccb670951fdfe1f9445224b5ad13d05a0cb086aabf639d4ab08250a93cedaae0be2c4fbab34e96c4862d0155125a90e42a2ac0880c40b1 SHA512 ab94f89e614919932d4d960bac8e5450c4d3f26dea4892e6591762bfaeeb4707a090352d4a952bcb55e34fde4950db22a36004788efd26ffb22b28770e9795c4
22 DIST chromium-68.0.3440.75.tar.xz 630277224 BLAKE2B 87c152c14333007223f611acb56360b553c5a4a97026f9cf4ca37d90aa501aabe5e294c3bacbd537c7602fc5dcb010a493c8d64b2881681ddfaad66cd58a3c56 SHA512 99ab36c9a9c224469f3a34f0193b0b4662b626ac29d23711716117cc6fa437717c2c3357f8a95adf9085b94a262c8b4c46727f88bf50bb231bb85af956afbedb
23 DIST chromium-69.0.3497.81.tar.xz 617333008 BLAKE2B c93f04c31a05a7ca29225157f434b27646529aac5e273f8c0e983dde8ebbcb8f32a94bbe6edf7d936f6e989869f49cbea4249a6e7ff7a497f382b0c8ca6d01b1 SHA512 99d3e3212496b3e42133719c6026aec71bd3cd90c7ff689cce509021e038a91986c14d094e6e71ba94600d0c27548b8b33b7084c75d4c2bb8d846b81a4c2562b
24 +DIST chromium-69.0.3497.92.tar.xz 617363228 BLAKE2B 651673423aa53fc86058d7c7f1f39111297f9f5f2f48166be9a06f7b4c86167c2a9e46749365f0a5447894fcb3f2c55bc6bb6bea344608d9956166d4753f6244 SHA512 46f2e799070d97956d3137008815d0885b9704705dab86ad9d53faca4582a37b0199026837ebae26aef49f7676630c85ecff928fc1c3ee4307598ccbee6facec
25 DIST chromium-70.0.3521.2.tar.xz 623774860 BLAKE2B 0476078b44561245b409ff4697ea84f093599f2a9fa089003a0de0e135633eff172807ff065d34b637046db9c2741504626f72dbbd46798233a048c219205f6c SHA512 0bcd3706fa86626b8f03f99b141f70b631797412bf67b455cb24a296a6436802acefe5a040553c65984529e4efd7990c659622aeb64b6a1ae1982014d66d4827
26 DIST chromium-70.0.3538.9.tar.xz 622701284 BLAKE2B e7a8a793787639d9f00fc1b0d5c8f9cf3a282a1dd2787e6b953dea822f001ca05346d384dd54fc439f9b00bba083ccea48a41b49791e476138bf087e16cb38b4 SHA512 96e656be2096a151ad4de53d359e1a49073e1080a882aaf871b0a01f3ad08713e0045ce58d10fd08586b462d9f8b44ac38ec4883b35bccc7028a78ecbe4b449f
27
28 diff --git a/www-client/chromium/chromium-69.0.3497.92.ebuild b/www-client/chromium/chromium-69.0.3497.92.ebuild
29 new file mode 100644
30 index 00000000000..26e24443a86
31 --- /dev/null
32 +++ b/www-client/chromium/chromium-69.0.3497.92.ebuild
33 @@ -0,0 +1,680 @@
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 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 ~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 widevine"
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-4:=
81 + || (
82 + media-video/ffmpeg[-samba]
83 + >=net-fs/samba-4.5.10-r1[-debug(-)]
84 + )
85 + !=net-fs/samba-4.5.12-r0
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-plugins/chrome-binary-plugins-57
115 + dev-util/gn
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 + widevine? ( www-plugins/chrome-binary-plugins[widevine(-)] )
122 +"
123 +# dev-vcs/git - https://bugs.gentoo.org/593476
124 +# sys-apps/sandbox - https://crbug.com/586444
125 +DEPEND="${COMMON_DEPEND}
126 + >=app-arch/gzip-1.7
127 + !arm? (
128 + dev-lang/yasm
129 + )
130 + dev-lang/perl
131 + >=dev-util/gperf-3.0.3
132 + >=dev-util/ninja-1.7.2
133 + >=net-libs/nodejs-6.9.4
134 + sys-apps/hwids[usb(+)]
135 + >=sys-devel/bison-2.4.3
136 + sys-devel/flex
137 + virtual/pkgconfig
138 + dev-vcs/git
139 +"
140 +
141 +if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
142 + EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
143 +fi
144 +
145 +DISABLE_AUTOFORMATTING="yes"
146 +DOC_CONTENTS="
147 +Some web pages may require additional fonts to display properly.
148 +Try installing some of the following packages if some characters
149 +are not displayed properly:
150 +- media-fonts/arphicfonts
151 +- media-fonts/droid
152 +- media-fonts/ipamonafont
153 +- media-fonts/noto
154 +- media-fonts/ja-ipafonts
155 +- media-fonts/takao-fonts
156 +- media-fonts/wqy-microhei
157 +- media-fonts/wqy-zenhei
158 +
159 +To fix broken icons on the Downloads page, you should install an icon
160 +theme that covers the appropriate MIME types, and configure this as your
161 +GTK+ icon theme.
162 +"
163 +
164 +PATCHES=(
165 + "${FILESDIR}/chromium-compiler-r4.patch"
166 + "${FILESDIR}/chromium-widevine-r2.patch"
167 + "${FILESDIR}/chromium-webrtc-r0.patch"
168 + "${FILESDIR}/chromium-memcpy-r0.patch"
169 + "${FILESDIR}/chromium-math.h-r0.patch"
170 + "${FILESDIR}/chromium-stdint.patch"
171 + "${FILESDIR}/chromium-ffmpeg-ebp-r1.patch"
172 +)
173 +
174 +pre_build_checks() {
175 + #if [[ ${MERGE_TYPE} != binary ]]; then
176 + # local -x CPP="$(tc-getCXX) -E"
177 + # if tc-is-clang && ! version_is_at_least "3.9.1" "$(clang-fullversion)"; then
178 + # # bugs: #601654
179 + # die "At least clang 3.9.1 is required"
180 + # fi
181 + # if tc-is-gcc && ! version_is_at_least 5.0 "$(gcc-version)"; then
182 + # # bugs: #535730, #525374, #518668, #600288, #627356
183 + # die "At least gcc 5.0 is required"
184 + # fi
185 + #fi
186 +
187 + # Check build requirements, bug #541816 and bug #471810 .
188 + CHECKREQS_MEMORY="3G"
189 + CHECKREQS_DISK_BUILD="5G"
190 + eshopts_push -s extglob
191 + if is-flagq '-g?(gdb)?([1-9])'; then
192 + CHECKREQS_DISK_BUILD="25G"
193 + if ! use component-build; then
194 + CHECKREQS_MEMORY="16G"
195 + fi
196 + fi
197 + eshopts_pop
198 + check-reqs_pkg_setup
199 +}
200 +
201 +pkg_pretend() {
202 + pre_build_checks
203 +}
204 +
205 +pkg_setup() {
206 + pre_build_checks
207 +
208 + chromium_suid_sandbox_check_kernel_config
209 +}
210 +
211 +src_prepare() {
212 + # Calling this here supports resumption via FEATURES=keepwork
213 + python_setup
214 +
215 + default
216 +
217 + mkdir -p third_party/node/linux/node-linux-x64/bin || die
218 + ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
219 +
220 + local keeplibs=(
221 + base/third_party/dmg_fp
222 + base/third_party/dynamic_annotations
223 + base/third_party/icu
224 + base/third_party/nspr
225 + base/third_party/superfasthash
226 + base/third_party/symbolize
227 + base/third_party/valgrind
228 + base/third_party/xdg_mime
229 + base/third_party/xdg_user_dirs
230 + buildtools/third_party/libc++
231 + buildtools/third_party/libc++abi
232 + chrome/third_party/mozilla_security_manager
233 + courgette/third_party
234 + net/third_party/http2
235 + net/third_party/mozilla_security_manager
236 + net/third_party/nss
237 + net/third_party/quic
238 + net/third_party/spdy
239 + third_party/WebKit
240 + third_party/abseil-cpp
241 + third_party/analytics
242 + third_party/angle
243 + third_party/angle/src/common/third_party/base
244 + third_party/angle/src/common/third_party/smhasher
245 + third_party/angle/src/third_party/compiler
246 + third_party/angle/src/third_party/libXNVCtrl
247 + third_party/angle/src/third_party/trace_event
248 + third_party/angle/third_party/glslang
249 + third_party/angle/third_party/spirv-headers
250 + third_party/angle/third_party/spirv-tools
251 + third_party/angle/third_party/vulkan-headers
252 + third_party/angle/third_party/vulkan-loader
253 + third_party/angle/third_party/vulkan-tools
254 + third_party/angle/third_party/vulkan-validation-layers
255 + third_party/apple_apsl
256 + third_party/blink
257 + third_party/boringssl
258 + third_party/boringssl/src/third_party/fiat
259 + third_party/breakpad
260 + third_party/breakpad/breakpad/src/third_party/curl
261 + third_party/brotli
262 + third_party/cacheinvalidation
263 + third_party/catapult
264 + third_party/catapult/common/py_vulcanize/third_party/rcssmin
265 + third_party/catapult/common/py_vulcanize/third_party/rjsmin
266 + third_party/catapult/third_party/beautifulsoup4
267 + third_party/catapult/third_party/html5lib-python
268 + third_party/catapult/third_party/polymer
269 + third_party/catapult/third_party/six
270 + third_party/catapult/tracing/third_party/d3
271 + third_party/catapult/tracing/third_party/gl-matrix
272 + third_party/catapult/tracing/third_party/jszip
273 + third_party/catapult/tracing/third_party/mannwhitneyu
274 + third_party/catapult/tracing/third_party/oboe
275 + third_party/catapult/tracing/third_party/pako
276 + third_party/ced
277 + third_party/cld_3
278 + third_party/crashpad
279 + third_party/crashpad/crashpad/third_party/zlib
280 + third_party/crc32c
281 + third_party/cros_system_api
282 + third_party/devscripts
283 + third_party/dom_distiller_js
284 + third_party/fips181
285 + third_party/flatbuffers
286 + third_party/flot
287 + third_party/freetype
288 + third_party/glslang-angle
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/googletest
293 + third_party/hunspell
294 + third_party/iccjpeg
295 + third_party/inspector_protocol
296 + third_party/jinja2
297 + third_party/jstemplate
298 + third_party/khronos
299 + third_party/leveldatabase
300 + third_party/libXNVCtrl
301 + third_party/libaddressinput
302 + third_party/libaom
303 + third_party/libjingle
304 + third_party/libphonenumber
305 + third_party/libsecret
306 + third_party/libsrtp
307 + third_party/libsync
308 + third_party/libudev
309 + third_party/libwebm
310 + third_party/libxml/chromium
311 + third_party/libyuv
312 + third_party/llvm
313 + third_party/lss
314 + third_party/lzma_sdk
315 + third_party/markupsafe
316 + third_party/mesa
317 + third_party/metrics_proto
318 + third_party/modp_b64
319 + third_party/node
320 + third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2
321 + third_party/openmax_dl
322 + third_party/ots
323 + third_party/pdfium
324 + third_party/pdfium/third_party/agg23
325 + third_party/pdfium/third_party/base
326 + third_party/pdfium/third_party/bigint
327 + third_party/pdfium/third_party/freetype
328 + third_party/pdfium/third_party/lcms
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/skia_shared
333 + third_party/perfetto
334 + third_party/ply
335 + third_party/polymer
336 + third_party/protobuf
337 + third_party/protobuf/third_party/six
338 + third_party/pyjson5
339 + third_party/qcms
340 + third_party/rnnoise
341 + third_party/s2cellid
342 + third_party/sfntly
343 + third_party/simplejson
344 + third_party/skia
345 + third_party/skia/third_party/gif
346 + third_party/skia/third_party/skcms
347 + third_party/skia/third_party/vulkan
348 + third_party/smhasher
349 + third_party/spirv-headers
350 + third_party/spirv-tools-angle
351 + third_party/sqlite
352 + third_party/swiftshader
353 + third_party/swiftshader/third_party/llvm-subzero
354 + third_party/swiftshader/third_party/subzero
355 + third_party/unrar
356 + third_party/usrsctp
357 + third_party/vulkan
358 + third_party/vulkan-validation-layers
359 + third_party/web-animations-js
360 + third_party/webdriver
361 + third_party/webrtc
362 + third_party/widevine
363 + third_party/woff2
364 + third_party/zlib/google
365 + url/third_party/mozilla
366 + v8/src/third_party/valgrind
367 + v8/src/third_party/utf8-decoder
368 + v8/third_party/antlr4
369 + v8/third_party/inspector_protocol
370 +
371 + # gyp -> gn leftovers
372 + base/third_party/libevent
373 + third_party/adobe
374 + third_party/speech-dispatcher
375 + third_party/usb_ids
376 + third_party/xdg-utils
377 + third_party/yasm/run_yasm.py
378 + )
379 + if ! use system-ffmpeg; then
380 + keeplibs+=( third_party/ffmpeg third_party/opus )
381 + fi
382 + if ! use system-icu; then
383 + keeplibs+=( third_party/icu )
384 + fi
385 + if ! use system-libvpx; then
386 + keeplibs+=( third_party/libvpx )
387 + keeplibs+=( third_party/libvpx/source/libvpx/third_party/x86inc )
388 + fi
389 + if use tcmalloc; then
390 + keeplibs+=( third_party/tcmalloc )
391 + fi
392 +
393 + # Remove most bundled libraries. Some are still needed.
394 + build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
395 +}
396 +
397 +src_configure() {
398 + # Calling this here supports resumption via FEATURES=keepwork
399 + python_setup
400 +
401 + local myconf_gn=""
402 +
403 + # Make sure the build system will use the right tools, bug #340795.
404 + tc-export AR CC CXX NM
405 +
406 + #if ! tc-is-clang; then
407 + # # Force clang since gcc is pretty broken at the moment.
408 + # CC=${CHOST}-clang
409 + # CXX=${CHOST}-clang++
410 + # strip-unsupported-flags
411 + #fi
412 +
413 + if tc-is-clang; then
414 + myconf_gn+=" is_clang=true clang_use_chrome_plugins=false"
415 + else
416 + myconf_gn+=" is_clang=false"
417 + fi
418 +
419 + # Define a custom toolchain for GN
420 + myconf_gn+=" custom_toolchain=\"//build/toolchain/linux/unbundle:default\""
421 +
422 + if tc-is-cross-compiler; then
423 + tc-export BUILD_{AR,CC,CXX,NM}
424 + myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:host\""
425 + myconf_gn+=" v8_snapshot_toolchain=\"//build/toolchain/linux/unbundle:host\""
426 + else
427 + myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:default\""
428 + fi
429 +
430 + # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
431 + myconf_gn+=" is_debug=false"
432 +
433 + # Component build isn't generally intended for use by end users. It's mostly useful
434 + # for development and debugging.
435 + myconf_gn+=" is_component_build=$(usex component-build true false)"
436 +
437 + # https://chromium.googlesource.com/chromium/src/+/lkcr/docs/jumbo.md
438 + myconf_gn+=" use_jumbo_build=$(usex jumbo-build true false)"
439 +
440 + myconf_gn+=" use_allocator=$(usex tcmalloc \"tcmalloc\" \"none\")"
441 +
442 + # Disable nacl, we can't build without pnacl (http://crbug.com/269560).
443 + myconf_gn+=" enable_nacl=false"
444 +
445 + # Use system-provided libraries.
446 + # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
447 + # TODO: use_system_hunspell (upstream changes needed).
448 + # TODO: use_system_libsrtp (bug #459932).
449 + # TODO: use_system_protobuf (bug #525560).
450 + # TODO: use_system_ssl (http://crbug.com/58087).
451 + # TODO: use_system_sqlite (http://crbug.com/22208).
452 +
453 + # libevent: https://bugs.gentoo.org/593458
454 + local gn_system_libraries=(
455 + flac
456 + fontconfig
457 + freetype
458 + # Need harfbuzz_from_pkgconfig target
459 + #harfbuzz-ng
460 + libdrm
461 + libjpeg
462 + libpng
463 + libwebp
464 + libxml
465 + libxslt
466 + openh264
467 + re2
468 + snappy
469 + yasm
470 + zlib
471 + )
472 + if use system-ffmpeg; then
473 + gn_system_libraries+=( ffmpeg opus )
474 + fi
475 + if use system-icu; then
476 + gn_system_libraries+=( icu )
477 + fi
478 + if use system-libvpx; then
479 + gn_system_libraries+=( libvpx )
480 + fi
481 + build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" || die
482 +
483 + # See dependency logic in third_party/BUILD.gn
484 + myconf_gn+=" use_system_harfbuzz=true"
485 +
486 + # Optional dependencies.
487 + myconf_gn+=" enable_hangout_services_extension=$(usex hangouts true false)"
488 + myconf_gn+=" enable_widevine=$(usex widevine true false)"
489 + myconf_gn+=" use_cups=$(usex cups true false)"
490 + myconf_gn+=" use_gnome_keyring=$(usex gnome-keyring true false)"
491 + myconf_gn+=" use_kerberos=$(usex kerberos true false)"
492 + myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)"
493 +
494 + # TODO: link_pulseaudio=true for GN.
495 +
496 + myconf_gn+=" fieldtrial_testing_like_official_build=true"
497 +
498 + # Never use bundled gold binary. Disable gold linker flags for now.
499 + # Do not use bundled clang.
500 + # Trying to use gold results in linker crash.
501 + myconf_gn+=" use_gold=false use_sysroot=false linux_use_bundled_binutils=false use_custom_libcxx=false"
502 +
503 + # Disable forced lld, bug 641556
504 + myconf_gn+=" use_lld=false"
505 +
506 + ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)"
507 + myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)"
508 + myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\""
509 +
510 + # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys .
511 + # Note: these are for Gentoo use ONLY. For your own distribution,
512 + # please get your own set of keys. Feel free to contact chromium@g.o
513 + # for more info.
514 + local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc"
515 + local google_default_client_id="329227923882.apps.googleusercontent.com"
516 + local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu"
517 + myconf_gn+=" google_api_key=\"${google_api_key}\""
518 + myconf_gn+=" google_default_client_id=\"${google_default_client_id}\""
519 + myconf_gn+=" google_default_client_secret=\"${google_default_client_secret}\""
520 +
521 + local myarch="$(tc-arch)"
522 + if [[ $myarch = amd64 ]] ; then
523 + myconf_gn+=" target_cpu=\"x64\""
524 + ffmpeg_target_arch=x64
525 + elif [[ $myarch = x86 ]] ; then
526 + myconf_gn+=" target_cpu=\"x86\""
527 + ffmpeg_target_arch=ia32
528 + elif [[ $myarch = arm64 ]] ; then
529 + myconf_gn+=" target_cpu=\"arm64\""
530 + ffmpeg_target_arch=arm64
531 + elif [[ $myarch = arm ]] ; then
532 + myconf_gn+=" target_cpu=\"arm\""
533 + ffmpeg_target_arch=$(usex neon arm-neon arm)
534 + else
535 + die "Failed to determine target arch, got '$myarch'."
536 + fi
537 +
538 + # Make sure that -Werror doesn't get added to CFLAGS by the build system.
539 + # Depending on GCC version the warnings are different and we don't want
540 + # the build to fail because of that.
541 + myconf_gn+=" treat_warnings_as_errors=false"
542 +
543 + # Disable fatal linker warnings, bug 506268.
544 + myconf_gn+=" fatal_linker_warnings=false"
545 +
546 + # Avoid CFLAGS problems, bug #352457, bug #390147.
547 + if ! use custom-cflags; then
548 + replace-flags "-Os" "-O2"
549 + strip-flags
550 +
551 + # Prevent linker from running out of address space, bug #471810 .
552 + if use x86; then
553 + filter-flags "-g*"
554 + fi
555 +
556 + # Prevent libvpx build failures. Bug 530248, 544702, 546984.
557 + if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then
558 + filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2
559 + fi
560 + fi
561 +
562 + # https://bugs.gentoo.org/588596
563 + #append-cxxflags $(test-flags-CXX -fno-delete-null-pointer-checks)
564 +
565 + # Bug 491582.
566 + export TMPDIR="${WORKDIR}/temp"
567 + mkdir -p -m 755 "${TMPDIR}" || die
568 +
569 + # https://bugs.gentoo.org/654216
570 + addpredict /dev/dri/ #nowarn
571 +
572 + #if ! use system-ffmpeg; then
573 + if false; then
574 + local build_ffmpeg_args=""
575 + if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then
576 + build_ffmpeg_args+=" --disable-asm"
577 + fi
578 +
579 + # Re-configure bundled ffmpeg. See bug #491378 for example reasons.
580 + einfo "Configuring bundled ffmpeg..."
581 + pushd third_party/ffmpeg > /dev/null || die
582 + chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \
583 + --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die
584 + chromium/scripts/copy_config.sh || die
585 + chromium/scripts/generate_gn.py || die
586 + popd > /dev/null || die
587 + fi
588 +
589 + einfo "Configuring Chromium..."
590 + set -- gn gen --args="${myconf_gn} ${EXTRA_GN}" out/Release
591 + echo "$@"
592 + "$@" || die
593 +}
594 +
595 +src_compile() {
596 + # Calling this here supports resumption via FEATURES=keepwork
597 + python_setup
598 +
599 + #"${EPYTHON}" tools/clang/scripts/update.py --force-local-build --gcc-toolchain /usr --skip-checkout --use-system-cmake --without-android || die
600 +
601 + # Build mksnapshot and pax-mark it.
602 + local x
603 + for x in mksnapshot v8_context_snapshot_generator; do
604 + if tc-is-cross-compiler; then
605 + eninja -C out/Release "host/${x}"
606 + pax-mark m "out/Release/host/${x}"
607 + else
608 + eninja -C out/Release "${x}"
609 + pax-mark m "out/Release/${x}"
610 + fi
611 + done
612 +
613 + # Even though ninja autodetects number of CPUs, we respect
614 + # user's options, for debugging with -j 1 or any other reason.
615 + eninja -C out/Release chrome chromedriver
616 + use suid && eninja -C out/Release chrome_sandbox
617 +
618 + pax-mark m out/Release/chrome
619 +}
620 +
621 +src_install() {
622 + local CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser"
623 + exeinto "${CHROMIUM_HOME}"
624 + doexe out/Release/chrome
625 +
626 + if use suid; then
627 + newexe out/Release/chrome_sandbox chrome-sandbox
628 + fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
629 + fi
630 +
631 + doexe out/Release/chromedriver
632 +
633 + local sedargs=( -e "s:/usr/lib/:/usr/$(get_libdir)/:g" )
634 + sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r3.sh" > chromium-launcher.sh || die
635 + doexe chromium-launcher.sh
636 +
637 + # It is important that we name the target "chromium-browser",
638 + # xdg-utils expect it; bug #355517.
639 + dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser
640 + # keep the old symlink around for consistency
641 + dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium
642 +
643 + dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver
644 +
645 + # Allow users to override command-line options, bug #357629.
646 + insinto /etc/chromium
647 + newins "${FILESDIR}/chromium.default" "default"
648 +
649 + pushd out/Release/locales > /dev/null || die
650 + chromium_remove_language_paks
651 + popd
652 +
653 + insinto "${CHROMIUM_HOME}"
654 + doins out/Release/*.bin
655 + doins out/Release/*.pak
656 + doins out/Release/*.so
657 +
658 + if ! use system-icu; then
659 + doins out/Release/icudtl.dat
660 + fi
661 +
662 + doins -r out/Release/locales
663 + doins -r out/Release/resources
664 +
665 + if [[ -d out/Release/swiftshader ]]; then
666 + insinto "${CHROMIUM_HOME}/swiftshader"
667 + doins out/Release/swiftshader/*.so
668 + fi
669 +
670 + # Install icons and desktop entry.
671 + local branding size
672 + for size in 16 22 24 32 48 64 128 256 ; do
673 + case ${size} in
674 + 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
675 + *) branding="chrome/app/theme/chromium" ;;
676 + esac
677 + newicon -s ${size} "${branding}/product_logo_${size}.png" \
678 + chromium-browser.png
679 + done
680 +
681 + local mime_types="text/html;text/xml;application/xhtml+xml;"
682 + mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797
683 + mime_types+="x-scheme-handler/ftp;" # bug #412185
684 + mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393
685 + make_desktop_entry \
686 + chromium-browser \
687 + "Chromium" \
688 + chromium-browser \
689 + "Network;WebBrowser" \
690 + "MimeType=${mime_types}\nStartupWMClass=chromium-browser"
691 + sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die
692 +
693 + # Install GNOME default application entry (bug #303100).
694 + insinto /usr/share/gnome-control-center/default-apps
695 + newins "${FILESDIR}"/chromium-browser.xml chromium-browser.xml
696 +
697 + readme.gentoo_create_doc
698 +}
699 +
700 +pkg_preinst() {
701 + gnome2_icon_savelist
702 +}
703 +
704 +pkg_postrm() {
705 + gnome2_icon_cache_update
706 + xdg_desktop_database_update
707 +}
708 +
709 +pkg_postinst() {
710 + gnome2_icon_cache_update
711 + xdg_desktop_database_update
712 + readme.gentoo_print_elog
713 +}