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