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-30.0.1599.65.ebuild ChangeLog chromium-30.0.1599.37.ebuild
Date: Sat, 28 Sep 2013 19:15:55
Message-Id: 20130928191551.646292004C@flycatcher.gentoo.org
1 floppym 13/09/28 19:15:51
2
3 Modified: ChangeLog
4 Added: chromium-30.0.1599.65.ebuild
5 Removed: chromium-30.0.1599.37.ebuild
6 Log:
7 Beta channel bump.
8
9 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4)
10
11 Revision Changes Path
12 1.953 www-client/chromium/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.953&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.953&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?r1=1.952&r2=1.953
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v
21 retrieving revision 1.952
22 retrieving revision 1.953
23 diff -u -r1.952 -r1.953
24 --- ChangeLog 28 Sep 2013 17:24:16 -0000 1.952
25 +++ ChangeLog 28 Sep 2013 19:15:51 -0000 1.953
26 @@ -1,6 +1,12 @@
27 # ChangeLog for www-client/chromium
28 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.952 2013/09/28 17:24:16 floppym Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.953 2013/09/28 19:15:51 floppym Exp $
31 +
32 +*chromium-30.0.1599.65 (28 Sep 2013)
33 +
34 + 28 Sep 2013; Mike Gilbert <floppym@g.o> +chromium-30.0.1599.65.ebuild,
35 + -chromium-30.0.1599.37.ebuild:
36 + Beta channel bump.
37
38 28 Sep 2013; Mike Gilbert <floppym@g.o> chromium-31.0.1650.0.ebuild:
39 Drop failing patch, bug 486290 by Albert W. Hopkins.
40
41
42
43 1.1 www-client/chromium/chromium-30.0.1599.65.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-30.0.1599.65.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-30.0.1599.65.ebuild?rev=1.1&content-type=text/plain
47
48 Index: chromium-30.0.1599.65.ebuild
49 ===================================================================
50 # Copyright 1999-2013 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-30.0.1599.65.ebuild,v 1.1 2013/09/28 19:15:51 floppym Exp $
53
54 EAPI="5"
55 PYTHON_COMPAT=( python{2_6,2_7} )
56
57 CHROMIUM_LANGS="am ar bg bn ca cs da de el en_GB es es_LA et fa fi fil fr gu he
58 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
59 sv sw ta te th tr uk vi zh_CN zh_TW"
60
61 inherit chromium eutils flag-o-matic multilib multiprocessing \
62 pax-utils portability python-any-r1 toolchain-funcs versionator virtualx
63
64 DESCRIPTION="Open-source version of Google Chrome web browser"
65 HOMEPAGE="http://chromium.org/"
66 SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.xz
67 test? ( https://commondatastorage.googleapis.com/chromium-browser-official/${P}-testdata.tar.xz )"
68
69 LICENSE="BSD"
70 SLOT="0"
71 KEYWORDS="~amd64 ~arm ~x86"
72 IUSE="bindist cups gnome gnome-keyring gps kerberos neon pulseaudio selinux system-sqlite tcmalloc"
73
74 # Native Client binaries are compiled with different set of flags, bug #452066.
75 QA_FLAGS_IGNORED=".*\.nexe"
76
77 # Native Client binaries may be stripped by the build system, which uses the
78 # right tools for it, bug #469144 .
79 QA_PRESTRIPPED=".*\.nexe"
80
81 RDEPEND=">=app-accessibility/speech-dispatcher-0.8:=
82 app-arch/bzip2:=
83 app-arch/snappy:=
84 system-sqlite? ( dev-db/sqlite:3 )
85 cups? (
86 dev-libs/libgcrypt:=
87 >=net-print/cups-1.3.11:=
88 )
89 >=dev-lang/v8-3.19.17:=
90 =dev-lang/v8-3.20*
91 >=dev-libs/elfutils-0.149
92 dev-libs/expat:=
93 >=dev-libs/icu-49.1.1-r1:=
94 >=dev-libs/jsoncpp-0.5.0-r1:=
95 >=dev-libs/libevent-1.4.13:=
96 dev-libs/libxml2:=[icu]
97 dev-libs/libxslt:=
98 dev-libs/nspr:=
99 >=dev-libs/nss-3.12.3:=
100 dev-libs/protobuf:=
101 dev-libs/re2:=
102 gnome? ( >=gnome-base/gconf-2.24.0:= )
103 gnome-keyring? ( >=gnome-base/gnome-keyring-2.28.2:= )
104 gps? ( >=sci-geosciences/gpsd-3.7:=[shm] )
105 >=media-libs/alsa-lib-1.0.19:=
106 media-libs/flac:=
107 media-libs/harfbuzz:=[icu(+)]
108 >=media-libs/libjpeg-turbo-1.2.0-r1:=
109 media-libs/libpng:0=
110 media-libs/libvpx:=
111 >=media-libs/libwebp-0.3.1:=
112 media-libs/opus:=
113 media-libs/speex:=
114 pulseaudio? ( media-sound/pulseaudio:= )
115 sys-apps/dbus:=
116 sys-apps/pciutils:=
117 sys-libs/zlib:=[minizip]
118 virtual/udev
119 x11-libs/gtk+:2=
120 x11-libs/libXinerama:=
121 x11-libs/libXScrnSaver:=
122 x11-libs/libXtst:=
123 kerberos? ( virtual/krb5 )
124 selinux? ( sec-policy/selinux-chromium )"
125 DEPEND="${RDEPEND}
126 ${PYTHON_DEPS}
127 !arm? (
128 dev-lang/yasm
129 )
130 dev-lang/perl
131 dev-perl/JSON
132 dev-python/jinja
133 dev-python/ply
134 dev-python/simplejson
135 >=dev-util/gperf-3.0.3
136 dev-util/ninja
137 sys-apps/hwids
138 >=sys-devel/bison-2.4.3
139 sys-devel/flex
140 virtual/pkgconfig
141 test? ( dev-python/pyftpdlib )"
142 RDEPEND+="
143 !=www-client/chromium-9999
144 x11-misc/xdg-utils
145 virtual/ttf-fonts"
146
147 if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
148 EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
149 fi
150
151 pkg_setup() {
152 if [[ "${SLOT}" == "0" ]]; then
153 CHROMIUM_SUFFIX=""
154 else
155 CHROMIUM_SUFFIX="-${SLOT}"
156 fi
157 CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser${CHROMIUM_SUFFIX}"
158
159 # Make sure the build system will use the right python, bug #344367.
160 python-any-r1_pkg_setup
161
162 chromium_suid_sandbox_check_kernel_config
163
164 if use bindist; then
165 elog "bindist enabled: H.264 video support will be disabled."
166 else
167 elog "bindist disabled: Resulting binaries may not be legal to re-distribute."
168 fi
169 }
170
171 src_prepare() {
172 # if ! use arm; then
173 # mkdir -p out/Release/gen/sdk/toolchain || die
174 # # Do not preserve SELinux context, bug #460892 .
175 # cp -a --no-preserve=context /usr/$(get_libdir)/nacl-toolchain-newlib \
176 # out/Release/gen/sdk/toolchain/linux_x86_newlib || die
177 # touch out/Release/gen/sdk/toolchain/linux_x86_newlib/stamp.untar || die
178 # fi
179
180 epatch "${FILESDIR}/${PN}-gpsd-r0.patch"
181 epatch "${FILESDIR}/${PN}-system-ply-r0.patch"
182
183 epatch_user
184
185 # Remove most bundled libraries. Some are still needed.
186 find third_party -type f \! -iname '*.gyp*' \
187 \! -path 'third_party/WebKit/*' \
188 \! -path 'third_party/angle_dx11/*' \
189 \! -path 'third_party/cacheinvalidation/*' \
190 \! -path 'third_party/cld/*' \
191 \! -path 'third_party/cros_system_api/*' \
192 \! -path 'third_party/ffmpeg/*' \
193 \! -path 'third_party/flot/*' \
194 \! -path 'third_party/hunspell/*' \
195 \! -path 'third_party/iccjpeg/*' \
196 \! -path 'third_party/jstemplate/*' \
197 \! -path 'third_party/khronos/*' \
198 \! -path 'third_party/leveldatabase/*' \
199 \! -path 'third_party/libjingle/*' \
200 \! -path 'third_party/libphonenumber/*' \
201 \! -path 'third_party/libsrtp/*' \
202 \! -path 'third_party/libusb/*' \
203 \! -path 'third_party/libxml/chromium/*' \
204 \! -path 'third_party/libXNVCtrl/*' \
205 \! -path 'third_party/libyuv/*' \
206 \! -path 'third_party/lss/*' \
207 \! -path 'third_party/lzma_sdk/*' \
208 \! -path 'third_party/mesa/*' \
209 \! -path 'third_party/modp_b64/*' \
210 \! -path 'third_party/mongoose/*' \
211 \! -path 'third_party/mt19937ar/*' \
212 \! -path 'third_party/npapi/*' \
213 \! -path 'third_party/openssl/*' \
214 \! -path 'third_party/ots/*' \
215 \! -path 'third_party/pywebsocket/*' \
216 \! -path 'third_party/qcms/*' \
217 \! -path 'third_party/sfntly/*' \
218 \! -path 'third_party/skia/*' \
219 \! -path 'third_party/smhasher/*' \
220 \! -path 'third_party/sqlite/*' \
221 \! -path 'third_party/tcmalloc/*' \
222 \! -path 'third_party/tlslite/*' \
223 \! -path 'third_party/trace-viewer/*' \
224 \! -path 'third_party/undoview/*' \
225 \! -path 'third_party/usrsctp/*' \
226 \! -path 'third_party/webdriver/*' \
227 \! -path 'third_party/webrtc/*' \
228 \! -path 'third_party/widevine/*' \
229 \! -path 'third_party/x86inc/*' \
230 \! -path 'third_party/zlib/google/*' \
231 -delete || die
232
233 # Remove bundled v8.
234 find v8 -type f \! -iname '*.gyp*' -delete || die
235 }
236
237 src_configure() {
238 local myconf=""
239
240 # Never tell the build system to "enable" SSE2, it has a few unexpected
241 # additions, bug #336871.
242 myconf+=" -Ddisable_sse2=1"
243
244 # Optional tcmalloc. Note it causes problems with e.g. NVIDIA
245 # drivers, bug #413637.
246 myconf+=" $(gyp_use tcmalloc linux_use_tcmalloc)"
247
248 # Disable nacl, we can't build without pnacl (http://crbug.com/269560).
249 myconf+=" -Ddisable_nacl=1"
250
251 # Disable glibc Native Client toolchain, we don't need it (bug #417019).
252 # myconf+=" -Ddisable_glibc=1"
253
254 # TODO: also build with pnacl
255 # myconf+=" -Ddisable_pnacl=1"
256
257 # It would be awkward for us to tar the toolchain and get it untarred again
258 # during the build.
259 # myconf+=" -Ddisable_newlib_untar=1"
260
261 # Make it possible to remove third_party/adobe.
262 echo > "${T}/flapper_version.h" || die
263 myconf+=" -Dflapper_version_h_file=${T}/flapper_version.h"
264
265 # Use system-provided libraries.
266 # TODO: use_system_hunspell (upstream changes needed).
267 # TODO: use_system_libsrtp (bug #459932).
268 # TODO: use_system_libusb (http://crbug.com/266149).
269 # TODO: use_system_ssl (http://crbug.com/58087).
270 # TODO: use_system_sqlite (http://crbug.com/22208).
271 myconf+="
272 -Duse_system_bzip2=1
273 -Duse_system_flac=1
274 -Duse_system_harfbuzz=1
275 -Duse_system_icu=1
276 -Duse_system_jsoncpp=1
277 -Duse_system_libevent=1
278 -Duse_system_libjpeg=1
279 -Duse_system_libpng=1
280 -Duse_system_libvpx=1
281 -Duse_system_libwebp=1
282 -Duse_system_libxml=1
283 -Duse_system_libxslt=1
284 -Duse_system_minizip=1
285 -Duse_system_nspr=1
286 -Duse_system_opus=1
287 -Duse_system_protobuf=1
288 -Duse_system_re2=1
289 -Duse_system_snappy=1
290 -Duse_system_speex=1
291 -Duse_system_v8=1
292 -Duse_system_xdg_utils=1
293 -Duse_system_zlib=1"
294
295 # TODO: patch gyp so that this arm conditional is not needed.
296 if ! use arm; then
297 myconf+="
298 -Duse_system_yasm=1"
299 fi
300
301 # TODO: re-enable on vp9 libvpx release (http://crbug.com/174287).
302 myconf+="
303 -Dmedia_use_libvpx=0"
304
305 # Optional dependencies.
306 # TODO: linux_link_kerberos, bug #381289.
307 myconf+="
308 $(gyp_use cups)
309 $(gyp_use gnome use_gconf)
310 $(gyp_use gnome-keyring use_gnome_keyring)
311 $(gyp_use gnome-keyring linux_link_gnome_keyring)
312 $(gyp_use gps linux_use_libgps)
313 $(gyp_use gps linux_link_libgps)
314 $(gyp_use kerberos)
315 $(gyp_use pulseaudio)"
316
317 if use system-sqlite; then
318 elog "Enabling system sqlite. WebSQL - http://www.w3.org/TR/webdatabase/"
319 elog "will not work. Please report sites broken by this"
320 elog "to https://bugs.gentoo.org"
321 myconf+="
322 -Duse_system_sqlite=1
323 -Denable_sql_database=0"
324 fi
325
326 # Use explicit library dependencies instead of dlopen.
327 # This makes breakages easier to detect by revdep-rebuild.
328 myconf+="
329 -Dlinux_link_gsettings=1
330 -Dlinux_link_libpci=1
331 -Dlinux_link_libspeechd=1
332 -Dlibspeechd_h_prefix=speech-dispatcher/"
333
334 # TODO: use the file at run time instead of effectively compiling it in.
335 myconf+="
336 -Dusb_ids_path=/usr/share/misc/usb.ids"
337
338 # Save space by removing DLOG and DCHECK messages (about 6% reduction).
339 myconf+="
340 -Dlogging_like_official_build=1"
341
342 # Never use bundled gold binary. Disable gold linker flags for now.
343 myconf+="
344 -Dlinux_use_gold_binary=0
345 -Dlinux_use_gold_flags=0"
346
347 # Always support proprietary codecs.
348 myconf+=" -Dproprietary_codecs=1"
349
350 if ! use bindist; then
351 # Enable H.264 support in bundled ffmpeg.
352 myconf+=" -Dffmpeg_branding=Chrome"
353 fi
354
355 # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys .
356 # Note: these are for Gentoo use ONLY. For your own distribution,
357 # please get your own set of keys. Feel free to contact chromium@g.o
358 # for more info.
359 myconf+=" -Dgoogle_api_key=AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc
360 -Dgoogle_default_client_id=329227923882.apps.googleusercontent.com
361 -Dgoogle_default_client_secret=vgKG0NNv7GoDpbtoFNLxCUXu"
362
363 local myarch="$(tc-arch)"
364 if [[ $myarch = amd64 ]] ; then
365 myconf+=" -Dtarget_arch=x64"
366 elif [[ $myarch = x86 ]] ; then
367 myconf+=" -Dtarget_arch=ia32"
368 elif [[ $myarch = arm ]] ; then
369 # TODO: re-enable NaCl (NativeClient).
370 local CTARGET=${CTARGET:-${CHOST}}
371 if [[ $(tc-is-softfloat) == "no" ]]; then
372
373 myconf+=" -Darm_float_abi=hard"
374 fi
375 filter-flags "-mfpu=*"
376 use neon || myconf+=" -Darm_fpu=${ARM_FPU:-vfpv3-d16}"
377
378 if [[ ${CTARGET} == armv[78]* ]]; then
379 myconf+=" -Darmv7=1"
380 else
381 myconf+=" -Darmv7=0"
382 fi
383 myconf+=" -Dtarget_arch=arm
384 -Dsysroot=
385 $(gyp_use neon arm_neon)
386 -Ddisable_nacl=1"
387 else
388 die "Failed to determine target arch, got '$myarch'."
389 fi
390
391 # Make sure that -Werror doesn't get added to CFLAGS by the build system.
392 # Depending on GCC version the warnings are different and we don't want
393 # the build to fail because of that.
394 myconf+=" -Dwerror="
395
396 # Avoid CFLAGS problems, bug #352457, bug #390147.
397 if ! use custom-cflags; then
398 replace-flags "-Os" "-O2"
399 strip-flags
400
401 # Prevent linker from running out of address space, bug #471810 .
402 if use x86; then
403 filter-flags "-g*"
404 fi
405 fi
406
407 # Make sure the build system will use the right tools, bug #340795.
408 tc-export AR CC CXX RANLIB
409
410 # Tools for building programs to be executed on the build system, bug #410883.
411 export AR_host=$(tc-getBUILD_AR)
412 export CC_host=$(tc-getBUILD_CC)
413 export CXX_host=$(tc-getBUILD_CXX)
414 export LD_host=${CXX_host}
415
416 build/linux/unbundle/replace_gyp_files.py ${myconf} || die
417 egyp_chromium ${myconf} || die
418 }
419
420 src_compile() {
421 # TODO: add media_unittests after fixing compile (bug #462546).
422 local test_targets=""
423 for x in base cacheinvalidation content crypto \
424 gpu net printing sql; do
425 test_targets+=" ${x}_unittests"
426 done
427
428 local ninja_targets="chrome chrome_sandbox chromedriver"
429 if use test; then
430 ninja_targets+=" $test_targets"
431 fi
432
433 # Even though ninja autodetects number of CPUs, we respect
434 # user's options, for debugging with -j 1 or any other reason.
435 ninja -C out/Release -v -j $(makeopts_jobs) ${ninja_targets} || die
436
437 pax-mark m out/Release/chrome
438 if use test; then
439 for x in $test_targets; do
440 pax-mark m out/Release/${x}
441 done
442 fi
443 }
444
445 src_test() {
446 # For more info see bug #350349.
447 local LC_ALL="en_US.utf8"
448
449 if ! locale -a | grep -q "${LC_ALL}"; then
450 eerror "${PN} requires ${LC_ALL} locale for tests"
451 eerror "Please read the following guides for more information:"
452 eerror " http://www.gentoo.org/doc/en/guide-localization.xml"
453 eerror " http://www.gentoo.org/doc/en/utf-8.xml"
454 die "locale ${LC_ALL} is not supported"
455 fi
456
457 # If we have the right locale, export it to the environment
458 export LC_ALL
459
460 # For more info see bug #370957.
461 if [[ $UID -eq 0 ]]; then
462 die "Tests must be run as non-root. Please use FEATURES=userpriv."
463 fi
464
465 # virtualmake dies on failure, so we run our tests in a function
466 VIRTUALX_COMMAND="chromium_test" virtualmake
467 }
468
469 chromium_test() {
470 # Keep track of the cumulative exit status for all tests
471 local exitstatus=0
472
473 runtest() {
474 local cmd=$1
475 shift
476 local IFS=:
477 set -- "${cmd}" "--gtest_filter=-$*"
478 einfo "$@"
479 "$@"
480 local st=$?
481 (( st )) && eerror "${cmd} failed"
482 (( exitstatus |= st ))
483 }
484
485 local excluded_base_unittests=(
486 "ICUStringConversionsTest.*" # bug #350347
487 "MessagePumpLibeventTest.*" # bug #398591
488 "TimeTest.JsTime" # bug #459614
489 "SecurityTest.NewOverflow" # bug #465724
490 )
491 runtest out/Release/base_unittests "${excluded_base_unittests[@]}"
492
493 runtest out/Release/cacheinvalidation_unittests
494
495 local excluded_content_unittests=(
496 "RendererDateTimePickerTest.*" # bug #465452
497 )
498 runtest out/Release/content_unittests "${excluded_content_unittests[@]}"
499
500 runtest out/Release/crypto_unittests
501 runtest out/Release/gpu_unittests
502
503 # TODO: add media_unittests after fixing compile (bug #462546).
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 "CertDatabaseNSSTest.TrustIntermediateCa*" # http://crbug.com/224612
512 "URLFetcher*" # bug #425764
513 "HTTPSOCSPTest.*" # bug #426630
514 "HTTPSEVCRLSetTest.*" # see above
515 "HTTPSCRLSetTest.*" # see above
516 "SpdyFramerTests/SpdyFramerTest.CreatePushPromiseCompressed/2" # bug #478168
517 "*SpdyFramerTest.BasicCompression*" # bug #465444
518 )
519 runtest out/Release/net_unittests "${excluded_net_unittests[@]}"
520
521 runtest out/Release/printing_unittests
522
523 local excluded_sql_unittests=(
524 "SQLiteFeaturesTest.FTS2" # bug #461286
525 )
526 runtest out/Release/sql_unittests "${excluded_sql_unittests[@]}"
527
528 return ${exitstatus}
529 }
530
531 src_install() {
532 exeinto "${CHROMIUM_HOME}"
533 doexe out/Release/chrome || die
534
535 newexe out/Release/chrome_sandbox chrome-sandbox || die
536 fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
537
538 doexe out/Release/chromedriver || die
539
540 # if ! use arm; then
541 # doexe out/Release/nacl_helper{,_bootstrap} || die
542 # insinto "${CHROMIUM_HOME}"
543 # doins out/Release/nacl_irt_*.nexe || die
544 # doins out/Release/libppGoogleNaClPluginChrome.so || die
545 # fi
546
547 local sedargs=( -e "s:/usr/lib/:/usr/$(get_libdir)/:g" )
548 if [[ -n ${CHROMIUM_SUFFIX} ]]; then
549 sedargs+=(
550 -e "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g"
551 -e "s:chromium.desktop:chromium${CHROMIUM_SUFFIX}.desktop:g"
552 -e "s:plugins:plugins --user-data-dir=\${HOME}/.config/chromium${CHROMIUM_SUFFIX}:"
553 )
554 fi
555 sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r3.sh" > chromium-launcher.sh || die
556 doexe chromium-launcher.sh
557
558 # It is important that we name the target "chromium-browser",
559 # xdg-utils expect it; bug #355517.
560 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser${CHROMIUM_SUFFIX} || die
561 # keep the old symlink around for consistency
562 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium${CHROMIUM_SUFFIX} || die
563
564 # Allow users to override command-line options, bug #357629.
565 dodir /etc/chromium || die
566 insinto /etc/chromium
567 newins "${FILESDIR}/chromium.default" "default" || die
568
569 pushd out/Release/locales > /dev/null || die
570 chromium_remove_language_paks
571 popd
572
573 insinto "${CHROMIUM_HOME}"
574 doins out/Release/*.pak || die
575
576 doins -r out/Release/locales || die
577 doins -r out/Release/resources || die
578
579 newman out/Release/chrome.1 chromium${CHROMIUM_SUFFIX}.1 || die
580 newman out/Release/chrome.1 chromium-browser${CHROMIUM_SUFFIX}.1 || die
581
582 doexe out/Release/libffmpegsumo.so || die
583
584 # Install icons and desktop entry.
585 local branding size
586 for size in 16 22 24 32 48 64 128 256 ; do
587 case ${size} in
588 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
589 *) branding="chrome/app/theme/chromium" ;;
590 esac
591 newicon -s ${size} "${branding}/product_logo_${size}.png" \
592 chromium-browser${CHROMIUM_SUFFIX}.png
593 done
594
595 local mime_types="text/html;text/xml;application/xhtml+xml;"
596 mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797
597 mime_types+="x-scheme-handler/ftp;" # bug #412185
598 mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393
599 make_desktop_entry \
600 chromium-browser${CHROMIUM_SUFFIX} \
601 "Chromium${CHROMIUM_SUFFIX}" \
602 chromium-browser${CHROMIUM_SUFFIX} \
603 "Network;WebBrowser" \
604 "MimeType=${mime_types}\nStartupWMClass=chromium-browser"
605 sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die
606
607 # Install GNOME default application entry (bug #303100).
608 if use gnome; then
609 dodir /usr/share/gnome-control-center/default-apps || die
610 insinto /usr/share/gnome-control-center/default-apps
611 newins "${FILESDIR}"/chromium-browser.xml chromium-browser${CHROMIUM_SUFFIX}.xml || die
612 if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then
613 sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" -i \
614 "${ED}"/usr/share/gnome-control-center/default-apps/chromium-browser${CHROMIUM_SUFFIX}.xml
615 fi
616 fi
617 }