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