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-23.0.1271.10-r1.ebuild chromium-23.0.1271.6.ebuild
Date: Tue, 02 Oct 2012 07:02:24
Message-Id: 20121002070210.2A15D21601@flycatcher.gentoo.org
1 phajdan.jr 12/10/02 07:02:10
2
3 Modified: ChangeLog chromium-9999-r1.ebuild
4 Added: chromium-23.0.1271.10-r1.ebuild
5 Removed: chromium-23.0.1271.6.ebuild
6 Log:
7 Re-enable NaCl. Build with system speex (bug #432748 by floppym). Remove old.
8
9 (Portage version: 2.1.11.9/cvs/Linux i686)
10
11 Revision Changes Path
12 1.723 www-client/chromium/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.723&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.723&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?r1=1.722&r2=1.723
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v
21 retrieving revision 1.722
22 retrieving revision 1.723
23 diff -u -r1.722 -r1.723
24 --- ChangeLog 28 Sep 2012 18:18:47 -0000 1.722
25 +++ ChangeLog 2 Oct 2012 07:02:09 -0000 1.723
26 @@ -1,6 +1,13 @@
27 # ChangeLog for www-client/chromium
28 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.722 2012/09/28 18:18:47 phajdan.jr Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.723 2012/10/02 07:02:09 phajdan.jr Exp $
31 +
32 +*chromium-23.0.1271.10-r1 (02 Oct 2012)
33 +
34 + 02 Oct 2012; Pawel Hajdan jr <phajdan.jr@g.o>
35 + +files/chromium-system-speex-r0.patch, -chromium-23.0.1271.6.ebuild,
36 + +chromium-23.0.1271.10-r1.ebuild, chromium-9999-r1.ebuild:
37 + Re-enable NaCl. Build with system speex (bug #432748 by floppym). Remove old.
38
39 *chromium-23.0.1271.10 (28 Sep 2012)
40
41
42
43
44 1.138 www-client/chromium/chromium-9999-r1.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-9999-r1.ebuild?rev=1.138&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-9999-r1.ebuild?rev=1.138&content-type=text/plain
48 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-9999-r1.ebuild?r1=1.137&r2=1.138
49
50 Index: chromium-9999-r1.ebuild
51 ===================================================================
52 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-9999-r1.ebuild,v
53 retrieving revision 1.137
54 retrieving revision 1.138
55 diff -u -r1.137 -r1.138
56 --- chromium-9999-r1.ebuild 28 Sep 2012 18:18:47 -0000 1.137
57 +++ chromium-9999-r1.ebuild 2 Oct 2012 07:02:09 -0000 1.138
58 @@ -1,6 +1,6 @@
59 # Copyright 1999-2012 Gentoo Foundation
60 # Distributed under the terms of the GNU General Public License v2
61 -# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-9999-r1.ebuild,v 1.137 2012/09/28 18:18:47 phajdan.jr Exp $
62 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-9999-r1.ebuild,v 1.138 2012/10/02 07:02:09 phajdan.jr Exp $
63
64 EAPI="4"
65 PYTHON_DEPEND="2:2.6"
66 @@ -41,6 +41,7 @@
67 >=media-libs/libjpeg-turbo-1.2.0-r1
68 media-libs/libpng
69 >=media-libs/libwebp-0.2.0_rc1
70 + media-libs/speex
71 pulseaudio? ( media-sound/pulseaudio )
72 sys-fs/udev
73 virtual/libusb:1
74 @@ -51,6 +52,7 @@
75 kerberos? ( virtual/krb5 )
76 selinux? ( sys-libs/libselinux )"
77 DEPEND="${RDEPEND}
78 + >=dev-lang/nacl-toolchain-newlib-0_p9093
79 dev-lang/perl
80 dev-lang/yasm
81 dev-python/ply
82 @@ -155,10 +157,16 @@
83 }
84
85 src_prepare() {
86 - # if ! use arm; then
87 - # ln -s /usr/$(get_libdir)/nacl-toolchain-newlib \
88 - # native_client/toolchain/linux_x86_newlib || die
89 - # fi
90 + if ! use arm; then
91 + ebegin "Preparing NaCl newlib toolchain"
92 + pushd "${T}" >/dev/null || die
93 + mkdir sdk || die
94 + cp -a /usr/$(get_libdir)/nacl-toolchain-newlib sdk/nacl-sdk || die
95 + mkdir -p "${S}"/native_client/toolchain/.tars || die
96 + tar czf "${S}"/native_client/toolchain/.tars/naclsdk_linux_x86.tgz sdk || die
97 + popd >/dev/null || die
98 + eend $?
99 + fi
100
101 # zlib-1.2.5.1-r1 renames the OF macro in zconf.h, bug 383371.
102 # sed -i '1i#define OF(x) x' \
103 @@ -208,7 +216,7 @@
104 \! -path 'third_party/sfntly/*' \
105 \! -path 'third_party/skia/*' \
106 \! -path 'third_party/smhasher/*' \
107 - \! -path 'third_party/speex/*' \
108 + \! -path 'third_party/speex/speex.h' \
109 \! -path 'third_party/sqlite/*' \
110 \! -path 'third_party/tcmalloc/*' \
111 \! -path 'third_party/tlslite/*' \
112 @@ -251,13 +259,12 @@
113 # drivers, bug #413637.
114 myconf+=" $(gyp_use tcmalloc linux_use_tcmalloc)"
115
116 - # TODO: re-enable nacl after fixing build errors, see
117 - # http://forums.gentoo.org/viewtopic-t-937222-highlight-chromium.html
118 - myconf+=" -Ddisable_nacl=1"
119 -
120 # Disable glibc Native Client toolchain, we don't need it (bug #417019).
121 myconf+=" -Ddisable_glibc=1"
122
123 + # TODO: also build with pnacl
124 + myconf+=" -Ddisable_pnacl=1"
125 +
126 # Make it possible to remove third_party/adobe.
127 echo > "${T}/flapper_version.h" || die
128 myconf+=" -Dflapper_version_h_file=${T}/flapper_version.h"
129 @@ -280,7 +287,7 @@
130 -Duse_system_libusb=1
131 -Duse_system_libwebp=1
132 -Duse_system_libxml=1
133 - -Duse_system_speex=0
134 + -Duse_system_speex=1
135 -Duse_system_v8=1
136 -Duse_system_xdg_utils=1
137 -Duse_system_yasm=1
138 @@ -440,12 +447,12 @@
139
140 doexe out/Release/chromedriver || die
141
142 - # if ! use arm; then
143 - # doexe out/Release/nacl_helper{,_bootstrap} || die
144 - # insinto "${CHROMIUM_HOME}"
145 - # doins out/Release/nacl_irt_*.nexe || die
146 - # doins out/Release/libppGoogleNaClPluginChrome.so || die
147 - # fi
148 + if ! use arm; then
149 + doexe out/Release/nacl_helper{,_bootstrap} || die
150 + insinto "${CHROMIUM_HOME}"
151 + doins out/Release/nacl_irt_*.nexe || die
152 + doins out/Release/libppGoogleNaClPluginChrome.so || die
153 + fi
154
155 newexe "${FILESDIR}"/chromium-launcher-r2.sh chromium-launcher.sh || die
156 if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then
157
158
159
160 1.1 www-client/chromium/chromium-23.0.1271.10-r1.ebuild
161
162 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-23.0.1271.10-r1.ebuild?rev=1.1&view=markup
163 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-23.0.1271.10-r1.ebuild?rev=1.1&content-type=text/plain
164
165 Index: chromium-23.0.1271.10-r1.ebuild
166 ===================================================================
167 # Copyright 1999-2012 Gentoo Foundation
168 # Distributed under the terms of the GNU General Public License v2
169 # $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-23.0.1271.10-r1.ebuild,v 1.1 2012/10/02 07:02:09 phajdan.jr Exp $
170
171 EAPI="4"
172 PYTHON_DEPEND="2:2.6"
173
174 CHROMIUM_LANGS="am ar bg bn ca cs da de el en_GB es es_LA et fa fi fil fr gu he
175 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
176 sv sw ta te th tr uk vi zh_CN zh_TW"
177
178 inherit chromium eutils flag-o-matic multilib \
179 pax-utils portability python toolchain-funcs versionator virtualx
180
181 DESCRIPTION="Open-source version of Google Chrome web browser"
182 HOMEPAGE="http://chromium.org/"
183 SRC_URI="http://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.bz2"
184
185 LICENSE="BSD"
186 SLOT="0"
187 KEYWORDS="~amd64 ~x86"
188 IUSE="bindist cups gnome gnome-keyring kerberos pulseaudio selinux tcmalloc"
189
190 RDEPEND="app-arch/bzip2
191 cups? (
192 dev-libs/libgcrypt
193 >=net-print/cups-1.3.11
194 )
195 >=dev-lang/v8-3.11.10.6
196 >=dev-libs/elfutils-0.149
197 dev-libs/expat
198 >=dev-libs/icu-49.1.1-r1
199 >=dev-libs/libevent-1.4.13
200 dev-libs/libxml2[icu]
201 dev-libs/libxslt
202 >=dev-libs/nss-3.12.3
203 gnome? ( >=gnome-base/gconf-2.24.0 )
204 gnome-keyring? ( >=gnome-base/gnome-keyring-2.28.2 )
205 >=media-libs/alsa-lib-1.0.19
206 media-libs/flac
207 >=media-libs/libjpeg-turbo-1.2.0-r1
208 media-libs/libpng
209 >=media-libs/libwebp-0.2.0_rc1
210 media-libs/speex
211 pulseaudio? ( media-sound/pulseaudio )
212 sys-fs/udev
213 virtual/libusb:1
214 x11-libs/gtk+:2
215 x11-libs/libXinerama
216 x11-libs/libXScrnSaver
217 x11-libs/libXtst
218 kerberos? ( virtual/krb5 )
219 selinux? ( sys-libs/libselinux )"
220 DEPEND="${RDEPEND}
221 >=dev-lang/nacl-toolchain-newlib-0_p9093
222 dev-lang/perl
223 dev-lang/yasm
224 dev-python/ply
225 dev-python/simplejson
226 >=dev-util/gperf-3.0.3
227 >=sys-devel/bison-2.4.3
228 sys-devel/flex
229 >=sys-devel/make-3.81-r2
230 virtual/pkgconfig
231 test? ( dev-python/pyftpdlib )"
232 RDEPEND+="
233 !=www-client/chromium-9999
234 x11-misc/xdg-utils
235 virtual/ttf-fonts"
236
237 if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
238 EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
239 fi
240
241 pkg_setup() {
242 if [[ "${SLOT}" == "0" ]]; then
243 CHROMIUM_SUFFIX=""
244 else
245 CHROMIUM_SUFFIX="-${SLOT}"
246 fi
247 CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser${CHROMIUM_SUFFIX}"
248
249 # Make sure the build system will use the right tools, bug #340795.
250 tc-export AR CC CXX RANLIB
251
252 # Make sure the build system will use the right python, bug #344367.
253 python_set_active_version 2
254 python_pkg_setup
255
256 if ! use selinux; then
257 chromium_suid_sandbox_check_kernel_config
258 fi
259
260 if use bindist; then
261 elog "bindist enabled: H.264 video support will be disabled."
262 else
263 elog "bindist disabled: Resulting binaries may not be legal to re-distribute."
264 fi
265 }
266
267 src_prepare() {
268 if ! use arm; then
269 ebegin "Preparing NaCl newlib toolchain"
270 pushd "${T}" >/dev/null || die
271 mkdir sdk || die
272 cp -a /usr/$(get_libdir)/nacl-toolchain-newlib sdk/nacl-sdk || die
273 mkdir -p "${S}"/native_client/toolchain/.tars || die
274 tar czf "${S}"/native_client/toolchain/.tars/naclsdk_linux_x86.tgz sdk || die
275 popd >/dev/null || die
276 eend $?
277 fi
278
279 # zlib-1.2.5.1-r1 renames the OF macro in zconf.h, bug 383371.
280 # sed -i '1i#define OF(x) x' \
281 # third_party/zlib/contrib/minizip/{ioapi,{,un}zip}.h || die
282
283 # Fix build without NaCl glibc toolchain.
284 epatch "${FILESDIR}/${PN}-ppapi-r0.patch"
285
286 # Fix unnecessary dependency on dbus-glib, bug #434346.
287 epatch "${FILESDIR}/${PN}-dbus-glib-r0.patch"
288
289 # Fix build with system ICU.
290 epatch "${FILESDIR}/${PN}-system-icu-r0.patch"
291
292 # Fix build with system speex, bug #432748.
293 epatch "${FILESDIR}/${PN}-system-speex-r0.patch"
294
295 # Missing gyp files in tarball.
296 # https://code.google.com/p/chromium/issues/detail?id=144823
297 if [[ -e chrome/test/data/nacl/nacl_test_data.gyp ]]; then
298 die "tarball fixed, please remove workaround"
299 fi
300
301 mkdir -p chrome/test/data/nacl
302 cat > chrome/test/data/nacl/nacl_test_data.gyp <<-EOF
303 {
304 'targets': [
305 {
306 'target_name': 'nacl_tests',
307 'type': 'none',
308 },
309 ],
310 }
311 EOF
312
313 epatch_user
314
315 # Remove most bundled libraries. Some are still needed.
316 find third_party -type f \! -iname '*.gyp*' \
317 \! -path 'third_party/WebKit/*' \
318 \! -path 'third_party/angle/*' \
319 \! -path 'third_party/cacheinvalidation/*' \
320 \! -path 'third_party/cld/*' \
321 \! -path 'third_party/ffmpeg/*' \
322 \! -path 'third_party/flac/flac.h' \
323 \! -path 'third_party/flot/*' \
324 \! -path 'third_party/gpsd/*' \
325 \! -path 'third_party/harfbuzz/*' \
326 \! -path 'third_party/hunspell/*' \
327 \! -path 'third_party/hyphen/*' \
328 \! -path 'third_party/iccjpeg/*' \
329 \! -path 'third_party/jsoncpp/*' \
330 \! -path 'third_party/khronos/*' \
331 \! -path 'third_party/launchpad_translations/*' \
332 \! -path 'third_party/leveldatabase/*' \
333 \! -path 'third_party/libjingle/*' \
334 \! -path 'third_party/libphonenumber/*' \
335 \! -path 'third_party/libsrtp/*' \
336 \! -path 'third_party/libusb/libusb.h' \
337 \! -path 'third_party/libva/*' \
338 \! -path 'third_party/libvpx/*' \
339 \! -path 'third_party/libxml/chromium/*' \
340 \! -path 'third_party/libXNVCtrl/*' \
341 \! -path 'third_party/libyuv/*' \
342 \! -path 'third_party/lss/*' \
343 \! -path 'third_party/mesa/*' \
344 \! -path 'third_party/modp_b64/*' \
345 \! -path 'third_party/mongoose/*' \
346 \! -path 'third_party/mt19937ar/*' \
347 \! -path 'third_party/npapi/*' \
348 \! -path 'third_party/openmax/*' \
349 \! -path 'third_party/ots/*' \
350 \! -path 'third_party/protobuf/*' \
351 \! -path 'third_party/qcms/*' \
352 \! -path 'third_party/re2/*' \
353 \! -path 'third_party/scons-2.0.1/*' \
354 \! -path 'third_party/sfntly/*' \
355 \! -path 'third_party/skia/*' \
356 \! -path 'third_party/smhasher/*' \
357 \! -path 'third_party/speex/speex.h' \
358 \! -path 'third_party/sqlite/*' \
359 \! -path 'third_party/tcmalloc/*' \
360 \! -path 'third_party/tlslite/*' \
361 \! -path 'third_party/trace-viewer/*' \
362 \! -path 'third_party/undoview/*' \
363 \! -path 'third_party/v8-i18n/*' \
364 \! -path 'third_party/webdriver/*' \
365 \! -path 'third_party/webgl_conformance/*' \
366 \! -path 'third_party/webrtc/*' \
367 \! -path 'third_party/zlib/*' \
368 -delete || die
369
370 local v8_bundled="$(chromium_bundled_v8_version)"
371 local v8_installed="$(chromium_installed_v8_version)"
372 einfo "V8 version: bundled - ${v8_bundled}; installed - ${v8_installed}"
373
374 # Remove bundled v8.
375 find v8 -type f \! -iname '*.gyp*' -delete || die
376
377 # The implementation files include v8 headers with full path,
378 # like #include "v8/include/v8.h". Make sure the system headers
379 # will be used.
380 # TODO: find a solution that can be upstreamed.
381 rmdir v8/include || die
382 ln -s /usr/include v8/include || die
383
384 # Make sure the build system will use the right python, bug #344367.
385 # Only convert directories that need it, to save time.
386 python_convert_shebangs -q -r 2 build tools
387 }
388
389 src_configure() {
390 local myconf=""
391
392 # Never tell the build system to "enable" SSE2, it has a few unexpected
393 # additions, bug #336871.
394 myconf+=" -Ddisable_sse2=1"
395
396 # Optional tcmalloc. Note it causes problems with e.g. NVIDIA
397 # drivers, bug #413637.
398 myconf+=" $(gyp_use tcmalloc linux_use_tcmalloc)"
399
400 # Disable glibc Native Client toolchain, we don't need it (bug #417019).
401 myconf+=" -Ddisable_glibc=1"
402
403 # TODO: also build with pnacl
404 myconf+=" -Ddisable_pnacl=1"
405
406 # Make it possible to remove third_party/adobe.
407 echo > "${T}/flapper_version.h" || die
408 myconf+=" -Dflapper_version_h_file=${T}/flapper_version.h"
409
410 # Use system-provided libraries.
411 # TODO: use_system_ffmpeg
412 # TODO: use_system_hunspell (upstream changes needed).
413 # TODO: use_system_speex (needs additional shims, bug #432748).
414 # TODO: use_system_ssl (http://crbug.com/58087).
415 # TODO: use_system_sqlite (http://crbug.com/22208).
416 # TODO: use_system_vpx
417 # TODO: use_system_zlib (forked, bug #432746).
418 myconf+="
419 -Duse_system_bzip2=1
420 -Duse_system_flac=1
421 -Duse_system_icu=1
422 -Duse_system_libevent=1
423 -Duse_system_libjpeg=1
424 -Duse_system_libpng=1
425 -Duse_system_libusb=1
426 -Duse_system_libwebp=1
427 -Duse_system_libxml=1
428 -Duse_system_speex=1
429 -Duse_system_v8=1
430 -Duse_system_xdg_utils=1
431 -Duse_system_yasm=1
432 -Duse_system_zlib=0"
433
434 # Optional dependencies.
435 # TODO: linux_link_kerberos, bug #381289.
436 myconf+="
437 $(gyp_use cups)
438 $(gyp_use gnome use_gconf)
439 $(gyp_use gnome-keyring use_gnome_keyring)
440 $(gyp_use gnome-keyring linux_link_gnome_keyring)
441 $(gyp_use kerberos)
442 $(gyp_use pulseaudio)
443 $(gyp_use selinux selinux)"
444
445 # Use explicit library dependencies instead of dlopen.
446 # This makes breakages easier to detect by revdep-rebuild.
447 myconf+="
448 -Dlinux_link_gsettings=1"
449
450 if ! use selinux; then
451 # Enable SUID sandbox.
452 myconf+="
453 -Dlinux_sandbox_path=${CHROMIUM_HOME}/chrome_sandbox
454 -Dlinux_sandbox_chrome_path=${CHROMIUM_HOME}/chrome"
455 fi
456
457 # Never use bundled gold binary. Disable gold linker flags for now.
458 myconf+="
459 -Dlinux_use_gold_binary=0
460 -Dlinux_use_gold_flags=0"
461
462 if ! use bindist; then
463 # Enable H.624 support in bundled ffmpeg.
464 myconf+=" -Dproprietary_codecs=1 -Dffmpeg_branding=Chrome"
465 fi
466
467 local myarch="$(tc-arch)"
468 if [[ $myarch = amd64 ]] ; then
469 myconf+=" -Dtarget_arch=x64"
470 elif [[ $myarch = x86 ]] ; then
471 myconf+=" -Dtarget_arch=ia32"
472 elif [[ $myarch = arm ]] ; then
473 # TODO: re-enable NaCl (NativeClient).
474 myconf+=" -Dtarget_arch=arm
475 -Darm_neon=0
476 -Ddisable_nacl=1"
477 else
478 die "Failed to determine target arch, got '$myarch'."
479 fi
480
481 # Make sure that -Werror doesn't get added to CFLAGS by the build system.
482 # Depending on GCC version the warnings are different and we don't want
483 # the build to fail because of that.
484 myconf+=" -Dwerror="
485
486 # Avoid CFLAGS problems, bug #352457, bug #390147.
487 if ! use custom-cflags; then
488 replace-flags "-Os" "-O2"
489 strip-flags
490 fi
491
492 egyp_chromium ${myconf} || die
493 }
494
495 src_compile() {
496 local test_targets
497 for x in base cacheinvalidation crypto \
498 googleurl gpu media net printing sql; do
499 test_targets+=" ${x}_unittests"
500 done
501
502 local make_targets="chrome chromedriver"
503 if ! use selinux; then
504 make_targets+=" chrome_sandbox"
505 fi
506 if use test; then
507 make_targets+=$test_targets
508 fi
509
510 # See bug #410883 for more info about the .host mess.
511 emake ${make_targets} BUILDTYPE=Release V=1 \
512 CC.host="$(tc-getCC)" CFLAGS.host="${CFLAGS}" \
513 CXX.host="$(tc-getCXX)" CXXFLAGS.host="${CXXFLAGS}" \
514 LINK.host="$(tc-getCXX)" LDFLAGS.host="${LDFLAGS}" \
515 AR.host="$(tc-getAR)" || die
516
517 pax-mark m out/Release/chrome
518 if use test; then
519 for x in $test_targets; do
520 pax-mark m out/Release/${x}
521 done
522 fi
523 }
524
525 src_test() {
526 # For more info see bug #350349.
527 local mylocale='en_US.utf8'
528 if ! locale -a | grep -q "$mylocale"; then
529 eerror "${PN} requires ${mylocale} locale for tests"
530 eerror "Please read the following guides for more information:"
531 eerror " http://www.gentoo.org/doc/en/guide-localization.xml"
532 eerror " http://www.gentoo.org/doc/en/utf-8.xml"
533 die "locale ${mylocale} is not supported"
534 fi
535
536 # For more info see bug #370957.
537 if [[ $UID -eq 0 ]]; then
538 die "Tests must be run as non-root. Please use FEATURES=userpriv."
539 fi
540
541 runtest() {
542 local cmd=$1
543 shift
544 local filter="--gtest_filter=$(IFS=:; echo "-${*}")"
545 einfo "${cmd}" "${filter}"
546 LC_ALL="${mylocale}" VIRTUALX_COMMAND="${cmd}" virtualmake "${filter}"
547 }
548
549 local excluded_base_unittests=(
550 "ICUStringConversionsTest.*" # bug #350347
551 "MessagePumpLibeventTest.*" # bug #398591
552 )
553 runtest out/Release/base_unittests "${excluded_base_unittests[@]}"
554
555 runtest out/Release/cacheinvalidation_unittests
556 runtest out/Release/crypto_unittests
557 runtest out/Release/googleurl_unittests
558 runtest out/Release/gpu_unittests
559 runtest out/Release/media_unittests
560
561 local excluded_net_unittests=(
562 "NetUtilTest.IDNToUnicode*" # bug 361885
563 "NetUtilTest.FormatUrl*" # see above
564 "DnsConfigServiceTest.GetSystemConfig" # bug #394883
565 "CertDatabaseNSSTest.ImportServerCert_SelfSigned" # bug #399269
566 "URLFetcher*" # bug #425764
567 "HTTPSOCSPTest.*" # bug #426630
568 "HTTPSEVCRLSetTest.*" # see above
569 "HTTPSCRLSetTest.*" # see above
570 )
571 runtest out/Release/net_unittests "${excluded_net_unittests[@]}"
572
573 runtest out/Release/printing_unittests
574 runtest out/Release/sql_unittests
575 }
576
577 src_install() {
578 exeinto "${CHROMIUM_HOME}"
579 doexe out/Release/chrome || die
580
581 if ! use selinux; then
582 doexe out/Release/chrome_sandbox || die
583 fperms 4755 "${CHROMIUM_HOME}/chrome_sandbox"
584 fi
585
586 doexe out/Release/chromedriver || die
587
588 if ! use arm; then
589 doexe out/Release/nacl_helper{,_bootstrap} || die
590 insinto "${CHROMIUM_HOME}"
591 doins out/Release/nacl_irt_*.nexe || die
592 doins out/Release/libppGoogleNaClPluginChrome.so || die
593 fi
594
595 newexe "${FILESDIR}"/chromium-launcher-r2.sh chromium-launcher.sh || die
596 if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then
597 sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" \
598 -i "${ED}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die
599 sed "s:chromium.desktop:chromium${CHROMIUM_SUFFIX}.desktop:g" \
600 -i "${ED}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die
601 sed "s:plugins:plugins --user-data-dir=\${HOME}/.config/chromium${CHROMIUM_SUFFIX}:" \
602 -i "${ED}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die
603 fi
604
605 # It is important that we name the target "chromium-browser",
606 # xdg-utils expect it; bug #355517.
607 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser${CHROMIUM_SUFFIX} || die
608 # keep the old symlink around for consistency
609 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium${CHROMIUM_SUFFIX} || die
610
611 # Allow users to override command-line options, bug #357629.
612 dodir /etc/chromium || die
613 insinto /etc/chromium
614 newins "${FILESDIR}/chromium.default" "default" || die
615
616 pushd out/Release/locales > /dev/null || die
617 chromium_remove_language_paks
618 popd
619
620 insinto "${CHROMIUM_HOME}"
621 doins out/Release/*.pak || die
622
623 doins -r out/Release/locales || die
624 doins -r out/Release/resources || die
625
626 newman out/Release/chrome.1 chromium${CHROMIUM_SUFFIX}.1 || die
627 newman out/Release/chrome.1 chromium-browser${CHROMIUM_SUFFIX}.1 || die
628
629 doexe out/Release/libffmpegsumo.so || die
630
631 # Install icons and desktop entry.
632 local branding size
633 for size in 16 22 24 32 48 64 128 256 ; do
634 case ${size} in
635 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
636 *) branding="chrome/app/theme/chromium" ;;
637 esac
638 newicon -s ${size} "${branding}/product_logo_${size}.png" \
639 chromium-browser${CHROMIUM_SUFFIX}.png
640 done
641
642 local mime_types="text/html;text/xml;application/xhtml+xml;"
643 mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797
644 mime_types+="x-scheme-handler/ftp;" # bug #412185
645 mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393
646 make_desktop_entry \
647 chromium-browser${CHROMIUM_SUFFIX} \
648 "Chromium${CHROMIUM_SUFFIX}" \
649 chromium-browser${CHROMIUM_SUFFIX} \
650 "Network;WebBrowser" \
651 "MimeType=${mime_types}\nStartupWMClass=chromium-browser"
652 sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die
653
654 # Install GNOME default application entry (bug #303100).
655 if use gnome; then
656 dodir /usr/share/gnome-control-center/default-apps || die
657 insinto /usr/share/gnome-control-center/default-apps
658 newins "${FILESDIR}"/chromium-browser.xml chromium-browser${CHROMIUM_SUFFIX}.xml || die
659 if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then
660 sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" -i \
661 "${ED}"/usr/share/gnome-control-center/default-apps/chromium-browser${CHROMIUM_SUFFIX}.xml
662 fi
663 fi
664 }