Gentoo Archives: gentoo-commits

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