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