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