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: Fri, 27 Sep 2019 16:00:46
Message-Id: 1569600021.2aaa87de767322e62ca856eb6e669ad0159d828c.floppym@gentoo
1 commit: 2aaa87de767322e62ca856eb6e669ad0159d828c
2 Author: Stephan Hartmann <stha09 <AT> googlemail <DOT> com>
3 AuthorDate: Fri Sep 27 14:22:12 2019 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 27 16:00:21 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2aaa87de
7
8 www-client/chromium: security cleanup
9
10 Bug: https://bugs.gentoo.org/694954
11 Closes: https://github.com/gentoo/gentoo/pull/13057
12 Package-Manager: Portage-2.3.69, Repoman-2.3.16
13 Signed-off-by: Stephan Hartmann <stha09 <AT> googlemail.com>
14 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
15
16 www-client/chromium/Manifest | 1 -
17 www-client/chromium/chromium-77.0.3865.75.ebuild | 727 -----------------------
18 2 files changed, 728 deletions(-)
19
20 diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest
21 index eaee2493399..8b478908b01 100644
22 --- a/www-client/chromium/Manifest
23 +++ b/www-client/chromium/Manifest
24 @@ -1,3 +1,2 @@
25 -DIST chromium-77.0.3865.75.tar.xz 733233852 BLAKE2B e39856418a4dc0bcc690e0748781fd6d2395b2908d06616d44c76f5923d08f9ccd0cb1793447970302a47da631244aa96c7cf4d3df8cbd89fb3271badf163873 SHA512 7ab5103d75ddaeded69b63110a4ce401f4773017981eb2abaa650cc8a0c013323f7cd4beb19b6bfb6b0542a0269d86f6274da302b3b25d662c7a945f6d17f5d6
26 DIST chromium-77.0.3865.90.tar.xz 729551228 BLAKE2B 865a40a7fa7d6a0b2de137249f7f14dad32b30cb0099fccc0d21570a2488834c5ab6504ef7c63f334e5d798de5391d6e96beaa49009caecb178d898e27317d89 SHA512 8b343c6ccc798c74cca8d5d41285153ace917da28360192afb21925c103ba425a4045f75c589f73a8c5c75bd1bbca44bfae1a4b96e9b7a97636d9929c7961bbc
27 DIST chromium-78.0.3887.7.tar.xz 737057024 BLAKE2B b4754f1fa9a243c29e83d6136494c6db1726a6d3f23013115a4a576428f7ca3c0fcd3f81cf7fe4037f2c3e6901b3fce015aeed7b7b945b4a3e368f2e6fb9afa1 SHA512 9b8eb33c6f19e5b247372e19a61ec1ae6c804bd7b9731222430e2e1b585146fc543a686ccfc9553d6d137999570c544cdb45696db6ce50c38dfead1b0760c1a4
28
29 diff --git a/www-client/chromium/chromium-77.0.3865.75.ebuild b/www-client/chromium/chromium-77.0.3865.75.ebuild
30 deleted file mode 100644
31 index cede40c2b38..00000000000
32 --- a/www-client/chromium/chromium-77.0.3865.75.ebuild
33 +++ /dev/null
34 @@ -1,727 +0,0 @@
35 -# Copyright 2009-2019 Gentoo Authors
36 -# Distributed under the terms of the GNU General Public License v2
37 -
38 -EAPI=7
39 -PYTHON_COMPAT=( python2_7 )
40 -
41 -CHROMIUM_LANGS="am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu he
42 - 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
43 - sv sw ta te th tr uk vi zh-CN zh-TW"
44 -
45 -inherit check-reqs chromium-2 desktop flag-o-matic multilib ninja-utils pax-utils portability python-any-r1 readme.gentoo-r1 toolchain-funcs xdg-utils
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 ~arm64 ~x86"
54 -IUSE="+closure-compile component-build cups cpu_flags_arm_neon gnome-keyring +hangouts jumbo-build kerberos pic +proprietary-codecs pulseaudio selinux +suid +system-ffmpeg +system-icu +system-libvpx +tcmalloc widevine"
55 -RESTRICT="!system-ffmpeg? ( proprietary-codecs? ( bindist ) )"
56 -REQUIRED_USE="component-build? ( !suid )"
57 -
58 -COMMON_DEPEND="
59 - >=app-accessibility/at-spi2-atk-2.26:2
60 - app-arch/bzip2:=
61 - cups? ( >=net-print/cups-1.3.11:= )
62 - >=dev-libs/atk-2.26
63 - dev-libs/expat:=
64 - dev-libs/glib:2
65 - system-icu? ( >=dev-libs/icu-64:= )
66 - >=dev-libs/libxml2-2.9.4-r3:=[icu]
67 - dev-libs/libxslt:=
68 - dev-libs/nspr:=
69 - >=dev-libs/nss-3.26:=
70 - >=dev-libs/re2-0.2016.11.01:=
71 - gnome-keyring? ( >=gnome-base/libgnome-keyring-3.12:= )
72 - >=media-libs/alsa-lib-1.0.19:=
73 - media-libs/fontconfig:=
74 - media-libs/freetype:=
75 - >=media-libs/harfbuzz-2.4.0:0=[icu(-)]
76 - media-libs/libjpeg-turbo:=
77 - media-libs/libpng:=
78 - system-libvpx? ( media-libs/libvpx:=[postproc,svc] )
79 - >=media-libs/openh264-1.6.0:=
80 - pulseaudio? ( media-sound/pulseaudio:= )
81 - system-ffmpeg? (
82 - >=media-video/ffmpeg-4:=
83 - || (
84 - media-video/ffmpeg[-samba]
85 - >=net-fs/samba-4.5.10-r1[-debug(-)]
86 - )
87 - !=net-fs/samba-4.5.12-r0
88 - media-libs/opus:=
89 - )
90 - sys-apps/dbus:=
91 - sys-apps/pciutils:=
92 - virtual/udev
93 - x11-libs/cairo:=
94 - x11-libs/gdk-pixbuf:2
95 - x11-libs/gtk+:3[X]
96 - x11-libs/libX11:=
97 - x11-libs/libXcomposite:=
98 - x11-libs/libXcursor:=
99 - x11-libs/libXdamage:=
100 - x11-libs/libXext:=
101 - x11-libs/libXfixes:=
102 - >=x11-libs/libXi-1.6.0:=
103 - x11-libs/libXrandr:=
104 - x11-libs/libXrender:=
105 - x11-libs/libXScrnSaver:=
106 - x11-libs/libXtst:=
107 - x11-libs/pango:=
108 - app-arch/snappy:=
109 - media-libs/flac:=
110 - >=media-libs/libwebp-0.4.0:=
111 - sys-libs/zlib:=[minizip]
112 - kerberos? ( virtual/krb5 )
113 -"
114 -# For nvidia-drivers blocker, see bug #413637 .
115 -RDEPEND="${COMMON_DEPEND}
116 - !<www-plugins/chrome-binary-plugins-57
117 - x11-misc/xdg-utils
118 - virtual/opengl
119 - virtual/ttf-fonts
120 - selinux? ( sec-policy/selinux-chromium )
121 - tcmalloc? ( !<x11-drivers/nvidia-drivers-331.20 )
122 -"
123 -DEPEND="${COMMON_DEPEND}
124 -"
125 -# dev-vcs/git - https://bugs.gentoo.org/593476
126 -BDEPEND="
127 - ${PYTHON_DEPS}
128 - >=app-arch/gzip-1.7
129 - !arm? (
130 - dev-lang/yasm
131 - )
132 - dev-lang/perl
133 - dev-util/gn
134 - dev-vcs/git
135 - >=dev-util/gperf-3.0.3
136 - >=dev-util/ninja-1.7.2
137 - >=net-libs/nodejs-7.6.0[inspector]
138 - sys-apps/hwids[usb(+)]
139 - >=sys-devel/bison-2.4.3
140 - sys-devel/flex
141 - closure-compile? ( virtual/jre )
142 - virtual/pkgconfig
143 -"
144 -
145 -: ${CHROMIUM_FORCE_CLANG=no}
146 -
147 -if [[ ${CHROMIUM_FORCE_CLANG} == yes ]]; then
148 - BDEPEND+=" >=sys-devel/clang-7"
149 -fi
150 -
151 -if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
152 - EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
153 -fi
154 -
155 -DISABLE_AUTOFORMATTING="yes"
156 -DOC_CONTENTS="
157 -Some web pages may require additional fonts to display properly.
158 -Try installing some of the following packages if some characters
159 -are not displayed properly:
160 -- media-fonts/arphicfonts
161 -- media-fonts/droid
162 -- media-fonts/ipamonafont
163 -- media-fonts/noto
164 -- media-fonts/ja-ipafonts
165 -- media-fonts/takao-fonts
166 -- media-fonts/wqy-microhei
167 -- media-fonts/wqy-zenhei
168 -
169 -To fix broken icons on the Downloads page, you should install an icon
170 -theme that covers the appropriate MIME types, and configure this as your
171 -GTK+ icon theme.
172 -
173 -For native file dialogs in KDE, install kde-apps/kdialog.
174 -"
175 -
176 -PATCHES=(
177 - "${FILESDIR}/chromium-compiler-r10.patch"
178 - "${FILESDIR}/chromium-widevine-r4.patch"
179 - "${FILESDIR}/chromium-fix-char_traits.patch"
180 - "${FILESDIR}/chromium-unbundle-zlib.patch"
181 - "${FILESDIR}/chromium-77-fix-gn-gen.patch"
182 - "${FILESDIR}/chromium-77-system-icu.patch"
183 - "${FILESDIR}/chromium-77-system-hb.patch"
184 - "${FILESDIR}/chromium-77-clang.patch"
185 - "${FILESDIR}/chromium-77-blink-include.patch"
186 - "${FILESDIR}/chromium-77-std-string.patch"
187 - "${FILESDIR}/chromium-77-no-cups.patch"
188 - "${FILESDIR}/chromium-77-gcc-abstract.patch"
189 - "${FILESDIR}/chromium-77-gcc-include.patch"
190 -)
191 -
192 -pre_build_checks() {
193 - if [[ ${MERGE_TYPE} != binary ]]; then
194 - local -x CPP="$(tc-getCXX) -E"
195 - if tc-is-gcc && ! ver_test "$(gcc-version)" -ge 8.0; then
196 - die "At least gcc 8.0 is required"
197 - fi
198 - fi
199 -
200 - # Check build requirements, bug #541816 and bug #471810 .
201 - CHECKREQS_MEMORY="3G"
202 - CHECKREQS_DISK_BUILD="7G"
203 - if ( shopt -s extglob; is-flagq '-g?(gdb)?([1-9])' ); then
204 - CHECKREQS_DISK_BUILD="25G"
205 - if ! use component-build; then
206 - CHECKREQS_MEMORY="16G"
207 - fi
208 - fi
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 - chromium_suid_sandbox_check_kernel_config
220 -}
221 -
222 -src_prepare() {
223 - # Calling this here supports resumption via FEATURES=keepwork
224 - python_setup
225 -
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/cityhash
233 - base/third_party/dmg_fp
234 - base/third_party/dynamic_annotations
235 - base/third_party/icu
236 - base/third_party/nspr
237 - base/third_party/superfasthash
238 - base/third_party/symbolize
239 - base/third_party/valgrind
240 - base/third_party/xdg_mime
241 - base/third_party/xdg_user_dirs
242 - buildtools/third_party/libc++
243 - buildtools/third_party/libc++abi
244 - chrome/third_party/mozilla_security_manager
245 - courgette/third_party
246 - net/third_party/mozilla_security_manager
247 - net/third_party/nss
248 - net/third_party/quic
249 - net/third_party/uri_template
250 - third_party/abseil-cpp
251 - third_party/angle
252 - third_party/angle/src/common/third_party/base
253 - third_party/angle/src/common/third_party/smhasher
254 - third_party/angle/src/common/third_party/xxhash
255 - third_party/angle/src/third_party/compiler
256 - third_party/angle/src/third_party/libXNVCtrl
257 - third_party/angle/src/third_party/trace_event
258 - third_party/angle/third_party/glslang
259 - third_party/angle/third_party/spirv-headers
260 - third_party/angle/third_party/spirv-tools
261 - third_party/angle/third_party/vulkan-headers
262 - third_party/angle/third_party/vulkan-loader
263 - third_party/angle/third_party/vulkan-tools
264 - third_party/angle/third_party/vulkan-validation-layers
265 - third_party/apple_apsl
266 - third_party/axe-core
267 - third_party/blink
268 - third_party/boringssl
269 - third_party/boringssl/src/third_party/fiat
270 - third_party/boringssl/src/third_party/sike
271 - third_party/boringssl/linux-aarch64/crypto/third_party/sike
272 - third_party/boringssl/linux-x86_64/crypto/third_party/sike
273 - third_party/breakpad
274 - third_party/breakpad/breakpad/src/third_party/curl
275 - third_party/brotli
276 - third_party/cacheinvalidation
277 - third_party/catapult
278 - third_party/catapult/common/py_vulcanize/third_party/rcssmin
279 - third_party/catapult/common/py_vulcanize/third_party/rjsmin
280 - third_party/catapult/third_party/beautifulsoup4
281 - third_party/catapult/third_party/html5lib-python
282 - third_party/catapult/third_party/polymer
283 - third_party/catapult/third_party/six
284 - third_party/catapult/tracing/third_party/d3
285 - third_party/catapult/tracing/third_party/gl-matrix
286 - third_party/catapult/tracing/third_party/jszip
287 - third_party/catapult/tracing/third_party/mannwhitneyu
288 - third_party/catapult/tracing/third_party/oboe
289 - third_party/catapult/tracing/third_party/pako
290 - third_party/ced
291 - third_party/cld_3
292 - third_party/closure_compiler
293 - third_party/crashpad
294 - third_party/crashpad/crashpad/third_party/lss
295 - third_party/crashpad/crashpad/third_party/zlib
296 - third_party/crc32c
297 - third_party/cros_system_api
298 - third_party/dav1d
299 - third_party/dawn
300 - third_party/devscripts
301 - third_party/dom_distiller_js
302 - third_party/emoji-segmenter
303 - third_party/flatbuffers
304 - third_party/flot
305 - third_party/freetype
306 - third_party/glslang
307 - third_party/google_input_tools
308 - third_party/google_input_tools/third_party/closure_library
309 - third_party/google_input_tools/third_party/closure_library/third_party/closure
310 - third_party/googletest
311 - third_party/hunspell
312 - third_party/iccjpeg
313 - third_party/inspector_protocol
314 - third_party/jinja2
315 - third_party/jsoncpp
316 - third_party/jstemplate
317 - third_party/khronos
318 - third_party/leveldatabase
319 - third_party/libXNVCtrl
320 - third_party/libaddressinput
321 - third_party/libaom
322 - third_party/libaom/source/libaom/third_party/vector
323 - third_party/libaom/source/libaom/third_party/x86inc
324 - third_party/libjingle
325 - third_party/libphonenumber
326 - third_party/libsecret
327 - third_party/libsrtp
328 - third_party/libsync
329 - third_party/libudev
330 - third_party/libwebm
331 - third_party/libxml/chromium
332 - third_party/libyuv
333 - third_party/llvm
334 - third_party/lss
335 - third_party/lzma_sdk
336 - third_party/markupsafe
337 - third_party/mesa
338 - third_party/metrics_proto
339 - third_party/modp_b64
340 - third_party/nasm
341 - third_party/node
342 - third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2
343 - third_party/one_euro_filter
344 - third_party/openscreen
345 - third_party/openscreen/src/third_party/tinycbor/src/src
346 - third_party/ots
347 - third_party/pdfium
348 - third_party/pdfium/third_party/agg23
349 - third_party/pdfium/third_party/base
350 - third_party/pdfium/third_party/bigint
351 - third_party/pdfium/third_party/freetype
352 - third_party/pdfium/third_party/lcms
353 - third_party/pdfium/third_party/libopenjpeg20
354 - third_party/pdfium/third_party/libpng16
355 - third_party/pdfium/third_party/libtiff
356 - third_party/pdfium/third_party/skia_shared
357 - third_party/perfetto
358 - third_party/pffft
359 - third_party/ply
360 - third_party/polymer
361 - third_party/protobuf
362 - third_party/protobuf/third_party/six
363 - third_party/pyjson5
364 - third_party/qcms
365 - third_party/rnnoise
366 - third_party/s2cellid
367 - third_party/sfntly
368 - third_party/simplejson
369 - third_party/skia
370 - third_party/skia/include/third_party/skcms
371 - third_party/skia/include/third_party/vulkan
372 - third_party/skia/third_party/gif
373 - third_party/skia/third_party/skcms
374 - third_party/skia/third_party/vulkan
375 - third_party/smhasher
376 - third_party/spirv-headers
377 - third_party/SPIRV-Tools
378 - third_party/sqlite
379 - third_party/swiftshader
380 - third_party/swiftshader/third_party/llvm-7.0
381 - third_party/swiftshader/third_party/llvm-subzero
382 - third_party/swiftshader/third_party/subzero
383 - third_party/swiftshader/third_party/SPIRV-Headers/include/spirv/unified1
384 - third_party/unrar
385 - third_party/usrsctp
386 - third_party/vulkan
387 - third_party/web-animations-js
388 - third_party/webdriver
389 - third_party/webrtc
390 - third_party/webrtc/common_audio/third_party/fft4g
391 - third_party/webrtc/common_audio/third_party/spl_sqrt_floor
392 - third_party/webrtc/modules/third_party/fft
393 - third_party/webrtc/modules/third_party/g711
394 - third_party/webrtc/modules/third_party/g722
395 - third_party/webrtc/rtc_base/third_party/base64
396 - third_party/webrtc/rtc_base/third_party/sigslot
397 - third_party/widevine
398 - third_party/woff2
399 - third_party/zlib/google
400 - url/third_party/mozilla
401 - v8/src/third_party/siphash
402 - v8/src/third_party/valgrind
403 - v8/src/third_party/utf8-decoder
404 - v8/third_party/inspector_protocol
405 - v8/third_party/v8
406 -
407 - # gyp -> gn leftovers
408 - base/third_party/libevent
409 - third_party/adobe
410 - third_party/speech-dispatcher
411 - third_party/usb_ids
412 - third_party/xdg-utils
413 - third_party/yasm/run_yasm.py
414 - )
415 - if ! use system-ffmpeg; then
416 - keeplibs+=( third_party/ffmpeg third_party/opus )
417 - fi
418 - if ! use system-icu; then
419 - keeplibs+=( third_party/icu )
420 - fi
421 - if ! use system-libvpx; then
422 - keeplibs+=( third_party/libvpx )
423 - keeplibs+=( third_party/libvpx/source/libvpx/third_party/x86inc )
424 - fi
425 - if use tcmalloc; then
426 - keeplibs+=( third_party/tcmalloc )
427 - fi
428 -
429 - # Remove most bundled libraries. Some are still needed.
430 - build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
431 -}
432 -
433 -src_configure() {
434 - # Calling this here supports resumption via FEATURES=keepwork
435 - python_setup
436 -
437 - local myconf_gn=""
438 -
439 - # Make sure the build system will use the right tools, bug #340795.
440 - tc-export AR CC CXX NM
441 -
442 - if [[ ${CHROMIUM_FORCE_CLANG} == yes ]] && ! tc-is-clang; then
443 - # Force clang since gcc is pretty broken at the moment.
444 - CC=${CHOST}-clang
445 - CXX=${CHOST}-clang++
446 - strip-unsupported-flags
447 - fi
448 -
449 - if tc-is-clang; then
450 - myconf_gn+=" is_clang=true clang_use_chrome_plugins=false"
451 - else
452 - myconf_gn+=" is_clang=false"
453 - fi
454 -
455 - # Define a custom toolchain for GN
456 - myconf_gn+=" custom_toolchain=\"//build/toolchain/linux/unbundle:default\""
457 -
458 - if tc-is-cross-compiler; then
459 - tc-export BUILD_{AR,CC,CXX,NM}
460 - myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:host\""
461 - myconf_gn+=" v8_snapshot_toolchain=\"//build/toolchain/linux/unbundle:host\""
462 - else
463 - myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:default\""
464 - fi
465 -
466 - # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
467 - myconf_gn+=" is_debug=false"
468 -
469 - # Component build isn't generally intended for use by end users. It's mostly useful
470 - # for development and debugging.
471 - myconf_gn+=" is_component_build=$(usex component-build true false)"
472 -
473 - # https://chromium.googlesource.com/chromium/src/+/lkcr/docs/jumbo.md
474 - myconf_gn+=" use_jumbo_build=$(usex jumbo-build true false)"
475 -
476 - myconf_gn+=" use_allocator=$(usex tcmalloc \"tcmalloc\" \"none\")"
477 -
478 - # Disable nacl, we can't build without pnacl (http://crbug.com/269560).
479 - myconf_gn+=" enable_nacl=false"
480 -
481 - # Use system-provided libraries.
482 - # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
483 - # TODO: use_system_hunspell (upstream changes needed).
484 - # TODO: use_system_libsrtp (bug #459932).
485 - # TODO: use_system_protobuf (bug #525560).
486 - # TODO: use_system_ssl (http://crbug.com/58087).
487 - # TODO: use_system_sqlite (http://crbug.com/22208).
488 -
489 - # libevent: https://bugs.gentoo.org/593458
490 - local gn_system_libraries=(
491 - flac
492 - fontconfig
493 - freetype
494 - # Need harfbuzz_from_pkgconfig target
495 - #harfbuzz-ng
496 - libdrm
497 - libjpeg
498 - libpng
499 - libwebp
500 - libxml
501 - libxslt
502 - openh264
503 - re2
504 - snappy
505 - yasm
506 - zlib
507 - )
508 - if use system-ffmpeg; then
509 - gn_system_libraries+=( ffmpeg opus )
510 - fi
511 - if use system-icu; then
512 - gn_system_libraries+=( icu )
513 - fi
514 - if use system-libvpx; then
515 - gn_system_libraries+=( libvpx )
516 - fi
517 - build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" || die
518 -
519 - # See dependency logic in third_party/BUILD.gn
520 - myconf_gn+=" use_system_harfbuzz=true"
521 -
522 - # Optional dependencies.
523 - myconf_gn+=" closure_compile=$(usex closure-compile true false)"
524 - myconf_gn+=" enable_hangout_services_extension=$(usex hangouts true false)"
525 - myconf_gn+=" enable_widevine=$(usex widevine true false)"
526 - myconf_gn+=" use_cups=$(usex cups true false)"
527 - myconf_gn+=" use_gnome_keyring=$(usex gnome-keyring true false)"
528 - myconf_gn+=" use_kerberos=$(usex kerberos true false)"
529 - myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)"
530 -
531 - # TODO: link_pulseaudio=true for GN.
532 -
533 - myconf_gn+=" fieldtrial_testing_like_official_build=true"
534 -
535 - # Never use bundled gold binary. Disable gold linker flags for now.
536 - # Do not use bundled clang.
537 - # Trying to use gold results in linker crash.
538 - myconf_gn+=" use_gold=false use_sysroot=false linux_use_bundled_binutils=false use_custom_libcxx=false"
539 -
540 - # Disable forced lld, bug 641556
541 - myconf_gn+=" use_lld=false"
542 -
543 - ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)"
544 - myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)"
545 - myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\""
546 -
547 - # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys .
548 - # Note: these are for Gentoo use ONLY. For your own distribution,
549 - # please get your own set of keys. Feel free to contact chromium@g.o
550 - # for more info.
551 - local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc"
552 - local google_default_client_id="329227923882.apps.googleusercontent.com"
553 - local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu"
554 - myconf_gn+=" google_api_key=\"${google_api_key}\""
555 - myconf_gn+=" google_default_client_id=\"${google_default_client_id}\""
556 - myconf_gn+=" google_default_client_secret=\"${google_default_client_secret}\""
557 -
558 - local myarch="$(tc-arch)"
559 -
560 - # Avoid CFLAGS problems, bug #352457, bug #390147.
561 - if ! use custom-cflags; then
562 - replace-flags "-Os" "-O2"
563 - strip-flags
564 -
565 - # Prevent linker from running out of address space, bug #471810 .
566 - if use x86; then
567 - filter-flags "-g*"
568 - fi
569 -
570 - # Prevent libvpx build failures. Bug 530248, 544702, 546984.
571 - if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then
572 - filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2
573 - fi
574 - fi
575 -
576 - if [[ $myarch = amd64 ]] ; then
577 - myconf_gn+=" target_cpu=\"x64\""
578 - ffmpeg_target_arch=x64
579 - elif [[ $myarch = x86 ]] ; then
580 - myconf_gn+=" target_cpu=\"x86\""
581 - ffmpeg_target_arch=ia32
582 -
583 - # This is normally defined by compiler_cpu_abi in
584 - # build/config/compiler/BUILD.gn, but we patch that part out.
585 - append-flags -msse2 -mfpmath=sse -mmmx
586 - elif [[ $myarch = arm64 ]] ; then
587 - myconf_gn+=" target_cpu=\"arm64\""
588 - ffmpeg_target_arch=arm64
589 - elif [[ $myarch = arm ]] ; then
590 - myconf_gn+=" target_cpu=\"arm\""
591 - ffmpeg_target_arch=$(usex cpu_flags_arm_neon arm-neon arm)
592 - else
593 - die "Failed to determine target arch, got '$myarch'."
594 - fi
595 -
596 - # Make sure that -Werror doesn't get added to CFLAGS by the build system.
597 - # Depending on GCC version the warnings are different and we don't want
598 - # the build to fail because of that.
599 - myconf_gn+=" treat_warnings_as_errors=false"
600 -
601 - # Disable fatal linker warnings, bug 506268.
602 - myconf_gn+=" fatal_linker_warnings=false"
603 -
604 - # Bug 491582.
605 - export TMPDIR="${WORKDIR}/temp"
606 - mkdir -p -m 755 "${TMPDIR}" || die
607 -
608 - # https://bugs.gentoo.org/654216
609 - addpredict /dev/dri/ #nowarn
610 -
611 - #if ! use system-ffmpeg; then
612 - if false; then
613 - local build_ffmpeg_args=""
614 - if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then
615 - build_ffmpeg_args+=" --disable-asm"
616 - fi
617 -
618 - # Re-configure bundled ffmpeg. See bug #491378 for example reasons.
619 - einfo "Configuring bundled ffmpeg..."
620 - pushd third_party/ffmpeg > /dev/null || die
621 - chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \
622 - --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die
623 - chromium/scripts/copy_config.sh || die
624 - chromium/scripts/generate_gn.py || die
625 - popd > /dev/null || die
626 - fi
627 -
628 - einfo "Configuring Chromium..."
629 - set -- gn gen --args="${myconf_gn} ${EXTRA_GN}" out/Release
630 - echo "$@"
631 - "$@" || die
632 -}
633 -
634 -src_compile() {
635 - # Final link uses lots of file descriptors.
636 - ulimit -n 2048
637 -
638 - # Calling this here supports resumption via FEATURES=keepwork
639 - python_setup
640 -
641 - #"${EPYTHON}" tools/clang/scripts/update.py --force-local-build --gcc-toolchain /usr --skip-checkout --use-system-cmake --without-android || die
642 -
643 - # Build mksnapshot and pax-mark it.
644 - local x
645 - for x in mksnapshot v8_context_snapshot_generator; do
646 - if tc-is-cross-compiler; then
647 - eninja -C out/Release "host/${x}"
648 - pax-mark m "out/Release/host/${x}"
649 - else
650 - eninja -C out/Release "${x}"
651 - pax-mark m "out/Release/${x}"
652 - fi
653 - done
654 -
655 - # Even though ninja autodetects number of CPUs, we respect
656 - # user's options, for debugging with -j 1 or any other reason.
657 - eninja -C out/Release chrome chromedriver
658 - use suid && eninja -C out/Release chrome_sandbox
659 -
660 - pax-mark m out/Release/chrome
661 -
662 - # Build manpage; bug #684550
663 - sed -e 's|@@PACKAGE@@|chromium-browser|g;
664 - s|@@MENUNAME@@|Chromium|g;' \
665 - chrome/app/resources/manpage.1.in > \
666 - out/Release/chromium-browser.1 || die
667 -}
668 -
669 -src_install() {
670 - local CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser"
671 - exeinto "${CHROMIUM_HOME}"
672 - doexe out/Release/chrome
673 -
674 - if use suid; then
675 - newexe out/Release/chrome_sandbox chrome-sandbox
676 - fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
677 - fi
678 -
679 - doexe out/Release/chromedriver
680 -
681 - local sedargs=( -e "s:/usr/lib/:/usr/$(get_libdir)/:g" )
682 - sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r3.sh" > chromium-launcher.sh || die
683 - doexe chromium-launcher.sh
684 -
685 - # It is important that we name the target "chromium-browser",
686 - # xdg-utils expect it; bug #355517.
687 - dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser
688 - # keep the old symlink around for consistency
689 - dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium
690 -
691 - dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver
692 -
693 - # Allow users to override command-line options, bug #357629.
694 - insinto /etc/chromium
695 - newins "${FILESDIR}/chromium.default" "default"
696 -
697 - pushd out/Release/locales > /dev/null || die
698 - chromium_remove_language_paks
699 - popd
700 -
701 - insinto "${CHROMIUM_HOME}"
702 - doins out/Release/*.bin
703 - doins out/Release/*.pak
704 - doins out/Release/*.so
705 -
706 - if ! use system-icu; then
707 - doins out/Release/icudtl.dat
708 - fi
709 -
710 - doins -r out/Release/locales
711 - doins -r out/Release/resources
712 -
713 - if [[ -d out/Release/swiftshader ]]; then
714 - insinto "${CHROMIUM_HOME}/swiftshader"
715 - doins out/Release/swiftshader/*.so
716 - fi
717 -
718 - # Install icons and desktop entry.
719 - local branding size
720 - for size in 16 24 32 48 64 128 256 ; do
721 - case ${size} in
722 - 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
723 - *) branding="chrome/app/theme/chromium" ;;
724 - esac
725 - newicon -s ${size} "${branding}/product_logo_${size}.png" \
726 - chromium-browser.png
727 - done
728 -
729 - local mime_types="text/html;text/xml;application/xhtml+xml;"
730 - mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797
731 - mime_types+="x-scheme-handler/ftp;" # bug #412185
732 - mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393
733 - make_desktop_entry \
734 - chromium-browser \
735 - "Chromium" \
736 - chromium-browser \
737 - "Network;WebBrowser" \
738 - "MimeType=${mime_types}\nStartupWMClass=chromium-browser"
739 - sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die
740 -
741 - # Install GNOME default application entry (bug #303100).
742 - insinto /usr/share/gnome-control-center/default-apps
743 - newins "${FILESDIR}"/chromium-browser.xml chromium-browser.xml
744 -
745 - # Install manpage; bug #684550
746 - doman out/Release/chromium-browser.1
747 - dosym chromium-browser.1 /usr/share/man/man1/chromium.1
748 -
749 - readme.gentoo_create_doc
750 -}
751 -
752 -pkg_postrm() {
753 - xdg_icon_cache_update
754 - xdg_desktop_database_update
755 -}
756 -
757 -pkg_postinst() {
758 - xdg_icon_cache_update
759 - xdg_desktop_database_update
760 - readme.gentoo_print_elog
761 -}