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