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