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: ChangeLog chromium-9999-r1.ebuild chromium-30.0.1581.2.ebuild
Date: Wed, 31 Jul 2013 15:40:35
Message-Id: 20130731154026.EFAE82171C@flycatcher.gentoo.org
1 phajdan.jr 13/07/31 15:40:26
2
3 Modified: ChangeLog chromium-9999-r1.ebuild
4 Added: chromium-30.0.1581.2.ebuild
5 Log:
6 Dev channel bump.
7
8 (Portage version: 2.1.12.2/cvs/Linux i686, signed Manifest commit with key 30427902)
9
10 Revision Changes Path
11 1.924 www-client/chromium/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.924&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.924&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?r1=1.923&r2=1.924
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v
20 retrieving revision 1.923
21 retrieving revision 1.924
22 diff -u -r1.923 -r1.924
23 --- ChangeLog 31 Jul 2013 08:47:12 -0000 1.923
24 +++ ChangeLog 31 Jul 2013 15:40:26 -0000 1.924
25 @@ -1,6 +1,13 @@
26 # ChangeLog for www-client/chromium
27 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.923 2013/07/31 08:47:12 ago Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.924 2013/07/31 15:40:26 phajdan.jr Exp $
30 +
31 +*chromium-30.0.1581.2 (31 Jul 2013)
32 +
33 + 31 Jul 2013; Pawel Hajdan jr <phajdan.jr@g.o>
34 + +files/chromium-system-icu-r0.patch, +files/chromium-system-ply-r0.patch,
35 + +chromium-30.0.1581.2.ebuild, chromium-9999-r1.ebuild:
36 + Dev channel bump.
37
38 31 Jul 2013; Agostino Sarubbo <ago@g.o> chromium-28.0.1500.95.ebuild:
39 Stable for x86, wrt bug #479048
40
41
42
43 1.205 www-client/chromium/chromium-9999-r1.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-9999-r1.ebuild?rev=1.205&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-9999-r1.ebuild?rev=1.205&content-type=text/plain
47 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-9999-r1.ebuild?r1=1.204&r2=1.205
48
49 Index: chromium-9999-r1.ebuild
50 ===================================================================
51 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-9999-r1.ebuild,v
52 retrieving revision 1.204
53 retrieving revision 1.205
54 diff -u -r1.204 -r1.205
55 --- chromium-9999-r1.ebuild 25 Jul 2013 15:36:55 -0000 1.204
56 +++ chromium-9999-r1.ebuild 31 Jul 2013 15:40:26 -0000 1.205
57 @@ -1,6 +1,6 @@
58 # Copyright 1999-2013 Gentoo Foundation
59 # Distributed under the terms of the GNU General Public License v2
60 -# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-9999-r1.ebuild,v 1.204 2013/07/25 15:36:55 phajdan.jr Exp $
61 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-9999-r1.ebuild,v 1.205 2013/07/31 15:40:26 phajdan.jr Exp $
62
63 EAPI="5"
64 PYTHON_COMPAT=( python{2_6,2_7} )
65 @@ -58,6 +58,7 @@
66 >=media-libs/libjpeg-turbo-1.2.0-r1:=
67 media-libs/libpng:0=
68 media-libs/libvpx:=
69 + >=media-libs/libwebp-0.3.1:=
70 !arm? ( !x86? ( >=media-libs/mesa-9.1:=[gles2] ) )
71 media-libs/opus:=
72 media-libs/speex:=
73 @@ -70,7 +71,6 @@
74 sys-apps/pciutils:=
75 sys-libs/zlib:=[minizip]
76 virtual/udev
77 - virtual/libusb:1=
78 x11-libs/gtk+:2=
79 x11-libs/libXinerama:=
80 x11-libs/libXScrnSaver:=
81 @@ -224,7 +224,7 @@
82 \! -path 'third_party/libjingle/*' \
83 \! -path 'third_party/libphonenumber/*' \
84 \! -path 'third_party/libsrtp/*' \
85 - \! -path 'third_party/libwebp/*' \
86 + \! -path 'third_party/libusb/*' \
87 \! -path 'third_party/libxml/chromium/*' \
88 \! -path 'third_party/libXNVCtrl/*' \
89 \! -path 'third_party/libyuv/*' \
90 @@ -292,7 +292,7 @@
91 # Use system-provided libraries.
92 # TODO: use_system_hunspell (upstream changes needed).
93 # TODO: use_system_libsrtp (bug #459932).
94 - # TODO: use_system_libwebp (requires internal header format_constants.h).
95 + # TODO: use_system_libusb (http://crbug.com/266149).
96 # TODO: use_system_ssl (http://crbug.com/58087).
97 # TODO: use_system_sqlite (http://crbug.com/22208).
98 myconf+="
99 @@ -304,8 +304,8 @@
100 -Duse_system_libevent=1
101 -Duse_system_libjpeg=1
102 -Duse_system_libpng=1
103 - -Duse_system_libusb=1
104 -Duse_system_libvpx=1
105 + -Duse_system_libwebp=1
106 -Duse_system_libxml=1
107 -Duse_system_libxslt=1
108 -Duse_system_minizip=1
109 @@ -369,6 +369,10 @@
110 myconf+="
111 -Dusb_ids_path=/usr/share/misc/usb.ids"
112
113 + # Save space by removing DLOG and DCHECK messages (about 6% reduction).
114 + myconf+="
115 + -Dlogging_like_official_build=1"
116 +
117 # Enable SUID sandbox.
118 myconf+="
119 -Dlinux_sandbox_path=${CHROMIUM_HOME}/chrome_sandbox
120
121
122
123 1.1 www-client/chromium/chromium-30.0.1581.2.ebuild
124
125 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-30.0.1581.2.ebuild?rev=1.1&view=markup
126 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-30.0.1581.2.ebuild?rev=1.1&content-type=text/plain
127
128 Index: chromium-30.0.1581.2.ebuild
129 ===================================================================
130 # Copyright 1999-2013 Gentoo Foundation
131 # Distributed under the terms of the GNU General Public License v2
132 # $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-30.0.1581.2.ebuild,v 1.1 2013/07/31 15:40:26 phajdan.jr Exp $
133
134 EAPI="5"
135 PYTHON_COMPAT=( python{2_6,2_7} )
136
137 CHROMIUM_LANGS="am ar bg bn ca cs da de el en_GB es es_LA et fa fi fil fr gu he
138 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
139 sv sw ta te th tr uk vi zh_CN zh_TW"
140
141 inherit chromium eutils flag-o-matic multilib multiprocessing \
142 pax-utils portability python-any-r1 toolchain-funcs versionator virtualx
143
144 DESCRIPTION="Open-source version of Google Chrome web browser"
145 HOMEPAGE="http://chromium.org/"
146 SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}-lite.tar.xz
147 test? ( https://commondatastorage.googleapis.com/chromium-browser-official/${P}-testdata.tar.xz )"
148
149 LICENSE="BSD"
150 SLOT="0"
151 KEYWORDS="~amd64 ~arm ~x86"
152 IUSE="bindist cups gnome gnome-keyring gps kerberos pulseaudio selinux +system-ffmpeg system-sqlite tcmalloc"
153
154 # Native Client binaries are compiled with different set of flags, bug #452066.
155 QA_FLAGS_IGNORED=".*\.nexe"
156
157 # Native Client binaries may be stripped by the build system, which uses the
158 # right tools for it, bug #469144 .
159 QA_PRESTRIPPED=".*\.nexe"
160
161 RDEPEND=">=app-accessibility/speech-dispatcher-0.8:=
162 app-arch/bzip2:=
163 app-arch/snappy:=
164 system-sqlite? ( dev-db/sqlite:3 )
165 cups? (
166 dev-libs/libgcrypt:=
167 >=net-print/cups-1.3.11:=
168 )
169 >=dev-lang/v8-3.19.17:=
170 =dev-lang/v8-3.20*
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/libwebp-0.3.1:=
192 !arm? ( !x86? ( >=media-libs/mesa-9.1:=[gles2] ) )
193 media-libs/opus:=
194 media-libs/speex:=
195 pulseaudio? ( media-sound/pulseaudio:= )
196 system-ffmpeg? ( || (
197 >=media-video/ffmpeg-1.0:=[opus]
198 >=media-video/libav-9.5:=[opus]
199 ) )
200 sys-apps/dbus:=
201 sys-apps/pciutils:=
202 sys-libs/zlib:=[minizip]
203 virtual/udev
204 x11-libs/gtk+:2=
205 x11-libs/libXinerama:=
206 x11-libs/libXScrnSaver:=
207 x11-libs/libXtst:=
208 kerberos? ( virtual/krb5 )
209 selinux? ( sec-policy/selinux-chromium )"
210 DEPEND="${RDEPEND}
211 ${PYTHON_DEPS}
212 !arm? (
213 >=dev-lang/nacl-toolchain-newlib-0_p11846
214 dev-lang/yasm
215 )
216 dev-lang/perl
217 dev-perl/JSON
218 dev-python/jinja
219 dev-python/ply
220 dev-python/simplejson
221 >=dev-util/gperf-3.0.3
222 dev-util/ninja
223 sys-apps/hwids
224 >=sys-devel/bison-2.4.3
225 sys-devel/flex
226 virtual/pkgconfig
227 test? ( dev-python/pyftpdlib )"
228 RDEPEND+="
229 !=www-client/chromium-9999
230 x11-misc/xdg-utils
231 virtual/ttf-fonts"
232
233 if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
234 EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
235 fi
236
237 pkg_setup() {
238 if [[ "${SLOT}" == "0" ]]; then
239 CHROMIUM_SUFFIX=""
240 else
241 CHROMIUM_SUFFIX="-${SLOT}"
242 fi
243 CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser${CHROMIUM_SUFFIX}"
244
245 # Make sure the build system will use the right python, bug #344367.
246 python-any-r1_pkg_setup
247
248 chromium_suid_sandbox_check_kernel_config
249
250 if use bindist && ! use system-ffmpeg; then
251 elog "bindist enabled: H.264 video support will be disabled."
252 fi
253 if ! use bindist; then
254 elog "bindist disabled: Resulting binaries may not be legal to re-distribute."
255 fi
256 }
257
258 src_prepare() {
259 if ! use arm; then
260 mkdir -p out/Release/gen/sdk/toolchain || die
261 # Do not preserve SELinux context, bug #460892 .
262 cp -a --no-preserve=context /usr/$(get_libdir)/nacl-toolchain-newlib \
263 out/Release/gen/sdk/toolchain/linux_x86_newlib || die
264 touch out/Release/gen/sdk/toolchain/linux_x86_newlib/stamp.untar || die
265 fi
266
267 epatch "${FILESDIR}/${PN}-gpsd-r0.patch"
268 epatch "${FILESDIR}/${PN}-system-ffmpeg-r7.patch"
269 epatch "${FILESDIR}/${PN}-system-ply-r0.patch"
270 epatch "${FILESDIR}/${PN}-system-icu-r0.patch"
271
272 epatch_user
273
274 # Remove most bundled libraries. Some are still needed.
275 find third_party -type f \! -iname '*.gyp*' \
276 \! -path 'third_party/WebKit/*' \
277 \! -path 'third_party/angle_dx11/*' \
278 \! -path 'third_party/cacheinvalidation/*' \
279 \! -path 'third_party/cld/*' \
280 \! -path 'third_party/cros_system_api/*' \
281 \! -path 'third_party/ffmpeg/*' \
282 \! -path 'third_party/flot/*' \
283 \! -path 'third_party/hunspell/*' \
284 \! -path 'third_party/hyphen/*' \
285 \! -path 'third_party/iccjpeg/*' \
286 \! -path 'third_party/jstemplate/*' \
287 \! -path 'third_party/khronos/*' \
288 \! -path 'third_party/leveldatabase/*' \
289 \! -path 'third_party/libjingle/*' \
290 \! -path 'third_party/libphonenumber/*' \
291 \! -path 'third_party/libsrtp/*' \
292 \! -path 'third_party/libusb/*' \
293 \! -path 'third_party/libxml/chromium/*' \
294 \! -path 'third_party/libXNVCtrl/*' \
295 \! -path 'third_party/libyuv/*' \
296 \! -path 'third_party/lss/*' \
297 \! -path 'third_party/lzma_sdk/*' \
298 \! -path 'third_party/mesa/*' \
299 \! -path 'third_party/modp_b64/*' \
300 \! -path 'third_party/mongoose/*' \
301 \! -path 'third_party/mt19937ar/*' \
302 \! -path 'third_party/npapi/*' \
303 \! -path 'third_party/openmax/*' \
304 \! -path 'third_party/ots/*' \
305 \! -path 'third_party/pywebsocket/*' \
306 \! -path 'third_party/qcms/*' \
307 \! -path 'third_party/sfntly/*' \
308 \! -path 'third_party/skia/*' \
309 \! -path 'third_party/smhasher/*' \
310 \! -path 'third_party/sqlite/*' \
311 \! -path 'third_party/tcmalloc/*' \
312 \! -path 'third_party/tlslite/*' \
313 \! -path 'third_party/trace-viewer/*' \
314 \! -path 'third_party/undoview/*' \
315 \! -path 'third_party/usrsctp/*' \
316 \! -path 'third_party/v8-i18n/*' \
317 \! -path 'third_party/webdriver/*' \
318 \! -path 'third_party/webrtc/*' \
319 \! -path 'third_party/widevine/*' \
320 \! -path 'third_party/x86inc/*' \
321 \! -path 'third_party/zlib/google/*' \
322 -delete || die
323
324 # Remove bundled v8.
325 find v8 -type f \! -iname '*.gyp*' -delete || die
326 }
327
328 src_configure() {
329 local myconf=""
330
331 # Never tell the build system to "enable" SSE2, it has a few unexpected
332 # additions, bug #336871.
333 myconf+=" -Ddisable_sse2=1"
334
335 # Optional tcmalloc. Note it causes problems with e.g. NVIDIA
336 # drivers, bug #413637.
337 myconf+=" $(gyp_use tcmalloc linux_use_tcmalloc)"
338
339 # Disable glibc Native Client toolchain, we don't need it (bug #417019).
340 myconf+=" -Ddisable_glibc=1"
341
342 # TODO: also build with pnacl
343 myconf+=" -Ddisable_pnacl=1"
344
345 # It would be awkward for us to tar the toolchain and get it untarred again
346 # during the build.
347 myconf+=" -Ddisable_newlib_untar=1"
348
349 # Make it possible to remove third_party/adobe.
350 echo > "${T}/flapper_version.h" || die
351 myconf+=" -Dflapper_version_h_file=${T}/flapper_version.h"
352
353 # Use system-provided libraries.
354 # TODO: use_system_hunspell (upstream changes needed).
355 # TODO: use_system_libsrtp (bug #459932).
356 # TODO: use_system_libusb (http://crbug.com/266149).
357 # TODO: use_system_ssl (http://crbug.com/58087).
358 # TODO: use_system_sqlite (http://crbug.com/22208).
359 myconf+="
360 -Duse_system_bzip2=1
361 -Duse_system_flac=1
362 -Duse_system_harfbuzz=1
363 -Duse_system_icu=1
364 -Duse_system_jsoncpp=1
365 -Duse_system_libevent=1
366 -Duse_system_libjpeg=1
367 -Duse_system_libpng=1
368 -Duse_system_libvpx=1
369 -Duse_system_libwebp=1
370 -Duse_system_libxml=1
371 -Duse_system_libxslt=1
372 -Duse_system_minizip=1
373 -Duse_system_nspr=1
374 -Duse_system_opus=1
375 -Duse_system_protobuf=1
376 -Duse_system_re2=1
377 -Duse_system_snappy=1
378 -Duse_system_speex=1
379 -Duse_system_v8=1
380 -Duse_system_xdg_utils=1
381 -Duse_system_zlib=1
382 $(gyp_use system-ffmpeg use_system_ffmpeg)"
383
384 # TODO: Use system mesa on x86, bug #457130 .
385 if ! use x86 && ! use arm; then
386 myconf+="
387 -Duse_system_mesa=1"
388 fi
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 # Enable SUID sandbox.
438 myconf+="
439 -Dlinux_sandbox_path=${CHROMIUM_HOME}/chrome_sandbox
440 -Dlinux_sandbox_chrome_path=${CHROMIUM_HOME}/chrome"
441
442 # Never use bundled gold binary. Disable gold linker flags for now.
443 myconf+="
444 -Dlinux_use_gold_binary=0
445 -Dlinux_use_gold_flags=0"
446
447 # Always support proprietary codecs.
448 myconf+=" -Dproprietary_codecs=1"
449
450 if ! use bindist && ! use system-ffmpeg; then
451 # Enable H.264 support in bundled ffmpeg.
452 myconf+=" -Dffmpeg_branding=Chrome"
453 fi
454
455 # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys .
456 # Note: these are for Gentoo use ONLY. For your own distribution,
457 # please get your own set of keys. Feel free to contact chromium@g.o
458 # for more info.
459 myconf+=" -Dgoogle_api_key=AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc
460 -Dgoogle_default_client_id=329227923882.apps.googleusercontent.com
461 -Dgoogle_default_client_secret=vgKG0NNv7GoDpbtoFNLxCUXu"
462
463 local myarch="$(tc-arch)"
464 if [[ $myarch = amd64 ]] ; then
465 myconf+=" -Dtarget_arch=x64"
466 elif [[ $myarch = x86 ]] ; then
467 myconf+=" -Dtarget_arch=ia32"
468 elif [[ $myarch = arm ]] ; then
469 # TODO: re-enable NaCl (NativeClient).
470 myconf+=" -Dtarget_arch=arm
471 -Dsysroot=
472 -Darmv7=0
473 -Darm_neon=0
474 -Ddisable_nacl=1"
475 else
476 die "Failed to determine target arch, got '$myarch'."
477 fi
478
479 # Make sure that -Werror doesn't get added to CFLAGS by the build system.
480 # Depending on GCC version the warnings are different and we don't want
481 # the build to fail because of that.
482 myconf+=" -Dwerror="
483
484 # Avoid CFLAGS problems, bug #352457, bug #390147.
485 if ! use custom-cflags; then
486 replace-flags "-Os" "-O2"
487 strip-flags
488
489 # Prevent linker from running out of address space, bug #471810 .
490 if use x86; then
491 filter-flags "-g*"
492 fi
493 fi
494
495 # Make sure the build system will use the right tools, bug #340795.
496 tc-export AR CC CXX RANLIB
497
498 # Tools for building programs to be executed on the build system, bug #410883.
499 export AR_host=$(tc-getBUILD_AR)
500 export CC_host=$(tc-getBUILD_CC)
501 export CXX_host=$(tc-getBUILD_CXX)
502 export LD_host=${CXX_host}
503
504 build/linux/unbundle/replace_gyp_files.py ${myconf} || die
505 egyp_chromium ${myconf} || die
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 googleurl 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 # Even though ninja autodetects number of CPUs, we respect
522 # user's options, for debugging with -j 1 or any other reason.
523 ninja -C out/Release -v -j $(makeopts_jobs) ${ninja_targets} || die
524
525 pax-mark m out/Release/chrome
526 if use test; then
527 for x in $test_targets; do
528 pax-mark m out/Release/${x}
529 done
530 fi
531 }
532
533 src_test() {
534 # For more info see bug #350349.
535 local mylocale='en_US.utf8'
536 if ! locale -a | grep -q "$mylocale"; then
537 eerror "${PN} requires ${mylocale} locale for tests"
538 eerror "Please read the following guides for more information:"
539 eerror " http://www.gentoo.org/doc/en/guide-localization.xml"
540 eerror " http://www.gentoo.org/doc/en/utf-8.xml"
541 die "locale ${mylocale} is not supported"
542 fi
543
544 # For more info see bug #370957.
545 if [[ $UID -eq 0 ]]; then
546 die "Tests must be run as non-root. Please use FEATURES=userpriv."
547 fi
548
549 runtest() {
550 local cmd=$1
551 shift
552 local filter="--gtest_filter=$(IFS=:; echo "-${*}")"
553 einfo "${cmd}" "${filter}"
554 LC_ALL="${mylocale}" VIRTUALX_COMMAND="${cmd}" virtualmake "${filter}"
555 }
556
557 local excluded_base_unittests=(
558 "ICUStringConversionsTest.*" # bug #350347
559 "MessagePumpLibeventTest.*" # bug #398591
560 "TimeTest.JsTime" # bug #459614
561 "SecurityTest.NewOverflow" # bug #465724
562 )
563 runtest out/Release/base_unittests "${excluded_base_unittests[@]}"
564
565 runtest out/Release/cacheinvalidation_unittests
566
567 local excluded_content_unittests=(
568 "RendererDateTimePickerTest.*" # bug #465452
569 )
570 runtest out/Release/content_unittests "${excluded_content_unittests[@]}"
571
572 runtest out/Release/crypto_unittests
573 runtest out/Release/googleurl_unittests
574 runtest out/Release/gpu_unittests
575
576 # TODO: add media_unittests after fixing compile (bug #462546).
577 # runtest out/Release/media_unittests
578
579 local excluded_net_unittests=(
580 "NetUtilTest.IDNToUnicode*" # bug 361885
581 "NetUtilTest.FormatUrl*" # see above
582 "DnsConfigServiceTest.GetSystemConfig" # bug #394883
583 "CertDatabaseNSSTest.ImportServerCert_SelfSigned" # bug #399269
584 "CertDatabaseNSSTest.TrustIntermediateCa*" # http://crbug.com/224612
585 "URLFetcher*" # bug #425764
586 "HTTPSOCSPTest.*" # bug #426630
587 "HTTPSEVCRLSetTest.*" # see above
588 "HTTPSCRLSetTest.*" # see above
589 "*SpdyFramerTest.BasicCompression*" # bug #465444
590 )
591 runtest out/Release/net_unittests "${excluded_net_unittests[@]}"
592
593 runtest out/Release/printing_unittests
594
595 local excluded_sql_unittests=(
596 "SQLiteFeaturesTest.FTS2" # bug #461286
597 )
598 runtest out/Release/sql_unittests "${excluded_sql_unittests[@]}"
599 }
600
601 src_install() {
602 exeinto "${CHROMIUM_HOME}"
603 doexe out/Release/chrome || die
604
605 doexe out/Release/chrome_sandbox || die
606 fperms 4755 "${CHROMIUM_HOME}/chrome_sandbox"
607
608 doexe out/Release/chromedriver || die
609
610 if ! use arm; then
611 doexe out/Release/nacl_helper{,_bootstrap} || die
612 insinto "${CHROMIUM_HOME}"
613 doins out/Release/nacl_irt_*.nexe || die
614 doins out/Release/libppGoogleNaClPluginChrome.so || die
615 fi
616
617 local sedargs=( -e "s:/usr/lib/:/usr/$(get_libdir)/:g" )
618 if [[ -n ${CHROMIUM_SUFFIX} ]]; then
619 sedargs+=(
620 -e "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g"
621 -e "s:chromium.desktop:chromium${CHROMIUM_SUFFIX}.desktop:g"
622 -e "s:plugins:plugins --user-data-dir=\${HOME}/.config/chromium${CHROMIUM_SUFFIX}:"
623 )
624 fi
625 sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r3.sh" > chromium-launcher.sh || die
626 doexe chromium-launcher.sh
627
628 # It is important that we name the target "chromium-browser",
629 # xdg-utils expect it; bug #355517.
630 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser${CHROMIUM_SUFFIX} || die
631 # keep the old symlink around for consistency
632 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium${CHROMIUM_SUFFIX} || die
633
634 # Allow users to override command-line options, bug #357629.
635 dodir /etc/chromium || die
636 insinto /etc/chromium
637 newins "${FILESDIR}/chromium.default" "default" || die
638
639 pushd out/Release/locales > /dev/null || die
640 chromium_remove_language_paks
641 popd
642
643 insinto "${CHROMIUM_HOME}"
644 doins out/Release/*.pak || die
645
646 doins -r out/Release/locales || die
647 doins -r out/Release/resources || die
648
649 newman out/Release/chrome.1 chromium${CHROMIUM_SUFFIX}.1 || die
650 newman out/Release/chrome.1 chromium-browser${CHROMIUM_SUFFIX}.1 || die
651
652 if ! use system-ffmpeg; then
653 doexe out/Release/libffmpegsumo.so || die
654 fi
655
656 # Install icons and desktop entry.
657 local branding size
658 for size in 16 22 24 32 48 64 128 256 ; do
659 case ${size} in
660 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
661 *) branding="chrome/app/theme/chromium" ;;
662 esac
663 newicon -s ${size} "${branding}/product_logo_${size}.png" \
664 chromium-browser${CHROMIUM_SUFFIX}.png
665 done
666
667 local mime_types="text/html;text/xml;application/xhtml+xml;"
668 mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797
669 mime_types+="x-scheme-handler/ftp;" # bug #412185
670 mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393
671 make_desktop_entry \
672 chromium-browser${CHROMIUM_SUFFIX} \
673 "Chromium${CHROMIUM_SUFFIX}" \
674 chromium-browser${CHROMIUM_SUFFIX} \
675 "Network;WebBrowser" \
676 "MimeType=${mime_types}\nStartupWMClass=chromium-browser"
677 sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die
678
679 # Install GNOME default application entry (bug #303100).
680 if use gnome; then
681 dodir /usr/share/gnome-control-center/default-apps || die
682 insinto /usr/share/gnome-control-center/default-apps
683 newins "${FILESDIR}"/chromium-browser.xml chromium-browser${CHROMIUM_SUFFIX}.xml || die
684 if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then
685 sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" -i \
686 "${ED}"/usr/share/gnome-control-center/default-apps/chromium-browser${CHROMIUM_SUFFIX}.xml
687 fi
688 fi
689 }