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.2017.2.ebuild ChangeLog
Date: Fri, 30 May 2014 07:21:25
Message-Id: 20140530072120.A36D72004F@flycatcher.gentoo.org
1 phajdan.jr 14/05/30 07:21:20
2
3 Modified: ChangeLog
4 Added: chromium-37.0.2017.2.ebuild
5 Log:
6 Dev channel bump.
7
8 (Portage version: 2.2.8-r1/cvs/Linux i686, signed Manifest commit with key 0x4F1A2555EA71991D!)
9
10 Revision Changes Path
11 1.1085 www-client/chromium/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.1085&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.1085&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?r1=1.1084&r2=1.1085
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v
20 retrieving revision 1.1084
21 retrieving revision 1.1085
22 diff -u -r1.1084 -r1.1085
23 --- ChangeLog 28 May 2014 02:20:44 -0000 1.1084
24 +++ ChangeLog 30 May 2014 07:21:20 -0000 1.1085
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.1084 2014/05/28 02:20:44 floppym Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.1085 2014/05/30 07:21:20 phajdan.jr Exp $
30 +
31 +*chromium-37.0.2017.2 (30 May 2014)
32 +
33 + 30 May 2014; Pawel Hajdan jr <phajdan.jr@g.o>
34 + +chromium-37.0.2017.2.ebuild, +files/chromium-system-harfbuzz-r0.patch:
35 + Dev channel bump.
36
37 28 May 2014; Mike Gilbert <floppym@g.o> chromium-37.0.2008.2.ebuild:
38 Add blocker to on <chrome-binary-plugins-37 so that portage upgrades
39
40
41
42 1.1 www-client/chromium/chromium-37.0.2017.2.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-37.0.2017.2.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-37.0.2017.2.ebuild?rev=1.1&content-type=text/plain
46
47 Index: chromium-37.0.2017.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.2017.2.ebuild,v 1.1 2014/05/30 07:21:20 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 !<www-plugins/chrome-binary-plugins-37
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}-system-harfbuzz-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/pdfium' \
269 'third_party/polymer' \
270 'third_party/ply' \
271 'third_party/protobuf' \
272 'third_party/pywebsocket' \
273 'third_party/qcms' \
274 'third_party/readability' \
275 'third_party/sfntly' \
276 'third_party/skia' \
277 'third_party/smhasher' \
278 'third_party/sqlite' \
279 'third_party/tcmalloc' \
280 'third_party/tlslite' \
281 'third_party/trace-viewer' \
282 'third_party/undoview' \
283 'third_party/usrsctp' \
284 'third_party/webdriver' \
285 'third_party/webrtc' \
286 'third_party/widevine' \
287 'third_party/x86inc' \
288 'third_party/zlib/google' \
289 'url/third_party/mozilla' \
290 'v8/src/third_party/valgrind' \
291 --do-remove || die
292 }
293
294 src_configure() {
295 local myconf=""
296
297 # Never tell the build system to "enable" SSE2, it has a few unexpected
298 # additions, bug #336871.
299 myconf+=" -Ddisable_sse2=1"
300
301 # Disable nacl, we can't build without pnacl (http://crbug.com/269560).
302 myconf+=" -Ddisable_nacl=1"
303
304 # Disable glibc Native Client toolchain, we don't need it (bug #417019).
305 # myconf+=" -Ddisable_glibc=1"
306
307 # TODO: also build with pnacl
308 # myconf+=" -Ddisable_pnacl=1"
309
310 # It would be awkward for us to tar the toolchain and get it untarred again
311 # during the build.
312 # myconf+=" -Ddisable_newlib_untar=1"
313
314 # Make it possible to remove third_party/adobe.
315 echo > "${T}/flapper_version.h" || die
316 myconf+=" -Dflapper_version_h_file=${T}/flapper_version.h"
317
318 # Use system-provided libraries.
319 # TODO: use_system_hunspell (upstream changes needed).
320 # TODO: use_system_libsrtp (bug #459932).
321 # TODO: use_system_libvpx (http://crbug.com/347823).
322 # TODO: use_system_libusb (http://crbug.com/266149).
323 # TODO: use_system_opus (https://code.google.com/p/webrtc/issues/detail?id=3077).
324 # TODO: use_system_protobuf (bug #503084).
325 # TODO: use_system_ssl (http://crbug.com/58087).
326 # TODO: use_system_sqlite (http://crbug.com/22208).
327 myconf+="
328 -Duse_system_bzip2=1
329 -Duse_system_flac=1
330 -Duse_system_harfbuzz=1
331 -Duse_system_icu=1
332 -Duse_system_jsoncpp=1
333 -Duse_system_libevent=1
334 -Duse_system_libjpeg=1
335 -Duse_system_libpng=1
336 -Duse_system_libwebp=1
337 -Duse_system_libxml=1
338 -Duse_system_libxslt=1
339 -Duse_system_minizip=1
340 -Duse_system_nspr=1
341 -Duse_system_openssl=1
342 -Duse_system_re2=1
343 -Duse_system_snappy=1
344 -Duse_system_speex=1
345 -Duse_system_xdg_utils=1
346 -Duse_system_zlib=1"
347
348 # Needed for system icu - we don't need additional data files.
349 myconf+=" -Dicu_use_data_file_flag=0"
350
351 # TODO: patch gyp so that this arm conditional is not needed.
352 if ! use arm; then
353 myconf+="
354 -Duse_system_yasm=1"
355 fi
356
357 # Optional dependencies.
358 # TODO: linux_link_kerberos, bug #381289.
359 myconf+="
360 $(gyp_use cups)
361 $(gyp_use gnome use_gconf)
362 $(gyp_use gnome-keyring use_gnome_keyring)
363 $(gyp_use gnome-keyring linux_link_gnome_keyring)
364 $(gyp_use kerberos)
365 $(gyp_use pulseaudio)
366 $(gyp_use tcmalloc use_allocator tcmalloc none)"
367
368 # Use explicit library dependencies instead of dlopen.
369 # This makes breakages easier to detect by revdep-rebuild.
370 myconf+="
371 -Dlinux_link_gsettings=1
372 -Dlinux_link_libpci=1
373 -Dlinux_link_libspeechd=1
374 -Dlibspeechd_h_prefix=speech-dispatcher/"
375
376 # TODO: use the file at run time instead of effectively compiling it in.
377 myconf+="
378 -Dusb_ids_path=/usr/share/misc/usb.ids"
379
380 # Save space by removing DLOG and DCHECK messages (about 6% reduction).
381 myconf+="
382 -Dlogging_like_official_build=1"
383
384 # Never use bundled gold binary. Disable gold linker flags for now.
385 myconf+="
386 -Dlinux_use_bundled_binutils=0
387 -Dlinux_use_bundled_gold=0
388 -Dlinux_use_gold_flags=0"
389
390 # TODO: enable mojo after fixing compile failures.
391 myconf+=" -Duse_mojo=0"
392
393 # Always support proprietary codecs.
394 myconf+=" -Dproprietary_codecs=1"
395
396 # Set python version and libdir so that python_arch.sh can find libpython.
397 # Bug 492864.
398 myconf+="
399 -Dpython_ver=${EPYTHON#python}
400 -Dsystem_libdir=$(get_libdir)"
401
402 if ! use bindist; then
403 # Enable H.264 support in bundled ffmpeg.
404 myconf+=" -Dffmpeg_branding=Chrome"
405 fi
406
407 # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys .
408 # Note: these are for Gentoo use ONLY. For your own distribution,
409 # please get your own set of keys. Feel free to contact chromium@g.o
410 # for more info.
411 myconf+=" -Dgoogle_api_key=AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc
412 -Dgoogle_default_client_id=329227923882.apps.googleusercontent.com
413 -Dgoogle_default_client_secret=vgKG0NNv7GoDpbtoFNLxCUXu"
414
415 local myarch="$(tc-arch)"
416 if [[ $myarch = amd64 ]] ; then
417 target_arch=x64
418 ffmpeg_target_arch=x64
419 elif [[ $myarch = x86 ]] ; then
420 target_arch=ia32
421 ffmpeg_target_arch=ia32
422 elif [[ $myarch = arm ]] ; then
423 target_arch=arm
424 ffmpeg_target_arch=$(usex neon arm-neon arm)
425 # TODO: re-enable NaCl (NativeClient).
426 local CTARGET=${CTARGET:-${CHOST}}
427 if [[ $(tc-is-softfloat) == "no" ]]; then
428
429 myconf+=" -Darm_float_abi=hard"
430 fi
431 filter-flags "-mfpu=*"
432 use neon || myconf+=" -Darm_fpu=${ARM_FPU:-vfpv3-d16}"
433
434 if [[ ${CTARGET} == armv[78]* ]]; then
435 myconf+=" -Darmv7=1"
436 else
437 myconf+=" -Darmv7=0"
438 fi
439 myconf+=" -Dsysroot=
440 $(gyp_use neon arm_neon)
441 -Ddisable_nacl=1"
442 else
443 die "Failed to determine target arch, got '$myarch'."
444 fi
445
446 myconf+=" -Dtarget_arch=${target_arch}"
447
448 # Make sure that -Werror doesn't get added to CFLAGS by the build system.
449 # Depending on GCC version the warnings are different and we don't want
450 # the build to fail because of that.
451 myconf+=" -Dwerror="
452
453 # Disable fatal linker warnings, bug 506268.
454 myconf+=" -Ddisable_fatal_linker_warnings=1"
455
456 # Avoid CFLAGS problems, bug #352457, bug #390147.
457 if ! use custom-cflags; then
458 replace-flags "-Os" "-O2"
459 strip-flags
460
461 # Prevent linker from running out of address space, bug #471810 .
462 if use x86; then
463 filter-flags "-g*"
464 fi
465 fi
466
467 # Make sure the build system will use the right tools, bug #340795.
468 tc-export AR CC CXX RANLIB
469
470 # Tools for building programs to be executed on the build system, bug #410883.
471 export AR_host=$(tc-getBUILD_AR)
472 export CC_host=$(tc-getBUILD_CC)
473 export CXX_host=$(tc-getBUILD_CXX)
474 export LD_host=${CXX_host}
475
476 # Bug 491582.
477 export TMPDIR="${WORKDIR}/temp"
478 mkdir -m 755 "${TMPDIR}" || die
479
480 # Re-configure bundled ffmpeg. See bug #491378 for example reasons.
481 einfo "Configuring bundled ffmpeg..."
482 pushd third_party/ffmpeg > /dev/null || die
483 chromium/scripts/build_ffmpeg.py --config-only linux ${ffmpeg_target_arch} || die
484 chromium/scripts/copy_config.sh || die
485 popd > /dev/null || die
486
487 einfo "Configuring Chromium..."
488 build/linux/unbundle/replace_gyp_files.py ${myconf} || die
489 egyp_chromium ${myconf} || die
490 }
491
492 eninja() {
493 if [[ -z ${NINJAOPTS+set} ]]; then
494 local jobs=$(makeopts_jobs)
495 local loadavg=$(makeopts_loadavg)
496
497 if [[ ${MAKEOPTS} == *-j* && ${jobs} != 999 ]]; then
498 NINJAOPTS+=" -j ${jobs}"
499 fi
500 if [[ ${MAKEOPTS} == *-l* && ${loadavg} != 999 ]]; then
501 NINJAOPTS+=" -l ${loadavg}"
502 fi
503 fi
504 set -- ninja -v ${NINJAOPTS} "$@"
505 echo "$@"
506 "$@"
507 }
508
509 src_compile() {
510 # TODO: add media_unittests after fixing compile (bug #462546).
511 local test_targets=""
512 for x in base cacheinvalidation content crypto \
513 gpu net printing sql; do
514 test_targets+=" ${x}_unittests"
515 done
516
517 local ninja_targets="chrome chrome_sandbox chromedriver"
518 if use test; then
519 ninja_targets+=" $test_targets"
520 fi
521
522 # Build mksnapshot and pax-mark it.
523 eninja -C out/Release mksnapshot || die
524 pax-mark m out/Release/mksnapshot
525
526 # Even though ninja autodetects number of CPUs, we respect
527 # user's options, for debugging with -j 1 or any other reason.
528 eninja -C out/Release ${ninja_targets} || die
529
530 pax-mark m out/Release/chrome
531 if use test; then
532 for x in $test_targets; do
533 pax-mark m out/Release/${x}
534 done
535 fi
536 }
537
538 src_test() {
539 # For more info see bug #350349.
540 local LC_ALL="en_US.utf8"
541
542 if ! locale -a | grep -q "${LC_ALL}"; then
543 eerror "${PN} requires ${LC_ALL} locale for tests"
544 eerror "Please read the following guides for more information:"
545 eerror " http://www.gentoo.org/doc/en/guide-localization.xml"
546 eerror " http://www.gentoo.org/doc/en/utf-8.xml"
547 die "locale ${LC_ALL} is not supported"
548 fi
549
550 # If we have the right locale, export it to the environment
551 export LC_ALL
552
553 # For more info see bug #370957.
554 if [[ $UID -eq 0 ]]; then
555 die "Tests must be run as non-root. Please use FEATURES=userpriv."
556 fi
557
558 # virtualmake dies on failure, so we run our tests in a function
559 VIRTUALX_COMMAND="chromium_test" virtualmake
560 }
561
562 chromium_test() {
563 # Keep track of the cumulative exit status for all tests
564 local exitstatus=0
565
566 runtest() {
567 local cmd=$1
568 shift
569 local IFS=:
570 set -- "${cmd}" --test-launcher-bot-mode "--gtest_filter=-$*"
571 einfo "$@"
572 "$@"
573 local st=$?
574 (( st )) && eerror "${cmd} failed"
575 (( exitstatus |= st ))
576 }
577
578 local excluded_base_unittests=(
579 "OutOfMemoryDeathTest.ViaSharedLibraries" # bug #497512
580 )
581 runtest out/Release/base_unittests "${excluded_base_unittests[@]}"
582 runtest out/Release/cacheinvalidation_unittests
583
584 local excluded_content_unittests=(
585 "RendererDateTimePickerTest.*" # bug #465452
586 )
587 runtest out/Release/content_unittests "${excluded_content_unittests[@]}"
588
589 runtest out/Release/crypto_unittests
590 runtest out/Release/gpu_unittests
591
592 # TODO: add media_unittests after fixing compile (bug #462546).
593 # runtest out/Release/media_unittests
594
595 local excluded_net_unittests=(
596 "NetUtilTest.IDNToUnicode*" # bug 361885
597 "NetUtilTest.FormatUrl*" # see above
598 "SpdyFramerTests/SpdyFramerTest.CreatePushPromiseCompressed/2" # bug #478168
599 "SpdyFramerTests/SpdyFramerTest.CreateContinuationCompressed/2" # see above
600 "HostResolverImplTest.BypassCache" # bug #498304
601 "HostResolverImplTest.FlushCacheOnIPAddressChange" # bug #481812
602 "HostResolverImplTest.ResolveFromCache" # see above
603 "ProxyResolverV8TracingTest.*" # see above
604 "SSLClientSocketTest.ConnectMismatched" # see above
605 "UDPSocketTest.*" # see above
606 "*EndToEndTest*" # see above
607 "Version/QuicHttpStreamTest.Priority/0" # bug #503010
608 "Version/QuicHttpStreamTest.DestroyedEarly/0" # see above
609 )
610 runtest out/Release/net_unittests "${excluded_net_unittests[@]}"
611
612 runtest out/Release/printing_unittests
613 runtest out/Release/sql_unittests
614
615 return ${exitstatus}
616 }
617
618 src_install() {
619 exeinto "${CHROMIUM_HOME}"
620 doexe out/Release/chrome || die
621
622 newexe out/Release/chrome_sandbox chrome-sandbox || die
623 fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
624
625 doexe out/Release/chromedriver || die
626
627 # if ! use arm; then
628 # doexe out/Release/nacl_helper{,_bootstrap} || die
629 # insinto "${CHROMIUM_HOME}"
630 # doins out/Release/nacl_irt_*.nexe || die
631 # doins out/Release/libppGoogleNaClPluginChrome.so || die
632 # fi
633
634 local sedargs=( -e "s:/usr/lib/:/usr/$(get_libdir)/:g" )
635 if [[ -n ${CHROMIUM_SUFFIX} ]]; then
636 sedargs+=(
637 -e "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g"
638 -e "s:chromium.desktop:chromium${CHROMIUM_SUFFIX}.desktop:g"
639 -e "s:plugins:plugins --user-data-dir=\${HOME}/.config/chromium${CHROMIUM_SUFFIX}:"
640 )
641 fi
642 sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r3.sh" > chromium-launcher.sh || die
643 doexe chromium-launcher.sh
644
645 # It is important that we name the target "chromium-browser",
646 # xdg-utils expect it; bug #355517.
647 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser${CHROMIUM_SUFFIX} || die
648 # keep the old symlink around for consistency
649 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium${CHROMIUM_SUFFIX} || die
650
651 dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver${CHROMIUM_SUFFIX} || die
652
653 # Allow users to override command-line options, bug #357629.
654 dodir /etc/chromium || die
655 insinto /etc/chromium
656 newins "${FILESDIR}/chromium.default" "default" || die
657
658 pushd out/Release/locales > /dev/null || die
659 chromium_remove_language_paks
660 popd
661
662 insinto "${CHROMIUM_HOME}"
663 doins out/Release/*.pak || die
664
665 doins -r out/Release/locales || die
666 doins -r out/Release/resources || die
667
668 newman out/Release/chrome.1 chromium${CHROMIUM_SUFFIX}.1 || die
669 newman out/Release/chrome.1 chromium-browser${CHROMIUM_SUFFIX}.1 || die
670
671 doexe out/Release/libffmpegsumo.so || die
672 doexe out/Release/libpdf.so || die
673
674 # Install icons and desktop entry.
675 local branding size
676 for size in 16 22 24 32 48 64 128 256 ; do
677 case ${size} in
678 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
679 *) branding="chrome/app/theme/chromium" ;;
680 esac
681 newicon -s ${size} "${branding}/product_logo_${size}.png" \
682 chromium-browser${CHROMIUM_SUFFIX}.png
683 done
684
685 local mime_types="text/html;text/xml;application/xhtml+xml;"
686 mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797
687 mime_types+="x-scheme-handler/ftp;" # bug #412185
688 mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393
689 make_desktop_entry \
690 chromium-browser${CHROMIUM_SUFFIX} \
691 "Chromium${CHROMIUM_SUFFIX}" \
692 chromium-browser${CHROMIUM_SUFFIX} \
693 "Network;WebBrowser" \
694 "MimeType=${mime_types}\nStartupWMClass=chromium-browser"
695 sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die
696
697 # Install GNOME default application entry (bug #303100).
698 if use gnome; then
699 dodir /usr/share/gnome-control-center/default-apps || die
700 insinto /usr/share/gnome-control-center/default-apps
701 newins "${FILESDIR}"/chromium-browser.xml chromium-browser${CHROMIUM_SUFFIX}.xml || die
702 if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then
703 sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" -i \
704 "${ED}"/usr/share/gnome-control-center/default-apps/chromium-browser${CHROMIUM_SUFFIX}.xml
705 fi
706 fi
707
708 readme.gentoo_create_doc
709 }
710
711 pkg_postinst() {
712 fdo-mime_desktop_database_update
713 gnome2_icon_cache_update
714 readme.gentoo_print_elog
715 }