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