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