Gentoo Archives: gentoo-commits

From: "Mike Gilbert (floppym)" <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-client/chromium: chromium-17.0.963.46.ebuild ChangeLog
Date: Tue, 31 Jan 2012 00:25:20
Message-Id: 20120131002509.533972004B@flycatcher.gentoo.org
1 floppym 12/01/31 00:25:09
2
3 Modified: ChangeLog
4 Added: chromium-17.0.963.46.ebuild
5 Log:
6 Version bump for beta channel release.
7
8 (Portage version: 2.2.0_alpha84/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.549 www-client/chromium/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.549&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.549&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?r1=1.548&r2=1.549
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v
20 retrieving revision 1.548
21 retrieving revision 1.549
22 diff -u -r1.548 -r1.549
23 --- ChangeLog 30 Jan 2012 07:58:08 -0000 1.548
24 +++ ChangeLog 31 Jan 2012 00:25:09 -0000 1.549
25 @@ -1,6 +1,11 @@
26 # ChangeLog for www-client/chromium
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.548 2012/01/30 07:58:08 phajdan.jr Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.549 2012/01/31 00:25:09 floppym Exp $
30 +
31 +*chromium-17.0.963.46 (31 Jan 2012)
32 +
33 + 31 Jan 2012; Mike Gilbert <floppym@g.o> +chromium-17.0.963.46.ebuild:
34 + Version bump for beta channel release.
35
36 *chromium-17.0.963.44-r1 (30 Jan 2012)
37
38
39
40
41 1.1 www-client/chromium/chromium-17.0.963.46.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-17.0.963.46.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-17.0.963.46.ebuild?rev=1.1&content-type=text/plain
45
46 Index: chromium-17.0.963.46.ebuild
47 ===================================================================
48 # Copyright 1999-2012 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-17.0.963.46.ebuild,v 1.1 2012/01/31 00:25:09 floppym Exp $
51
52 EAPI="4"
53 PYTHON_DEPEND="2:2.6"
54
55 inherit eutils fdo-mime flag-o-matic gnome2-utils linux-info multilib \
56 pax-utils portability python toolchain-funcs versionator virtualx
57
58 DESCRIPTION="Open-source version of Google Chrome web browser"
59 HOMEPAGE="http://chromium.org/"
60 SRC_URI="http://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.bz2"
61
62 LICENSE="BSD"
63 SLOT="0"
64 KEYWORDS="~amd64 ~x86"
65 IUSE="bindist cups custom-cflags gnome gnome-keyring kerberos pulseaudio"
66
67 # en_US is ommitted on purpose from the list below. It must always be available.
68 LANGS="am ar bg bn ca cs da de el en_GB es es_LA et fa fi fil fr gu he hi hr
69 hu id it ja kn ko lt lv ml mr nb nl pl pt_BR pt_PT ro ru sk sl sr sv sw ta te th
70 tr uk vi zh_CN zh_TW"
71 for lang in ${LANGS}; do
72 IUSE+=" linguas_${lang}"
73 done
74
75 RDEPEND="app-arch/bzip2
76 cups? (
77 dev-libs/libgcrypt
78 >=net-print/cups-1.3.11
79 )
80 >=dev-lang/v8-3.7.6
81 dev-libs/dbus-glib
82 dev-libs/elfutils
83 >=dev-libs/icu-4.4.1
84 >=dev-libs/libevent-1.4.13
85 dev-libs/libxml2[icu]
86 dev-libs/libxslt
87 >=dev-libs/nss-3.12.3
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 virtual/jpeg
93 media-libs/libpng
94 >=media-libs/libwebp-0.1.2
95 media-libs/speex
96 pulseaudio? ( media-sound/pulseaudio )
97 sys-libs/zlib
98 x11-libs/gtk+:2
99 x11-libs/libXinerama
100 x11-libs/libXScrnSaver
101 x11-libs/libXtst
102 kerberos? ( virtual/krb5 )"
103 DEPEND="${RDEPEND}
104 >=dev-lang/nacl-toolchain-newlib-0_p7311
105 dev-lang/perl
106 dev-lang/yasm
107 dev-python/simplejson
108 >=dev-util/gperf-3.0.3
109 >=dev-util/pkgconfig-0.23
110 >=sys-devel/bison-2.4.3
111 sys-devel/flex
112 >=sys-devel/make-3.81-r2
113 test? ( dev-python/pyftpdlib )"
114 RDEPEND+="
115 !=www-client/chromium-9999
116 x11-misc/xdg-utils
117 virtual/ttf-fonts"
118
119 gyp_use() {
120 if [[ $# -lt 2 ]]; then
121 echo "!!! usage: gyp_use <USEFLAG> <GYPFLAG>" >&2
122 return 1
123 fi
124 if use "$1"; then echo "-D$2=1"; else echo "-D$2=0"; fi
125 }
126
127 egyp() {
128 set -- build/gyp_chromium --depth=. "${@}"
129 echo "${@}" >&2
130 "${@}"
131 }
132
133 # Chromium uses different names for some langs,
134 # return Chromium name corresponding to a Gentoo lang.
135 chromium_lang() {
136 if [[ "$1" == "es_LA" ]]; then
137 echo "es_419"
138 else
139 echo "$1"
140 fi
141 }
142
143 get_bundled_v8_version() {
144 "$(PYTHON -2)" "${FILESDIR}"/extract_v8_version.py v8/src/version.cc
145 }
146
147 get_installed_v8_version() {
148 best_version dev-lang/v8 | sed -e 's@dev-lang/v8-@@g'
149 }
150
151 if ! has chromium-pkg_die ${EBUILD_DEATH_HOOKS}; then
152 EBUILD_DEATH_HOOKS+=" chromium-pkg_die";
153 fi
154
155 chromium-pkg_die() {
156 if [[ "${EBUILD_PHASE}" != "compile" ]]; then
157 return
158 fi
159
160 # Prevent user problems like bug #348235.
161 eshopts_push -s extglob
162 if is-flagq '-g?(gdb)?([1-9])'; then
163 ewarn
164 ewarn "You have enabled debug info (i.e. -g or -ggdb in your CFLAGS/CXXFLAGS)."
165 ewarn "Please try removing -g{,gdb} before reporting a bug."
166 ewarn
167 fi
168 eshopts_pop
169
170 # ccache often causes bogus compile failures, especially when the cache gets
171 # corrupted.
172 if has ccache ${FEATURES}; then
173 ewarn
174 ewarn "You have enabled ccache. Please try disabling ccache"
175 ewarn "before reporting a bug."
176 ewarn
177 fi
178
179 # No ricer bugs.
180 if use custom-cflags; then
181 ewarn
182 ewarn "You have enabled the custom-cflags USE flag."
183 ewarn "Please disable it before reporting a bug."
184 ewarn
185 fi
186
187 # If the system doesn't have enough memory, the compilation is known to
188 # fail. Print info about memory to recognize this condition.
189 einfo
190 einfo "$(grep MemTotal /proc/meminfo)"
191 einfo "$(grep SwapTotal /proc/meminfo)"
192 einfo
193 }
194
195 pkg_setup() {
196 if [[ "${SLOT}" == "0" ]]; then
197 CHROMIUM_SUFFIX=""
198 else
199 CHROMIUM_SUFFIX="-${SLOT}"
200 fi
201 CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser${CHROMIUM_SUFFIX}"
202
203 # Make sure the build system will use the right tools, bug #340795.
204 tc-export AR CC CXX RANLIB
205
206 # Make sure the build system will use the right python, bug #344367.
207 python_set_active_version 2
208 python_pkg_setup
209
210 if [[ "${MERGE_TYPE}" == "source" || "${MERGE_TYPE}" == "binary" ]]; then
211 # Fail if the kernel doesn't support features needed for sandboxing,
212 # bug #363907.
213 ERROR_PID_NS="PID_NS is required for sandbox to work"
214 ERROR_NET_NS="NET_NS is required for sandbox to work"
215 CONFIG_CHECK="~PID_NS ~NET_NS"
216 check_extra_config
217 fi
218
219 if use bindist; then
220 elog "bindist enabled: H.264 video support will be disabled."
221 else
222 elog "bindist disabled: Resulting binaries may not be legal to re-distribute."
223 fi
224 }
225
226 src_prepare() {
227 ln -s /usr/$(get_libdir)/nacl-toolchain-newlib \
228 native_client/toolchain/linux_x86_newlib || die
229
230 # zlib-1.2.5.1-r1 renames the OF macro in zconf.h, bug 383371.
231 sed -i '1i#define OF(x) x' \
232 third_party/zlib/contrib/minizip/{ioapi,{,un}zip}.c \
233 chrome/common/zip*.cc || die
234
235 # Revert WebKit changeset responsible for Gentoo bug #393471.
236 epatch "${FILESDIR}/${PN}-revert-jpeg-swizzle-r0.patch"
237
238 epatch_user
239
240 # Remove most bundled libraries. Some are still needed.
241 find third_party -type f \! -iname '*.gyp*' \
242 \! -path 'third_party/WebKit/*' \
243 \! -path 'third_party/angle/*' \
244 \! -path 'third_party/cacheinvalidation/*' \
245 \! -path 'third_party/cld/*' \
246 \! -path 'third_party/expat/*' \
247 \! -path 'third_party/ffmpeg/*' \
248 \! -path 'third_party/flac/flac.h' \
249 \! -path 'third_party/gpsd/*' \
250 \! -path 'third_party/harfbuzz/*' \
251 \! -path 'third_party/hunspell/*' \
252 \! -path 'third_party/iccjpeg/*' \
253 \! -path 'third_party/jsoncpp/*' \
254 \! -path 'third_party/khronos/*' \
255 \! -path 'third_party/launchpad_translations/*' \
256 \! -path 'third_party/leveldb/*' \
257 \! -path 'third_party/leveldatabase/*' \
258 \! -path 'third_party/libjingle/*' \
259 \! -path 'third_party/libphonenumber/*' \
260 \! -path 'third_party/libvpx/*' \
261 \! -path 'third_party/lss/*' \
262 \! -path 'third_party/mesa/*' \
263 \! -path 'third_party/modp_b64/*' \
264 \! -path 'third_party/mongoose/*' \
265 \! -path 'third_party/npapi/*' \
266 \! -path 'third_party/openmax/*' \
267 \! -path 'third_party/ots/*' \
268 \! -path 'third_party/protobuf/*' \
269 \! -path 'third_party/scons-2.0.1/*' \
270 \! -path 'third_party/sfntly/*' \
271 \! -path 'third_party/skia/*' \
272 \! -path 'third_party/smhasher/*' \
273 \! -path 'third_party/speex/speex.h' \
274 \! -path 'third_party/sqlite/*' \
275 \! -path 'third_party/tcmalloc/*' \
276 \! -path 'third_party/tlslite/*' \
277 \! -path 'third_party/undoview/*' \
278 \! -path 'third_party/v8-i18n/*' \
279 \! -path 'third_party/webdriver/*' \
280 \! -path 'third_party/webgl_conformance/*' \
281 \! -path 'third_party/webrtc/*' \
282 \! -path 'third_party/zlib/contrib/minizip/*' \
283 -delete || die
284
285 local v8_bundled="$(get_bundled_v8_version)"
286 local v8_installed="$(get_installed_v8_version)"
287 elog "V8 version: bundled - ${v8_bundled}; installed - ${v8_installed}"
288
289 # Remove bundled v8.
290 find v8 -type f \! -iname '*.gyp*' -delete || die
291
292 # The implementation files include v8 headers with full path,
293 # like #include "v8/include/v8.h". Make sure the system headers
294 # will be used.
295 # TODO: find a solution that can be upstreamed.
296 rmdir v8/include || die
297 ln -s /usr/include v8/include || die
298
299 # Make sure the build system will use the right python, bug #344367.
300 # Only convert directories that need it, to save time.
301 python_convert_shebangs -q -r 2 build tools
302 }
303
304 src_configure() {
305 local myconf=""
306
307 # Never tell the build system to "enable" SSE2, it has a few unexpected
308 # additions, bug #336871.
309 myconf+=" -Ddisable_sse2=1"
310
311 # Use system-provided libraries.
312 # TODO: use_system_ffmpeg
313 # TODO: use_system_hunspell (upstream changes needed).
314 # TODO: use_system_ssl (http://crbug.com/58087).
315 # TODO: use_system_sqlite (http://crbug.com/22208).
316 # TODO: use_system_vpx
317 myconf+="
318 -Duse_system_bzip2=1
319 -Duse_system_flac=1
320 -Duse_system_icu=1
321 -Duse_system_libevent=1
322 -Duse_system_libjpeg=1
323 -Duse_system_libpng=1
324 -Duse_system_libwebp=1
325 -Duse_system_libxml=1
326 -Duse_system_speex=1
327 -Duse_system_v8=1
328 -Duse_system_xdg_utils=1
329 -Duse_system_yasm=1
330 -Duse_system_zlib=1"
331
332 # Optional dependencies.
333 # TODO: linux_link_kerberos, bug #381289.
334 myconf+="
335 $(gyp_use cups use_cups)
336 $(gyp_use gnome use_gconf)
337 $(gyp_use gnome-keyring use_gnome_keyring)
338 $(gyp_use gnome-keyring linux_link_gnome_keyring)
339 $(gyp_use kerberos use_kerberos)
340 $(gyp_use pulseaudio use_pulseaudio)"
341
342 # Enable sandbox.
343 myconf+="
344 -Dlinux_sandbox_path=${CHROMIUM_HOME}/chrome_sandbox
345 -Dlinux_sandbox_chrome_path=${CHROMIUM_HOME}/chrome"
346
347 # if host-is-pax; then
348 # # Prevent the build from failing (bug #301880). The performance
349 # # difference is very small.
350 # myconf+=" -Dv8_use_snapshot=0"
351 # fi
352
353 # Our system ffmpeg should support more codecs than the bundled one
354 # for Chromium.
355 # myconf+=" -Dproprietary_codecs=1"
356
357 if ! use bindist; then
358 # Enable H.624 support in bundled ffmpeg.
359 myconf+=" -Dproprietary_codecs=1 -Dffmpeg_branding=Chrome"
360 fi
361
362 local myarch="$(tc-arch)"
363 if [[ $myarch = amd64 ]] ; then
364 myconf+=" -Dtarget_arch=x64"
365 elif [[ $myarch = x86 ]] ; then
366 myconf+=" -Dtarget_arch=ia32"
367 elif [[ $myarch = arm ]] ; then
368 # TODO: check this again after
369 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39509 is fixed.
370 append-flags -fno-tree-sink
371
372 myconf+=" -Dtarget_arch=arm -Ddisable_nacl=1 -Dlinux_use_tcmalloc=0"
373 else
374 die "Failed to determine target arch, got '$myarch'."
375 fi
376
377 # Make sure that -Werror doesn't get added to CFLAGS by the build system.
378 # Depending on GCC version the warnings are different and we don't want
379 # the build to fail because of that.
380 myconf+=" -Dwerror="
381
382 # Avoid CFLAGS problems, bug #352457, bug #390147.
383 if ! use custom-cflags; then
384 replace-flags "-Os" "-O2"
385 strip-flags
386 fi
387
388 egyp ${myconf} || die
389 }
390
391 src_compile() {
392 emake chrome chrome_sandbox chromedriver BUILDTYPE=Release V=1 || die
393 pax-mark m out/Release/chrome
394 if use test; then
395 emake {base,cacheinvalidation,crypto,googleurl,gpu,media,net,printing}_unittests BUILDTYPE=Release V=1 || die
396 pax-mark m out/Release/{base,cacheinvalidation,crypto,googleurl,gpu,media,net,printing}_unittests
397 fi
398 }
399
400 src_test() {
401 # For more info see bug #350349.
402 local mylocale='en_US.utf8'
403 if ! locale -a | grep -q "$mylocale"; then
404 eerror "${PN} requires ${mylocale} locale for tests"
405 eerror "Please read the following guides for more information:"
406 eerror " http://www.gentoo.org/doc/en/guide-localization.xml"
407 eerror " http://www.gentoo.org/doc/en/utf-8.xml"
408 die "locale ${mylocale} is not supported"
409 fi
410
411 # For more info see bug #370957.
412 if [[ $UID -eq 0 ]]; then
413 die "Tests must be run as non-root. Please use FEATURES=userpriv."
414 fi
415
416 # ICUStringConversionsTest: bug #350347.
417 # MessagePumpLibeventTest: bug #398501.
418 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/base_unittests virtualmake \
419 '--gtest_filter=-ICUStringConversionsTest.*:MessagePumpLibeventTest.*'
420
421 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/cacheinvalidation_unittests virtualmake
422 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/crypto_unittests virtualmake
423 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/googleurl_unittests virtualmake
424 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/gpu_unittests virtualmake
425 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/media_unittests virtualmake
426
427 # NetUtilTest: bug #361885.
428 # NetUtilTest.GenerateFileName: some locale-related mismatch.
429 # UDP: unstable, active development. We should revisit this later.
430 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/net_unittests virtualmake \
431 '--gtest_filter=-NetUtilTest.IDNToUnicode*:NetUtilTest.FormatUrl*:NetUtilTest.GenerateFileName:*UDP*'
432
433 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/printing_unittests virtualmake
434 }
435
436 src_install() {
437 exeinto "${CHROMIUM_HOME}"
438 doexe out/Release/chrome || die
439 doexe out/Release/chrome_sandbox || die
440 fperms 4755 "${CHROMIUM_HOME}/chrome_sandbox"
441
442 doexe out/Release/chromedriver || die
443
444 # Install Native Client files on platforms that support it.
445 insinto "${CHROMIUM_HOME}"
446 case "$(tc-arch)" in
447 amd64)
448 doexe out/Release/nacl_helper{,_bootstrap} || die
449 doins out/Release/nacl_irt_x86_64.nexe || die
450 doins out/Release/libppGoogleNaClPluginChrome.so || die
451 ;;
452 x86)
453 doexe out/Release/nacl_helper{,_bootstrap} || die
454 doins out/Release/nacl_irt_x86_32.nexe || die
455 doins out/Release/libppGoogleNaClPluginChrome.so || die
456 ;;
457 esac
458
459 newexe "${FILESDIR}"/chromium-launcher-r2.sh chromium-launcher.sh || die
460 if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then
461 sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" \
462 -i "${ED}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die
463 sed "s:chromium.desktop:chromium${CHROMIUM_SUFFIX}.desktop:g" \
464 -i "${ED}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die
465 sed "s:plugins:plugins --user-data-dir=\${HOME}/.config/chromium${CHROMIUM_SUFFIX}:" \
466 -i "${ED}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die
467 fi
468
469 # It is important that we name the target "chromium-browser",
470 # xdg-utils expect it; bug #355517.
471 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser${CHROMIUM_SUFFIX} || die
472 # keep the old symlink around for consistency
473 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium${CHROMIUM_SUFFIX} || die
474
475 # Allow users to override command-line options, bug #357629.
476 dodir /etc/chromium || die
477 insinto /etc/chromium
478 newins "${FILESDIR}/chromium.default" "default" || die
479
480 # Support LINGUAS, bug #332751.
481 local pak
482 for pak in out/Release/locales/*.pak; do
483 local pakbasename="$(basename ${pak})"
484 local pakname="${pakbasename%.pak}"
485 local langname="${pakname//-/_}"
486
487 # Do not issue warning for en_US locale. This is the fallback
488 # locale so it should always be installed.
489 if [[ "${langname}" == "en_US" ]]; then
490 continue
491 fi
492
493 local found=false
494 local lang
495 for lang in ${LANGS}; do
496 local crlang="$(chromium_lang ${lang})"
497 if [[ "${langname}" == "${crlang}" ]]; then
498 found=true
499 break
500 fi
501 done
502 if ! $found; then
503 ewarn "LINGUAS warning: no ${langname} in LANGS"
504 fi
505 done
506 local lang
507 for lang in ${LANGS}; do
508 local crlang="$(chromium_lang ${lang})"
509 local pakfile="out/Release/locales/${crlang//_/-}.pak"
510 if [ ! -f "${pakfile}" ]; then
511 ewarn "LINGUAS warning: no .pak file for ${lang} (${pakfile} not found)"
512 fi
513 if ! use linguas_${lang}; then
514 rm "${pakfile}" || die
515 fi
516 done
517
518 insinto "${CHROMIUM_HOME}"
519 doins out/Release/chrome.pak || die
520 doins out/Release/resources.pak || die
521
522 doins -r out/Release/locales || die
523 doins -r out/Release/resources || die
524
525 newman out/Release/chrome.1 chromium${CHROMIUM_SUFFIX}.1 || die
526 newman out/Release/chrome.1 chromium-browser${CHROMIUM_SUFFIX}.1 || die
527
528 # Chromium looks for these in its folder
529 # See media_posix.cc and base_paths_linux.cc
530 # dosym /usr/$(get_libdir)/libavcodec.so.52 "${CHROMIUM_HOME}" || die
531 # dosym /usr/$(get_libdir)/libavformat.so.52 "${CHROMIUM_HOME}" || die
532 # dosym /usr/$(get_libdir)/libavutil.so.50 "${CHROMIUM_HOME}" || die
533 doexe out/Release/libffmpegsumo.so || die
534
535 # Install icons and desktop entry.
536 for SIZE in 16 22 24 32 48 64 128 256 ; do
537 insinto /usr/share/icons/hicolor/${SIZE}x${SIZE}/apps
538 newins chrome/app/theme/chromium/product_logo_${SIZE}.png \
539 chromium-browser${CHROMIUM_SUFFIX}.png || die
540 done
541 local mime_types="text/html;text/xml;application/xhtml+xml;"
542 mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797
543 make_desktop_entry \
544 chromium-browser${CHROMIUM_SUFFIX} \
545 "Chromium${CHROMIUM_SUFFIX}" \
546 chromium-browser${CHROMIUM_SUFFIX} \
547 "Network;WebBrowser" \
548 "MimeType=${mime_types}\nStartupWMClass=chromium-browser"
549 sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die
550
551 # Install GNOME default application entry (bug #303100).
552 if use gnome; then
553 dodir /usr/share/gnome-control-center/default-apps || die
554 insinto /usr/share/gnome-control-center/default-apps
555 newins "${FILESDIR}"/chromium-browser.xml chromium-browser${CHROMIUM_SUFFIX}.xml || die
556 if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then
557 sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" -i \
558 "${ED}"/usr/share/gnome-control-center/default-apps/chromium-browser${CHROMIUM_SUFFIX}.xml
559 fi
560 fi
561 }
562
563 pkg_preinst() {
564 gnome2_icon_savelist
565 }
566
567 pkg_postinst() {
568 fdo-mime_desktop_database_update
569 gnome2_icon_cache_update
570
571 # For more info see bug #292201, bug #352263, bug #361859.
572 elog
573 elog "Depending on your desktop environment, you may need"
574 elog "to install additional packages to get icons on the Downloads page."
575 elog
576 elog "For KDE, the required package is kde-base/oxygen-icons."
577 elog
578 elog "For other desktop environments, try one of the following:"
579 elog " - x11-themes/gnome-icon-theme"
580 elog " - x11-themes/tango-icon-theme"
581
582 # For more info see bug #359153.
583 elog
584 elog "Some web pages may require additional fonts to display properly."
585 elog "Try installing some of the following packages if some characters"
586 elog "are not displayed properly:"
587 elog " - media-fonts/arphicfonts"
588 elog " - media-fonts/bitstream-cyberbit"
589 elog " - media-fonts/droid"
590 elog " - media-fonts/ipamonafont"
591 elog " - media-fonts/ja-ipafonts"
592 elog " - media-fonts/takao-fonts"
593 elog " - media-fonts/wqy-microhei"
594 elog " - media-fonts/wqy-zenhei"
595 }
596
597 pkg_postrm() {
598 gnome2_icon_cache_update
599 }