Gentoo Archives: gentoo-commits

From: "Mike Gilbert (floppym)" <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-client/chromium: chromium-43.0.2357.130.ebuild ChangeLog
Date: Tue, 23 Jun 2015 23:54:12
Message-Id: 20150623235401.E0AE9A40@oystercatcher.gentoo.org
1 floppym 15/06/23 23:54:01
2
3 Modified: ChangeLog
4 Added: chromium-43.0.2357.130.ebuild
5 Log:
6 Bump. Add hotwording use flag.
7
8 (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4)
9
10 Revision Changes Path
11 1.1258 www-client/chromium/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.1258&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.1258&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?r1=1.1257&r2=1.1258
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v
20 retrieving revision 1.1257
21 retrieving revision 1.1258
22 diff -u -r1.1257 -r1.1258
23 --- ChangeLog 23 Jun 2015 01:41:28 -0000 1.1257
24 +++ ChangeLog 23 Jun 2015 23:54:01 -0000 1.1258
25 @@ -1,6 +1,11 @@
26 # ChangeLog for www-client/chromium
27 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.1257 2015/06/23 01:41:28 floppym Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.1258 2015/06/23 23:54:01 floppym Exp $
30 +
31 +*chromium-43.0.2357.130 (23 Jun 2015)
32 +
33 + 23 Jun 2015; Mike Gilbert <floppym@g.o> +chromium-43.0.2357.130.ebuild:
34 + Bump. Add hotwording use flag.
35
36 23 Jun 2015; Mike Gilbert <floppym@g.o>
37 +files/chromium-hotwording-2403.patch, chromium-44.0.2403.30.ebuild:
38
39
40
41 1.1 www-client/chromium/chromium-43.0.2357.130.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-43.0.2357.130.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-43.0.2357.130.ebuild?rev=1.1&content-type=text/plain
45
46 Index: chromium-43.0.2357.130.ebuild
47 ===================================================================
48 # Copyright 1999-2015 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-43.0.2357.130.ebuild,v 1.1 2015/06/23 23:54:01 floppym Exp $
51
52 EAPI="5"
53 PYTHON_COMPAT=( python2_7 )
54
55 CHROMIUM_LANGS="am ar bg bn ca cs da de el en_GB es es_LA et fa fi fil fr gu he
56 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
57 sv sw ta te th tr uk vi zh_CN zh_TW"
58
59 inherit check-reqs chromium eutils flag-o-matic multilib multiprocessing pax-utils \
60 portability python-any-r1 readme.gentoo toolchain-funcs versionator virtualx
61
62 DESCRIPTION="Open-source version of Google Chrome web browser"
63 HOMEPAGE="http://chromium.org/"
64 SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.xz"
65
66 LICENSE="BSD hotwording? ( no-source-code )"
67 SLOT="0"
68 KEYWORDS="~amd64 ~arm ~x86"
69 IUSE="cups gnome gnome-keyring hidpi hotwording kerberos neon pic +proprietary-codecs pulseaudio selinux +tcmalloc widevine"
70 RESTRICT="proprietary-codecs? ( bindist )"
71
72 # Native Client binaries are compiled with different set of flags, bug #452066.
73 QA_FLAGS_IGNORED=".*\.nexe"
74
75 # Native Client binaries may be stripped by the build system, which uses the
76 # right tools for it, bug #469144 .
77 QA_PRESTRIPPED=".*\.nexe"
78
79 RDEPEND=">=app-accessibility/speech-dispatcher-0.8:=
80 app-arch/bzip2:=
81 app-arch/snappy:=
82 cups? ( >=net-print/cups-1.3.11:= )
83 >=dev-libs/elfutils-0.149
84 dev-libs/expat:=
85 dev-libs/glib:=
86 dev-libs/icu:=
87 >=dev-libs/jsoncpp-0.5.0-r1:=
88 >=dev-libs/libevent-1.4.13:=
89 dev-libs/libxml2:=[icu]
90 dev-libs/libxslt:=
91 dev-libs/nspr:=
92 >=dev-libs/nss-3.14.3:=
93 dev-libs/re2:=
94 gnome? ( >=gnome-base/gconf-2.24.0:= )
95 gnome-keyring? ( >=gnome-base/libgnome-keyring-3.12:= )
96 >=media-libs/alsa-lib-1.0.19:=
97 media-libs/flac:=
98 media-libs/fontconfig:=
99 media-libs/freetype:=
100 media-libs/harfbuzz:=[icu(+)]
101 media-libs/libexif:=
102 >=media-libs/libjpeg-turbo-1.2.0-r1:=
103 media-libs/libpng:0=
104 >=media-libs/libwebp-0.4.0:=
105 >=media-libs/libvpx-1.4.0:=
106 media-libs/speex:=
107 pulseaudio? ( media-sound/pulseaudio:= )
108 sys-apps/dbus:=
109 sys-apps/pciutils:=
110 >=sys-libs/libcap-2.22:=
111 sys-libs/zlib:=[minizip]
112 virtual/udev
113 x11-libs/cairo:=
114 x11-libs/gdk-pixbuf:=
115 x11-libs/gtk+:2=
116 x11-libs/libdrm
117 x11-libs/libX11:=
118 x11-libs/libXcomposite:=
119 x11-libs/libXcursor:=
120 x11-libs/libXdamage:=
121 x11-libs/libXext:=
122 x11-libs/libXfixes:=
123 >=x11-libs/libXi-1.6.0:=
124 x11-libs/libXinerama:=
125 x11-libs/libXrandr:=
126 x11-libs/libXrender:=
127 x11-libs/libXScrnSaver:=
128 x11-libs/libXtst:=
129 x11-libs/pango:=
130 kerberos? ( virtual/krb5 )"
131 DEPEND="${RDEPEND}
132 !arm? (
133 dev-lang/yasm
134 )
135 dev-lang/perl
136 dev-perl/JSON
137 >=dev-util/gperf-3.0.3
138 dev-util/ninja
139 sys-apps/hwids[usb(+)]
140 >=sys-devel/bison-2.4.3
141 sys-devel/flex
142 virtual/pkgconfig
143 widevine? ( www-plugins/chrome-binary-plugins[widevine] )"
144 # We build-dep on having widevine, because the patch
145 # below must extract the current version.
146
147 # For nvidia-drivers blocker, see bug #413637 .
148 RDEPEND+="
149 !=www-client/chromium-9999
150 !<www-plugins/chrome-binary-plugins-37
151 x11-misc/xdg-utils
152 virtual/opengl
153 virtual/ttf-fonts
154 selinux? ( sec-policy/selinux-chromium )
155 tcmalloc? ( !<x11-drivers/nvidia-drivers-331.20 )"
156
157 # Python dependencies. The DEPEND part needs to be kept in sync
158 # with python_check_deps.
159 DEPEND+=" $(python_gen_any_dep '
160 dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]
161 dev-python/jinja[${PYTHON_USEDEP}]
162 dev-python/ply[${PYTHON_USEDEP}]
163 dev-python/simplejson[${PYTHON_USEDEP}]
164 ')"
165 python_check_deps() {
166 has_version "dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]" && \
167 has_version "dev-python/jinja[${PYTHON_USEDEP}]" && \
168 has_version "dev-python/ply[${PYTHON_USEDEP}]" && \
169 has_version "dev-python/simplejson[${PYTHON_USEDEP}]"
170 }
171
172 if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
173 EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
174 fi
175
176 DISABLE_AUTOFORMATTING="yes"
177 DOC_CONTENTS="
178 Some web pages may require additional fonts to display properly.
179 Try installing some of the following packages if some characters
180 are not displayed properly:
181 - media-fonts/arphicfonts
182 - media-fonts/bitstream-cyberbit
183 - media-fonts/droid
184 - media-fonts/ipamonafont
185 - media-fonts/ja-ipafonts
186 - media-fonts/takao-fonts
187 - media-fonts/wqy-microhei
188 - media-fonts/wqy-zenhei
189
190 Depending on your desktop environment, you may need
191 to install additional packages to get icons on the Downloads page.
192
193 For KDE, the required package is kde-apps/oxygen-icons.
194
195 For other desktop environments, try one of the following:
196 - x11-themes/gnome-icon-theme
197 - x11-themes/tango-icon-theme
198 "
199
200 pkg_pretend() {
201 if [[ $(tc-getCC)$ == *gcc* ]] && \
202 [[ $(gcc-major-version)$(gcc-minor-version) -lt 48 ]]; then
203 die 'At least gcc 4.8 is required, see bugs: #535730, #525374, #518668.'
204 fi
205
206 # Check build requirements, bug #541816 .
207 CHECKREQS_DISK_BUILD="5G"
208 eshopts_push -s extglob
209 if is-flagq '-g?(gdb)?([1-9])'; then
210 CHECKREQS_DISK_BUILD="25G"
211 fi
212 eshopts_pop
213 check-reqs_pkg_pretend
214 }
215
216 pkg_setup() {
217 if [[ "${SLOT}" == "0" ]]; then
218 CHROMIUM_SUFFIX=""
219 else
220 CHROMIUM_SUFFIX="-${SLOT}"
221 fi
222 CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser${CHROMIUM_SUFFIX}"
223
224 # Make sure the build system will use the right python, bug #344367.
225 python-any-r1_pkg_setup
226
227 chromium_suid_sandbox_check_kernel_config
228 }
229
230 src_prepare() {
231 # if ! use arm; then
232 # mkdir -p out/Release/gen/sdk/toolchain || die
233 # # Do not preserve SELinux context, bug #460892 .
234 # cp -a --no-preserve=context /usr/$(get_libdir)/nacl-toolchain-newlib \
235 # out/Release/gen/sdk/toolchain/linux_x86_newlib || die
236 # touch out/Release/gen/sdk/toolchain/linux_x86_newlib/stamp.untar || die
237 # fi
238
239 epatch "${FILESDIR}/${PN}-system-jinja-r7.patch"
240 epatch "${FILESDIR}/${PN}-system-libvpx-r0.patch"
241 epatch "${FILESDIR}/${PN}-hotwording-2403.patch"
242
243 if use widevine; then
244 local WIDEVINE_VERSION="$(< "${ROOT}/usr/$(get_libdir)/chromium-browser/widevine.version")"
245 [[ -z $WIDEVINE_VERSION ]] && die "Could not determine Widevine version."
246 sed -e "s/@WIDEVINE_VERSION@/${WIDEVINE_VERSION}/" "${FILESDIR}/${PN}-widevine.patch" > "${T}/${PN}-widevine-${WIDEVINE_VERSION}.patch"
247 epatch "${T}/${PN}-widevine-${WIDEVINE_VERSION}.patch"
248 local WIDEVINE_SUPPORTED_ARCHS="x64 ia32"
249 local arch
250 for arch in $WIDEVINE_SUPPORTED_ARCHS; do
251 mkdir -p third_party/widevine/cdm/linux/$arch
252 cp "${ROOT}/usr/$(get_libdir)/chromium-browser/libwidevinecdm.so" third_party/widevine/cdm/widevine_cdm_*.h third_party/widevine/cdm/linux/$arch/ || die "Could not copy headers for Widevine."
253 done
254 fi
255
256 epatch_user
257
258 # Remove most bundled libraries. Some are still needed.
259 build/linux/unbundle/remove_bundled_libraries.py \
260 'base/third_party/dmg_fp' \
261 'base/third_party/dynamic_annotations' \
262 'base/third_party/icu' \
263 'base/third_party/nspr' \
264 'base/third_party/superfasthash' \
265 'base/third_party/symbolize' \
266 'base/third_party/valgrind' \
267 'base/third_party/xdg_mime' \
268 'base/third_party/xdg_user_dirs' \
269 'breakpad/src/third_party/curl' \
270 'chrome/third_party/mozilla_security_manager' \
271 'courgette/third_party' \
272 'crypto/third_party/nss' \
273 'net/third_party/mozilla_security_manager' \
274 'net/third_party/nss' \
275 'third_party/WebKit' \
276 'third_party/analytics' \
277 'third_party/angle' \
278 'third_party/angle/src/third_party/compiler' \
279 'third_party/brotli' \
280 'third_party/cacheinvalidation' \
281 'third_party/cld_2' \
282 'third_party/cros_system_api' \
283 'third_party/cython/python_flags.py' \
284 'third_party/dom_distiller_js' \
285 'third_party/dom_distiller_js/dist/proto_gen/third_party/dom_distiller_js' \
286 'third_party/ffmpeg' \
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/jstemplate' \
295 'third_party/khronos' \
296 'third_party/leveldatabase' \
297 'third_party/libaddressinput' \
298 'third_party/libjingle' \
299 'third_party/libphonenumber' \
300 'third_party/libsecret' \
301 'third_party/libsrtp' \
302 'third_party/libudev' \
303 'third_party/libusb' \
304 'third_party/libxml/chromium' \
305 'third_party/libXNVCtrl' \
306 'third_party/libyuv' \
307 'third_party/lss' \
308 'third_party/lzma_sdk' \
309 'third_party/mesa' \
310 'third_party/modp_b64' \
311 'third_party/mojo' \
312 'third_party/mt19937ar' \
313 'third_party/npapi' \
314 'third_party/openmax_dl' \
315 'third_party/opus' \
316 'third_party/ots' \
317 'third_party/pdfium' \
318 'third_party/pdfium/third_party/base' \
319 'third_party/pdfium/third_party/bigint' \
320 'third_party/pdfium/third_party/freetype' \
321 'third_party/polymer' \
322 'third_party/protobuf' \
323 'third_party/qcms' \
324 'third_party/readability' \
325 'third_party/sfntly' \
326 'third_party/skia' \
327 'third_party/smhasher' \
328 'third_party/sqlite' \
329 'third_party/tcmalloc' \
330 'third_party/trace-viewer' \
331 'third_party/trace-viewer/third_party/components/polymer' \
332 'third_party/trace-viewer/third_party/d3' \
333 'third_party/trace-viewer/third_party/gl-matrix' \
334 'third_party/trace-viewer/third_party/jszip' \
335 'third_party/trace-viewer/third_party/tvcm' \
336 'third_party/trace-viewer/third_party/tvcm/third_party/beautifulsoup/polymer_soup.py' \
337 'third_party/undoview' \
338 'third_party/usrsctp' \
339 'third_party/web-animations-js' \
340 'third_party/webdriver' \
341 'third_party/webrtc' \
342 'third_party/widevine' \
343 'third_party/x86inc' \
344 'third_party/zlib/google' \
345 'url/third_party/mozilla' \
346 'v8/src/third_party/fdlibm' \
347 'v8/src/third_party/kernel' \
348 'v8/src/third_party/valgrind' \
349 --do-remove || die
350 }
351
352 src_configure() {
353 local myconf=""
354
355 # Never tell the build system to "enable" SSE2, it has a few unexpected
356 # additions, bug #336871.
357 myconf+=" -Ddisable_sse2=1"
358
359 # Disable nacl, we can't build without pnacl (http://crbug.com/269560).
360 myconf+=" -Ddisable_nacl=1"
361
362 # Disable glibc Native Client toolchain, we don't need it (bug #417019).
363 # myconf+=" -Ddisable_glibc=1"
364
365 # TODO: also build with pnacl
366 # myconf+=" -Ddisable_pnacl=1"
367
368 # It would be awkward for us to tar the toolchain and get it untarred again
369 # during the build.
370 # myconf+=" -Ddisable_newlib_untar=1"
371
372 # Make it possible to remove third_party/adobe.
373 echo > "${T}/flapper_version.h" || die
374 myconf+=" -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_libsrtp (bug #459932).
379 # TODO: use_system_libusb (http://crbug.com/266149).
380 # TODO: use_system_opus (https://code.google.com/p/webrtc/issues/detail?id=3077).
381 # TODO: use_system_protobuf (bug #525560).
382 # TODO: use_system_ssl (http://crbug.com/58087).
383 # TODO: use_system_sqlite (http://crbug.com/22208).
384 myconf+="
385 -Duse_system_bzip2=1
386 -Duse_system_flac=1
387 -Duse_system_harfbuzz=1
388 -Duse_system_icu=1
389 -Duse_system_jsoncpp=1
390 -Duse_system_libevent=1
391 -Duse_system_libjpeg=1
392 -Duse_system_libpng=1
393 -Duse_system_libwebp=1
394 -Duse_system_libvpx=1
395 -Duse_system_libxml=1
396 -Duse_system_libxslt=1
397 -Duse_system_minizip=1
398 -Duse_system_nspr=1
399 -Duse_system_re2=1
400 -Duse_system_snappy=1
401 -Duse_system_speex=1
402 -Duse_system_xdg_utils=1
403 -Duse_system_zlib=1"
404
405 # Needed for system icu - we don't need additional data files.
406 myconf+=" -Dicu_use_data_file_flag=0"
407
408 # TODO: patch gyp so that this arm conditional is not needed.
409 if ! use arm; then
410 myconf+="
411 -Duse_system_yasm=1"
412 fi
413
414 # Optional dependencies.
415 # TODO: linux_link_kerberos, bug #381289.
416 myconf+="
417 $(gyp_use cups)
418 $(gyp_use gnome use_gconf)
419 $(gyp_use gnome-keyring use_gnome_keyring)
420 $(gyp_use gnome-keyring linux_link_gnome_keyring)
421 $(gyp_use hidpi enable_hidpi)
422 $(gyp_use hotwording enable_hotwording)
423 $(gyp_use kerberos)
424 $(gyp_use pulseaudio)
425 $(gyp_use tcmalloc use_allocator tcmalloc none)"
426
427 # Use explicit library dependencies instead of dlopen.
428 # This makes breakages easier to detect by revdep-rebuild.
429 myconf+="
430 -Dlinux_link_gsettings=1
431 -Dlinux_link_libpci=1
432 -Dlinux_link_libspeechd=1
433 -Dlibspeechd_h_prefix=speech-dispatcher/"
434
435 # TODO: use the file at run time instead of effectively compiling it in.
436 myconf+="
437 -Dusb_ids_path=/usr/share/misc/usb.ids"
438
439 # Save space by removing DLOG and DCHECK messages (about 6% reduction).
440 myconf+="
441 -Dlogging_like_official_build=1"
442
443 if [[ $(tc-getCC) == *clang* ]]; then
444 myconf+=" -Dclang=1"
445 else
446 myconf+=" -Dclang=0"
447 fi
448
449 # Never use bundled gold binary. Disable gold linker flags for now.
450 # Do not use bundled clang.
451 myconf+="
452 -Dclang_use_chrome_plugins=0
453 -Dhost_clang=0
454 -Dlinux_use_bundled_binutils=0
455 -Dlinux_use_bundled_gold=0
456 -Dlinux_use_gold_flags=0"
457
458 ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)"
459 myconf+=" -Dproprietary_codecs=1 -Dffmpeg_branding=${ffmpeg_branding}"
460
461 # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys .
462 # Note: these are for Gentoo use ONLY. For your own distribution,
463 # please get your own set of keys. Feel free to contact chromium@g.o
464 # for more info.
465 myconf+=" -Dgoogle_api_key=AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc
466 -Dgoogle_default_client_id=329227923882.apps.googleusercontent.com
467 -Dgoogle_default_client_secret=vgKG0NNv7GoDpbtoFNLxCUXu"
468
469 local myarch="$(tc-arch)"
470 if [[ $myarch = amd64 ]] ; then
471 target_arch=x64
472 ffmpeg_target_arch=x64
473 elif [[ $myarch = x86 ]] ; then
474 target_arch=ia32
475 ffmpeg_target_arch=ia32
476 elif [[ $myarch = arm ]] ; then
477 target_arch=arm
478 ffmpeg_target_arch=$(usex neon arm-neon arm)
479 # TODO: re-enable NaCl (NativeClient).
480 local CTARGET=${CTARGET:-${CHOST}}
481 if [[ $(tc-is-softfloat) == "no" ]]; then
482
483 myconf+=" -Darm_float_abi=hard"
484 fi
485 filter-flags "-mfpu=*"
486 use neon || myconf+=" -Darm_fpu=${ARM_FPU:-vfpv3-d16}"
487
488 if [[ ${CTARGET} == armv[78]* ]]; then
489 myconf+=" -Darmv7=1"
490 else
491 myconf+=" -Darmv7=0"
492 fi
493 myconf+=" -Dsysroot=
494 $(gyp_use neon arm_neon)
495 -Ddisable_nacl=1"
496 else
497 die "Failed to determine target arch, got '$myarch'."
498 fi
499
500 myconf+=" -Dtarget_arch=${target_arch}"
501
502 # Make sure that -Werror doesn't get added to CFLAGS by the build system.
503 # Depending on GCC version the warnings are different and we don't want
504 # the build to fail because of that.
505 myconf+=" -Dwerror="
506
507 # Disable fatal linker warnings, bug 506268.
508 myconf+=" -Ddisable_fatal_linker_warnings=1"
509
510 # Avoid CFLAGS problems, bug #352457, bug #390147.
511 if ! use custom-cflags; then
512 replace-flags "-Os" "-O2"
513 strip-flags
514
515 # Prevent linker from running out of address space, bug #471810 .
516 if use x86; then
517 filter-flags "-g*"
518 fi
519
520 # Prevent libvpx build failures. Bug 530248, 544702, 546984.
521 if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then
522 filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx2
523 fi
524 fi
525
526 # Make sure the build system will use the right tools, bug #340795.
527 tc-export AR CC CXX RANLIB
528
529 # Tools for building programs to be executed on the build system, bug #410883.
530 export AR_host=$(tc-getBUILD_AR)
531 export CC_host=$(tc-getBUILD_CC)
532 export CXX_host=$(tc-getBUILD_CXX)
533 export LD_host=${CXX_host}
534
535 # Bug 491582.
536 export TMPDIR="${WORKDIR}/temp"
537 mkdir -m 755 "${TMPDIR}" || die
538
539 local build_ffmpeg_args=""
540 if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then
541 build_ffmpeg_args+=" --disable-asm"
542 fi
543
544 # Re-configure bundled ffmpeg. See bug #491378 for example reasons.
545 einfo "Configuring bundled ffmpeg..."
546 pushd third_party/ffmpeg > /dev/null || die
547 chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \
548 --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die
549 chromium/scripts/copy_config.sh || die
550 chromium/scripts/generate_gyp.py || die
551 popd > /dev/null || die
552
553 third_party/libaddressinput/chromium/tools/update-strings.py || die
554
555 einfo "Configuring Chromium..."
556 build/linux/unbundle/replace_gyp_files.py ${myconf} || die
557 egyp_chromium ${myconf} || die
558 }
559
560 eninja() {
561 if [[ -z ${NINJAOPTS+set} ]]; then
562 local jobs=$(makeopts_jobs)
563 local loadavg=$(makeopts_loadavg)
564
565 if [[ ${MAKEOPTS} == *-j* && ${jobs} != 999 ]]; then
566 NINJAOPTS+=" -j ${jobs}"
567 fi
568 if [[ ${MAKEOPTS} == *-l* && ${loadavg} != 999 ]]; then
569 NINJAOPTS+=" -l ${loadavg}"
570 fi
571 fi
572 set -- ninja -v ${NINJAOPTS} "$@"
573 echo "$@"
574 "$@"
575 }
576
577 src_compile() {
578 local ninja_targets="chrome chrome_sandbox chromedriver"
579
580 # Build mksnapshot and pax-mark it.
581 eninja -C out/Release mksnapshot || die
582 pax-mark m out/Release/mksnapshot
583
584 # Even though ninja autodetects number of CPUs, we respect
585 # user's options, for debugging with -j 1 or any other reason.
586 eninja -C out/Release ${ninja_targets} || die
587
588 pax-mark m out/Release/chrome
589 }
590
591 src_install() {
592 exeinto "${CHROMIUM_HOME}"
593 doexe out/Release/chrome || die
594
595 newexe out/Release/chrome_sandbox chrome-sandbox || die
596 fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
597
598 doexe out/Release/chromedriver || die
599
600 # if ! use arm; then
601 # doexe out/Release/nacl_helper{,_bootstrap} || die
602 # insinto "${CHROMIUM_HOME}"
603 # doins out/Release/nacl_irt_*.nexe || die
604 # doins out/Release/libppGoogleNaClPluginChrome.so || die
605 # fi
606
607 local sedargs=( -e "s:/usr/lib/:/usr/$(get_libdir)/:g" )
608 if [[ -n ${CHROMIUM_SUFFIX} ]]; then
609 sedargs+=(
610 -e "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g"
611 -e "s:chromium.desktop:chromium${CHROMIUM_SUFFIX}.desktop:g"
612 -e "s:plugins:plugins --user-data-dir=\${HOME}/.config/chromium${CHROMIUM_SUFFIX}:"
613 )
614 fi
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${CHROMIUM_SUFFIX} || die
621 # keep the old symlink around for consistency
622 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium${CHROMIUM_SUFFIX} || die
623
624 dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver${CHROMIUM_SUFFIX} || die
625
626 # Allow users to override command-line options, bug #357629.
627 dodir /etc/chromium || die
628 insinto /etc/chromium
629 newins "${FILESDIR}/chromium.default" "default" || die
630
631 pushd out/Release/locales > /dev/null || die
632 chromium_remove_language_paks
633 popd
634
635 insinto "${CHROMIUM_HOME}"
636 doins out/Release/*.bin || die
637 doins out/Release/*.pak || die
638
639 doins -r out/Release/locales || die
640 doins -r out/Release/resources || die
641
642 newman out/Release/chrome.1 chromium${CHROMIUM_SUFFIX}.1 || die
643 newman out/Release/chrome.1 chromium-browser${CHROMIUM_SUFFIX}.1 || die
644
645 doexe out/Release/libffmpegsumo.so || die
646 if use widevine; then
647 doexe out/Release/libwidevinecdmadapter.so || die
648 fi
649
650 # Install icons and desktop entry.
651 local branding size
652 for size in 16 22 24 32 48 64 128 256 ; do
653 case ${size} in
654 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
655 *) branding="chrome/app/theme/chromium" ;;
656 esac
657 newicon -s ${size} "${branding}/product_logo_${size}.png" \
658 chromium-browser${CHROMIUM_SUFFIX}.png
659 done
660
661 local mime_types="text/html;text/xml;application/xhtml+xml;"
662 mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797
663 mime_types+="x-scheme-handler/ftp;" # bug #412185
664 mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393
665 make_desktop_entry \
666 chromium-browser${CHROMIUM_SUFFIX} \
667 "Chromium${CHROMIUM_SUFFIX}" \
668 chromium-browser${CHROMIUM_SUFFIX} \
669 "Network;WebBrowser" \
670 "MimeType=${mime_types}\nStartupWMClass=chromium-browser"
671 sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die
672
673 # Install GNOME default application entry (bug #303100).
674 if use gnome; then
675 dodir /usr/share/gnome-control-center/default-apps || die
676 insinto /usr/share/gnome-control-center/default-apps
677 newins "${FILESDIR}"/chromium-browser.xml chromium-browser${CHROMIUM_SUFFIX}.xml || die
678 if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then
679 sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" -i \
680 "${ED}"/usr/share/gnome-control-center/default-apps/chromium-browser${CHROMIUM_SUFFIX}.xml
681 fi
682 fi
683
684 readme.gentoo_create_doc
685 }
686
687 pkg_postinst() {
688 fdo-mime_desktop_database_update
689 gnome2_icon_cache_update
690 readme.gentoo_print_elog
691 }