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-19.0.1055.1.ebuild chromium-19.0.1041.0.ebuild
Date: Wed, 29 Feb 2012 11:06:39
Message-Id: 20120229110621.400892004B@flycatcher.gentoo.org
1 phajdan.jr 12/02/29 11:06:21
2
3 Modified: ChangeLog
4 Added: chromium-19.0.1055.1.ebuild
5 Removed: chromium-19.0.1041.0.ebuild
6 Log:
7 Version bump for dev channel release. Remove old.
8
9 (Portage version: 2.1.10.44/cvs/Linux i686)
10
11 Revision Changes Path
12 1.567 www-client/chromium/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.567&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.567&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?r1=1.566&r2=1.567
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v
21 retrieving revision 1.566
22 retrieving revision 1.567
23 diff -u -r1.566 -r1.567
24 --- ChangeLog 24 Feb 2012 17:30:17 -0000 1.566
25 +++ ChangeLog 29 Feb 2012 11:06:21 -0000 1.567
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.566 2012/02/24 17:30:17 phajdan.jr Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.567 2012/02/29 11:06:21 phajdan.jr Exp $
31 +
32 +*chromium-19.0.1055.1 (29 Feb 2012)
33 +
34 + 29 Feb 2012; Pawel Hajdan jr <phajdan.jr@g.o>
35 + -chromium-19.0.1041.0.ebuild, +chromium-19.0.1055.1.ebuild:
36 + Version bump for dev channel release. Remove old.
37
38 *chromium-19.0.1049.3 (24 Feb 2012)
39
40
41
42
43 1.1 www-client/chromium/chromium-19.0.1055.1.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-19.0.1055.1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-19.0.1055.1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: chromium-19.0.1055.1.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-19.0.1055.1.ebuild,v 1.1 2012/02/29 11:06:21 phajdan.jr Exp $
53
54 EAPI="4"
55 PYTHON_DEPEND="2:2.6"
56
57 inherit eutils fdo-mime flag-o-matic gnome2-utils linux-info multilib \
58 pax-utils portability python toolchain-funcs versionator virtualx
59
60 DESCRIPTION="Open-source version of Google Chrome web browser"
61 HOMEPAGE="http://chromium.org/"
62 SRC_URI="http://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.bz2"
63
64 LICENSE="BSD"
65 SLOT="0"
66 KEYWORDS="~amd64 ~x86"
67 IUSE="bindist cups custom-cflags gnome gnome-keyring kerberos pulseaudio"
68
69 # en_US is ommitted on purpose from the list below. It must always be available.
70 LANGS="am ar bg bn ca cs da de el en_GB es es_LA et fa fi fil fr gu he hi hr
71 hu id it ja kn ko lt lv ml mr ms nb nl pl pt_BR pt_PT ro ru sk sl sr sv sw ta te th
72 tr uk vi zh_CN zh_TW"
73 for lang in ${LANGS}; do
74 IUSE+=" linguas_${lang}"
75 done
76
77 RDEPEND="app-arch/bzip2
78 cups? (
79 dev-libs/libgcrypt
80 >=net-print/cups-1.3.11
81 )
82 >=dev-lang/v8-3.9.4
83 dev-libs/dbus-glib
84 dev-libs/elfutils
85 >=dev-libs/icu-4.4.1
86 >=dev-libs/libevent-1.4.13
87 dev-libs/libxml2[icu]
88 dev-libs/libxslt
89 >=dev-libs/nss-3.12.3
90 gnome? ( >=gnome-base/gconf-2.24.0 )
91 gnome-keyring? ( >=gnome-base/gnome-keyring-2.28.2 )
92 >=media-libs/alsa-lib-1.0.19
93 media-libs/flac
94 >=media-libs/libjpeg-turbo-1.2.0-r1
95 media-libs/libpng
96 >=media-libs/libwebp-0.1.3
97 media-libs/speex
98 pulseaudio? ( media-sound/pulseaudio )
99 sys-fs/udev
100 sys-libs/zlib
101 x11-libs/gtk+:2
102 x11-libs/libXinerama
103 x11-libs/libXScrnSaver
104 x11-libs/libXtst
105 kerberos? ( virtual/krb5 )"
106 DEPEND="${RDEPEND}
107 >=dev-lang/nacl-toolchain-newlib-0_p7311
108 dev-lang/perl
109 dev-lang/yasm
110 dev-python/simplejson
111 >=dev-util/gperf-3.0.3
112 >=dev-util/pkgconfig-0.23
113 >=sys-devel/bison-2.4.3
114 sys-devel/flex
115 >=sys-devel/make-3.81-r2
116 test? ( dev-python/pyftpdlib )"
117 RDEPEND+="
118 !=www-client/chromium-9999
119 x11-misc/xdg-utils
120 virtual/ttf-fonts"
121
122 gyp_use() {
123 if [[ $# -lt 2 ]]; then
124 echo "!!! usage: gyp_use <USEFLAG> <GYPFLAG>" >&2
125 return 1
126 fi
127 if use "$1"; then echo "-D$2=1"; else echo "-D$2=0"; fi
128 }
129
130 egyp() {
131 set -- build/gyp_chromium --depth=. "${@}"
132 echo "${@}" >&2
133 "${@}"
134 }
135
136 # Chromium uses different names for some langs,
137 # return Chromium name corresponding to a Gentoo lang.
138 chromium_lang() {
139 if [[ "$1" == "es_LA" ]]; then
140 echo "es_419"
141 else
142 echo "$1"
143 fi
144 }
145
146 get_bundled_v8_version() {
147 "$(PYTHON -2)" "${FILESDIR}"/extract_v8_version.py v8/src/version.cc
148 }
149
150 get_installed_v8_version() {
151 best_version dev-lang/v8 | sed -e 's@dev-lang/v8-@@g'
152 }
153
154 if ! has chromium-pkg_die ${EBUILD_DEATH_HOOKS}; then
155 EBUILD_DEATH_HOOKS+=" chromium-pkg_die";
156 fi
157
158 chromium-pkg_die() {
159 if [[ "${EBUILD_PHASE}" != "compile" ]]; then
160 return
161 fi
162
163 # Prevent user problems like bug #348235.
164 eshopts_push -s extglob
165 if is-flagq '-g?(gdb)?([1-9])'; then
166 ewarn
167 ewarn "You have enabled debug info (i.e. -g or -ggdb in your CFLAGS/CXXFLAGS)."
168 ewarn "Please try removing -g{,gdb} before reporting a bug."
169 ewarn
170 fi
171 eshopts_pop
172
173 # ccache often causes bogus compile failures, especially when the cache gets
174 # corrupted.
175 if has ccache ${FEATURES}; then
176 ewarn
177 ewarn "You have enabled ccache. Please try disabling ccache"
178 ewarn "before reporting a bug."
179 ewarn
180 fi
181
182 # No ricer bugs.
183 if use custom-cflags; then
184 ewarn
185 ewarn "You have enabled the custom-cflags USE flag."
186 ewarn "Please disable it before reporting a bug."
187 ewarn
188 fi
189
190 # If the system doesn't have enough memory, the compilation is known to
191 # fail. Print info about memory to recognize this condition.
192 einfo
193 einfo "$(grep MemTotal /proc/meminfo)"
194 einfo "$(grep SwapTotal /proc/meminfo)"
195 einfo
196 }
197
198 pkg_setup() {
199 if [[ "${SLOT}" == "0" ]]; then
200 CHROMIUM_SUFFIX=""
201 else
202 CHROMIUM_SUFFIX="-${SLOT}"
203 fi
204 CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser${CHROMIUM_SUFFIX}"
205
206 # Make sure the build system will use the right tools, bug #340795.
207 tc-export AR CC CXX RANLIB
208
209 # Make sure the build system will use the right python, bug #344367.
210 python_set_active_version 2
211 python_pkg_setup
212
213 if [[ "${MERGE_TYPE}" == "source" || "${MERGE_TYPE}" == "binary" ]]; then
214 # Fail if the kernel doesn't support features needed for sandboxing,
215 # bug #363907.
216 ERROR_PID_NS="PID_NS is required for sandbox to work"
217 ERROR_NET_NS="NET_NS is required for sandbox to work"
218 CONFIG_CHECK="~PID_NS ~NET_NS"
219 check_extra_config
220 fi
221
222 if use bindist; then
223 elog "bindist enabled: H.264 video support will be disabled."
224 else
225 elog "bindist disabled: Resulting binaries may not be legal to re-distribute."
226 fi
227 }
228
229 src_prepare() {
230 ln -s /usr/$(get_libdir)/nacl-toolchain-newlib \
231 native_client/toolchain/linux_x86_newlib || die
232
233 # zlib-1.2.5.1-r1 renames the OF macro in zconf.h, bug 383371.
234 sed -i '1i#define OF(x) x' \
235 third_party/zlib/contrib/minizip/{ioapi,{,un}zip}.c \
236 chrome/common/zip*.cc || die
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/adobe/*' \
244 \! -path 'third_party/angle/*' \
245 \! -path 'third_party/cacheinvalidation/*' \
246 \! -path 'third_party/cld/*' \
247 \! -path 'third_party/expat/*' \
248 \! -path 'third_party/ffmpeg/*' \
249 \! -path 'third_party/flac/flac.h' \
250 \! -path 'third_party/gpsd/*' \
251 \! -path 'third_party/harfbuzz/*' \
252 \! -path 'third_party/hunspell/*' \
253 \! -path 'third_party/iccjpeg/*' \
254 \! -path 'third_party/jsoncpp/*' \
255 \! -path 'third_party/khronos/*' \
256 \! -path 'third_party/launchpad_translations/*' \
257 \! -path 'third_party/leveldb/*' \
258 \! -path 'third_party/leveldatabase/*' \
259 \! -path 'third_party/libjingle/*' \
260 \! -path 'third_party/libphonenumber/*' \
261 \! -path 'third_party/libsrtp/*' \
262 \! -path 'third_party/libvpx/*' \
263 \! -path 'third_party/libyuv/*' \
264 \! -path 'third_party/lss/*' \
265 \! -path 'third_party/mesa/*' \
266 \! -path 'third_party/modp_b64/*' \
267 \! -path 'third_party/mongoose/*' \
268 \! -path 'third_party/npapi/*' \
269 \! -path 'third_party/openmax/*' \
270 \! -path 'third_party/ots/*' \
271 \! -path 'third_party/protobuf/*' \
272 \! -path 'third_party/scons-2.0.1/*' \
273 \! -path 'third_party/sfntly/*' \
274 \! -path 'third_party/skia/*' \
275 \! -path 'third_party/smhasher/*' \
276 \! -path 'third_party/speex/speex.h' \
277 \! -path 'third_party/sqlite/*' \
278 \! -path 'third_party/tcmalloc/*' \
279 \! -path 'third_party/tlslite/*' \
280 \! -path 'third_party/undoview/*' \
281 \! -path 'third_party/v8-i18n/*' \
282 \! -path 'third_party/webdriver/*' \
283 \! -path 'third_party/webgl_conformance/*' \
284 \! -path 'third_party/webrtc/*' \
285 \! -path 'third_party/zlib/contrib/minizip/*' \
286 -delete || die
287
288 local v8_bundled="$(get_bundled_v8_version)"
289 local v8_installed="$(get_installed_v8_version)"
290 elog "V8 version: bundled - ${v8_bundled}; installed - ${v8_installed}"
291
292 # Remove bundled v8.
293 find v8 -type f \! -iname '*.gyp*' -delete || die
294
295 # The implementation files include v8 headers with full path,
296 # like #include "v8/include/v8.h". Make sure the system headers
297 # will be used.
298 # TODO: find a solution that can be upstreamed.
299 rmdir v8/include || die
300 ln -s /usr/include v8/include || die
301
302 # Make sure the build system will use the right python, bug #344367.
303 # Only convert directories that need it, to save time.
304 python_convert_shebangs -q -r 2 build tools
305 }
306
307 src_configure() {
308 local myconf=""
309
310 # Never tell the build system to "enable" SSE2, it has a few unexpected
311 # additions, bug #336871.
312 myconf+=" -Ddisable_sse2=1"
313
314 # Use system-provided libraries.
315 # TODO: use_system_ffmpeg
316 # TODO: use_system_hunspell (upstream changes needed).
317 # TODO: use_system_ssl (http://crbug.com/58087).
318 # TODO: use_system_sqlite (http://crbug.com/22208).
319 # TODO: use_system_vpx
320 myconf+="
321 -Duse_system_bzip2=1
322 -Duse_system_flac=1
323 -Duse_system_icu=1
324 -Duse_system_libevent=1
325 -Duse_system_libjpeg=1
326 -Duse_system_libpng=1
327 -Duse_system_libwebp=1
328 -Duse_system_libxml=1
329 -Duse_system_speex=1
330 -Duse_system_v8=1
331 -Duse_system_xdg_utils=1
332 -Duse_system_yasm=1
333 -Duse_system_zlib=1"
334
335 # Optional dependencies.
336 # TODO: linux_link_kerberos, bug #381289.
337 myconf+="
338 $(gyp_use cups use_cups)
339 $(gyp_use gnome use_gconf)
340 $(gyp_use gnome-keyring use_gnome_keyring)
341 $(gyp_use gnome-keyring linux_link_gnome_keyring)
342 $(gyp_use kerberos use_kerberos)
343 $(gyp_use pulseaudio use_pulseaudio)"
344
345 # Enable sandbox.
346 myconf+="
347 -Dlinux_sandbox_path=${CHROMIUM_HOME}/chrome_sandbox
348 -Dlinux_sandbox_chrome_path=${CHROMIUM_HOME}/chrome"
349
350 # Never use bundled gold binary. Disable gold linker flags for now.
351 myconf+="
352 -Dlinux_use_gold_binary=0
353 -Dlinux_use_gold_flags=0"
354
355 # if host-is-pax; then
356 # # Prevent the build from failing (bug #301880). The performance
357 # # difference is very small.
358 # myconf+=" -Dv8_use_snapshot=0"
359 # fi
360
361 # Our system ffmpeg should support more codecs than the bundled one
362 # for Chromium.
363 # myconf+=" -Dproprietary_codecs=1"
364
365 if ! use bindist; then
366 # Enable H.624 support in bundled ffmpeg.
367 myconf+=" -Dproprietary_codecs=1 -Dffmpeg_branding=Chrome"
368 fi
369
370 local myarch="$(tc-arch)"
371 if [[ $myarch = amd64 ]] ; then
372 myconf+=" -Dtarget_arch=x64"
373 elif [[ $myarch = x86 ]] ; then
374 myconf+=" -Dtarget_arch=ia32"
375 elif [[ $myarch = arm ]] ; then
376 # TODO: check this again after
377 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39509 is fixed.
378 append-flags -fno-tree-sink
379
380 myconf+=" -Dtarget_arch=arm -Ddisable_nacl=1 -Dlinux_use_tcmalloc=0"
381 else
382 die "Failed to determine target arch, got '$myarch'."
383 fi
384
385 # Make sure that -Werror doesn't get added to CFLAGS by the build system.
386 # Depending on GCC version the warnings are different and we don't want
387 # the build to fail because of that.
388 myconf+=" -Dwerror="
389
390 # Avoid CFLAGS problems, bug #352457, bug #390147.
391 if ! use custom-cflags; then
392 replace-flags "-Os" "-O2"
393 strip-flags
394 fi
395
396 egyp ${myconf} || die
397 }
398
399 src_compile() {
400 emake chrome chrome_sandbox chromedriver BUILDTYPE=Release V=1 || die
401 pax-mark m out/Release/chrome
402 if use test; then
403 emake {base,cacheinvalidation,crypto,googleurl,gpu,media,net,printing}_unittests BUILDTYPE=Release V=1 || die
404 pax-mark m out/Release/{base,cacheinvalidation,crypto,googleurl,gpu,media,net,printing}_unittests
405 fi
406 }
407
408 src_test() {
409 # For more info see bug #350349.
410 local mylocale='en_US.utf8'
411 if ! locale -a | grep -q "$mylocale"; then
412 eerror "${PN} requires ${mylocale} locale for tests"
413 eerror "Please read the following guides for more information:"
414 eerror " http://www.gentoo.org/doc/en/guide-localization.xml"
415 eerror " http://www.gentoo.org/doc/en/utf-8.xml"
416 die "locale ${mylocale} is not supported"
417 fi
418
419 # For more info see bug #370957.
420 if [[ $UID -eq 0 ]]; then
421 die "Tests must be run as non-root. Please use FEATURES=userpriv."
422 fi
423
424 # ICUStringConversionsTest: bug #350347.
425 # MessagePumpLibeventTest: bug #398501.
426 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/base_unittests virtualmake \
427 '--gtest_filter=-ICUStringConversionsTest.*:MessagePumpLibeventTest.*'
428
429 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/cacheinvalidation_unittests virtualmake
430 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/crypto_unittests virtualmake
431 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/googleurl_unittests virtualmake
432 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/gpu_unittests virtualmake
433 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/media_unittests virtualmake
434
435 # NetUtilTest: bug #361885.
436 # DnsConfigServiceTest.GetSystemConfig: bug #394883.
437 # CertDatabaseNSSTest.ImportServerCert_SelfSigned: bug #399269.
438 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/net_unittests virtualmake \
439 '--gtest_filter=-NetUtilTest.IDNToUnicode*:NetUtilTest.FormatUrl*:DnsConfigServiceTest.GetSystemConfig:CertDatabaseNSSTest.ImportServerCert_SelfSigned'
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 }