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