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