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: Thu, 13 Oct 2016 15:58:28
Message-Id: 1476374297.663f9a2840af0e4506e55a15da3de60a4283dd66.floppym@gentoo
1 commit: 663f9a2840af0e4506e55a15da3de60a4283dd66
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Thu Oct 13 15:58:17 2016 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Thu Oct 13 15:58:17 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=663f9a28
7
8 www-client/chromium: remove old
9
10 Package-Manager: portage-2.3.2
11
12 www-client/chromium/Manifest | 1 -
13 www-client/chromium/chromium-54.0.2840.50.ebuild | 731 -----------------------
14 2 files changed, 732 deletions(-)
15
16 diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest
17 index cd8d22a..eee3882 100644
18 --- a/www-client/chromium/Manifest
19 +++ b/www-client/chromium/Manifest
20 @@ -1,5 +1,4 @@
21 DIST chromium-53.0.2785.143.tar.xz 460878628 SHA256 c52a58b79bfb27bb87e4a0a6ff213001485fbc747657b290f75d39ddce07dcc3 SHA512 d51ee1bd60d9ac0ae2dfa66b7ba10cae479002f32995d169c181e7ef1170953069531ec786e8031d3fc4777f002b213471213b4ed3e6f1e89f851547305456b9 WHIRLPOOL a9e75f905d7529aa0ed2ff3af9a7273c1b53dcb4c8a393d0fb34361b4cfa46e6e3691abf6fedc36dd6c375ab43038f76c981678d1988054d3fdb04b33b79d4a8
22 -DIST chromium-54.0.2840.50.tar.xz 479717252 SHA256 9b0b58f3af8353751e93fb6759660bd18de853fd3caabf88cbd48047e1c6cc38 SHA512 338dc37a994346877e180b9c7c9537a9f6a116f152f62a489dcb8d51e061e7262eba2585e63d368cf503b15d987e24b7ff4b4acc284e887b06c4cb3238b13543 WHIRLPOOL 0fccf4ca53b4289bc02e0bcd8d8e47fa9d1bff34545c85eeb8a0809067389cad1c395687388909069839ae921c47eebfa5b4fda4af13d0015d28d42e249c9728
23 DIST chromium-54.0.2840.59.tar.xz 479763932 SHA256 df89c284b0109566acc6a5a1a84d94a5ab0509cc3a86a31299a50328991edcde SHA512 f0b615a2e7dd667c8959f8ce501035a69e7ce852f04ae3023677d933025a56cbc7e1c5f4e85f6e790236ac61cfbd5df7290ed5da74292ee40ebbd89e75fb159f WHIRLPOOL a719ddf51cce89bb445bed1cfa694bf5c49a67455b1ed495363920303ba4337ae81d660c7fa613653f84e1cefb934d54640ea6727b95e0ab4451517d3db83299
24 DIST chromium-55.0.2868.3.tar.xz 505338268 SHA256 bec801332cdfb784d06a08da3936f5b9719e5b6a3bbaee88c3829651799077d1 SHA512 918c53f7380f889450b0e97e085f8d28af0ef4c25a5dd7b1ae0b2467ccc564747915c64d3bc6f64d31798ea4ef76f7a5cd7f64c06830ed9775756a495d9bb319 WHIRLPOOL df1fc03ebbc0ce4697e5aae6199c970d55b3cfdf78a00e18e47206dfc4f1995b3bae34216ea1d1023f7619febc87e9bfe738d015cee24123be386d6d41bec572
25 DIST chromium-55.0.2873.0.tar.xz 505121804 SHA256 7f0a502e18951215693567ab668c2a0b4031bd8a1b3d10f8c9d1711079f56c1a SHA512 352349314b6f7565dbef9425152efee1546c116346b6ec2094b9c7ccf30d7caa2b2b2a4b8aa97deb66e25e692741bd63675d3c1f95ee99e1e7345406509c0ad3 WHIRLPOOL de4c5f31ecbe072c5cf5718a889f383ec49d5100fb4dfbeda456e78c6665d80e3f85044efc6d56c6d575579992d90bfddbe23c16530b1cf5c570c5ce2cd3d0ac
26
27 diff --git a/www-client/chromium/chromium-54.0.2840.50.ebuild b/www-client/chromium/chromium-54.0.2840.50.ebuild
28 deleted file mode 100644
29 index 8063646..00000000
30 --- a/www-client/chromium/chromium-54.0.2840.50.ebuild
31 +++ /dev/null
32 @@ -1,731 +0,0 @@
33 -# Copyright 1999-2016 Gentoo Foundation
34 -# Distributed under the terms of the GNU General Public License v2
35 -# $Id$
36 -
37 -EAPI="6"
38 -PYTHON_COMPAT=( python2_7 )
39 -
40 -CHROMIUM_LANGS="am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu he
41 - hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr
42 - sv sw ta te th tr uk vi zh-CN zh-TW"
43 -
44 -inherit check-reqs chromium-2 eutils gnome2-utils flag-o-matic multilib multiprocessing pax-utils portability python-any-r1 readme.gentoo-r1 toolchain-funcs versionator virtualx xdg-utils
45 -
46 -DESCRIPTION="Open-source version of Google Chrome web browser"
47 -HOMEPAGE="http://chromium.org/"
48 -SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.xz"
49 -
50 -LICENSE="BSD"
51 -SLOT="0"
52 -KEYWORDS="~amd64 ~arm ~arm64 ~x86"
53 -IUSE="cups +gn gnome gnome-keyring gtk3 +hangouts kerberos neon pic +proprietary-codecs pulseaudio selinux +suid +system-ffmpeg +tcmalloc widevine"
54 -RESTRICT="!system-ffmpeg? ( proprietary-codecs? ( bindist ) )"
55 -
56 -# Native Client binaries are compiled with different set of flags, bug #452066.
57 -QA_FLAGS_IGNORED=".*\.nexe"
58 -
59 -# Native Client binaries may be stripped by the build system, which uses the
60 -# right tools for it, bug #469144 .
61 -QA_PRESTRIPPED=".*\.nexe"
62 -
63 -COMMON_DEPEND="
64 - app-arch/bzip2:=
65 - cups? ( >=net-print/cups-1.3.11:= )
66 - >=dev-libs/elfutils-0.149
67 - dev-libs/expat:=
68 - dev-libs/glib:=
69 - >=dev-libs/jsoncpp-0.5.0-r1:=
70 - dev-libs/nspr:=
71 - >=dev-libs/nss-3.14.3:=
72 - >=dev-libs/re2-0.2016.05.01:=
73 - gnome? ( >=gnome-base/gconf-2.24.0:= )
74 - gnome-keyring? ( >=gnome-base/libgnome-keyring-3.12:= )
75 - >=media-libs/alsa-lib-1.0.19:=
76 - media-libs/fontconfig:=
77 - media-libs/freetype:=
78 - media-libs/libexif:=
79 - media-libs/libjpeg-turbo:=
80 - media-libs/libpng:=
81 - media-libs/libvpx:=[svc]
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 - app-arch/snappy:=
108 - dev-libs/libxml2:=[icu]
109 - dev-libs/libxslt:=
110 - media-libs/flac:=
111 - >=media-libs/harfbuzz-0.9.41:=[icu(+)]
112 - >=media-libs/libwebp-0.4.0:=
113 - sys-libs/zlib:=[minizip]
114 - kerberos? ( virtual/krb5 )
115 - !gn? (
116 - >=app-accessibility/speech-dispatcher-0.8:=
117 - >=dev-libs/libevent-1.4.13:=
118 - )
119 -"
120 -# For nvidia-drivers blocker, see bug #413637 .
121 -RDEPEND="${COMMON_DEPEND}
122 - !=www-client/chromium-9999
123 - !<www-plugins/chrome-binary-plugins-37
124 - x11-misc/xdg-utils
125 - virtual/opengl
126 - virtual/ttf-fonts
127 - selinux? ( sec-policy/selinux-chromium )
128 - tcmalloc? ( !<x11-drivers/nvidia-drivers-331.20 )
129 - widevine? ( www-plugins/chrome-binary-plugins[widevine(-)] )
130 -"
131 -# dev-vcs/git - https://bugs.gentoo.org/593476
132 -DEPEND="${COMMON_DEPEND}
133 - >=app-arch/gzip-1.7
134 - !arm? (
135 - dev-lang/yasm
136 - )
137 - dev-lang/perl
138 - dev-perl/JSON
139 - >=dev-util/gperf-3.0.3
140 - dev-util/ninja
141 - sys-apps/hwids[usb(+)]
142 - >=sys-devel/bison-2.4.3
143 - sys-devel/flex
144 - virtual/pkgconfig
145 - dev-vcs/git
146 - $(python_gen_any_dep '
147 - dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]
148 - >=dev-python/beautifulsoup-4.3.2:4[${PYTHON_USEDEP}]
149 - dev-python/html5lib[${PYTHON_USEDEP}]
150 - dev-python/jinja[${PYTHON_USEDEP}]
151 - dev-python/ply[${PYTHON_USEDEP}]
152 - dev-python/simplejson[${PYTHON_USEDEP}]
153 - ')
154 -"
155 -
156 -# Keep this in sync with the python_gen_any_dep call.
157 -python_check_deps() {
158 - has_version --host-root "dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]" &&
159 - has_version --host-root ">=dev-python/beautifulsoup-4.3.2:4[${PYTHON_USEDEP}]" &&
160 - has_version --host-root "dev-python/html5lib[${PYTHON_USEDEP}]" &&
161 - has_version --host-root "dev-python/jinja[${PYTHON_USEDEP}]" &&
162 - has_version --host-root "dev-python/ply[${PYTHON_USEDEP}]" &&
163 - has_version --host-root "dev-python/simplejson[${PYTHON_USEDEP}]"
164 -}
165 -
166 -if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
167 - EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
168 -fi
169 -
170 -DISABLE_AUTOFORMATTING="yes"
171 -DOC_CONTENTS="
172 -Some web pages may require additional fonts to display properly.
173 -Try installing some of the following packages if some characters
174 -are not displayed properly:
175 -- media-fonts/arphicfonts
176 -- media-fonts/bitstream-cyberbit
177 -- media-fonts/droid
178 -- media-fonts/ipamonafont
179 -- media-fonts/noto
180 -- media-fonts/ja-ipafonts
181 -- media-fonts/takao-fonts
182 -- media-fonts/wqy-microhei
183 -- media-fonts/wqy-zenhei
184 -
185 -Depending on your desktop environment, you may need
186 -to install additional packages to get icons on the Downloads page.
187 -
188 -For KDE, the required package is kde-frameworks/oxygen-icons.
189 -
190 -For other desktop environments, try one of the following:
191 -- x11-themes/gnome-icon-theme
192 -- x11-themes/tango-icon-theme
193 -"
194 -
195 -PATCHES=(
196 - "${FILESDIR}/${PN}-system-ffmpeg-r3.patch"
197 - "${FILESDIR}/${PN}-system-jinja-r13.patch"
198 - "${FILESDIR}/${PN}-widevine-r1.patch"
199 - "${FILESDIR}/chromium-54-ffmpeg2compat.patch"
200 -)
201 -
202 -pkg_pretend() {
203 - if [[ ${MERGE_TYPE} != binary ]]; then
204 - if tc-is-gcc && ! version_is_at_least 4.8 "$(gcc-version)"; then
205 - die 'At least gcc 4.8 is required, see bugs: #535730, #525374, #518668.'
206 - fi
207 - fi
208 -
209 - # Check build requirements, bug #541816 and bug #471810 .
210 - CHECKREQS_MEMORY="3G"
211 - CHECKREQS_DISK_BUILD="5G"
212 - eshopts_push -s extglob
213 - if is-flagq '-g?(gdb)?([1-9])'; then
214 - CHECKREQS_DISK_BUILD="25G"
215 - fi
216 - eshopts_pop
217 - check-reqs_pkg_pretend
218 -}
219 -
220 -pkg_setup() {
221 - # Make sure the build system will use the right python, bug #344367.
222 - python-any-r1_pkg_setup
223 -
224 - chromium_suid_sandbox_check_kernel_config
225 -}
226 -
227 -src_prepare() {
228 - default
229 -
230 - local keeplibs=(
231 - base/third_party/dmg_fp
232 - base/third_party/dynamic_annotations
233 - base/third_party/icu
234 - base/third_party/nspr
235 - base/third_party/superfasthash
236 - base/third_party/symbolize
237 - base/third_party/valgrind
238 - base/third_party/xdg_mime
239 - base/third_party/xdg_user_dirs
240 - breakpad/src/third_party/curl
241 - chrome/third_party/mozilla_security_manager
242 - courgette/third_party
243 - net/third_party/mozilla_security_manager
244 - net/third_party/nss
245 - third_party/WebKit
246 - third_party/analytics
247 - third_party/angle
248 - third_party/angle/src/common/third_party/numerics
249 - third_party/angle/src/third_party/compiler
250 - third_party/angle/src/third_party/libXNVCtrl
251 - third_party/angle/src/third_party/murmurhash
252 - third_party/angle/src/third_party/trace_event
253 - third_party/boringssl
254 - third_party/brotli
255 - third_party/cacheinvalidation
256 - third_party/catapult
257 - third_party/catapult/third_party/polymer
258 - third_party/catapult/third_party/py_vulcanize
259 - third_party/catapult/third_party/py_vulcanize/third_party/rcssmin
260 - third_party/catapult/third_party/py_vulcanize/third_party/rjsmin
261 - third_party/catapult/tracing/third_party/d3
262 - third_party/catapult/tracing/third_party/gl-matrix
263 - third_party/catapult/tracing/third_party/jszip
264 - third_party/catapult/tracing/third_party/mannwhitneyu
265 - third_party/ced
266 - third_party/cld_2
267 - third_party/cld_3
268 - third_party/cros_system_api
269 - third_party/cython/python_flags.py
270 - third_party/devscripts
271 - third_party/dom_distiller_js
272 - third_party/fips181
273 - third_party/flatbuffers
274 - third_party/flot
275 - third_party/google_input_tools
276 - third_party/google_input_tools/third_party/closure_library
277 - third_party/google_input_tools/third_party/closure_library/third_party/closure
278 - third_party/hunspell
279 - third_party/iccjpeg
280 - third_party/icu
281 - third_party/jstemplate
282 - third_party/khronos
283 - third_party/leveldatabase
284 - third_party/libXNVCtrl
285 - third_party/libaddressinput
286 - third_party/libjingle
287 - third_party/libphonenumber
288 - third_party/libsecret
289 - third_party/libsrtp
290 - third_party/libudev
291 - third_party/libusb
292 - third_party/libwebm
293 - third_party/libxml/chromium
294 - third_party/libyuv
295 - third_party/lss
296 - third_party/lzma_sdk
297 - third_party/mesa
298 - third_party/modp_b64
299 - third_party/mt19937ar
300 - third_party/openh264
301 - third_party/openmax_dl
302 - third_party/opus
303 - third_party/ots
304 - third_party/pdfium
305 - third_party/pdfium/third_party/agg23
306 - third_party/pdfium/third_party/base
307 - third_party/pdfium/third_party/bigint
308 - third_party/pdfium/third_party/freetype
309 - third_party/pdfium/third_party/lcms2-2.6
310 - third_party/pdfium/third_party/libjpeg
311 - third_party/pdfium/third_party/libopenjpeg20
312 - third_party/pdfium/third_party/libpng16
313 - third_party/pdfium/third_party/libtiff
314 - third_party/pdfium/third_party/zlib_v128
315 - third_party/polymer
316 - third_party/protobuf
317 - third_party/protobuf/third_party/six
318 - third_party/qcms
319 - third_party/sfntly
320 - third_party/skia
321 - third_party/smhasher
322 - third_party/sqlite
323 - third_party/tcmalloc
324 - third_party/usrsctp
325 - third_party/web-animations-js
326 - third_party/webdriver
327 - third_party/webrtc
328 - third_party/widevine
329 - third_party/woff2
330 - third_party/x86inc
331 - third_party/zlib/google
332 - url/third_party/mozilla
333 - v8/src/third_party/valgrind
334 - )
335 - if ! use system-ffmpeg; then
336 - keeplibs+=( third_party/ffmpeg )
337 - fi
338 - if use gn; then
339 - keeplibs+=(
340 - base/third_party/libevent
341 - third_party/adobe
342 - third_party/speech-dispatcher
343 - third_party/usb_ids
344 - third_party/xdg-utils
345 - third_party/yasm/run_yasm.py
346 - )
347 - fi
348 -
349 - # Remove most bundled libraries. Some are still needed.
350 - build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
351 -}
352 -
353 -src_configure() {
354 - local myconf_gyp=""
355 - local myconf_gn=""
356 -
357 - # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
358 - myconf_gn+=" is_debug=false"
359 -
360 - # Never tell the build system to "enable" SSE2, it has a few unexpected
361 - # additions, bug #336871.
362 - myconf_gyp+=" -Ddisable_sse2=1"
363 -
364 - # Disable nacl, we can't build without pnacl (http://crbug.com/269560).
365 - myconf_gyp+=" -Ddisable_nacl=1"
366 - myconf_gn+=" enable_nacl=false"
367 -
368 - # Make it possible to remove third_party/adobe.
369 - echo > "${T}/flapper_version.h" || die
370 - myconf_gyp+=" -Dflapper_version_h_file=${T}/flapper_version.h"
371 -
372 - # Use system-provided libraries.
373 - # TODO: use_system_hunspell (upstream changes needed).
374 - # TODO: use_system_icu (bug #576370).
375 - # TODO: use_system_libsrtp (bug #459932).
376 - # TODO: use_system_libusb (http://crbug.com/266149).
377 - # TODO: use_system_opus (https://code.google.com/p/webrtc/issues/detail?id=3077).
378 - # TODO: use_system_protobuf (bug #525560).
379 - # TODO: use_system_ssl (http://crbug.com/58087).
380 - # TODO: use_system_sqlite (http://crbug.com/22208).
381 - myconf_gyp+="
382 - -Duse_system_bzip2=1
383 - -Duse_system_ffmpeg=$(usex system-ffmpeg 1 0)
384 - -Duse_system_flac=1
385 - -Duse_system_harfbuzz=1
386 - -Duse_system_jsoncpp=1
387 - -Duse_system_libevent=1
388 - -Duse_system_libpng=1
389 - -Duse_system_libvpx=1
390 - -Duse_system_libwebp=1
391 - -Duse_system_libxml=1
392 - -Duse_system_libxslt=1
393 - -Duse_system_minizip=1
394 - -Duse_system_nspr=1
395 - -Duse_system_snappy=1
396 - -Duse_system_speex=1
397 - -Duse_system_xdg_utils=1
398 - -Duse_system_zlib=1"
399 -
400 - # libevent: https://bugs.gentoo.org/593458
401 - local gn_system_libraries="
402 - flac
403 - harfbuzz-ng
404 - libjpeg
405 - libpng
406 - libvpx
407 - libwebp
408 - libxml
409 - libxslt
410 - re2
411 - snappy
412 - yasm
413 - zlib"
414 - if use system-ffmpeg; then
415 - gn_system_libraries+=" ffmpeg"
416 - fi
417 - build/linux/unbundle/replace_gn_files.py --system-libraries ${gn_system_libraries} || die
418 -
419 - # Needed for system icu - we don't need additional data files.
420 - # myconf_gyp+=" -Dicu_use_data_file_flag=0"
421 -
422 - # TODO: patch gyp so that this arm conditional is not needed.
423 - if ! use arm; then
424 - myconf_gyp+="
425 - -Duse_system_yasm=1"
426 - fi
427 -
428 - # Optional dependencies.
429 - # TODO: linux_link_kerberos, bug #381289.
430 - myconf_gyp+="
431 - $(gyp_use cups)
432 - $(gyp_use gnome use_gconf)
433 - $(gyp_use gnome-keyring use_gnome_keyring)
434 - $(gyp_use gnome-keyring linux_link_gnome_keyring)
435 - $(gyp_use gtk3)
436 - $(gyp_use hangouts enable_hangout_services_extension)
437 - $(gyp_use kerberos)
438 - $(gyp_use pulseaudio)
439 - $(gyp_use tcmalloc use_allocator tcmalloc none)
440 - $(gyp_use widevine enable_widevine)"
441 -
442 - myconf_gn+=" enable_hangout_services_extension=$(usex hangouts true false)"
443 - myconf_gn+=" enable_widevine=$(usex widevine true false)"
444 - myconf_gn+=" use_cups=$(usex cups true false)"
445 - myconf_gn+=" use_gconf=$(usex gnome true false)"
446 - myconf_gn+=" use_gnome_keyring=$(usex gnome-keyring true false)"
447 - myconf_gn+=" use_gtk3=$(usex gtk3 true false)"
448 - myconf_gn+=" use_kerberos=$(usex kerberos true false)"
449 - myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)"
450 -
451 - # Use explicit library dependencies instead of dlopen.
452 - # This makes breakages easier to detect by revdep-rebuild.
453 - myconf_gyp+="
454 - -Dlinux_link_gsettings=1
455 - -Dlinux_link_libpci=1
456 - -Dlinux_link_libspeechd=1
457 - -Dlibspeechd_h_prefix=speech-dispatcher/"
458 -
459 - # TODO: link_pulseaudio=true for GN.
460 -
461 - # TODO: use the file at run time instead of effectively compiling it in.
462 - myconf_gyp+="
463 - -Dusb_ids_path=/usr/share/misc/usb.ids"
464 -
465 - myconf_gyp+=" -Dfieldtrial_testing_like_official_build=1"
466 - myconf_gn+=" fieldtrial_testing_like_official_build=true"
467 -
468 - if tc-is-clang; then
469 - myconf_gyp+=" -Dclang=1"
470 - myconf_gn+=" is_clang=true clang_base_path=\"/usr\" clang_use_chrome_plugins=false"
471 - else
472 - myconf_gyp+=" -Dclang=0"
473 - myconf_gn+=" is_clang=false"
474 - fi
475 -
476 - # Never use bundled gold binary. Disable gold linker flags for now.
477 - # Do not use bundled clang.
478 - myconf_gyp+="
479 - -Dclang_use_chrome_plugins=0
480 - -Dhost_clang=0
481 - -Dlinux_use_bundled_binutils=0
482 - -Dlinux_use_bundled_gold=0
483 - -Dlinux_use_gold_flags=0
484 - -Dsysroot="
485 - # Trying to use gold results in linker crash.
486 - myconf_gn+=" use_gold=false use_sysroot=false linux_use_bundled_binutils=false"
487 -
488 - ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)"
489 - myconf_gyp+=" -Dproprietary_codecs=1 -Dffmpeg_branding=${ffmpeg_branding}"
490 - myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)"
491 - myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\""
492 -
493 - # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys .
494 - # Note: these are for Gentoo use ONLY. For your own distribution,
495 - # please get your own set of keys. Feel free to contact chromium@g.o
496 - # for more info.
497 - local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc"
498 - local google_default_client_id="329227923882.apps.googleusercontent.com"
499 - local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu"
500 - myconf_gyp+=" -Dgoogle_api_key=${google_api_key}
501 - -Dgoogle_default_client_id=${google_default_client_id}
502 - -Dgoogle_default_client_secret=${google_default_client_secret}"
503 - myconf_gn+=" google_api_key=\"${google_api_key}\""
504 - myconf_gn+=" google_default_client_id=\"${google_default_client_id}\""
505 - myconf_gn+=" google_default_client_secret=\"${google_default_client_secret}\""
506 -
507 - local myarch="$(tc-arch)"
508 - if [[ $myarch = amd64 ]] ; then
509 - target_arch=x64
510 - ffmpeg_target_arch=x64
511 - elif [[ $myarch = x86 ]] ; then
512 - target_arch=ia32
513 - ffmpeg_target_arch=ia32
514 - elif [[ $myarch = arm64 ]] ; then
515 - target_arch=arm64
516 - ffmpeg_target_arch=arm64
517 - elif [[ $myarch = arm ]] ; then
518 - target_arch=arm
519 - ffmpeg_target_arch=$(usex neon arm-neon arm)
520 - # TODO: re-enable NaCl (NativeClient).
521 - local CTARGET=${CTARGET:-${CHOST}}
522 - if [[ $(tc-is-softfloat) == "no" ]]; then
523 -
524 - myconf_gyp+=" -Darm_float_abi=hard"
525 - fi
526 - filter-flags "-mfpu=*"
527 - use neon || myconf_gyp+=" -Darm_fpu=${ARM_FPU:-vfpv3-d16}"
528 -
529 - if [[ ${CTARGET} == armv[78]* ]]; then
530 - myconf_gyp+=" -Darmv7=1"
531 - else
532 - myconf_gyp+=" -Darmv7=0"
533 - fi
534 - myconf_gyp+=" -Dsysroot=
535 - $(gyp_use neon arm_neon)
536 - -Ddisable_nacl=1"
537 - else
538 - die "Failed to determine target arch, got '$myarch'."
539 - fi
540 -
541 - myconf_gyp+=" -Dtarget_arch=${target_arch}"
542 -
543 - # Make sure that -Werror doesn't get added to CFLAGS by the build system.
544 - # Depending on GCC version the warnings are different and we don't want
545 - # the build to fail because of that.
546 - myconf_gyp+=" -Dwerror="
547 - myconf_gn+=" treat_warnings_as_errors=false"
548 -
549 - # Disable fatal linker warnings, bug 506268.
550 - myconf_gyp+=" -Ddisable_fatal_linker_warnings=1"
551 - myconf_gn+=" fatal_linker_warnings=false"
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 - # Define a custom toolchain for GN
573 - myconf_gn+=" custom_toolchain=\"${FILESDIR}/toolchain:default\""
574 -
575 - # Tools for building programs to be executed on the build system, bug #410883.
576 - if tc-is-cross-compiler; then
577 - export AR_host=$(tc-getBUILD_AR)
578 - export CC_host=$(tc-getBUILD_CC)
579 - export CXX_host=$(tc-getBUILD_CXX)
580 - export NM_host=$(tc-getBUILD_NM)
581 - fi
582 -
583 - # Bug 491582.
584 - export TMPDIR="${WORKDIR}/temp"
585 - mkdir -p -m 755 "${TMPDIR}" || die
586 -
587 - if ! use system-ffmpeg; then
588 - local build_ffmpeg_args=""
589 - if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then
590 - build_ffmpeg_args+=" --disable-asm"
591 - fi
592 -
593 - # Re-configure bundled ffmpeg. See bug #491378 for example reasons.
594 - einfo "Configuring bundled ffmpeg..."
595 - pushd third_party/ffmpeg > /dev/null || die
596 - chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \
597 - --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die
598 - chromium/scripts/copy_config.sh || die
599 - chromium/scripts/generate_gyp.py || die
600 - popd > /dev/null || die
601 - fi
602 -
603 - third_party/libaddressinput/chromium/tools/update-strings.py || die
604 -
605 - touch chrome/test/data/webui/i18n_process_css_test.html || die
606 -
607 - einfo "Configuring Chromium..."
608 - if use gn; then
609 - # TODO: bootstrapped gn binary hangs when using tcmalloc with portage's sandbox.
610 - tools/gn/bootstrap/bootstrap.py -v --gn-gen-args "${myconf_gn} use_allocator=\"none\"" || die
611 - myconf_gn+=" use_allocator=$(usex tcmalloc \"tcmalloc\" \"none\")"
612 - out/Release/gn gen --args="${myconf_gn}" out/Release || die
613 - else
614 - build/linux/unbundle/replace_gyp_files.py ${myconf_gyp} || die
615 - egyp_chromium ${myconf_gyp} || die
616 - fi
617 -}
618 -
619 -eninja() {
620 - if [[ -z ${NINJAOPTS+set} ]]; then
621 - local jobs=$(makeopts_jobs)
622 - local loadavg=$(makeopts_loadavg)
623 -
624 - if [[ ${MAKEOPTS} == *-j* && ${jobs} != 999 ]]; then
625 - NINJAOPTS+=" -j ${jobs}"
626 - fi
627 - if [[ ${MAKEOPTS} == *-l* && ${loadavg} != 999 ]]; then
628 - NINJAOPTS+=" -l ${loadavg}"
629 - fi
630 - fi
631 - set -- ninja -v ${NINJAOPTS} "$@"
632 - echo "$@"
633 - "$@"
634 -}
635 -
636 -src_compile() {
637 - local ninja_targets="chrome chromedriver"
638 - if use suid; then
639 - ninja_targets+=" chrome_sandbox"
640 - fi
641 -
642 - # Build mksnapshot and pax-mark it.
643 - eninja -C out/Release mksnapshot || die
644 - pax-mark m out/Release/mksnapshot
645 -
646 - # Even though ninja autodetects number of CPUs, we respect
647 - # user's options, for debugging with -j 1 or any other reason.
648 - eninja -C out/Release ${ninja_targets} || die
649 -
650 - pax-mark m out/Release/chrome
651 -}
652 -
653 -src_install() {
654 - local CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser${CHROMIUM_SUFFIX}"
655 - exeinto "${CHROMIUM_HOME}"
656 - doexe out/Release/chrome || die
657 -
658 - if use suid; then
659 - newexe out/Release/chrome_sandbox chrome-sandbox || die
660 - fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
661 - fi
662 -
663 - doexe out/Release/chromedriver || die
664 - use widevine && doexe out/Release/libwidevinecdmadapter.so
665 -
666 - # if ! use arm; then
667 - # doexe out/Release/nacl_helper{,_bootstrap} || die
668 - # insinto "${CHROMIUM_HOME}"
669 - # doins out/Release/nacl_irt_*.nexe || die
670 - # doins out/Release/libppGoogleNaClPluginChrome.so || die
671 - # fi
672 -
673 - local sedargs=( -e "s:/usr/lib/:/usr/$(get_libdir)/:g" )
674 - if [[ -n ${CHROMIUM_SUFFIX} ]]; then
675 - sedargs+=(
676 - -e "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g"
677 - -e "s:chromium.desktop:chromium${CHROMIUM_SUFFIX}.desktop:g"
678 - -e "s:plugins:plugins --user-data-dir=\${HOME}/.config/chromium${CHROMIUM_SUFFIX}:"
679 - )
680 - fi
681 - sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r3.sh" > chromium-launcher.sh || die
682 - doexe chromium-launcher.sh
683 -
684 - # It is important that we name the target "chromium-browser",
685 - # xdg-utils expect it; bug #355517.
686 - dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser${CHROMIUM_SUFFIX} || die
687 - # keep the old symlink around for consistency
688 - dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium${CHROMIUM_SUFFIX} || die
689 -
690 - dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver${CHROMIUM_SUFFIX} || die
691 -
692 - # Allow users to override command-line options, bug #357629.
693 - dodir /etc/chromium || die
694 - insinto /etc/chromium
695 - newins "${FILESDIR}/chromium.default" "default" || die
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 || die
703 - doins out/Release/*.pak || die
704 -
705 - doins out/Release/icudtl.dat || die
706 -
707 - doins -r out/Release/locales || die
708 - doins -r out/Release/resources || die
709 -
710 - newman out/Release/chrome.1 chromium${CHROMIUM_SUFFIX}.1 || die
711 - newman out/Release/chrome.1 chromium-browser${CHROMIUM_SUFFIX}.1 || die
712 -
713 - # Install icons and desktop entry.
714 - local branding size
715 - for size in 16 22 24 32 48 64 128 256 ; do
716 - case ${size} in
717 - 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
718 - *) branding="chrome/app/theme/chromium" ;;
719 - esac
720 - newicon -s ${size} "${branding}/product_logo_${size}.png" \
721 - chromium-browser${CHROMIUM_SUFFIX}.png
722 - done
723 -
724 - local mime_types="text/html;text/xml;application/xhtml+xml;"
725 - mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797
726 - mime_types+="x-scheme-handler/ftp;" # bug #412185
727 - mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393
728 - make_desktop_entry \
729 - chromium-browser${CHROMIUM_SUFFIX} \
730 - "Chromium${CHROMIUM_SUFFIX}" \
731 - chromium-browser${CHROMIUM_SUFFIX} \
732 - "Network;WebBrowser" \
733 - "MimeType=${mime_types}\nStartupWMClass=chromium-browser"
734 - sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die
735 -
736 - # Install GNOME default application entry (bug #303100).
737 - if use gnome; then
738 - dodir /usr/share/gnome-control-center/default-apps || die
739 - insinto /usr/share/gnome-control-center/default-apps
740 - newins "${FILESDIR}"/chromium-browser.xml chromium-browser${CHROMIUM_SUFFIX}.xml || die
741 - if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then
742 - sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" -i \
743 - "${ED}"/usr/share/gnome-control-center/default-apps/chromium-browser${CHROMIUM_SUFFIX}.xml
744 - fi
745 - fi
746 -
747 - readme.gentoo_create_doc
748 -}
749 -
750 -pkg_preinst() {
751 - gnome2_icon_savelist
752 -}
753 -
754 -pkg_postrm() {
755 - gnome2_icon_cache_update
756 - xdg_desktop_database_update
757 -}
758 -
759 -pkg_postinst() {
760 - gnome2_icon_cache_update
761 - xdg_desktop_database_update
762 - readme.gentoo_print_elog
763 -}