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