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