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: Sun, 04 Dec 2016 22:29:34
Message-Id: 1480890566.e42aa32dbbf84df2c954615fb1815f5cfc149443.floppym@gentoo
1 commit: e42aa32dbbf84df2c954615fb1815f5cfc149443
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 4 22:29:26 2016 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 4 22:29:26 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e42aa32d
7
8 www-client/chromium: remove old
9
10 Package-Manager: portage-2.3.2_p13
11
12 www-client/chromium/Manifest | 1 -
13 www-client/chromium/chromium-54.0.2840.100.ebuild | 735 ----------------------
14 2 files changed, 736 deletions(-)
15
16 diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest
17 index e2ef177..610d114 100644
18 --- a/www-client/chromium/Manifest
19 +++ b/www-client/chromium/Manifest
20 @@ -1,4 +1,3 @@
21 -DIST chromium-54.0.2840.100.tar.xz 479762112 SHA256 e2e7f54a780c93ec2e933af09e1126837e6cf940b57213d39f36d58df10c89df SHA512 52f34db6f68bbf2c8a1ac71789dfa7b6ee17ea97519d0a9a1079d78324cffe55572652701e05055f08e03230d887674757322399062f2f5354b1e43c3fdf8f78 WHIRLPOOL e9e47d695b32aff2a5c654cdec664ea3f94307639e9f330bd231ff6d762ea9caffe1130595dbb36443eefc8bccac92839bc967db89dbed236c5bfa91c6fc6e9b
22 DIST chromium-55.0.2883.75.tar.xz 511256096 SHA256 5bcf7180935bebc7648f7e2577f612da681f7846127f79dac22630ded9984e55 SHA512 9830b02e05ebaf120b02b11114c67196ba5c7f2d5aa917b9e5f8516b1f0cce1abd8e752c379e8ac1f16c7b7e451341486d9356d47a1b77b72ab5117390ce16b9 WHIRLPOOL ab752b9e9a6c7a536424ac1384d9f0ad0f23dd40bbf6784e4185554602628e8e1f45acbb264fff33f7f00c8ee14f293bfaf23259d2db4f785c9c9c49e72b28eb
23 DIST chromium-56.0.2924.10.tar.xz 512579188 SHA256 6fd603951fdefc5e513f7b19325edd81ca17648e9aeb9bab458ff756a268953b SHA512 6901587421fa47530d4343fe77a644bfe8759f7a310b234a563f5662251272fb70a9bde9b5b083bd98c72ef52378d0746eacb2c1baab8df4fbc0f6abc21b96a7 WHIRLPOOL 670eb556245d6c60cd954f7c8ffbc6ffbd2dce27dea85f9e171f8ba0941970f57e14cef3f3cdd8132faf61a0d4559250a1faf4d116094635cb60e460e58eaaf4
24 DIST chromium-56.0.2924.14.tar.xz 513240844 SHA256 4e8d340abdbdeb6c0ddbda7c8692010dd48515161c2f67532546947660f11b92 SHA512 dd814726d786450c47719715264bad3dd5682d0c4bae9e84355e1f67772dd20032c06b491615e41c9af08f6af47204405f777f85543b36d9b5f51e8bba3d8042 WHIRLPOOL 12cd0fa35d0829cb6206b40ab91fae9cb7b42afdd9b89bc75edc0a6f8fe0e494d573912ac2bd9166ef30c9db3e536150dbf35875ec75d466594ddf891586d60d
25
26 diff --git a/www-client/chromium/chromium-54.0.2840.100.ebuild b/www-client/chromium/chromium-54.0.2840.100.ebuild
27 deleted file mode 100644
28 index 3c2597f..00000000
29 --- a/www-client/chromium/chromium-54.0.2840.100.ebuild
30 +++ /dev/null
31 @@ -1,735 +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="6"
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 +suid +system-ffmpeg +tcmalloc widevine"
53 -RESTRICT="!system-ffmpeg? ( proprietary-codecs? ( bindist ) )"
54 -
55 -# Native Client binaries are compiled with different set of flags, bug #452066.
56 -QA_FLAGS_IGNORED=".*\.nexe"
57 -
58 -# Native Client binaries may be stripped by the build system, which uses the
59 -# right tools for it, bug #469144 .
60 -QA_PRESTRIPPED=".*\.nexe"
61 -
62 -COMMON_DEPEND="
63 - app-arch/bzip2:=
64 - cups? ( >=net-print/cups-1.3.11:= )
65 - >=dev-libs/elfutils-0.149
66 - dev-libs/expat:=
67 - dev-libs/glib:=
68 - >=dev-libs/jsoncpp-0.5.0-r1:=
69 - dev-libs/nspr:=
70 - >=dev-libs/nss-3.14.3:=
71 - >=dev-libs/re2-0.2016.05.01:=
72 - gnome? ( >=gnome-base/gconf-2.24.0:= )
73 - gnome-keyring? ( >=gnome-base/libgnome-keyring-3.12:= )
74 - >=media-libs/alsa-lib-1.0.19:=
75 - media-libs/fontconfig:=
76 - media-libs/freetype:=
77 - media-libs/libexif:=
78 - media-libs/libjpeg-turbo:=
79 - media-libs/libpng:=
80 - media-libs/libvpx:=[svc]
81 - media-libs/speex:=
82 - pulseaudio? ( media-sound/pulseaudio:= )
83 - system-ffmpeg? ( >=media-video/ffmpeg-2.7.2:= )
84 - sys-apps/dbus:=
85 - sys-apps/pciutils:=
86 - >=sys-libs/libcap-2.22:=
87 - virtual/udev
88 - x11-libs/cairo:=
89 - x11-libs/gdk-pixbuf:=
90 - gtk3? ( x11-libs/gtk+:3= )
91 - !gtk3? ( x11-libs/gtk+:2= )
92 - x11-libs/libdrm
93 - x11-libs/libX11:=
94 - x11-libs/libXcomposite:=
95 - x11-libs/libXcursor:=
96 - x11-libs/libXdamage:=
97 - x11-libs/libXext:=
98 - x11-libs/libXfixes:=
99 - >=x11-libs/libXi-1.6.0:=
100 - x11-libs/libXinerama:=
101 - x11-libs/libXrandr:=
102 - x11-libs/libXrender:=
103 - x11-libs/libXScrnSaver:=
104 - x11-libs/libXtst:=
105 - x11-libs/pango:=
106 - app-arch/snappy:=
107 - dev-libs/libxml2:=[icu]
108 - dev-libs/libxslt:=
109 - media-libs/flac:=
110 - >=media-libs/harfbuzz-1.3.1:=[icu(+)]
111 - >=media-libs/libwebp-0.4.0:=
112 - sys-libs/zlib:=[minizip]
113 - kerberos? ( virtual/krb5 )
114 - !gn? (
115 - >=app-accessibility/speech-dispatcher-0.8:=
116 - >=dev-libs/libevent-1.4.13:=
117 - )
118 -"
119 -# For nvidia-drivers blocker, see bug #413637 .
120 -RDEPEND="${COMMON_DEPEND}
121 - !=www-client/chromium-9999
122 - !<www-plugins/chrome-binary-plugins-37
123 - x11-misc/xdg-utils
124 - virtual/opengl
125 - virtual/ttf-fonts
126 - selinux? ( sec-policy/selinux-chromium )
127 - tcmalloc? ( !<x11-drivers/nvidia-drivers-331.20 )
128 - widevine? ( www-plugins/chrome-binary-plugins[widevine(-)] )
129 -"
130 -# dev-vcs/git - https://bugs.gentoo.org/593476
131 -DEPEND="${COMMON_DEPEND}
132 - >=app-arch/gzip-1.7
133 - !arm? (
134 - dev-lang/yasm
135 - )
136 - dev-lang/perl
137 - dev-perl/JSON
138 - >=dev-util/gperf-3.0.3
139 - dev-util/ninja
140 - sys-apps/hwids[usb(+)]
141 - >=sys-devel/bison-2.4.3
142 - sys-devel/flex
143 - virtual/pkgconfig
144 - dev-vcs/git
145 - $(python_gen_any_dep '
146 - dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]
147 - >=dev-python/beautifulsoup-4.3.2:4[${PYTHON_USEDEP}]
148 - dev-python/html5lib[${PYTHON_USEDEP}]
149 - dev-python/jinja[${PYTHON_USEDEP}]
150 - dev-python/ply[${PYTHON_USEDEP}]
151 - dev-python/simplejson[${PYTHON_USEDEP}]
152 - ')
153 -"
154 -
155 -# Keep this in sync with the python_gen_any_dep call.
156 -python_check_deps() {
157 - has_version --host-root "dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]" &&
158 - has_version --host-root ">=dev-python/beautifulsoup-4.3.2:4[${PYTHON_USEDEP}]" &&
159 - has_version --host-root "dev-python/html5lib[${PYTHON_USEDEP}]" &&
160 - has_version --host-root "dev-python/jinja[${PYTHON_USEDEP}]" &&
161 - has_version --host-root "dev-python/ply[${PYTHON_USEDEP}]" &&
162 - has_version --host-root "dev-python/simplejson[${PYTHON_USEDEP}]"
163 -}
164 -
165 -if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
166 - EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
167 -fi
168 -
169 -DISABLE_AUTOFORMATTING="yes"
170 -DOC_CONTENTS="
171 -Some web pages may require additional fonts to display properly.
172 -Try installing some of the following packages if some characters
173 -are not displayed properly:
174 -- media-fonts/arphicfonts
175 -- media-fonts/bitstream-cyberbit
176 -- media-fonts/droid
177 -- media-fonts/ipamonafont
178 -- media-fonts/noto
179 -- media-fonts/ja-ipafonts
180 -- media-fonts/takao-fonts
181 -- media-fonts/wqy-microhei
182 -- media-fonts/wqy-zenhei
183 -
184 -Depending on your desktop environment, you may need
185 -to install additional packages to get icons on the Downloads page.
186 -
187 -For KDE, the required package is kde-frameworks/oxygen-icons.
188 -
189 -For other desktop environments, try one of the following:
190 -- x11-themes/gnome-icon-theme
191 -- x11-themes/tango-icon-theme
192 -"
193 -
194 -PATCHES=(
195 - "${FILESDIR}/${PN}-system-ffmpeg-r3.patch"
196 - "${FILESDIR}/${PN}-system-jinja-r13.patch"
197 - "${FILESDIR}/${PN}-widevine-r1.patch"
198 - "${FILESDIR}/chromium-54-ffmpeg2compat.patch"
199 - "${FILESDIR}/${PN}-gn-bootstrap-ld.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 - # https://bugs.gentoo.org/588596
573 - append-cxxflags $(test-flags-CXX -fno-delete-null-pointer-checks)
574 -
575 - # Define a custom toolchain for GN
576 - myconf_gn+=" custom_toolchain=\"${FILESDIR}/toolchain:default\""
577 -
578 - # Tools for building programs to be executed on the build system, bug #410883.
579 - if tc-is-cross-compiler; then
580 - export AR_host=$(tc-getBUILD_AR)
581 - export CC_host=$(tc-getBUILD_CC)
582 - export CXX_host=$(tc-getBUILD_CXX)
583 - export NM_host=$(tc-getBUILD_NM)
584 - fi
585 -
586 - # Bug 491582.
587 - export TMPDIR="${WORKDIR}/temp"
588 - mkdir -p -m 755 "${TMPDIR}" || die
589 -
590 - if ! use system-ffmpeg; then
591 - local build_ffmpeg_args=""
592 - if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then
593 - build_ffmpeg_args+=" --disable-asm"
594 - fi
595 -
596 - # Re-configure bundled ffmpeg. See bug #491378 for example reasons.
597 - einfo "Configuring bundled ffmpeg..."
598 - pushd third_party/ffmpeg > /dev/null || die
599 - chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \
600 - --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die
601 - chromium/scripts/copy_config.sh || die
602 - chromium/scripts/generate_gyp.py || die
603 - popd > /dev/null || die
604 - fi
605 -
606 - third_party/libaddressinput/chromium/tools/update-strings.py || die
607 -
608 - touch chrome/test/data/webui/i18n_process_css_test.html || die
609 -
610 - einfo "Configuring Chromium..."
611 - if use gn; then
612 - # TODO: bootstrapped gn binary hangs when using tcmalloc with portage's sandbox.
613 - tools/gn/bootstrap/bootstrap.py -v --gn-gen-args "${myconf_gn} use_allocator=\"none\"" || die
614 - myconf_gn+=" use_allocator=$(usex tcmalloc \"tcmalloc\" \"none\")"
615 - out/Release/gn gen --args="${myconf_gn}" out/Release || die
616 - else
617 - build/linux/unbundle/replace_gyp_files.py ${myconf_gyp} || die
618 - egyp_chromium ${myconf_gyp} || die
619 - fi
620 -}
621 -
622 -eninja() {
623 - if [[ -z ${NINJAOPTS+set} ]]; then
624 - local jobs=$(makeopts_jobs)
625 - local loadavg=$(makeopts_loadavg)
626 -
627 - if [[ ${MAKEOPTS} == *-j* && ${jobs} != 999 ]]; then
628 - NINJAOPTS+=" -j ${jobs}"
629 - fi
630 - if [[ ${MAKEOPTS} == *-l* && ${loadavg} != 999 ]]; then
631 - NINJAOPTS+=" -l ${loadavg}"
632 - fi
633 - fi
634 - set -- ninja -v ${NINJAOPTS} "$@"
635 - echo "$@"
636 - "$@"
637 -}
638 -
639 -src_compile() {
640 - local ninja_targets="chrome chromedriver"
641 - if use suid; then
642 - ninja_targets+=" chrome_sandbox"
643 - fi
644 -
645 - # Build mksnapshot and pax-mark it.
646 - eninja -C out/Release mksnapshot || die
647 - pax-mark m out/Release/mksnapshot
648 -
649 - # Even though ninja autodetects number of CPUs, we respect
650 - # user's options, for debugging with -j 1 or any other reason.
651 - eninja -C out/Release ${ninja_targets} || die
652 -
653 - pax-mark m out/Release/chrome
654 -}
655 -
656 -src_install() {
657 - local CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser${CHROMIUM_SUFFIX}"
658 - exeinto "${CHROMIUM_HOME}"
659 - doexe out/Release/chrome || die
660 -
661 - if use suid; then
662 - newexe out/Release/chrome_sandbox chrome-sandbox || die
663 - fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
664 - fi
665 -
666 - doexe out/Release/chromedriver || die
667 - use widevine && doexe out/Release/libwidevinecdmadapter.so
668 -
669 - # if ! use arm; then
670 - # doexe out/Release/nacl_helper{,_bootstrap} || die
671 - # insinto "${CHROMIUM_HOME}"
672 - # doins out/Release/nacl_irt_*.nexe || die
673 - # doins out/Release/libppGoogleNaClPluginChrome.so || die
674 - # fi
675 -
676 - local sedargs=( -e "s:/usr/lib/:/usr/$(get_libdir)/:g" )
677 - if [[ -n ${CHROMIUM_SUFFIX} ]]; then
678 - sedargs+=(
679 - -e "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g"
680 - -e "s:chromium.desktop:chromium${CHROMIUM_SUFFIX}.desktop:g"
681 - -e "s:plugins:plugins --user-data-dir=\${HOME}/.config/chromium${CHROMIUM_SUFFIX}:"
682 - )
683 - fi
684 - sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r3.sh" > chromium-launcher.sh || die
685 - doexe chromium-launcher.sh
686 -
687 - # It is important that we name the target "chromium-browser",
688 - # xdg-utils expect it; bug #355517.
689 - dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser${CHROMIUM_SUFFIX} || die
690 - # keep the old symlink around for consistency
691 - dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium${CHROMIUM_SUFFIX} || die
692 -
693 - dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver${CHROMIUM_SUFFIX} || die
694 -
695 - # Allow users to override command-line options, bug #357629.
696 - dodir /etc/chromium || die
697 - insinto /etc/chromium
698 - newins "${FILESDIR}/chromium.default" "default" || die
699 -
700 - pushd out/Release/locales > /dev/null || die
701 - chromium_remove_language_paks
702 - popd
703 -
704 - insinto "${CHROMIUM_HOME}"
705 - doins out/Release/*.bin || die
706 - doins out/Release/*.pak || die
707 -
708 - doins out/Release/icudtl.dat || die
709 -
710 - doins -r out/Release/locales || die
711 - doins -r out/Release/resources || die
712 -
713 - newman out/Release/chrome.1 chromium${CHROMIUM_SUFFIX}.1 || die
714 - newman out/Release/chrome.1 chromium-browser${CHROMIUM_SUFFIX}.1 || die
715 -
716 - # Install icons and desktop entry.
717 - local branding size
718 - for size in 16 22 24 32 48 64 128 256 ; do
719 - case ${size} in
720 - 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
721 - *) branding="chrome/app/theme/chromium" ;;
722 - esac
723 - newicon -s ${size} "${branding}/product_logo_${size}.png" \
724 - chromium-browser${CHROMIUM_SUFFIX}.png
725 - done
726 -
727 - local mime_types="text/html;text/xml;application/xhtml+xml;"
728 - mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797
729 - mime_types+="x-scheme-handler/ftp;" # bug #412185
730 - mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393
731 - make_desktop_entry \
732 - chromium-browser${CHROMIUM_SUFFIX} \
733 - "Chromium${CHROMIUM_SUFFIX}" \
734 - chromium-browser${CHROMIUM_SUFFIX} \
735 - "Network;WebBrowser" \
736 - "MimeType=${mime_types}\nStartupWMClass=chromium-browser"
737 - sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die
738 -
739 - # Install GNOME default application entry (bug #303100).
740 - if use gnome; then
741 - dodir /usr/share/gnome-control-center/default-apps || die
742 - insinto /usr/share/gnome-control-center/default-apps
743 - newins "${FILESDIR}"/chromium-browser.xml chromium-browser${CHROMIUM_SUFFIX}.xml || die
744 - if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then
745 - sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" -i \
746 - "${ED}"/usr/share/gnome-control-center/default-apps/chromium-browser${CHROMIUM_SUFFIX}.xml
747 - fi
748 - fi
749 -
750 - readme.gentoo_create_doc
751 -}
752 -
753 -pkg_preinst() {
754 - gnome2_icon_savelist
755 -}
756 -
757 -pkg_postrm() {
758 - gnome2_icon_cache_update
759 - xdg_desktop_database_update
760 -}
761 -
762 -pkg_postinst() {
763 - gnome2_icon_cache_update
764 - xdg_desktop_database_update
765 - readme.gentoo_print_elog
766 -}