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