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