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