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