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