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.2138.3.ebuild
Date: Fri, 29 Aug 2014 18:28:05
Message-Id: 20140829182800.5DA404308@oystercatcher.gentoo.org
1 phajdan.jr 14/08/29 18:28:00
2
3 Modified: ChangeLog
4 Added: chromium-39.0.2138.3.ebuild
5 Log:
6 Dev channel bump.
7
8 (Portage version: 2.2.8-r1/cvs/Linux i686, signed Manifest commit with key 0x4F1A2555EA71991D!)
9
10 Revision Changes Path
11 1.1127 www-client/chromium/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.1127&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.1127&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?r1=1.1126&r2=1.1127
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v
20 retrieving revision 1.1126
21 retrieving revision 1.1127
22 diff -u -r1.1126 -r1.1127
23 --- ChangeLog 29 Aug 2014 17:39:01 -0000 1.1126
24 +++ ChangeLog 29 Aug 2014 18:28:00 -0000 1.1127
25 @@ -1,6 +1,12 @@
26 # ChangeLog for www-client/chromium
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.1126 2014/08/29 17:39:01 phajdan.jr Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.1127 2014/08/29 18:28:00 phajdan.jr Exp $
30 +
31 +*chromium-39.0.2138.3 (29 Aug 2014)
32 +
33 + 29 Aug 2014; Pawel Hajdan jr <phajdan.jr@g.o>
34 + +chromium-39.0.2138.3.ebuild:
35 + Dev channel bump.
36
37 *chromium-38.0.2125.24 (22 Aug 2014)
38
39
40
41
42 1.1 www-client/chromium/chromium-39.0.2138.3.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-39.0.2138.3.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-39.0.2138.3.ebuild?rev=1.1&content-type=text/plain
46
47 Index: chromium-39.0.2138.3.ebuild
48 ===================================================================
49 # Copyright 1999-2014 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-39.0.2138.3.ebuild,v 1.1 2014/08/29 18:28:00 phajdan.jr Exp $
52
53 EAPI="5"
54 PYTHON_COMPAT=( python{2_6,2_7} )
55
56 CHROMIUM_LANGS="am ar bg bn ca cs da de el en_GB es es_LA et fa fi fil fr gu he
57 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
58 sv sw ta te th tr uk vi zh_CN zh_TW"
59
60 inherit chromium eutils flag-o-matic multilib multiprocessing pax-utils \
61 portability python-any-r1 readme.gentoo toolchain-funcs versionator virtualx
62
63 DESCRIPTION="Open-source version of Google Chrome web browser"
64 HOMEPAGE="http://chromium.org/"
65 SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.xz"
66
67 LICENSE="BSD"
68 SLOT="0"
69 KEYWORDS="~amd64 ~arm ~x86"
70 IUSE="bindist cups gnome gnome-keyring kerberos neon pic pulseaudio selinux +tcmalloc"
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 selinux? ( sec-policy/selinux-chromium )"
134 DEPEND="${RDEPEND}
135 !arm? (
136 dev-lang/yasm
137 )
138 dev-lang/perl
139 dev-perl/JSON
140 >=dev-util/gperf-3.0.3
141 dev-util/ninja
142 sys-apps/hwids[usb(+)]
143 >=sys-devel/bison-2.4.3
144 sys-devel/flex
145 virtual/pkgconfig"
146 # For nvidia-drivers blocker, see bug #413637 .
147 RDEPEND+="
148 !=www-client/chromium-9999
149 !<www-plugins/chrome-binary-plugins-37
150 x11-misc/xdg-utils
151 virtual/opengl
152 virtual/ttf-fonts
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/jinja[${PYTHON_USEDEP}]
159 dev-python/ply[${PYTHON_USEDEP}]
160 dev-python/simplejson[${PYTHON_USEDEP}]
161 ')"
162 python_check_deps() {
163 has_version "dev-python/jinja[${PYTHON_USEDEP}]" && \
164 has_version "dev-python/ply[${PYTHON_USEDEP}]" && \
165 has_version "dev-python/simplejson[${PYTHON_USEDEP}]"
166 }
167
168 if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
169 EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
170 fi
171
172 DISABLE_AUTOFORMATTING="yes"
173 DOC_CONTENTS="
174 Some web pages may require additional fonts to display properly.
175 Try installing some of the following packages if some characters
176 are not displayed properly:
177 - media-fonts/arphicfonts
178 - media-fonts/bitstream-cyberbit
179 - media-fonts/droid
180 - media-fonts/ipamonafont
181 - media-fonts/ja-ipafonts
182 - media-fonts/takao-fonts
183 - media-fonts/wqy-microhei
184 - media-fonts/wqy-zenhei
185
186 Depending on your desktop environment, you may need
187 to install additional packages to get icons on the Downloads page.
188
189 For KDE, the required package is kde-base/oxygen-icons.
190
191 For other desktop environments, try one of the following:
192 - x11-themes/gnome-icon-theme
193 - x11-themes/tango-icon-theme
194 "
195
196 pkg_setup() {
197 if [[ "${SLOT}" == "0" ]]; then
198 CHROMIUM_SUFFIX=""
199 else
200 CHROMIUM_SUFFIX="-${SLOT}"
201 fi
202 CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser${CHROMIUM_SUFFIX}"
203
204 # Make sure the build system will use the right python, bug #344367.
205 python-any-r1_pkg_setup
206
207 chromium_suid_sandbox_check_kernel_config
208
209 if use bindist; then
210 elog "bindist enabled: H.264 video support will be disabled."
211 else
212 elog "bindist disabled: Resulting binaries may not be legal to re-distribute."
213 fi
214 }
215
216 src_prepare() {
217 # if ! use arm; then
218 # mkdir -p out/Release/gen/sdk/toolchain || die
219 # # Do not preserve SELinux context, bug #460892 .
220 # cp -a --no-preserve=context /usr/$(get_libdir)/nacl-toolchain-newlib \
221 # out/Release/gen/sdk/toolchain/linux_x86_newlib || die
222 # touch out/Release/gen/sdk/toolchain/linux_x86_newlib/stamp.untar || die
223 # fi
224
225 epatch "${FILESDIR}/${PN}-system-jinja-r6.patch"
226
227 epatch_user
228
229 # Remove most bundled libraries. Some are still needed.
230 build/linux/unbundle/remove_bundled_libraries.py \
231 'base/third_party/dmg_fp' \
232 'base/third_party/dynamic_annotations' \
233 'base/third_party/icu' \
234 'base/third_party/nspr' \
235 'base/third_party/superfasthash' \
236 'base/third_party/symbolize' \
237 'base/third_party/valgrind' \
238 'base/third_party/xdg_mime' \
239 'base/third_party/xdg_user_dirs' \
240 'breakpad/src/third_party/curl' \
241 'chrome/third_party/mozilla_security_manager' \
242 'courgette/third_party' \
243 'crypto/third_party/nss' \
244 'net/third_party/mozilla_security_manager' \
245 'net/third_party/nss' \
246 'third_party/WebKit' \
247 'third_party/angle' \
248 'third_party/angle/src/third_party/compiler' \
249 'third_party/brotli' \
250 'third_party/cacheinvalidation' \
251 'third_party/cld_2' \
252 'third_party/cros_system_api' \
253 'third_party/cython/python_flags.py' \
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 }