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