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-23.0.1251.2.ebuild chromium-23.0.1243.2.ebuild
Date: Sat, 01 Sep 2012 08:40:37
Message-Id: 20120901084023.A1FE420E7C@flycatcher.gentoo.org
1 phajdan.jr 12/09/01 08:40:23
2
3 Modified: ChangeLog chromium-9999-r1.ebuild
4 Added: chromium-23.0.1251.2.ebuild
5 Removed: chromium-23.0.1243.2.ebuild
6 Log:
7 Version bump for dev channel release. Incomplete fixes for arm. Remove old.
8
9 (Portage version: 2.1.11.9/cvs/Linux i686)
10
11 Revision Changes Path
12 1.704 www-client/chromium/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.704&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.704&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?r1=1.703&r2=1.704
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v
21 retrieving revision 1.703
22 retrieving revision 1.704
23 diff -u -r1.703 -r1.704
24 --- ChangeLog 31 Aug 2012 20:01:47 -0000 1.703
25 +++ ChangeLog 1 Sep 2012 08:40:23 -0000 1.704
26 @@ -1,6 +1,13 @@
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.703 2012/08/31 20:01:47 floppym Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.704 2012/09/01 08:40:23 phajdan.jr Exp $
31 +
32 +*chromium-23.0.1251.2 (01 Sep 2012)
33 +
34 + 01 Sep 2012; Pawel Hajdan jr <phajdan.jr@g.o>
35 + -chromium-23.0.1243.2.ebuild, +chromium-23.0.1251.2.ebuild,
36 + chromium-9999-r1.ebuild:
37 + Version bump for dev channel release. Incomplete fixes for arm. Remove old.
38
39 *chromium-21.0.1180.89 (31 Aug 2012)
40
41
42
43
44 1.133 www-client/chromium/chromium-9999-r1.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-9999-r1.ebuild?rev=1.133&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-9999-r1.ebuild?rev=1.133&content-type=text/plain
48 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-9999-r1.ebuild?r1=1.132&r2=1.133
49
50 Index: chromium-9999-r1.ebuild
51 ===================================================================
52 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-9999-r1.ebuild,v
53 retrieving revision 1.132
54 retrieving revision 1.133
55 diff -u -r1.132 -r1.133
56 --- chromium-9999-r1.ebuild 28 Aug 2012 20:49:34 -0000 1.132
57 +++ chromium-9999-r1.ebuild 1 Sep 2012 08:40:23 -0000 1.133
58 @@ -1,6 +1,6 @@
59 # Copyright 1999-2012 Gentoo Foundation
60 # Distributed under the terms of the GNU General Public License v2
61 -# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-9999-r1.ebuild,v 1.132 2012/08/28 20:49:34 floppym Exp $
62 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-9999-r1.ebuild,v 1.133 2012/09/01 08:40:23 phajdan.jr Exp $
63
64 EAPI="4"
65 PYTHON_DEPEND="2:2.6"
66 @@ -54,7 +54,7 @@
67 kerberos? ( virtual/krb5 )
68 selinux? ( sys-libs/libselinux )"
69 DEPEND="${RDEPEND}
70 - >=dev-lang/nacl-toolchain-newlib-0_p9093
71 + !arm? ( >=dev-lang/nacl-toolchain-newlib-0_p9093 )
72 dev-lang/perl
73 dev-lang/yasm
74 dev-python/ply
75 @@ -161,8 +161,10 @@
76 }
77
78 src_prepare() {
79 - ln -s /usr/$(get_libdir)/nacl-toolchain-newlib \
80 - native_client/toolchain/linux_x86_newlib || die
81 + if ! use arm; then
82 + ln -s /usr/$(get_libdir)/nacl-toolchain-newlib \
83 + native_client/toolchain/linux_x86_newlib || die
84 + fi
85
86 # zlib-1.2.5.1-r1 renames the OF macro in zconf.h, bug 383371.
87 sed -i '1i#define OF(x) x' \
88 @@ -323,6 +325,11 @@
89 myconf+=" -Dtarget_arch=x64"
90 elif [[ $myarch = x86 ]] ; then
91 myconf+=" -Dtarget_arch=ia32"
92 + elif [[ $myarch = arm ]] ; then
93 + # TODO: re-enable NaCl (NativeClient).
94 + myconf+=" -Dtarget_arch=arm
95 + -Darm_neon=0
96 + -Ddisable_nacl=1"
97 else
98 die "Failed to determine target arch, got '$myarch'."
99 fi
100 @@ -431,10 +438,12 @@
101
102 doexe out/Release/chromedriver || die
103
104 - doexe out/Release/nacl_helper{,_bootstrap} || die
105 - insinto "${CHROMIUM_HOME}"
106 - doins out/Release/nacl_irt_*.nexe || die
107 - doins out/Release/libppGoogleNaClPluginChrome.so || die
108 + if ! use arm; then
109 + doexe out/Release/nacl_helper{,_bootstrap} || die
110 + insinto "${CHROMIUM_HOME}"
111 + doins out/Release/nacl_irt_*.nexe || die
112 + doins out/Release/libppGoogleNaClPluginChrome.so || die
113 + fi
114
115 newexe "${FILESDIR}"/chromium-launcher-r2.sh chromium-launcher.sh || die
116 if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then
117
118
119
120 1.1 www-client/chromium/chromium-23.0.1251.2.ebuild
121
122 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-23.0.1251.2.ebuild?rev=1.1&view=markup
123 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-23.0.1251.2.ebuild?rev=1.1&content-type=text/plain
124
125 Index: chromium-23.0.1251.2.ebuild
126 ===================================================================
127 # Copyright 1999-2012 Gentoo Foundation
128 # Distributed under the terms of the GNU General Public License v2
129 # $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-23.0.1251.2.ebuild,v 1.1 2012/09/01 08:40:23 phajdan.jr Exp $
130
131 EAPI="4"
132 PYTHON_DEPEND="2:2.6"
133
134 CHROMIUM_LANGS="am ar bg bn ca cs da de el en_GB es es_LA et fa fi fil fr gu he
135 hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt_BR pt_PT ro ru sk sl sr
136 sv sw ta te th tr uk vi zh_CN zh_TW"
137
138 inherit chromium eutils flag-o-matic multilib \
139 pax-utils portability python toolchain-funcs versionator virtualx
140
141 DESCRIPTION="Open-source version of Google Chrome web browser"
142 HOMEPAGE="http://chromium.org/"
143 SRC_URI="http://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.bz2"
144
145 LICENSE="BSD"
146 SLOT="0"
147 KEYWORDS="~amd64 ~x86"
148 IUSE="bindist cups gnome gnome-keyring kerberos pulseaudio selinux"
149
150 RDEPEND="app-arch/bzip2
151 cups? (
152 dev-libs/libgcrypt
153 >=net-print/cups-1.3.11
154 )
155 >=dev-lang/v8-3.11.10.6
156 dev-libs/dbus-glib
157 >=dev-libs/elfutils-0.149
158 dev-libs/expat
159 >=dev-libs/icu-49.1.1-r1
160 >=dev-libs/libevent-1.4.13
161 dev-libs/libxml2[icu]
162 dev-libs/libxslt
163 >=dev-libs/nss-3.12.3
164 gnome? ( >=gnome-base/gconf-2.24.0 )
165 gnome-keyring? ( >=gnome-base/gnome-keyring-2.28.2 )
166 >=media-libs/alsa-lib-1.0.19
167 media-libs/flac
168 >=media-libs/libjpeg-turbo-1.2.0-r1
169 media-libs/libpng
170 >=media-libs/libwebp-0.2.0_rc1
171 media-libs/speex
172 pulseaudio? ( media-sound/pulseaudio )
173 sys-fs/udev
174 sys-libs/zlib
175 virtual/libusb:1
176 x11-libs/gtk+:2
177 x11-libs/libXinerama
178 x11-libs/libXScrnSaver
179 x11-libs/libXtst
180 kerberos? ( virtual/krb5 )
181 selinux? ( sys-libs/libselinux )"
182 DEPEND="${RDEPEND}
183 !arm? ( >=dev-lang/nacl-toolchain-newlib-0_p9093 )
184 dev-lang/perl
185 dev-lang/yasm
186 dev-python/ply
187 dev-python/simplejson
188 >=dev-util/gperf-3.0.3
189 >=sys-devel/bison-2.4.3
190 sys-devel/flex
191 >=sys-devel/make-3.81-r2
192 virtual/pkgconfig
193 test? (
194 dev-python/pyftpdlib
195 )"
196 RDEPEND+="
197 !=www-client/chromium-9999
198 x11-misc/xdg-utils
199 virtual/ttf-fonts"
200
201 if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
202 EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
203 fi
204
205 pkg_setup() {
206 if [[ "${SLOT}" == "0" ]]; then
207 CHROMIUM_SUFFIX=""
208 else
209 CHROMIUM_SUFFIX="-${SLOT}"
210 fi
211 CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser${CHROMIUM_SUFFIX}"
212
213 # Make sure the build system will use the right tools, bug #340795.
214 tc-export AR CC CXX RANLIB
215
216 # Make sure the build system will use the right python, bug #344367.
217 python_set_active_version 2
218 python_pkg_setup
219
220 if ! use selinux; then
221 chromium_suid_sandbox_check_kernel_config
222 fi
223
224 if use bindist; then
225 elog "bindist enabled: H.264 video support will be disabled."
226 else
227 elog "bindist disabled: Resulting binaries may not be legal to re-distribute."
228 fi
229 }
230
231 src_prepare() {
232 if ! use arm; then
233 ln -s /usr/$(get_libdir)/nacl-toolchain-newlib \
234 native_client/toolchain/linux_x86_newlib || die
235 fi
236
237 # zlib-1.2.5.1-r1 renames the OF macro in zconf.h, bug 383371.
238 sed -i '1i#define OF(x) x' \
239 third_party/zlib/contrib/minizip/{ioapi,{,un}zip}.h || die
240
241 # Fix build without NaCl glibc toolchain.
242 epatch "${FILESDIR}/${PN}-ppapi-r0.patch"
243
244 # Missing gyp files in tarball.
245 # https://code.google.com/p/chromium/issues/detail?id=144823
246 if [[ -e chrome/test/data/nacl/nacl_test_data.gyp ]]; then
247 die "tarball fixed, please remove workaround"
248 fi
249
250 mkdir -p chrome/test/data/nacl
251 cat > chrome/test/data/nacl/nacl_test_data.gyp <<-EOF
252 {
253 'targets': [
254 {
255 'target_name': 'nacl_tests',
256 'type': 'none',
257 },
258 ],
259 }
260 EOF
261
262 epatch_user
263
264 # Remove most bundled libraries. Some are still needed.
265 find third_party -type f \! -iname '*.gyp*' \
266 \! -path 'third_party/WebKit/*' \
267 \! -path 'third_party/angle/*' \
268 \! -path 'third_party/cacheinvalidation/*' \
269 \! -path 'third_party/cld/*' \
270 \! -path 'third_party/ffmpeg/*' \
271 \! -path 'third_party/flac/flac.h' \
272 \! -path 'third_party/flot/*' \
273 \! -path 'third_party/gpsd/*' \
274 \! -path 'third_party/harfbuzz/*' \
275 \! -path 'third_party/hunspell/*' \
276 \! -path 'third_party/hyphen/*' \
277 \! -path 'third_party/iccjpeg/*' \
278 \! -path 'third_party/jsoncpp/*' \
279 \! -path 'third_party/khronos/*' \
280 \! -path 'third_party/launchpad_translations/*' \
281 \! -path 'third_party/leveldatabase/*' \
282 \! -path 'third_party/libjingle/*' \
283 \! -path 'third_party/libphonenumber/*' \
284 \! -path 'third_party/libsrtp/*' \
285 \! -path 'third_party/libusb/libusb.h' \
286 \! -path 'third_party/libva/*' \
287 \! -path 'third_party/libvpx/*' \
288 \! -path 'third_party/libxml/chromium/*' \
289 \! -path 'third_party/libXNVCtrl/*' \
290 \! -path 'third_party/libyuv/*' \
291 \! -path 'third_party/lss/*' \
292 \! -path 'third_party/mesa/*' \
293 \! -path 'third_party/modp_b64/*' \
294 \! -path 'third_party/mongoose/*' \
295 \! -path 'third_party/mt19937ar/*' \
296 \! -path 'third_party/npapi/*' \
297 \! -path 'third_party/openmax/*' \
298 \! -path 'third_party/ots/*' \
299 \! -path 'third_party/protobuf/*' \
300 \! -path 'third_party/qcms/*' \
301 \! -path 'third_party/re2/*' \
302 \! -path 'third_party/scons-2.0.1/*' \
303 \! -path 'third_party/sfntly/*' \
304 \! -path 'third_party/skia/*' \
305 \! -path 'third_party/smhasher/*' \
306 \! -path 'third_party/speex/*' \
307 \! -path 'third_party/sqlite/*' \
308 \! -path 'third_party/tlslite/*' \
309 \! -path 'third_party/trace-viewer/*' \
310 \! -path 'third_party/undoview/*' \
311 \! -path 'third_party/v8-i18n/*' \
312 \! -path 'third_party/webdriver/*' \
313 \! -path 'third_party/webgl_conformance/*' \
314 \! -path 'third_party/webrtc/*' \
315 \! -path 'third_party/zlib/*' \
316 -delete || die
317
318 local v8_bundled="$(chromium_bundled_v8_version)"
319 local v8_installed="$(chromium_installed_v8_version)"
320 einfo "V8 version: bundled - ${v8_bundled}; installed - ${v8_installed}"
321
322 # Remove bundled v8.
323 find v8 -type f \! -iname '*.gyp*' -delete || die
324
325 # The implementation files include v8 headers with full path,
326 # like #include "v8/include/v8.h". Make sure the system headers
327 # will be used.
328 # TODO: find a solution that can be upstreamed.
329 rmdir v8/include || die
330 ln -s /usr/include v8/include || die
331
332 # Make sure the build system will use the right python, bug #344367.
333 # Only convert directories that need it, to save time.
334 python_convert_shebangs -q -r 2 build tools
335 }
336
337 src_configure() {
338 local myconf=""
339
340 # Never tell the build system to "enable" SSE2, it has a few unexpected
341 # additions, bug #336871.
342 myconf+=" -Ddisable_sse2=1"
343
344 # Disable tcmalloc, it causes problems with e.g. NVIDIA
345 # drivers, bug #413637.
346 myconf+=" -Dlinux_use_tcmalloc=0"
347
348 # Disable glibc Native Client toolchain, we don't need it (bug #417019).
349 myconf+=" -Ddisable_glibc=1"
350
351 # Make it possible to remove third_party/adobe.
352 echo > "${T}/flapper_version.h" || die
353 myconf+=" -Dflapper_version_h_file=${T}/flapper_version.h"
354
355 # Use system-provided libraries.
356 # TODO: use_system_ffmpeg
357 # TODO: use_system_hunspell (upstream changes needed).
358 # TODO: use_system_speex (needs additional shims, bug #432748).
359 # TODO: use_system_ssl (http://crbug.com/58087).
360 # TODO: use_system_sqlite (http://crbug.com/22208).
361 # TODO: use_system_vpx
362 # TODO: use_system_zlib (forked, bug #432746).
363 myconf+="
364 -Duse_system_bzip2=1
365 -Duse_system_flac=1
366 -Duse_system_icu=1
367 -Duse_system_libevent=1
368 -Duse_system_libjpeg=1
369 -Duse_system_libpng=1
370 -Duse_system_libusb=1
371 -Duse_system_libwebp=1
372 -Duse_system_libxml=1
373 -Duse_system_speex=0
374 -Duse_system_v8=1
375 -Duse_system_xdg_utils=1
376 -Duse_system_yasm=1
377 -Duse_system_zlib=0"
378
379 # Optional dependencies.
380 # TODO: linux_link_kerberos, bug #381289.
381 myconf+="
382 $(gyp_use cups)
383 $(gyp_use gnome use_gconf)
384 $(gyp_use gnome-keyring use_gnome_keyring)
385 $(gyp_use gnome-keyring linux_link_gnome_keyring)
386 $(gyp_use kerberos)
387 $(gyp_use pulseaudio)
388 $(gyp_use selinux selinux)"
389
390 # Use explicit library dependencies instead of dlopen.
391 # This makes breakages easier to detect by revdep-rebuild.
392 myconf+="
393 -Dlinux_link_gsettings=1"
394
395 if ! use selinux; then
396 # Enable SUID sandbox.
397 myconf+="
398 -Dlinux_sandbox_path=${CHROMIUM_HOME}/chrome_sandbox
399 -Dlinux_sandbox_chrome_path=${CHROMIUM_HOME}/chrome"
400 fi
401
402 # Never use bundled gold binary. Disable gold linker flags for now.
403 myconf+="
404 -Dlinux_use_gold_binary=0
405 -Dlinux_use_gold_flags=0"
406
407 if ! use bindist; then
408 # Enable H.624 support in bundled ffmpeg.
409 myconf+=" -Dproprietary_codecs=1 -Dffmpeg_branding=Chrome"
410 fi
411
412 local myarch="$(tc-arch)"
413 if [[ $myarch = amd64 ]] ; then
414 myconf+=" -Dtarget_arch=x64"
415 elif [[ $myarch = x86 ]] ; then
416 myconf+=" -Dtarget_arch=ia32"
417 elif [[ $myarch = arm ]] ; then
418 # TODO: re-enable NaCl (NativeClient).
419 myconf+=" -Dtarget_arch=arm
420 -Darm_neon=0
421 -Ddisable_nacl=1"
422 else
423 die "Failed to determine target arch, got '$myarch'."
424 fi
425
426 # Make sure that -Werror doesn't get added to CFLAGS by the build system.
427 # Depending on GCC version the warnings are different and we don't want
428 # the build to fail because of that.
429 myconf+=" -Dwerror="
430
431 # Avoid CFLAGS problems, bug #352457, bug #390147.
432 if ! use custom-cflags; then
433 replace-flags "-Os" "-O2"
434 strip-flags
435 fi
436
437 egyp_chromium ${myconf} || die
438 }
439
440 src_compile() {
441 local test_targets
442 for x in base cacheinvalidation crypto \
443 googleurl gpu media net printing sql; do
444 test_targets+=" ${x}_unittests"
445 done
446
447 local make_targets="chrome chromedriver"
448 if ! use selinux; then
449 make_targets+=" chrome_sandbox"
450 fi
451 if use test; then
452 make_targets+=$test_targets
453 fi
454
455 # See bug #410883 for more info about the .host mess.
456 emake ${make_targets} BUILDTYPE=Release V=1 \
457 CC.host="$(tc-getCC)" CFLAGS.host="${CFLAGS}" \
458 CXX.host="$(tc-getCXX)" CXXFLAGS.host="${CXXFLAGS}" \
459 LINK.host="$(tc-getCXX)" LDFLAGS.host="${LDFLAGS}" \
460 AR.host="$(tc-getAR)" || die
461
462 pax-mark m out/Release/chrome
463 if use test; then
464 for x in $test_targets; do
465 pax-mark m out/Release/${x}
466 done
467 fi
468 }
469
470 src_test() {
471 # For more info see bug #350349.
472 local mylocale='en_US.utf8'
473 if ! locale -a | grep -q "$mylocale"; then
474 eerror "${PN} requires ${mylocale} locale for tests"
475 eerror "Please read the following guides for more information:"
476 eerror " http://www.gentoo.org/doc/en/guide-localization.xml"
477 eerror " http://www.gentoo.org/doc/en/utf-8.xml"
478 die "locale ${mylocale} is not supported"
479 fi
480
481 # For more info see bug #370957.
482 if [[ $UID -eq 0 ]]; then
483 die "Tests must be run as non-root. Please use FEATURES=userpriv."
484 fi
485
486 runtest() {
487 local cmd=$1
488 shift
489 local filter="--gtest_filter=$(IFS=:; echo "-${*}")"
490 einfo "${cmd}" "${filter}"
491 LC_ALL="${mylocale}" VIRTUALX_COMMAND="${cmd}" virtualmake "${filter}"
492 }
493
494 local excluded_base_unittests=(
495 "ICUStringConversionsTest.*" # bug #350347
496 "MessagePumpLibeventTest.*" # bug #398591
497 )
498 runtest out/Release/base_unittests "${excluded_base_unittests[@]}"
499
500 runtest out/Release/cacheinvalidation_unittests
501 runtest out/Release/crypto_unittests
502 runtest out/Release/googleurl_unittests
503 runtest out/Release/gpu_unittests
504 runtest out/Release/media_unittests
505
506 local excluded_net_unittests=(
507 "NetUtilTest.IDNToUnicode*" # bug 361885
508 "NetUtilTest.FormatUrl*" # see above
509 "DnsConfigServiceTest.GetSystemConfig" # bug #394883
510 "CertDatabaseNSSTest.ImportServerCert_SelfSigned" # bug #399269
511 "URLFetcher*" # bug #425764
512 )
513 runtest out/Release/net_unittests "${excluded_net_unittests[@]}"
514
515 runtest out/Release/printing_unittests
516 runtest out/Release/sql_unittests
517 }
518
519 src_install() {
520 exeinto "${CHROMIUM_HOME}"
521 doexe out/Release/chrome || die
522
523 if ! use selinux; then
524 doexe out/Release/chrome_sandbox || die
525 fperms 4755 "${CHROMIUM_HOME}/chrome_sandbox"
526 fi
527
528 doexe out/Release/chromedriver || die
529
530 if ! use arm; then
531 doexe out/Release/nacl_helper{,_bootstrap} || die
532 insinto "${CHROMIUM_HOME}"
533 doins out/Release/nacl_irt_*.nexe || die
534 doins out/Release/libppGoogleNaClPluginChrome.so || die
535 fi
536
537 newexe "${FILESDIR}"/chromium-launcher-r2.sh chromium-launcher.sh || die
538 if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then
539 sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" \
540 -i "${ED}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die
541 sed "s:chromium.desktop:chromium${CHROMIUM_SUFFIX}.desktop:g" \
542 -i "${ED}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die
543 sed "s:plugins:plugins --user-data-dir=\${HOME}/.config/chromium${CHROMIUM_SUFFIX}:" \
544 -i "${ED}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die
545 fi
546
547 # It is important that we name the target "chromium-browser",
548 # xdg-utils expect it; bug #355517.
549 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser${CHROMIUM_SUFFIX} || die
550 # keep the old symlink around for consistency
551 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium${CHROMIUM_SUFFIX} || die
552
553 # Allow users to override command-line options, bug #357629.
554 dodir /etc/chromium || die
555 insinto /etc/chromium
556 newins "${FILESDIR}/chromium.default" "default" || die
557
558 pushd out/Release/locales > /dev/null || die
559 chromium_remove_language_paks
560 popd
561
562 insinto "${CHROMIUM_HOME}"
563 doins out/Release/*.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 doexe out/Release/libffmpegsumo.so || die
572
573 # Install icons and desktop entry.
574 local branding size
575 for size in 16 22 24 32 48 64 128 256 ; do
576 case ${size} in
577 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
578 *) branding="chrome/app/theme/chromium" ;;
579 esac
580 newicon -s ${size} "${branding}/product_logo_${size}.png" \
581 chromium-browser${CHROMIUM_SUFFIX}.png
582 done
583
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 mime_types+="x-scheme-handler/ftp;" # bug #412185
587 mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393
588 make_desktop_entry \
589 chromium-browser${CHROMIUM_SUFFIX} \
590 "Chromium${CHROMIUM_SUFFIX}" \
591 chromium-browser${CHROMIUM_SUFFIX} \
592 "Network;WebBrowser" \
593 "MimeType=${mime_types}\nStartupWMClass=chromium-browser"
594 sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die
595
596 # Install GNOME default application entry (bug #303100).
597 if use gnome; then
598 dodir /usr/share/gnome-control-center/default-apps || die
599 insinto /usr/share/gnome-control-center/default-apps
600 newins "${FILESDIR}"/chromium-browser.xml chromium-browser${CHROMIUM_SUFFIX}.xml || die
601 if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then
602 sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" -i \
603 "${ED}"/usr/share/gnome-control-center/default-apps/chromium-browser${CHROMIUM_SUFFIX}.xml
604 fi
605 fi
606 }