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.66.ebuild ChangeLog
Date: Wed, 07 Mar 2012 00:13:41
Message-Id: 20120307001331.CF47C2004B@flycatcher.gentoo.org
1 floppym 12/03/07 00:13:31
2
3 Modified: ChangeLog
4 Added: chromium-17.0.963.66.ebuild
5 Log:
6 Version bump for stable channel release.
7
8 (Portage version: 2.2.0_alpha89/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.573 www-client/chromium/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.573&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.573&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?r1=1.572&r2=1.573
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v
20 retrieving revision 1.572
21 retrieving revision 1.573
22 diff -u -r1.572 -r1.573
23 --- ChangeLog 5 Mar 2012 18:07:15 -0000 1.572
24 +++ ChangeLog 7 Mar 2012 00:13:31 -0000 1.573
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.572 2012/03/05 18:07:15 floppym Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.573 2012/03/07 00:13:31 floppym Exp $
30 +
31 +*chromium-17.0.963.66 (07 Mar 2012)
32 +
33 + 07 Mar 2012; Mike Gilbert <floppym@g.o> +chromium-17.0.963.66.ebuild:
34 + Version bump for stable channel release.
35
36 *chromium-17.0.963.65 (05 Mar 2012)
37
38
39
40
41 1.1 www-client/chromium/chromium-17.0.963.66.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-17.0.963.66.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-17.0.963.66.ebuild?rev=1.1&content-type=text/plain
45
46 Index: chromium-17.0.963.66.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.66.ebuild,v 1.1 2012/03/07 00:13:31 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 # Backport upstream fix for Gentoo bug #389479.
239 epatch "${FILESDIR}/${PN}-dev-shm-r0.patch"
240
241 # Fix crashes on illegal instructions, bug #401537.
242 epatch "${FILESDIR}/${PN}-media-no-sse-r0.patch"
243
244 epatch_user
245
246 # Remove most bundled libraries. Some are still needed.
247 find third_party -type f \! -iname '*.gyp*' \
248 \! -path 'third_party/WebKit/*' \
249 \! -path 'third_party/angle/*' \
250 \! -path 'third_party/cacheinvalidation/*' \
251 \! -path 'third_party/cld/*' \
252 \! -path 'third_party/expat/*' \
253 \! -path 'third_party/ffmpeg/*' \
254 \! -path 'third_party/flac/flac.h' \
255 \! -path 'third_party/gpsd/*' \
256 \! -path 'third_party/harfbuzz/*' \
257 \! -path 'third_party/hunspell/*' \
258 \! -path 'third_party/iccjpeg/*' \
259 \! -path 'third_party/jsoncpp/*' \
260 \! -path 'third_party/khronos/*' \
261 \! -path 'third_party/launchpad_translations/*' \
262 \! -path 'third_party/leveldb/*' \
263 \! -path 'third_party/leveldatabase/*' \
264 \! -path 'third_party/libjingle/*' \
265 \! -path 'third_party/libphonenumber/*' \
266 \! -path 'third_party/libvpx/*' \
267 \! -path 'third_party/lss/*' \
268 \! -path 'third_party/mesa/*' \
269 \! -path 'third_party/modp_b64/*' \
270 \! -path 'third_party/mongoose/*' \
271 \! -path 'third_party/npapi/*' \
272 \! -path 'third_party/openmax/*' \
273 \! -path 'third_party/ots/*' \
274 \! -path 'third_party/protobuf/*' \
275 \! -path 'third_party/scons-2.0.1/*' \
276 \! -path 'third_party/sfntly/*' \
277 \! -path 'third_party/skia/*' \
278 \! -path 'third_party/smhasher/*' \
279 \! -path 'third_party/speex/speex.h' \
280 \! -path 'third_party/sqlite/*' \
281 \! -path 'third_party/tcmalloc/*' \
282 \! -path 'third_party/tlslite/*' \
283 \! -path 'third_party/undoview/*' \
284 \! -path 'third_party/v8-i18n/*' \
285 \! -path 'third_party/webdriver/*' \
286 \! -path 'third_party/webgl_conformance/*' \
287 \! -path 'third_party/webrtc/*' \
288 \! -path 'third_party/zlib/contrib/minizip/*' \
289 -delete || die
290
291 local v8_bundled="$(get_bundled_v8_version)"
292 local v8_installed="$(get_installed_v8_version)"
293 elog "V8 version: bundled - ${v8_bundled}; installed - ${v8_installed}"
294
295 # Remove bundled v8.
296 find v8 -type f \! -iname '*.gyp*' -delete || die
297
298 # The implementation files include v8 headers with full path,
299 # like #include "v8/include/v8.h". Make sure the system headers
300 # will be used.
301 # TODO: find a solution that can be upstreamed.
302 rmdir v8/include || die
303 ln -s /usr/include v8/include || die
304
305 # Make sure the build system will use the right python, bug #344367.
306 # Only convert directories that need it, to save time.
307 python_convert_shebangs -q -r 2 build tools
308 }
309
310 src_configure() {
311 local myconf=""
312
313 # Never tell the build system to "enable" SSE2, it has a few unexpected
314 # additions, bug #336871.
315 myconf+=" -Ddisable_sse2=1"
316
317 # Use system-provided libraries.
318 # TODO: use_system_ffmpeg
319 # TODO: use_system_hunspell (upstream changes needed).
320 # TODO: use_system_ssl (http://crbug.com/58087).
321 # TODO: use_system_sqlite (http://crbug.com/22208).
322 # TODO: use_system_vpx
323 myconf+="
324 -Duse_system_bzip2=1
325 -Duse_system_flac=1
326 -Duse_system_icu=1
327 -Duse_system_libevent=1
328 -Duse_system_libjpeg=1
329 -Duse_system_libpng=1
330 -Duse_system_libwebp=1
331 -Duse_system_libxml=1
332 -Duse_system_speex=1
333 -Duse_system_v8=1
334 -Duse_system_xdg_utils=1
335 -Duse_system_yasm=1
336 -Duse_system_zlib=1"
337
338 # Optional dependencies.
339 # TODO: linux_link_kerberos, bug #381289.
340 myconf+="
341 $(gyp_use cups use_cups)
342 $(gyp_use gnome use_gconf)
343 $(gyp_use gnome-keyring use_gnome_keyring)
344 $(gyp_use gnome-keyring linux_link_gnome_keyring)
345 $(gyp_use kerberos use_kerberos)
346 $(gyp_use pulseaudio use_pulseaudio)"
347
348 # Enable sandbox.
349 myconf+="
350 -Dlinux_sandbox_path=${CHROMIUM_HOME}/chrome_sandbox
351 -Dlinux_sandbox_chrome_path=${CHROMIUM_HOME}/chrome"
352
353 # if host-is-pax; then
354 # # Prevent the build from failing (bug #301880). The performance
355 # # difference is very small.
356 # myconf+=" -Dv8_use_snapshot=0"
357 # fi
358
359 # Our system ffmpeg should support more codecs than the bundled one
360 # for Chromium.
361 # myconf+=" -Dproprietary_codecs=1"
362
363 if ! use bindist; then
364 # Enable H.624 support in bundled ffmpeg.
365 myconf+=" -Dproprietary_codecs=1 -Dffmpeg_branding=Chrome"
366 fi
367
368 local myarch="$(tc-arch)"
369 if [[ $myarch = amd64 ]] ; then
370 myconf+=" -Dtarget_arch=x64"
371 elif [[ $myarch = x86 ]] ; then
372 myconf+=" -Dtarget_arch=ia32"
373 elif [[ $myarch = arm ]] ; then
374 # TODO: check this again after
375 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39509 is fixed.
376 append-flags -fno-tree-sink
377
378 myconf+=" -Dtarget_arch=arm -Ddisable_nacl=1 -Dlinux_use_tcmalloc=0"
379 else
380 die "Failed to determine target arch, got '$myarch'."
381 fi
382
383 # Make sure that -Werror doesn't get added to CFLAGS by the build system.
384 # Depending on GCC version the warnings are different and we don't want
385 # the build to fail because of that.
386 myconf+=" -Dwerror="
387
388 # Avoid CFLAGS problems, bug #352457, bug #390147.
389 if ! use custom-cflags; then
390 replace-flags "-Os" "-O2"
391 strip-flags
392 fi
393
394 egyp ${myconf} || die
395 }
396
397 src_compile() {
398 emake chrome chrome_sandbox chromedriver BUILDTYPE=Release V=1 || die
399 pax-mark m out/Release/chrome
400 if use test; then
401 emake {base,cacheinvalidation,crypto,googleurl,gpu,media,net,printing}_unittests BUILDTYPE=Release V=1 || die
402 pax-mark m out/Release/{base,cacheinvalidation,crypto,googleurl,gpu,media,net,printing}_unittests
403 fi
404 }
405
406 src_test() {
407 # For more info see bug #350349.
408 local mylocale='en_US.utf8'
409 if ! locale -a | grep -q "$mylocale"; then
410 eerror "${PN} requires ${mylocale} locale for tests"
411 eerror "Please read the following guides for more information:"
412 eerror " http://www.gentoo.org/doc/en/guide-localization.xml"
413 eerror " http://www.gentoo.org/doc/en/utf-8.xml"
414 die "locale ${mylocale} is not supported"
415 fi
416
417 # For more info see bug #370957.
418 if [[ $UID -eq 0 ]]; then
419 die "Tests must be run as non-root. Please use FEATURES=userpriv."
420 fi
421
422 # ICUStringConversionsTest: bug #350347.
423 # MessagePumpLibeventTest: bug #398501.
424 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/base_unittests virtualmake \
425 '--gtest_filter=-ICUStringConversionsTest.*:MessagePumpLibeventTest.*'
426
427 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/cacheinvalidation_unittests virtualmake
428 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/crypto_unittests virtualmake
429 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/googleurl_unittests virtualmake
430 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/gpu_unittests virtualmake
431 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/media_unittests virtualmake
432
433 # NetUtilTest: bug #361885.
434 # NetUtilTest.GenerateFileName: some locale-related mismatch.
435 # UDP: unstable, active development. We should revisit this later.
436 # CertDatabaseNSSTest.ImportCACertHierarchyTree: works in 18.x, broken here.
437 # CertDatabaseNSSTest.ImportServerCert_SelfSigned: bug #399269.
438 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/net_unittests virtualmake \
439 '--gtest_filter=-NetUtilTest.IDNToUnicode*:NetUtilTest.FormatUrl*:NetUtilTest.GenerateFileName:*UDP*:CertDatabaseNSSTest.ImportCACertHierarchyTree:CertDatabaseNSSTest.ImportServerCert_SelfSigned:KeygenHandlerTest.*'
440
441 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/printing_unittests virtualmake
442 }
443
444 src_install() {
445 exeinto "${CHROMIUM_HOME}"
446 doexe out/Release/chrome || die
447 doexe out/Release/chrome_sandbox || die
448 fperms 4755 "${CHROMIUM_HOME}/chrome_sandbox"
449
450 doexe out/Release/chromedriver || die
451
452 # Install Native Client files on platforms that support it.
453 insinto "${CHROMIUM_HOME}"
454 case "$(tc-arch)" in
455 amd64)
456 doexe out/Release/nacl_helper{,_bootstrap} || die
457 doins out/Release/nacl_irt_x86_64.nexe || die
458 doins out/Release/libppGoogleNaClPluginChrome.so || die
459 ;;
460 x86)
461 doexe out/Release/nacl_helper{,_bootstrap} || die
462 doins out/Release/nacl_irt_x86_32.nexe || die
463 doins out/Release/libppGoogleNaClPluginChrome.so || die
464 ;;
465 esac
466
467 newexe "${FILESDIR}"/chromium-launcher-r2.sh chromium-launcher.sh || die
468 if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then
469 sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" \
470 -i "${ED}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die
471 sed "s:chromium.desktop:chromium${CHROMIUM_SUFFIX}.desktop:g" \
472 -i "${ED}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die
473 sed "s:plugins:plugins --user-data-dir=\${HOME}/.config/chromium${CHROMIUM_SUFFIX}:" \
474 -i "${ED}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die
475 fi
476
477 # It is important that we name the target "chromium-browser",
478 # xdg-utils expect it; bug #355517.
479 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser${CHROMIUM_SUFFIX} || die
480 # keep the old symlink around for consistency
481 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium${CHROMIUM_SUFFIX} || die
482
483 # Allow users to override command-line options, bug #357629.
484 dodir /etc/chromium || die
485 insinto /etc/chromium
486 newins "${FILESDIR}/chromium.default" "default" || die
487
488 # Support LINGUAS, bug #332751.
489 local pak
490 for pak in out/Release/locales/*.pak; do
491 local pakbasename="$(basename ${pak})"
492 local pakname="${pakbasename%.pak}"
493 local langname="${pakname//-/_}"
494
495 # Do not issue warning for en_US locale. This is the fallback
496 # locale so it should always be installed.
497 if [[ "${langname}" == "en_US" ]]; then
498 continue
499 fi
500
501 local found=false
502 local lang
503 for lang in ${LANGS}; do
504 local crlang="$(chromium_lang ${lang})"
505 if [[ "${langname}" == "${crlang}" ]]; then
506 found=true
507 break
508 fi
509 done
510 if ! $found; then
511 ewarn "LINGUAS warning: no ${langname} in LANGS"
512 fi
513 done
514 local lang
515 for lang in ${LANGS}; do
516 local crlang="$(chromium_lang ${lang})"
517 local pakfile="out/Release/locales/${crlang//_/-}.pak"
518 if [ ! -f "${pakfile}" ]; then
519 ewarn "LINGUAS warning: no .pak file for ${lang} (${pakfile} not found)"
520 fi
521 if ! use linguas_${lang}; then
522 rm "${pakfile}" || die
523 fi
524 done
525
526 insinto "${CHROMIUM_HOME}"
527 doins out/Release/chrome.pak || die
528 doins out/Release/resources.pak || die
529
530 doins -r out/Release/locales || die
531 doins -r out/Release/resources || die
532
533 newman out/Release/chrome.1 chromium${CHROMIUM_SUFFIX}.1 || die
534 newman out/Release/chrome.1 chromium-browser${CHROMIUM_SUFFIX}.1 || die
535
536 # Chromium looks for these in its folder
537 # See media_posix.cc and base_paths_linux.cc
538 # dosym /usr/$(get_libdir)/libavcodec.so.52 "${CHROMIUM_HOME}" || die
539 # dosym /usr/$(get_libdir)/libavformat.so.52 "${CHROMIUM_HOME}" || die
540 # dosym /usr/$(get_libdir)/libavutil.so.50 "${CHROMIUM_HOME}" || die
541 doexe out/Release/libffmpegsumo.so || die
542
543 # Install icons and desktop entry.
544 for SIZE in 16 22 24 32 48 64 128 256 ; do
545 insinto /usr/share/icons/hicolor/${SIZE}x${SIZE}/apps
546 newins chrome/app/theme/chromium/product_logo_${SIZE}.png \
547 chromium-browser${CHROMIUM_SUFFIX}.png || die
548 done
549 local mime_types="text/html;text/xml;application/xhtml+xml;"
550 mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797
551 make_desktop_entry \
552 chromium-browser${CHROMIUM_SUFFIX} \
553 "Chromium${CHROMIUM_SUFFIX}" \
554 chromium-browser${CHROMIUM_SUFFIX} \
555 "Network;WebBrowser" \
556 "MimeType=${mime_types}\nStartupWMClass=chromium-browser"
557 sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die
558
559 # Install GNOME default application entry (bug #303100).
560 if use gnome; then
561 dodir /usr/share/gnome-control-center/default-apps || die
562 insinto /usr/share/gnome-control-center/default-apps
563 newins "${FILESDIR}"/chromium-browser.xml chromium-browser${CHROMIUM_SUFFIX}.xml || die
564 if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then
565 sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" -i \
566 "${ED}"/usr/share/gnome-control-center/default-apps/chromium-browser${CHROMIUM_SUFFIX}.xml
567 fi
568 fi
569 }
570
571 pkg_preinst() {
572 gnome2_icon_savelist
573 }
574
575 pkg_postinst() {
576 fdo-mime_desktop_database_update
577 gnome2_icon_cache_update
578
579 # For more info see bug #292201, bug #352263, bug #361859.
580 elog
581 elog "Depending on your desktop environment, you may need"
582 elog "to install additional packages to get icons on the Downloads page."
583 elog
584 elog "For KDE, the required package is kde-base/oxygen-icons."
585 elog
586 elog "For other desktop environments, try one of the following:"
587 elog " - x11-themes/gnome-icon-theme"
588 elog " - x11-themes/tango-icon-theme"
589
590 # For more info see bug #359153.
591 elog
592 elog "Some web pages may require additional fonts to display properly."
593 elog "Try installing some of the following packages if some characters"
594 elog "are not displayed properly:"
595 elog " - media-fonts/arphicfonts"
596 elog " - media-fonts/bitstream-cyberbit"
597 elog " - media-fonts/droid"
598 elog " - media-fonts/ipamonafont"
599 elog " - media-fonts/ja-ipafonts"
600 elog " - media-fonts/takao-fonts"
601 elog " - media-fonts/wqy-microhei"
602 elog " - media-fonts/wqy-zenhei"
603 }
604
605 pkg_postrm() {
606 gnome2_icon_cache_update
607 }