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-39.0.2171.42.ebuild ChangeLog chromium-39.0.2171.27.ebuild
Date: Thu, 30 Oct 2014 09:02:36
Message-Id: 20141030090231.B337390EE@oystercatcher.gentoo.org
1 floppym 14/10/30 09:02:31
2
3 Modified: ChangeLog
4 Added: chromium-39.0.2171.42.ebuild
5 Removed: chromium-39.0.2171.27.ebuild
6 Log:
7 Beta channel bump.
8
9 (Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4)
10
11 Revision Changes Path
12 1.1159 www-client/chromium/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.1159&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.1159&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?r1=1.1158&r2=1.1159
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v
21 retrieving revision 1.1158
22 retrieving revision 1.1159
23 diff -u -r1.1158 -r1.1159
24 --- ChangeLog 30 Oct 2014 02:54:55 -0000 1.1158
25 +++ ChangeLog 30 Oct 2014 09:02:31 -0000 1.1159
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.1158 2014/10/30 02:54:55 floppym Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.1159 2014/10/30 09:02:31 floppym Exp $
31 +
32 +*chromium-39.0.2171.42 (30 Oct 2014)
33 +
34 + 30 Oct 2014; Mike Gilbert <floppym@g.o> +chromium-39.0.2171.42.ebuild,
35 + -chromium-39.0.2171.27.ebuild:
36 + Beta channel bump.
37
38 *chromium-38.0.2125.111 (30 Oct 2014)
39
40
41
42
43 1.1 www-client/chromium/chromium-39.0.2171.42.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-39.0.2171.42.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-39.0.2171.42.ebuild?rev=1.1&content-type=text/plain
47
48 Index: chromium-39.0.2171.42.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-39.0.2171.42.ebuild,v 1.1 2014/10/30 09:02:31 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}-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
73 # Native Client binaries are compiled with different set of flags, bug #452066.
74 QA_FLAGS_IGNORED=".*\.nexe"
75
76 # Native Client binaries may be stripped by the build system, which uses the
77 # right tools for it, bug #469144 .
78 QA_PRESTRIPPED=".*\.nexe"
79
80 RDEPEND=">=app-accessibility/speech-dispatcher-0.8:=
81 app-arch/bzip2:=
82 app-arch/snappy:=
83 cups? (
84 dev-libs/libgcrypt:0=
85 >=net-print/cups-1.3.11:=
86 )
87 >=dev-libs/elfutils-0.149
88 dev-libs/expat:=
89 dev-libs/glib:=
90 dev-libs/icu:=
91 >=dev-libs/jsoncpp-0.5.0-r1:=
92 >=dev-libs/libevent-1.4.13:=
93 dev-libs/libxml2:=[icu]
94 dev-libs/libxslt:=
95 dev-libs/nspr:=
96 >=dev-libs/nss-3.14.3:=
97 >=dev-libs/protobuf-2.5.0-r1:=
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}-gcc-4.7-r0.patch"
230 epatch "${FILESDIR}/${PN}-system-jinja-r7.patch"
231
232 epatch_user
233
234 # Remove most bundled libraries. Some are still needed.
235 build/linux/unbundle/remove_bundled_libraries.py \
236 'base/third_party/dmg_fp' \
237 'base/third_party/dynamic_annotations' \
238 'base/third_party/icu' \
239 'base/third_party/nspr' \
240 'base/third_party/superfasthash' \
241 'base/third_party/symbolize' \
242 'base/third_party/valgrind' \
243 'base/third_party/xdg_mime' \
244 'base/third_party/xdg_user_dirs' \
245 'breakpad/src/third_party/curl' \
246 'chrome/third_party/mozilla_security_manager' \
247 'courgette/third_party' \
248 'crypto/third_party/nss' \
249 'net/third_party/mozilla_security_manager' \
250 'net/third_party/nss' \
251 'third_party/WebKit' \
252 'third_party/angle' \
253 'third_party/angle/src/third_party/compiler' \
254 'third_party/brotli' \
255 'third_party/cacheinvalidation' \
256 'third_party/cld_2' \
257 'third_party/cros_system_api' \
258 'third_party/cython/python_flags.py' \
259 'third_party/dom_distiller_js' \
260 'third_party/dom_distiller_js/package/proto_gen/third_party/dom_distiller_js' \
261 'third_party/ffmpeg' \
262 'third_party/fips181' \
263 'third_party/flot' \
264 'third_party/hunspell' \
265 'third_party/iccjpeg' \
266 'third_party/jstemplate' \
267 'third_party/khronos' \
268 'third_party/leveldatabase' \
269 'third_party/libaddressinput' \
270 'third_party/libjingle' \
271 'third_party/libphonenumber' \
272 'third_party/libsrtp' \
273 'third_party/libusb' \
274 'third_party/libvpx' \
275 'third_party/libvpx/source/libvpx/third_party/x86inc' \
276 'third_party/libwebm' \
277 'third_party/libxml/chromium' \
278 'third_party/libXNVCtrl' \
279 'third_party/libyuv' \
280 'third_party/lss' \
281 'third_party/lzma_sdk' \
282 'third_party/mesa' \
283 'third_party/modp_b64' \
284 'third_party/mt19937ar' \
285 'third_party/npapi' \
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/qcms' \
295 'third_party/readability' \
296 'third_party/sfntly' \
297 'third_party/skia' \
298 'third_party/smhasher' \
299 'third_party/sqlite' \
300 'third_party/tcmalloc' \
301 'third_party/tlslite' \
302 'third_party/trace-viewer' \
303 'third_party/trace-viewer/third_party/jszip' \
304 'third_party/trace-viewer/third_party/tvcm' \
305 'third_party/trace-viewer/third_party/tvcm/third_party/d3' \
306 'third_party/trace-viewer/third_party/tvcm/third_party/gl-matrix' \
307 'third_party/trace-viewer/third_party/tvcm/third_party/polymer' \
308 'third_party/undoview' \
309 'third_party/usrsctp' \
310 'third_party/webdriver' \
311 'third_party/webrtc' \
312 'third_party/widevine' \
313 'third_party/x86inc' \
314 'third_party/zlib/google' \
315 'url/third_party/mozilla' \
316 'v8/src/third_party/kernel' \
317 'v8/src/third_party/valgrind' \
318 'v8/third_party/fdlibm' \
319 --do-remove || die
320 }
321
322 src_configure() {
323 local myconf=""
324
325 # Never tell the build system to "enable" SSE2, it has a few unexpected
326 # additions, bug #336871.
327 myconf+=" -Ddisable_sse2=1"
328
329 # Disable nacl, we can't build without pnacl (http://crbug.com/269560).
330 myconf+=" -Ddisable_nacl=1"
331
332 # Disable glibc Native Client toolchain, we don't need it (bug #417019).
333 # myconf+=" -Ddisable_glibc=1"
334
335 # TODO: also build with pnacl
336 # myconf+=" -Ddisable_pnacl=1"
337
338 # It would be awkward for us to tar the toolchain and get it untarred again
339 # during the build.
340 # myconf+=" -Ddisable_newlib_untar=1"
341
342 # Make it possible to remove third_party/adobe.
343 echo > "${T}/flapper_version.h" || die
344 myconf+=" -Dflapper_version_h_file=${T}/flapper_version.h"
345
346 # Use system-provided libraries.
347 # TODO: use_system_hunspell (upstream changes needed).
348 # TODO: use_system_libsrtp (bug #459932).
349 # TODO: use_system_libvpx (http://crbug.com/347823).
350 # TODO: use_system_libusb (http://crbug.com/266149).
351 # TODO: use_system_opus (https://code.google.com/p/webrtc/issues/detail?id=3077).
352 # TODO: use_system_ssl (http://crbug.com/58087).
353 # TODO: use_system_sqlite (http://crbug.com/22208).
354 myconf+="
355 -Duse_system_bzip2=1
356 -Duse_system_flac=1
357 -Duse_system_harfbuzz=1
358 -Duse_system_icu=1
359 -Duse_system_jsoncpp=1
360 -Duse_system_libevent=1
361 -Duse_system_libjpeg=1
362 -Duse_system_libpng=1
363 -Duse_system_libwebp=1
364 -Duse_system_libxml=1
365 -Duse_system_libxslt=1
366 -Duse_system_minizip=1
367 -Duse_system_nspr=1
368 -Duse_system_protobuf=1
369 -Duse_system_re2=1
370 -Duse_system_snappy=1
371 -Duse_system_speex=1
372 -Duse_system_xdg_utils=1
373 -Duse_system_zlib=1"
374
375 # Needed for system icu - we don't need additional data files.
376 myconf+=" -Dicu_use_data_file_flag=0"
377
378 # TODO: patch gyp so that this arm conditional is not needed.
379 if ! use arm; then
380 myconf+="
381 -Duse_system_yasm=1"
382 fi
383
384 # Optional dependencies.
385 # TODO: linux_link_kerberos, bug #381289.
386 myconf+="
387 $(gyp_use cups)
388 $(gyp_use gnome use_gconf)
389 $(gyp_use gnome-keyring use_gnome_keyring)
390 $(gyp_use gnome-keyring linux_link_gnome_keyring)
391 $(gyp_use kerberos)
392 $(gyp_use pulseaudio)
393 $(gyp_use tcmalloc use_allocator tcmalloc none)"
394
395 # Use explicit library dependencies instead of dlopen.
396 # This makes breakages easier to detect by revdep-rebuild.
397 myconf+="
398 -Dlinux_link_gsettings=1
399 -Dlinux_link_libpci=1
400 -Dlinux_link_libspeechd=1
401 -Dlibspeechd_h_prefix=speech-dispatcher/"
402
403 # TODO: use the file at run time instead of effectively compiling it in.
404 myconf+="
405 -Dusb_ids_path=/usr/share/misc/usb.ids"
406
407 # Save space by removing DLOG and DCHECK messages (about 6% reduction).
408 myconf+="
409 -Dlogging_like_official_build=1"
410
411 # Never use bundled gold binary. Disable gold linker flags for now.
412 # Do not use bundled clang.
413 myconf+="
414 -Dclang=0
415 -Dhost_clang=0
416 -Dlinux_use_bundled_binutils=0
417 -Dlinux_use_bundled_gold=0
418 -Dlinux_use_gold_flags=0"
419
420 # Always support proprietary codecs.
421 myconf+=" -Dproprietary_codecs=1"
422
423 ffmpeg_branding="Chromium"
424 if ! use bindist; then
425 # Enable H.264 support in bundled ffmpeg.
426 ffmpeg_branding="Chrome"
427 fi
428 myconf+=" -Dffmpeg_branding=${ffmpeg_branding}"
429
430 # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys .
431 # Note: these are for Gentoo use ONLY. For your own distribution,
432 # please get your own set of keys. Feel free to contact chromium@g.o
433 # for more info.
434 myconf+=" -Dgoogle_api_key=AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc
435 -Dgoogle_default_client_id=329227923882.apps.googleusercontent.com
436 -Dgoogle_default_client_secret=vgKG0NNv7GoDpbtoFNLxCUXu"
437
438 local myarch="$(tc-arch)"
439 if [[ $myarch = amd64 ]] ; then
440 target_arch=x64
441 ffmpeg_target_arch=x64
442 elif [[ $myarch = x86 ]] ; then
443 target_arch=ia32
444 ffmpeg_target_arch=ia32
445 elif [[ $myarch = arm ]] ; then
446 target_arch=arm
447 ffmpeg_target_arch=$(usex neon arm-neon arm)
448 # TODO: re-enable NaCl (NativeClient).
449 local CTARGET=${CTARGET:-${CHOST}}
450 if [[ $(tc-is-softfloat) == "no" ]]; then
451
452 myconf+=" -Darm_float_abi=hard"
453 fi
454 filter-flags "-mfpu=*"
455 use neon || myconf+=" -Darm_fpu=${ARM_FPU:-vfpv3-d16}"
456
457 if [[ ${CTARGET} == armv[78]* ]]; then
458 myconf+=" -Darmv7=1"
459 else
460 myconf+=" -Darmv7=0"
461 fi
462 myconf+=" -Dsysroot=
463 $(gyp_use neon arm_neon)
464 -Ddisable_nacl=1"
465 else
466 die "Failed to determine target arch, got '$myarch'."
467 fi
468
469 myconf+=" -Dtarget_arch=${target_arch}"
470
471 # Make sure that -Werror doesn't get added to CFLAGS by the build system.
472 # Depending on GCC version the warnings are different and we don't want
473 # the build to fail because of that.
474 myconf+=" -Dwerror="
475
476 # Disable fatal linker warnings, bug 506268.
477 myconf+=" -Ddisable_fatal_linker_warnings=1"
478
479 # Avoid CFLAGS problems, bug #352457, bug #390147.
480 if ! use custom-cflags; then
481 replace-flags "-Os" "-O2"
482 strip-flags
483
484 # Prevent linker from running out of address space, bug #471810 .
485 if use x86; then
486 filter-flags "-g*"
487 fi
488 fi
489
490 # Make sure the build system will use the right tools, bug #340795.
491 tc-export AR CC CXX RANLIB
492
493 # Tools for building programs to be executed on the build system, bug #410883.
494 export AR_host=$(tc-getBUILD_AR)
495 export CC_host=$(tc-getBUILD_CC)
496 export CXX_host=$(tc-getBUILD_CXX)
497 export LD_host=${CXX_host}
498
499 # Bug 491582.
500 export TMPDIR="${WORKDIR}/temp"
501 mkdir -m 755 "${TMPDIR}" || die
502
503 local build_ffmpeg_args=""
504 if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then
505 build_ffmpeg_args+=" --disable-asm"
506 fi
507
508 # Re-configure bundled ffmpeg. See bug #491378 for example reasons.
509 einfo "Configuring bundled ffmpeg..."
510 pushd third_party/ffmpeg > /dev/null || die
511 chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \
512 --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die
513 chromium/scripts/copy_config.sh || die
514 chromium/scripts/generate_gyp.py || die
515 popd > /dev/null || die
516
517 third_party/libaddressinput/chromium/tools/update-strings.py || die
518
519 einfo "Configuring Chromium..."
520 build/linux/unbundle/replace_gyp_files.py ${myconf} || die
521 egyp_chromium ${myconf} || die
522 }
523
524 eninja() {
525 if [[ -z ${NINJAOPTS+set} ]]; then
526 local jobs=$(makeopts_jobs)
527 local loadavg=$(makeopts_loadavg)
528
529 if [[ ${MAKEOPTS} == *-j* && ${jobs} != 999 ]]; then
530 NINJAOPTS+=" -j ${jobs}"
531 fi
532 if [[ ${MAKEOPTS} == *-l* && ${loadavg} != 999 ]]; then
533 NINJAOPTS+=" -l ${loadavg}"
534 fi
535 fi
536 set -- ninja -v ${NINJAOPTS} "$@"
537 echo "$@"
538 "$@"
539 }
540
541 src_compile() {
542 local ninja_targets="chrome chrome_sandbox chromedriver"
543
544 # Build mksnapshot and pax-mark it.
545 eninja -C out/Release mksnapshot || die
546 pax-mark m out/Release/mksnapshot
547
548 # Even though ninja autodetects number of CPUs, we respect
549 # user's options, for debugging with -j 1 or any other reason.
550 eninja -C out/Release ${ninja_targets} || die
551
552 pax-mark m out/Release/chrome
553 }
554
555 src_install() {
556 exeinto "${CHROMIUM_HOME}"
557 doexe out/Release/chrome || die
558
559 newexe out/Release/chrome_sandbox chrome-sandbox || die
560 fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
561
562 doexe out/Release/chromedriver || die
563
564 # if ! use arm; then
565 # doexe out/Release/nacl_helper{,_bootstrap} || die
566 # insinto "${CHROMIUM_HOME}"
567 # doins out/Release/nacl_irt_*.nexe || die
568 # doins out/Release/libppGoogleNaClPluginChrome.so || die
569 # fi
570
571 local sedargs=( -e "s:/usr/lib/:/usr/$(get_libdir)/:g" )
572 if [[ -n ${CHROMIUM_SUFFIX} ]]; then
573 sedargs+=(
574 -e "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g"
575 -e "s:chromium.desktop:chromium${CHROMIUM_SUFFIX}.desktop:g"
576 -e "s:plugins:plugins --user-data-dir=\${HOME}/.config/chromium${CHROMIUM_SUFFIX}:"
577 )
578 fi
579 sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r3.sh" > chromium-launcher.sh || die
580 doexe chromium-launcher.sh
581
582 # It is important that we name the target "chromium-browser",
583 # xdg-utils expect it; bug #355517.
584 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser${CHROMIUM_SUFFIX} || die
585 # keep the old symlink around for consistency
586 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium${CHROMIUM_SUFFIX} || die
587
588 dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver${CHROMIUM_SUFFIX} || die
589
590 # Allow users to override command-line options, bug #357629.
591 dodir /etc/chromium || die
592 insinto /etc/chromium
593 newins "${FILESDIR}/chromium.default" "default" || die
594
595 pushd out/Release/locales > /dev/null || die
596 chromium_remove_language_paks
597 popd
598
599 insinto "${CHROMIUM_HOME}"
600 doins out/Release/*.pak || die
601
602 doins -r out/Release/locales || die
603 doins -r out/Release/resources || die
604
605 newman out/Release/chrome.1 chromium${CHROMIUM_SUFFIX}.1 || die
606 newman out/Release/chrome.1 chromium-browser${CHROMIUM_SUFFIX}.1 || die
607
608 doexe out/Release/libffmpegsumo.so || die
609 doexe out/Release/libpdf.so || die
610
611 # Install icons and desktop entry.
612 local branding size
613 for size in 16 22 24 32 48 64 128 256 ; do
614 case ${size} in
615 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
616 *) branding="chrome/app/theme/chromium" ;;
617 esac
618 newicon -s ${size} "${branding}/product_logo_${size}.png" \
619 chromium-browser${CHROMIUM_SUFFIX}.png
620 done
621
622 local mime_types="text/html;text/xml;application/xhtml+xml;"
623 mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797
624 mime_types+="x-scheme-handler/ftp;" # bug #412185
625 mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393
626 make_desktop_entry \
627 chromium-browser${CHROMIUM_SUFFIX} \
628 "Chromium${CHROMIUM_SUFFIX}" \
629 chromium-browser${CHROMIUM_SUFFIX} \
630 "Network;WebBrowser" \
631 "MimeType=${mime_types}\nStartupWMClass=chromium-browser"
632 sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die
633
634 # Install GNOME default application entry (bug #303100).
635 if use gnome; then
636 dodir /usr/share/gnome-control-center/default-apps || die
637 insinto /usr/share/gnome-control-center/default-apps
638 newins "${FILESDIR}"/chromium-browser.xml chromium-browser${CHROMIUM_SUFFIX}.xml || die
639 if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then
640 sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" -i \
641 "${ED}"/usr/share/gnome-control-center/default-apps/chromium-browser${CHROMIUM_SUFFIX}.xml
642 fi
643 fi
644
645 readme.gentoo_create_doc
646 }
647
648 pkg_postinst() {
649 fdo-mime_desktop_database_update
650 gnome2_icon_cache_update
651 readme.gentoo_print_elog
652 }