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