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-40.0.2202.3.ebuild chromium-40.0.2188.2.ebuild
Date: Wed, 29 Oct 2014 20:22:56
Message-Id: 20141029202251.48040905E@oystercatcher.gentoo.org
1 phajdan.jr 14/10/29 20:22:51
2
3 Modified: ChangeLog
4 Added: chromium-40.0.2202.3.ebuild
5 Removed: chromium-40.0.2188.2.ebuild
6 Log:
7 Dev channel bump. Remove old.
8
9 (Portage version: 2.2.8-r2/cvs/Linux i686, signed Manifest commit with key 0x4F1A2555EA71991D!)
10
11 Revision Changes Path
12 1.1157 www-client/chromium/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.1157&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.1157&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?r1=1.1156&r2=1.1157
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v
21 retrieving revision 1.1156
22 retrieving revision 1.1157
23 diff -u -r1.1156 -r1.1157
24 --- ChangeLog 24 Oct 2014 00:47:17 -0000 1.1156
25 +++ ChangeLog 29 Oct 2014 20:22:51 -0000 1.1157
26 @@ -1,6 +1,12 @@
27 # ChangeLog for www-client/chromium
28 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.1156 2014/10/24 00:47:17 floppym Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.1157 2014/10/29 20:22:51 phajdan.jr Exp $
31 +
32 +*chromium-40.0.2202.3 (29 Oct 2014)
33 +
34 + 29 Oct 2014; Pawel Hajdan jr <phajdan.jr@g.o>
35 + -chromium-40.0.2188.2.ebuild, +chromium-40.0.2202.3.ebuild:
36 + Dev channel bump. Remove old.
37
38 *chromium-39.0.2171.36 (24 Oct 2014)
39
40
41
42
43 1.1 www-client/chromium/chromium-40.0.2202.3.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-40.0.2202.3.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-40.0.2202.3.ebuild?rev=1.1&content-type=text/plain
47
48 Index: chromium-40.0.2202.3.ebuild
49 ===================================================================
50 # Copyright 1999-2014 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-40.0.2202.3.ebuild,v 1.1 2014/10/29 20:22:51 phajdan.jr 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}-lite.tar.xz"
67
68 LICENSE="BSD"
69 SLOT="0"
70 KEYWORDS="~amd64 ~arm ~x86"
71 IUSE="bindist cups gnome gnome-keyring kerberos neon pic pulseaudio selinux +tcmalloc"
72 RESTRICT="!bindist? ( bindist )"
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 cups? (
85 dev-libs/libgcrypt:0=
86 >=net-print/cups-1.3.11:=
87 )
88 >=dev-libs/elfutils-0.149
89 dev-libs/expat:=
90 dev-libs/glib:=
91 dev-libs/icu:=
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/re2:=
99 gnome? ( >=gnome-base/gconf-2.24.0:= )
100 gnome-keyring? ( >=gnome-base/libgnome-keyring-3.12:= )
101 >=media-libs/alsa-lib-1.0.19:=
102 media-libs/flac:=
103 media-libs/fontconfig:=
104 media-libs/freetype:=
105 media-libs/harfbuzz:=[icu(+)]
106 media-libs/libexif:=
107 >=media-libs/libjpeg-turbo-1.2.0-r1:=
108 media-libs/libpng:0=
109 >=media-libs/libwebp-0.4.0:=
110 media-libs/speex:=
111 pulseaudio? ( media-sound/pulseaudio:= )
112 sys-apps/dbus:=
113 sys-apps/pciutils:=
114 >=sys-libs/libcap-2.22:=
115 sys-libs/zlib:=[minizip]
116 virtual/udev
117 x11-libs/cairo:=
118 x11-libs/gdk-pixbuf:=
119 x11-libs/gtk+:2=
120 x11-libs/libdrm
121 x11-libs/libX11:=
122 x11-libs/libXcomposite:=
123 x11-libs/libXcursor:=
124 x11-libs/libXdamage:=
125 x11-libs/libXext:=
126 x11-libs/libXfixes:=
127 >=x11-libs/libXi-1.6.0:=
128 x11-libs/libXinerama:=
129 x11-libs/libXrandr:=
130 x11-libs/libXrender:=
131 x11-libs/libXScrnSaver:=
132 x11-libs/libXtst:=
133 x11-libs/pango:=
134 kerberos? ( virtual/krb5 )
135 selinux? ( sec-policy/selinux-chromium )"
136 DEPEND="${RDEPEND}
137 !arm? (
138 dev-lang/yasm
139 )
140 dev-lang/perl
141 dev-perl/JSON
142 >=dev-util/gperf-3.0.3
143 dev-util/ninja
144 sys-apps/hwids[usb(+)]
145 >=sys-devel/bison-2.4.3
146 sys-devel/flex
147 virtual/pkgconfig"
148 # For nvidia-drivers blocker, see bug #413637 .
149 RDEPEND+="
150 !=www-client/chromium-9999
151 !<www-plugins/chrome-binary-plugins-37
152 x11-misc/xdg-utils
153 virtual/opengl
154 virtual/ttf-fonts
155 tcmalloc? ( !<x11-drivers/nvidia-drivers-331.20 )"
156
157 # Python dependencies. The DEPEND part needs to be kept in sync
158 # with python_check_deps.
159 DEPEND+=" $(python_gen_any_dep '
160 dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]
161 dev-python/jinja[${PYTHON_USEDEP}]
162 dev-python/ply[${PYTHON_USEDEP}]
163 dev-python/simplejson[${PYTHON_USEDEP}]
164 ')"
165 python_check_deps() {
166 has_version "dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]" && \
167 has_version "dev-python/jinja[${PYTHON_USEDEP}]" && \
168 has_version "dev-python/ply[${PYTHON_USEDEP}]" && \
169 has_version "dev-python/simplejson[${PYTHON_USEDEP}]"
170 }
171
172 if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
173 EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
174 fi
175
176 DISABLE_AUTOFORMATTING="yes"
177 DOC_CONTENTS="
178 Some web pages may require additional fonts to display properly.
179 Try installing some of the following packages if some characters
180 are not displayed properly:
181 - media-fonts/arphicfonts
182 - media-fonts/bitstream-cyberbit
183 - media-fonts/droid
184 - media-fonts/ipamonafont
185 - media-fonts/ja-ipafonts
186 - media-fonts/takao-fonts
187 - media-fonts/wqy-microhei
188 - media-fonts/wqy-zenhei
189
190 Depending on your desktop environment, you may need
191 to install additional packages to get icons on the Downloads page.
192
193 For KDE, the required package is kde-base/oxygen-icons.
194
195 For other desktop environments, try one of the following:
196 - x11-themes/gnome-icon-theme
197 - x11-themes/tango-icon-theme
198 "
199
200 pkg_setup() {
201 if [[ "${SLOT}" == "0" ]]; then
202 CHROMIUM_SUFFIX=""
203 else
204 CHROMIUM_SUFFIX="-${SLOT}"
205 fi
206 CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser${CHROMIUM_SUFFIX}"
207
208 # Make sure the build system will use the right python, bug #344367.
209 python-any-r1_pkg_setup
210
211 chromium_suid_sandbox_check_kernel_config
212
213 if use bindist; then
214 elog "bindist enabled: H.264 video support will be disabled."
215 else
216 elog "bindist disabled: Resulting binaries may not be legal to re-distribute."
217 fi
218 }
219
220 src_prepare() {
221 # if ! use arm; then
222 # mkdir -p out/Release/gen/sdk/toolchain || die
223 # # Do not preserve SELinux context, bug #460892 .
224 # cp -a --no-preserve=context /usr/$(get_libdir)/nacl-toolchain-newlib \
225 # out/Release/gen/sdk/toolchain/linux_x86_newlib || die
226 # touch out/Release/gen/sdk/toolchain/linux_x86_newlib/stamp.untar || die
227 # fi
228
229 epatch "${FILESDIR}/${PN}-system-jinja-r7.patch"
230
231 epatch_user
232
233 # Remove most bundled libraries. Some are still needed.
234 build/linux/unbundle/remove_bundled_libraries.py \
235 'base/third_party/dmg_fp' \
236 'base/third_party/dynamic_annotations' \
237 'base/third_party/icu' \
238 'base/third_party/nspr' \
239 'base/third_party/superfasthash' \
240 'base/third_party/symbolize' \
241 'base/third_party/valgrind' \
242 'base/third_party/xdg_mime' \
243 'base/third_party/xdg_user_dirs' \
244 'breakpad/src/third_party/curl' \
245 'chrome/third_party/mozilla_security_manager' \
246 'courgette/third_party' \
247 'crypto/third_party/nss' \
248 'net/third_party/mozilla_security_manager' \
249 'net/third_party/nss' \
250 'third_party/WebKit' \
251 'third_party/angle' \
252 'third_party/angle/src/third_party/compiler' \
253 'third_party/brotli' \
254 'third_party/cacheinvalidation' \
255 'third_party/cld_2' \
256 'third_party/cros_system_api' \
257 'third_party/cython/python_flags.py' \
258 'third_party/dom_distiller_js' \
259 'third_party/dom_distiller_js/package/proto_gen/third_party/dom_distiller_js' \
260 'third_party/ffmpeg' \
261 'third_party/fips181' \
262 'third_party/flot' \
263 'third_party/hunspell' \
264 'third_party/iccjpeg' \
265 'third_party/jstemplate' \
266 'third_party/khronos' \
267 'third_party/leveldatabase' \
268 'third_party/libaddressinput' \
269 'third_party/libjingle' \
270 'third_party/libphonenumber' \
271 'third_party/libsrtp' \
272 'third_party/libusb' \
273 'third_party/libvpx' \
274 'third_party/libvpx/source/libvpx/third_party/x86inc' \
275 'third_party/libwebm' \
276 'third_party/libxml/chromium' \
277 'third_party/libXNVCtrl' \
278 'third_party/libyuv' \
279 'third_party/lss' \
280 'third_party/lzma_sdk' \
281 'third_party/mesa' \
282 'third_party/modp_b64' \
283 'third_party/mt19937ar' \
284 'third_party/npapi' \
285 'third_party/openmax_dl' \
286 'third_party/opus' \
287 'third_party/ots' \
288 'third_party/pdfium' \
289 'third_party/pdfium/third_party/logging.h' \
290 'third_party/pdfium/third_party/macros.h' \
291 'third_party/pdfium/third_party/numerics' \
292 'third_party/pdfium/third_party/template_util.h' \
293 'third_party/polymer' \
294 'third_party/protobuf' \
295 'third_party/qcms' \
296 'third_party/readability' \
297 'third_party/sfntly' \
298 'third_party/skia' \
299 'third_party/smhasher' \
300 'third_party/sqlite' \
301 'third_party/tcmalloc' \
302 'third_party/tlslite' \
303 'third_party/trace-viewer' \
304 'third_party/trace-viewer/third_party/components/polymer' \
305 'third_party/trace-viewer/third_party/d3' \
306 'third_party/trace-viewer/third_party/gl-matrix' \
307 'third_party/trace-viewer/third_party/jszip' \
308 'third_party/trace-viewer/third_party/tvcm' \
309 'third_party/trace-viewer/third_party/tvcm/third_party/beautifulsoup/polymer_soup.py' \
310 'third_party/undoview' \
311 'third_party/usrsctp' \
312 'third_party/webdriver' \
313 'third_party/webrtc' \
314 'third_party/widevine' \
315 'third_party/x86inc' \
316 'third_party/zlib/google' \
317 'url/third_party/mozilla' \
318 'v8/src/third_party/fdlibm' \
319 'v8/src/third_party/kernel' \
320 'v8/src/third_party/valgrind' \
321 --do-remove || die
322 }
323
324 src_configure() {
325 local myconf=""
326
327 # Never tell the build system to "enable" SSE2, it has a few unexpected
328 # additions, bug #336871.
329 myconf+=" -Ddisable_sse2=1"
330
331 # Disable nacl, we can't build without pnacl (http://crbug.com/269560).
332 myconf+=" -Ddisable_nacl=1"
333
334 # Disable glibc Native Client toolchain, we don't need it (bug #417019).
335 # myconf+=" -Ddisable_glibc=1"
336
337 # TODO: also build with pnacl
338 # myconf+=" -Ddisable_pnacl=1"
339
340 # It would be awkward for us to tar the toolchain and get it untarred again
341 # during the build.
342 # myconf+=" -Ddisable_newlib_untar=1"
343
344 # Make it possible to remove third_party/adobe.
345 echo > "${T}/flapper_version.h" || die
346 myconf+=" -Dflapper_version_h_file=${T}/flapper_version.h"
347
348 # Use system-provided libraries.
349 # TODO: use_system_hunspell (upstream changes needed).
350 # TODO: use_system_libsrtp (bug #459932).
351 # TODO: use_system_libvpx (http://crbug.com/347823).
352 # TODO: use_system_libusb (http://crbug.com/266149).
353 # TODO: use_system_opus (https://code.google.com/p/webrtc/issues/detail?id=3077).
354 # TODO: use_system_protobuf (bug #525560).
355 # TODO: use_system_ssl (http://crbug.com/58087).
356 # TODO: use_system_sqlite (http://crbug.com/22208).
357 myconf+="
358 -Duse_system_bzip2=1
359 -Duse_system_flac=1
360 -Duse_system_harfbuzz=1
361 -Duse_system_icu=1
362 -Duse_system_jsoncpp=1
363 -Duse_system_libevent=1
364 -Duse_system_libjpeg=1
365 -Duse_system_libpng=1
366 -Duse_system_libwebp=1
367 -Duse_system_libxml=1
368 -Duse_system_libxslt=1
369 -Duse_system_minizip=1
370 -Duse_system_nspr=1
371 -Duse_system_re2=1
372 -Duse_system_snappy=1
373 -Duse_system_speex=1
374 -Duse_system_xdg_utils=1
375 -Duse_system_zlib=1"
376
377 # Needed for system icu - we don't need additional data files.
378 myconf+=" -Dicu_use_data_file_flag=0"
379
380 # TODO: patch gyp so that this arm conditional is not needed.
381 if ! use arm; then
382 myconf+="
383 -Duse_system_yasm=1"
384 fi
385
386 # Optional dependencies.
387 # TODO: linux_link_kerberos, bug #381289.
388 myconf+="
389 $(gyp_use cups)
390 $(gyp_use gnome use_gconf)
391 $(gyp_use gnome-keyring use_gnome_keyring)
392 $(gyp_use gnome-keyring linux_link_gnome_keyring)
393 $(gyp_use kerberos)
394 $(gyp_use pulseaudio)
395 $(gyp_use tcmalloc use_allocator tcmalloc none)"
396
397 # Use explicit library dependencies instead of dlopen.
398 # This makes breakages easier to detect by revdep-rebuild.
399 myconf+="
400 -Dlinux_link_gsettings=1
401 -Dlinux_link_libpci=1
402 -Dlinux_link_libspeechd=1
403 -Dlibspeechd_h_prefix=speech-dispatcher/"
404
405 # TODO: use the file at run time instead of effectively compiling it in.
406 myconf+="
407 -Dusb_ids_path=/usr/share/misc/usb.ids"
408
409 # Save space by removing DLOG and DCHECK messages (about 6% reduction).
410 myconf+="
411 -Dlogging_like_official_build=1"
412
413 # Never use bundled gold binary. Disable gold linker flags for now.
414 # Do not use bundled clang.
415 myconf+="
416 -Dclang=0
417 -Dhost_clang=0
418 -Dlinux_use_bundled_binutils=0
419 -Dlinux_use_bundled_gold=0
420 -Dlinux_use_gold_flags=0"
421
422 # Always support proprietary codecs.
423 myconf+=" -Dproprietary_codecs=1"
424
425 ffmpeg_branding="Chromium"
426 if ! use bindist; then
427 # Enable H.264 support in bundled ffmpeg.
428 ffmpeg_branding="Chrome"
429 fi
430 myconf+=" -Dffmpeg_branding=${ffmpeg_branding}"
431
432 # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys .
433 # Note: these are for Gentoo use ONLY. For your own distribution,
434 # please get your own set of keys. Feel free to contact chromium@g.o
435 # for more info.
436 myconf+=" -Dgoogle_api_key=AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc
437 -Dgoogle_default_client_id=329227923882.apps.googleusercontent.com
438 -Dgoogle_default_client_secret=vgKG0NNv7GoDpbtoFNLxCUXu"
439
440 local myarch="$(tc-arch)"
441 if [[ $myarch = amd64 ]] ; then
442 target_arch=x64
443 ffmpeg_target_arch=x64
444 elif [[ $myarch = x86 ]] ; then
445 target_arch=ia32
446 ffmpeg_target_arch=ia32
447 elif [[ $myarch = arm ]] ; then
448 target_arch=arm
449 ffmpeg_target_arch=$(usex neon arm-neon arm)
450 # TODO: re-enable NaCl (NativeClient).
451 local CTARGET=${CTARGET:-${CHOST}}
452 if [[ $(tc-is-softfloat) == "no" ]]; then
453
454 myconf+=" -Darm_float_abi=hard"
455 fi
456 filter-flags "-mfpu=*"
457 use neon || myconf+=" -Darm_fpu=${ARM_FPU:-vfpv3-d16}"
458
459 if [[ ${CTARGET} == armv[78]* ]]; then
460 myconf+=" -Darmv7=1"
461 else
462 myconf+=" -Darmv7=0"
463 fi
464 myconf+=" -Dsysroot=
465 $(gyp_use neon arm_neon)
466 -Ddisable_nacl=1"
467 else
468 die "Failed to determine target arch, got '$myarch'."
469 fi
470
471 myconf+=" -Dtarget_arch=${target_arch}"
472
473 # Make sure that -Werror doesn't get added to CFLAGS by the build system.
474 # Depending on GCC version the warnings are different and we don't want
475 # the build to fail because of that.
476 myconf+=" -Dwerror="
477
478 # Disable fatal linker warnings, bug 506268.
479 myconf+=" -Ddisable_fatal_linker_warnings=1"
480
481 # Avoid CFLAGS problems, bug #352457, bug #390147.
482 if ! use custom-cflags; then
483 replace-flags "-Os" "-O2"
484 strip-flags
485
486 # Prevent linker from running out of address space, bug #471810 .
487 if use x86; then
488 filter-flags "-g*"
489 fi
490 fi
491
492 # Make sure the build system will use the right tools, bug #340795.
493 tc-export AR CC CXX RANLIB
494
495 # Tools for building programs to be executed on the build system, bug #410883.
496 export AR_host=$(tc-getBUILD_AR)
497 export CC_host=$(tc-getBUILD_CC)
498 export CXX_host=$(tc-getBUILD_CXX)
499 export LD_host=${CXX_host}
500
501 # Bug 491582.
502 export TMPDIR="${WORKDIR}/temp"
503 mkdir -m 755 "${TMPDIR}" || die
504
505 local build_ffmpeg_args=""
506 if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then
507 build_ffmpeg_args+=" --disable-asm"
508 fi
509
510 # Re-configure bundled ffmpeg. See bug #491378 for example reasons.
511 einfo "Configuring bundled ffmpeg..."
512 pushd third_party/ffmpeg > /dev/null || die
513 chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \
514 --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die
515 chromium/scripts/copy_config.sh || die
516 chromium/scripts/generate_gyp.py || die
517 popd > /dev/null || die
518
519 third_party/libaddressinput/chromium/tools/update-strings.py || die
520
521 einfo "Configuring Chromium..."
522 build/linux/unbundle/replace_gyp_files.py ${myconf} || die
523 egyp_chromium ${myconf} || die
524 }
525
526 eninja() {
527 if [[ -z ${NINJAOPTS+set} ]]; then
528 local jobs=$(makeopts_jobs)
529 local loadavg=$(makeopts_loadavg)
530
531 if [[ ${MAKEOPTS} == *-j* && ${jobs} != 999 ]]; then
532 NINJAOPTS+=" -j ${jobs}"
533 fi
534 if [[ ${MAKEOPTS} == *-l* && ${loadavg} != 999 ]]; then
535 NINJAOPTS+=" -l ${loadavg}"
536 fi
537 fi
538 set -- ninja -v ${NINJAOPTS} "$@"
539 echo "$@"
540 "$@"
541 }
542
543 src_compile() {
544 local ninja_targets="chrome chrome_sandbox chromedriver"
545
546 # Build mksnapshot and pax-mark it.
547 eninja -C out/Release mksnapshot || die
548 pax-mark m out/Release/mksnapshot
549
550 # Even though ninja autodetects number of CPUs, we respect
551 # user's options, for debugging with -j 1 or any other reason.
552 eninja -C out/Release ${ninja_targets} || die
553
554 pax-mark m out/Release/chrome
555 }
556
557 src_install() {
558 exeinto "${CHROMIUM_HOME}"
559 doexe out/Release/chrome || die
560
561 newexe out/Release/chrome_sandbox chrome-sandbox || die
562 fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
563
564 doexe out/Release/chromedriver || die
565
566 # if ! use arm; then
567 # doexe out/Release/nacl_helper{,_bootstrap} || die
568 # insinto "${CHROMIUM_HOME}"
569 # doins out/Release/nacl_irt_*.nexe || die
570 # doins out/Release/libppGoogleNaClPluginChrome.so || die
571 # fi
572
573 local sedargs=( -e "s:/usr/lib/:/usr/$(get_libdir)/:g" )
574 if [[ -n ${CHROMIUM_SUFFIX} ]]; then
575 sedargs+=(
576 -e "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g"
577 -e "s:chromium.desktop:chromium${CHROMIUM_SUFFIX}.desktop:g"
578 -e "s:plugins:plugins --user-data-dir=\${HOME}/.config/chromium${CHROMIUM_SUFFIX}:"
579 )
580 fi
581 sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r3.sh" > chromium-launcher.sh || die
582 doexe chromium-launcher.sh
583
584 # It is important that we name the target "chromium-browser",
585 # xdg-utils expect it; bug #355517.
586 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser${CHROMIUM_SUFFIX} || die
587 # keep the old symlink around for consistency
588 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium${CHROMIUM_SUFFIX} || die
589
590 dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver${CHROMIUM_SUFFIX} || die
591
592 # Allow users to override command-line options, bug #357629.
593 dodir /etc/chromium || die
594 insinto /etc/chromium
595 newins "${FILESDIR}/chromium.default" "default" || die
596
597 pushd out/Release/locales > /dev/null || die
598 chromium_remove_language_paks
599 popd
600
601 insinto "${CHROMIUM_HOME}"
602 doins out/Release/*.pak || die
603
604 doins -r out/Release/locales || die
605 doins -r out/Release/resources || die
606
607 newman out/Release/chrome.1 chromium${CHROMIUM_SUFFIX}.1 || die
608 newman out/Release/chrome.1 chromium-browser${CHROMIUM_SUFFIX}.1 || die
609
610 doexe out/Release/libffmpegsumo.so || die
611 doexe out/Release/libpdf.so || die
612
613 # Install icons and desktop entry.
614 local branding size
615 for size in 16 22 24 32 48 64 128 256 ; do
616 case ${size} in
617 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
618 *) branding="chrome/app/theme/chromium" ;;
619 esac
620 newicon -s ${size} "${branding}/product_logo_${size}.png" \
621 chromium-browser${CHROMIUM_SUFFIX}.png
622 done
623
624 local mime_types="text/html;text/xml;application/xhtml+xml;"
625 mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797
626 mime_types+="x-scheme-handler/ftp;" # bug #412185
627 mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393
628 make_desktop_entry \
629 chromium-browser${CHROMIUM_SUFFIX} \
630 "Chromium${CHROMIUM_SUFFIX}" \
631 chromium-browser${CHROMIUM_SUFFIX} \
632 "Network;WebBrowser" \
633 "MimeType=${mime_types}\nStartupWMClass=chromium-browser"
634 sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die
635
636 # Install GNOME default application entry (bug #303100).
637 if use gnome; then
638 dodir /usr/share/gnome-control-center/default-apps || die
639 insinto /usr/share/gnome-control-center/default-apps
640 newins "${FILESDIR}"/chromium-browser.xml chromium-browser${CHROMIUM_SUFFIX}.xml || die
641 if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then
642 sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" -i \
643 "${ED}"/usr/share/gnome-control-center/default-apps/chromium-browser${CHROMIUM_SUFFIX}.xml
644 fi
645 fi
646
647 readme.gentoo_create_doc
648 }
649
650 pkg_postinst() {
651 fdo-mime_desktop_database_update
652 gnome2_icon_cache_update
653 readme.gentoo_print_elog
654 }