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