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