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.65.ebuild ChangeLog
Date: Mon, 05 Mar 2012 18:07:27
Message-Id: 20120305180715.6A1D32004B@flycatcher.gentoo.org
1 floppym 12/03/05 18:07:15
2
3 Modified: ChangeLog
4 Added: chromium-17.0.963.65.ebuild
5 Log:
6 Version bump for stable channel release. Security bug 406975. Filtered KeygenHandlerTest, bug 407001.
7
8 (Portage version: 2.2.0_alpha89/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.572 www-client/chromium/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.572&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.572&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?r1=1.571&r2=1.572
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v
20 retrieving revision 1.571
21 retrieving revision 1.572
22 diff -u -r1.571 -r1.572
23 --- ChangeLog 3 Mar 2012 09:28:16 -0000 1.571
24 +++ ChangeLog 5 Mar 2012 18:07:15 -0000 1.572
25 @@ -1,6 +1,12 @@
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.571 2012/03/03 09:28:16 phajdan.jr Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.572 2012/03/05 18:07:15 floppym Exp $
30 +
31 +*chromium-17.0.963.65 (05 Mar 2012)
32 +
33 + 05 Mar 2012; Mike Gilbert <floppym@g.o> +chromium-17.0.963.65.ebuild:
34 + Version bump for stable channel release. Security bug 406975. Filtered
35 + KeygenHandlerTest, bug 407001.
36
37 03 Mar 2012; Pawel Hajdan jr <phajdan.jr@g.o>
38 chromium-19.0.1055.1.ebuild, chromium-9999-r1.ebuild:
39
40
41
42 1.1 www-client/chromium/chromium-17.0.963.65.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-17.0.963.65.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-17.0.963.65.ebuild?rev=1.1&content-type=text/plain
46
47 Index: chromium-17.0.963.65.ebuild
48 ===================================================================
49 # Copyright 1999-2012 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-17.0.963.65.ebuild,v 1.1 2012/03/05 18:07:15 floppym Exp $
52
53 EAPI="4"
54 PYTHON_DEPEND="2:2.6"
55
56 inherit eutils fdo-mime flag-o-matic gnome2-utils linux-info multilib \
57 pax-utils portability python toolchain-funcs versionator virtualx
58
59 DESCRIPTION="Open-source version of Google Chrome web browser"
60 HOMEPAGE="http://chromium.org/"
61 SRC_URI="http://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.bz2"
62
63 LICENSE="BSD"
64 SLOT="0"
65 KEYWORDS="~amd64 ~x86"
66 IUSE="bindist cups custom-cflags gnome gnome-keyring kerberos pulseaudio"
67
68 # en_US is ommitted on purpose from the list below. It must always be available.
69 LANGS="am ar bg bn ca cs da de el en_GB es es_LA et fa fi fil fr gu he hi hr
70 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
71 tr uk vi zh_CN zh_TW"
72 for lang in ${LANGS}; do
73 IUSE+=" linguas_${lang}"
74 done
75
76 RDEPEND="app-arch/bzip2
77 cups? (
78 dev-libs/libgcrypt
79 >=net-print/cups-1.3.11
80 )
81 >=dev-lang/v8-3.7.6
82 dev-libs/dbus-glib
83 dev-libs/elfutils
84 >=dev-libs/icu-4.4.1
85 >=dev-libs/libevent-1.4.13
86 dev-libs/libxml2[icu]
87 dev-libs/libxslt
88 >=dev-libs/nss-3.12.3
89 gnome? ( >=gnome-base/gconf-2.24.0 )
90 gnome-keyring? ( >=gnome-base/gnome-keyring-2.28.2 )
91 >=media-libs/alsa-lib-1.0.19
92 media-libs/flac
93 virtual/jpeg
94 media-libs/libpng
95 >=media-libs/libwebp-0.1.2
96 media-libs/speex
97 pulseaudio? ( media-sound/pulseaudio )
98 sys-libs/zlib
99 x11-libs/gtk+:2
100 x11-libs/libXinerama
101 x11-libs/libXScrnSaver
102 x11-libs/libXtst
103 kerberos? ( virtual/krb5 )"
104 DEPEND="${RDEPEND}
105 >=dev-lang/nacl-toolchain-newlib-0_p7311
106 dev-lang/perl
107 dev-lang/yasm
108 dev-python/simplejson
109 >=dev-util/gperf-3.0.3
110 >=dev-util/pkgconfig-0.23
111 >=sys-devel/bison-2.4.3
112 sys-devel/flex
113 >=sys-devel/make-3.81-r2
114 test? ( dev-python/pyftpdlib )"
115 RDEPEND+="
116 !=www-client/chromium-9999
117 x11-misc/xdg-utils
118 virtual/ttf-fonts"
119
120 gyp_use() {
121 if [[ $# -lt 2 ]]; then
122 echo "!!! usage: gyp_use <USEFLAG> <GYPFLAG>" >&2
123 return 1
124 fi
125 if use "$1"; then echo "-D$2=1"; else echo "-D$2=0"; fi
126 }
127
128 egyp() {
129 set -- build/gyp_chromium --depth=. "${@}"
130 echo "${@}" >&2
131 "${@}"
132 }
133
134 # Chromium uses different names for some langs,
135 # return Chromium name corresponding to a Gentoo lang.
136 chromium_lang() {
137 if [[ "$1" == "es_LA" ]]; then
138 echo "es_419"
139 else
140 echo "$1"
141 fi
142 }
143
144 get_bundled_v8_version() {
145 "$(PYTHON -2)" "${FILESDIR}"/extract_v8_version.py v8/src/version.cc
146 }
147
148 get_installed_v8_version() {
149 best_version dev-lang/v8 | sed -e 's@dev-lang/v8-@@g'
150 }
151
152 if ! has chromium-pkg_die ${EBUILD_DEATH_HOOKS}; then
153 EBUILD_DEATH_HOOKS+=" chromium-pkg_die";
154 fi
155
156 chromium-pkg_die() {
157 if [[ "${EBUILD_PHASE}" != "compile" ]]; then
158 return
159 fi
160
161 # Prevent user problems like bug #348235.
162 eshopts_push -s extglob
163 if is-flagq '-g?(gdb)?([1-9])'; then
164 ewarn
165 ewarn "You have enabled debug info (i.e. -g or -ggdb in your CFLAGS/CXXFLAGS)."
166 ewarn "Please try removing -g{,gdb} before reporting a bug."
167 ewarn
168 fi
169 eshopts_pop
170
171 # ccache often causes bogus compile failures, especially when the cache gets
172 # corrupted.
173 if has ccache ${FEATURES}; then
174 ewarn
175 ewarn "You have enabled ccache. Please try disabling ccache"
176 ewarn "before reporting a bug."
177 ewarn
178 fi
179
180 # No ricer bugs.
181 if use custom-cflags; then
182 ewarn
183 ewarn "You have enabled the custom-cflags USE flag."
184 ewarn "Please disable it before reporting a bug."
185 ewarn
186 fi
187
188 # If the system doesn't have enough memory, the compilation is known to
189 # fail. Print info about memory to recognize this condition.
190 einfo
191 einfo "$(grep MemTotal /proc/meminfo)"
192 einfo "$(grep SwapTotal /proc/meminfo)"
193 einfo
194 }
195
196 pkg_setup() {
197 if [[ "${SLOT}" == "0" ]]; then
198 CHROMIUM_SUFFIX=""
199 else
200 CHROMIUM_SUFFIX="-${SLOT}"
201 fi
202 CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser${CHROMIUM_SUFFIX}"
203
204 # Make sure the build system will use the right tools, bug #340795.
205 tc-export AR CC CXX RANLIB
206
207 # Make sure the build system will use the right python, bug #344367.
208 python_set_active_version 2
209 python_pkg_setup
210
211 if [[ "${MERGE_TYPE}" == "source" || "${MERGE_TYPE}" == "binary" ]]; then
212 # Fail if the kernel doesn't support features needed for sandboxing,
213 # bug #363907.
214 ERROR_PID_NS="PID_NS is required for sandbox to work"
215 ERROR_NET_NS="NET_NS is required for sandbox to work"
216 CONFIG_CHECK="~PID_NS ~NET_NS"
217 check_extra_config
218 fi
219
220 if use bindist; then
221 elog "bindist enabled: H.264 video support will be disabled."
222 else
223 elog "bindist disabled: Resulting binaries may not be legal to re-distribute."
224 fi
225 }
226
227 src_prepare() {
228 ln -s /usr/$(get_libdir)/nacl-toolchain-newlib \
229 native_client/toolchain/linux_x86_newlib || die
230
231 # zlib-1.2.5.1-r1 renames the OF macro in zconf.h, bug 383371.
232 sed -i '1i#define OF(x) x' \
233 third_party/zlib/contrib/minizip/{ioapi,{,un}zip}.c \
234 chrome/common/zip*.cc || die
235
236 # Revert WebKit changeset responsible for Gentoo bug #393471.
237 epatch "${FILESDIR}/${PN}-revert-jpeg-swizzle-r0.patch"
238
239 # Backport upstream fix for Gentoo bug #389479.
240 epatch "${FILESDIR}/${PN}-dev-shm-r0.patch"
241
242 # Fix crashes on illegal instructions, bug #401537.
243 epatch "${FILESDIR}/${PN}-media-no-sse-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 # CertDatabaseNSSTest.ImportServerCert_SelfSigned: bug #399269.
439 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/net_unittests virtualmake \
440 '--gtest_filter=-NetUtilTest.IDNToUnicode*:NetUtilTest.FormatUrl*:NetUtilTest.GenerateFileName:*UDP*:CertDatabaseNSSTest.ImportCACertHierarchyTree:CertDatabaseNSSTest.ImportServerCert_SelfSigned:KeygenHandlerTest.*'
441
442 LC_ALL="${mylocale}" VIRTUALX_COMMAND=out/Release/printing_unittests virtualmake
443 }
444
445 src_install() {
446 exeinto "${CHROMIUM_HOME}"
447 doexe out/Release/chrome || die
448 doexe out/Release/chrome_sandbox || die
449 fperms 4755 "${CHROMIUM_HOME}/chrome_sandbox"
450
451 doexe out/Release/chromedriver || die
452
453 # Install Native Client files on platforms that support it.
454 insinto "${CHROMIUM_HOME}"
455 case "$(tc-arch)" in
456 amd64)
457 doexe out/Release/nacl_helper{,_bootstrap} || die
458 doins out/Release/nacl_irt_x86_64.nexe || die
459 doins out/Release/libppGoogleNaClPluginChrome.so || die
460 ;;
461 x86)
462 doexe out/Release/nacl_helper{,_bootstrap} || die
463 doins out/Release/nacl_irt_x86_32.nexe || die
464 doins out/Release/libppGoogleNaClPluginChrome.so || die
465 ;;
466 esac
467
468 newexe "${FILESDIR}"/chromium-launcher-r2.sh chromium-launcher.sh || die
469 if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then
470 sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" \
471 -i "${ED}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die
472 sed "s:chromium.desktop:chromium${CHROMIUM_SUFFIX}.desktop:g" \
473 -i "${ED}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die
474 sed "s:plugins:plugins --user-data-dir=\${HOME}/.config/chromium${CHROMIUM_SUFFIX}:" \
475 -i "${ED}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die
476 fi
477
478 # It is important that we name the target "chromium-browser",
479 # xdg-utils expect it; bug #355517.
480 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser${CHROMIUM_SUFFIX} || die
481 # keep the old symlink around for consistency
482 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium${CHROMIUM_SUFFIX} || die
483
484 # Allow users to override command-line options, bug #357629.
485 dodir /etc/chromium || die
486 insinto /etc/chromium
487 newins "${FILESDIR}/chromium.default" "default" || die
488
489 # Support LINGUAS, bug #332751.
490 local pak
491 for pak in out/Release/locales/*.pak; do
492 local pakbasename="$(basename ${pak})"
493 local pakname="${pakbasename%.pak}"
494 local langname="${pakname//-/_}"
495
496 # Do not issue warning for en_US locale. This is the fallback
497 # locale so it should always be installed.
498 if [[ "${langname}" == "en_US" ]]; then
499 continue
500 fi
501
502 local found=false
503 local lang
504 for lang in ${LANGS}; do
505 local crlang="$(chromium_lang ${lang})"
506 if [[ "${langname}" == "${crlang}" ]]; then
507 found=true
508 break
509 fi
510 done
511 if ! $found; then
512 ewarn "LINGUAS warning: no ${langname} in LANGS"
513 fi
514 done
515 local lang
516 for lang in ${LANGS}; do
517 local crlang="$(chromium_lang ${lang})"
518 local pakfile="out/Release/locales/${crlang//_/-}.pak"
519 if [ ! -f "${pakfile}" ]; then
520 ewarn "LINGUAS warning: no .pak file for ${lang} (${pakfile} not found)"
521 fi
522 if ! use linguas_${lang}; then
523 rm "${pakfile}" || die
524 fi
525 done
526
527 insinto "${CHROMIUM_HOME}"
528 doins out/Release/chrome.pak || die
529 doins out/Release/resources.pak || die
530
531 doins -r out/Release/locales || die
532 doins -r out/Release/resources || die
533
534 newman out/Release/chrome.1 chromium${CHROMIUM_SUFFIX}.1 || die
535 newman out/Release/chrome.1 chromium-browser${CHROMIUM_SUFFIX}.1 || die
536
537 # Chromium looks for these in its folder
538 # See media_posix.cc and base_paths_linux.cc
539 # dosym /usr/$(get_libdir)/libavcodec.so.52 "${CHROMIUM_HOME}" || die
540 # dosym /usr/$(get_libdir)/libavformat.so.52 "${CHROMIUM_HOME}" || die
541 # dosym /usr/$(get_libdir)/libavutil.so.50 "${CHROMIUM_HOME}" || die
542 doexe out/Release/libffmpegsumo.so || die
543
544 # Install icons and desktop entry.
545 for SIZE in 16 22 24 32 48 64 128 256 ; do
546 insinto /usr/share/icons/hicolor/${SIZE}x${SIZE}/apps
547 newins chrome/app/theme/chromium/product_logo_${SIZE}.png \
548 chromium-browser${CHROMIUM_SUFFIX}.png || die
549 done
550 local mime_types="text/html;text/xml;application/xhtml+xml;"
551 mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797
552 make_desktop_entry \
553 chromium-browser${CHROMIUM_SUFFIX} \
554 "Chromium${CHROMIUM_SUFFIX}" \
555 chromium-browser${CHROMIUM_SUFFIX} \
556 "Network;WebBrowser" \
557 "MimeType=${mime_types}\nStartupWMClass=chromium-browser"
558 sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die
559
560 # Install GNOME default application entry (bug #303100).
561 if use gnome; then
562 dodir /usr/share/gnome-control-center/default-apps || die
563 insinto /usr/share/gnome-control-center/default-apps
564 newins "${FILESDIR}"/chromium-browser.xml chromium-browser${CHROMIUM_SUFFIX}.xml || die
565 if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then
566 sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" -i \
567 "${ED}"/usr/share/gnome-control-center/default-apps/chromium-browser${CHROMIUM_SUFFIX}.xml
568 fi
569 fi
570 }
571
572 pkg_preinst() {
573 gnome2_icon_savelist
574 }
575
576 pkg_postinst() {
577 fdo-mime_desktop_database_update
578 gnome2_icon_cache_update
579
580 # For more info see bug #292201, bug #352263, bug #361859.
581 elog
582 elog "Depending on your desktop environment, you may need"
583 elog "to install additional packages to get icons on the Downloads page."
584 elog
585 elog "For KDE, the required package is kde-base/oxygen-icons."
586 elog
587 elog "For other desktop environments, try one of the following:"
588 elog " - x11-themes/gnome-icon-theme"
589 elog " - x11-themes/tango-icon-theme"
590
591 # For more info see bug #359153.
592 elog
593 elog "Some web pages may require additional fonts to display properly."
594 elog "Try installing some of the following packages if some characters"
595 elog "are not displayed properly:"
596 elog " - media-fonts/arphicfonts"
597 elog " - media-fonts/bitstream-cyberbit"
598 elog " - media-fonts/droid"
599 elog " - media-fonts/ipamonafont"
600 elog " - media-fonts/ja-ipafonts"
601 elog " - media-fonts/takao-fonts"
602 elog " - media-fonts/wqy-microhei"
603 elog " - media-fonts/wqy-zenhei"
604 }
605
606 pkg_postrm() {
607 gnome2_icon_cache_update
608 }