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.2438.3.ebuild chromium-45.0.2427.7.ebuild
Date: Wed, 24 Jun 2015 21:22:58
Message-Id: 20150624212244.87C83A51@oystercatcher.gentoo.org
1 phajdan.jr 15/06/24 21:22:44
2
3 Modified: ChangeLog
4 Added: chromium-45.0.2438.3.ebuild
5 Removed: chromium-45.0.2427.7.ebuild
6 Log:
7 Dev channel bump. Use system icu. Use lite tarball. Remove old.
8
9 (Portage version: 2.2.14/cvs/Linux i686, signed Manifest commit with key 0x4F1A2555EA71991D!)
10
11 Revision Changes Path
12 1.1261 www-client/chromium/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.1261&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.1261&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?r1=1.1260&r2=1.1261
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v
21 retrieving revision 1.1260
22 retrieving revision 1.1261
23 diff -u -r1.1260 -r1.1261
24 --- ChangeLog 24 Jun 2015 08:17:07 -0000 1.1260
25 +++ ChangeLog 24 Jun 2015 21:22:44 -0000 1.1261
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.1260 2015/06/24 08:17:07 ago Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.1261 2015/06/24 21:22:44 phajdan.jr Exp $
31 +
32 +*chromium-45.0.2438.3 (24 Jun 2015)
33 +
34 + 24 Jun 2015; Pawel Hajdan jr <phajdan.jr@g.o>
35 + -chromium-45.0.2427.7.ebuild, +chromium-45.0.2438.3.ebuild:
36 + Dev channel bump. Use system icu. Use lite tarball. Remove old.
37
38 24 Jun 2015; Agostino Sarubbo <ago@g.o> chromium-43.0.2357.130.ebuild:
39 Stable for x86, wrt bug #552904
40
41
42
43 1.1 www-client/chromium/chromium-45.0.2438.3.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-45.0.2438.3.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-45.0.2438.3.ebuild?rev=1.1&content-type=text/plain
47
48 Index: chromium-45.0.2438.3.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-45.0.2438.3.ebuild,v 1.1 2015/06/24 21:22:44 phajdan.jr 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}-lite.tar.xz"
67
68 LICENSE="BSD hotwording? ( no-source-code )"
69 SLOT="0"
70 KEYWORDS="~amd64 ~arm ~x86"
71 IUSE="cups gnome gnome-keyring hidpi hotwording 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/icu-55.1:=
89 >=dev-libs/jsoncpp-0.5.0-r1:=
90 >=dev-libs/libevent-1.4.13:=
91 dev-libs/libxml2:=[icu]
92 dev-libs/libxslt:=
93 dev-libs/nspr:=
94 >=dev-libs/nss-3.14.3:=
95 dev-libs/re2:=
96 gnome? ( >=gnome-base/gconf-2.24.0:= )
97 gnome-keyring? ( >=gnome-base/libgnome-keyring-3.12:= )
98 >=media-libs/alsa-lib-1.0.19:=
99 media-libs/flac:=
100 media-libs/fontconfig:=
101 media-libs/freetype:=
102 media-libs/harfbuzz:=[icu(+)]
103 media-libs/libexif:=
104 >=media-libs/libjpeg-turbo-1.2.0-r1:=
105 media-libs/libpng:0=
106 >=media-libs/libwebp-0.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-apps/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/devscripts' \
270 'third_party/dom_distiller_js' \
271 'third_party/dom_distiller_js/dist/proto_gen/third_party/dom_distiller_js' \
272 'third_party/ffmpeg' \
273 'third_party/fips181' \
274 'third_party/flot' \
275 'third_party/google_input_tools' \
276 'third_party/google_input_tools/third_party/closure_library' \
277 'third_party/google_input_tools/third_party/closure_library/third_party/closure' \
278 'third_party/hunspell' \
279 'third_party/iccjpeg' \
280 'third_party/jstemplate' \
281 'third_party/khronos' \
282 'third_party/leveldatabase' \
283 'third_party/libXNVCtrl' \
284 'third_party/libaddressinput' \
285 'third_party/libjingle' \
286 'third_party/libphonenumber' \
287 'third_party/libsecret' \
288 'third_party/libsrtp' \
289 'third_party/libudev' \
290 'third_party/libusb' \
291 'third_party/libvpx' \
292 'third_party/libvpx/source/libvpx/third_party/x86inc' \
293 'third_party/libxml/chromium' \
294 'third_party/libyuv' \
295 'third_party/lss' \
296 'third_party/lzma_sdk' \
297 'third_party/mesa' \
298 'third_party/modp_b64' \
299 'third_party/mojo' \
300 'third_party/mt19937ar' \
301 'third_party/npapi' \
302 'third_party/openmax_dl' \
303 'third_party/opus' \
304 'third_party/ots' \
305 'third_party/pdfium' \
306 'third_party/pdfium/third_party/agg23' \
307 'third_party/pdfium/third_party/base' \
308 'third_party/pdfium/third_party/bigint' \
309 'third_party/pdfium/third_party/freetype' \
310 'third_party/polymer' \
311 'third_party/protobuf' \
312 'third_party/qcms' \
313 'third_party/readability' \
314 'third_party/sfntly' \
315 'third_party/skia' \
316 'third_party/smhasher' \
317 'third_party/sqlite' \
318 'third_party/tcmalloc' \
319 'third_party/trace-viewer' \
320 'third_party/trace-viewer/third_party/components/polymer' \
321 'third_party/trace-viewer/third_party/d3' \
322 'third_party/trace-viewer/third_party/gl-matrix' \
323 'third_party/trace-viewer/third_party/jszip' \
324 'third_party/trace-viewer/third_party/tvcm' \
325 'third_party/trace-viewer/third_party/tvcm/third_party/beautifulsoup/polymer_soup.py' \
326 'third_party/trace-viewer/third_party/tvcm/third_party/rcssmin' \
327 'third_party/trace-viewer/third_party/tvcm/third_party/rjsmin' \
328 'third_party/usrsctp' \
329 'third_party/web-animations-js' \
330 'third_party/webdriver' \
331 'third_party/webrtc' \
332 'third_party/widevine' \
333 'third_party/x86inc' \
334 'third_party/zlib/google' \
335 'url/third_party/mozilla' \
336 'v8/src/third_party/fdlibm' \
337 'v8/src/third_party/valgrind' \
338 --do-remove || die
339 }
340
341 src_configure() {
342 local myconf=""
343
344 # Never tell the build system to "enable" SSE2, it has a few unexpected
345 # additions, bug #336871.
346 myconf+=" -Ddisable_sse2=1"
347
348 # Disable nacl, we can't build without pnacl (http://crbug.com/269560).
349 myconf+=" -Ddisable_nacl=1"
350
351 # Disable glibc Native Client toolchain, we don't need it (bug #417019).
352 # myconf+=" -Ddisable_glibc=1"
353
354 # TODO: also build with pnacl
355 # myconf+=" -Ddisable_pnacl=1"
356
357 # It would be awkward for us to tar the toolchain and get it untarred again
358 # during the build.
359 # myconf+=" -Ddisable_newlib_untar=1"
360
361 # Make it possible to remove third_party/adobe.
362 echo > "${T}/flapper_version.h" || die
363 myconf+=" -Dflapper_version_h_file=${T}/flapper_version.h"
364
365 # Use system-provided libraries.
366 # TODO: use_system_hunspell (upstream changes needed).
367 # TODO: use_system_libsrtp (bug #459932).
368 # TODO: use_system_libusb (http://crbug.com/266149).
369 # TODO: use_system_libvpx (http://crbug.com/494939).
370 # TODO: use_system_opus (https://code.google.com/p/webrtc/issues/detail?id=3077).
371 # TODO: use_system_protobuf (bug #525560).
372 # TODO: use_system_ssl (http://crbug.com/58087).
373 # TODO: use_system_sqlite (http://crbug.com/22208).
374 myconf+="
375 -Duse_system_bzip2=1
376 -Duse_system_flac=1
377 -Duse_system_harfbuzz=1
378 -Duse_system_icu=1
379 -Duse_system_jsoncpp=1
380 -Duse_system_libevent=1
381 -Duse_system_libjpeg=1
382 -Duse_system_libpng=1
383 -Duse_system_libwebp=1
384 -Duse_system_libxml=1
385 -Duse_system_libxslt=1
386 -Duse_system_minizip=1
387 -Duse_system_nspr=1
388 -Duse_system_re2=1
389 -Duse_system_snappy=1
390 -Duse_system_speex=1
391 -Duse_system_xdg_utils=1
392 -Duse_system_zlib=1"
393
394 # Needed for system icu - we don't need additional data files.
395 myconf+=" -Dicu_use_data_file_flag=0"
396
397 # TODO: patch gyp so that this arm conditional is not needed.
398 if ! use arm; then
399 myconf+="
400 -Duse_system_yasm=1"
401 fi
402
403 # Optional dependencies.
404 # TODO: linux_link_kerberos, bug #381289.
405 myconf+="
406 $(gyp_use cups)
407 $(gyp_use gnome use_gconf)
408 $(gyp_use gnome-keyring use_gnome_keyring)
409 $(gyp_use gnome-keyring linux_link_gnome_keyring)
410 $(gyp_use hidpi enable_hidpi)
411 $(gyp_use hotwording enable_hotwording)
412 $(gyp_use kerberos)
413 $(gyp_use pulseaudio)
414 $(gyp_use tcmalloc use_allocator tcmalloc none)"
415
416 # Use explicit library dependencies instead of dlopen.
417 # This makes breakages easier to detect by revdep-rebuild.
418 myconf+="
419 -Dlinux_link_gsettings=1
420 -Dlinux_link_libpci=1
421 -Dlinux_link_libspeechd=1
422 -Dlibspeechd_h_prefix=speech-dispatcher/"
423
424 # TODO: use the file at run time instead of effectively compiling it in.
425 myconf+="
426 -Dusb_ids_path=/usr/share/misc/usb.ids"
427
428 # Save space by removing DLOG and DCHECK messages (about 6% reduction).
429 myconf+="
430 -Dlogging_like_official_build=1"
431
432 if [[ $(tc-getCC) == *clang* ]]; then
433 myconf+=" -Dclang=1"
434 else
435 myconf+=" -Dclang=0"
436 fi
437
438 # Never use bundled gold binary. Disable gold linker flags for now.
439 # Do not use bundled clang.
440 myconf+="
441 -Dclang_use_chrome_plugins=0
442 -Dhost_clang=0
443 -Dlinux_use_bundled_binutils=0
444 -Dlinux_use_bundled_gold=0
445 -Dlinux_use_gold_flags=0"
446
447 ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)"
448 myconf+=" -Dproprietary_codecs=1 -Dffmpeg_branding=${ffmpeg_branding}"
449
450 # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys .
451 # Note: these are for Gentoo use ONLY. For your own distribution,
452 # please get your own set of keys. Feel free to contact chromium@g.o
453 # for more info.
454 myconf+=" -Dgoogle_api_key=AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc
455 -Dgoogle_default_client_id=329227923882.apps.googleusercontent.com
456 -Dgoogle_default_client_secret=vgKG0NNv7GoDpbtoFNLxCUXu"
457
458 local myarch="$(tc-arch)"
459 if [[ $myarch = amd64 ]] ; then
460 target_arch=x64
461 ffmpeg_target_arch=x64
462 elif [[ $myarch = x86 ]] ; then
463 target_arch=ia32
464 ffmpeg_target_arch=ia32
465 elif [[ $myarch = arm ]] ; then
466 target_arch=arm
467 ffmpeg_target_arch=$(usex neon arm-neon arm)
468 # TODO: re-enable NaCl (NativeClient).
469 local CTARGET=${CTARGET:-${CHOST}}
470 if [[ $(tc-is-softfloat) == "no" ]]; then
471
472 myconf+=" -Darm_float_abi=hard"
473 fi
474 filter-flags "-mfpu=*"
475 use neon || myconf+=" -Darm_fpu=${ARM_FPU:-vfpv3-d16}"
476
477 if [[ ${CTARGET} == armv[78]* ]]; then
478 myconf+=" -Darmv7=1"
479 else
480 myconf+=" -Darmv7=0"
481 fi
482 myconf+=" -Dsysroot=
483 $(gyp_use neon arm_neon)
484 -Ddisable_nacl=1"
485 else
486 die "Failed to determine target arch, got '$myarch'."
487 fi
488
489 myconf+=" -Dtarget_arch=${target_arch}"
490
491 # Make sure that -Werror doesn't get added to CFLAGS by the build system.
492 # Depending on GCC version the warnings are different and we don't want
493 # the build to fail because of that.
494 myconf+=" -Dwerror="
495
496 # Disable fatal linker warnings, bug 506268.
497 myconf+=" -Ddisable_fatal_linker_warnings=1"
498
499 # Avoid CFLAGS problems, bug #352457, bug #390147.
500 if ! use custom-cflags; then
501 replace-flags "-Os" "-O2"
502 strip-flags
503
504 # Prevent linker from running out of address space, bug #471810 .
505 if use x86; then
506 filter-flags "-g*"
507 fi
508
509 # Prevent libvpx build failures. Bug 530248, 544702, 546984.
510 if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then
511 filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx2
512 fi
513 fi
514
515 # Make sure the build system will use the right tools, bug #340795.
516 tc-export AR CC CXX RANLIB
517
518 # Tools for building programs to be executed on the build system, bug #410883.
519 export AR_host=$(tc-getBUILD_AR)
520 export CC_host=$(tc-getBUILD_CC)
521 export CXX_host=$(tc-getBUILD_CXX)
522 export LD_host=${CXX_host}
523
524 # Bug 491582.
525 export TMPDIR="${WORKDIR}/temp"
526 mkdir -m 755 "${TMPDIR}" || die
527
528 local build_ffmpeg_args=""
529 if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then
530 build_ffmpeg_args+=" --disable-asm"
531 fi
532
533 # Re-configure bundled ffmpeg. See bug #491378 for example reasons.
534 einfo "Configuring bundled ffmpeg..."
535 pushd third_party/ffmpeg > /dev/null || die
536 chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \
537 --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die
538 chromium/scripts/copy_config.sh || die
539 chromium/scripts/generate_gyp.py || die
540 popd > /dev/null || die
541
542 third_party/libaddressinput/chromium/tools/update-strings.py || die
543
544 einfo "Configuring Chromium..."
545 build/linux/unbundle/replace_gyp_files.py ${myconf} || die
546 egyp_chromium ${myconf} || die
547 }
548
549 eninja() {
550 if [[ -z ${NINJAOPTS+set} ]]; then
551 local jobs=$(makeopts_jobs)
552 local loadavg=$(makeopts_loadavg)
553
554 if [[ ${MAKEOPTS} == *-j* && ${jobs} != 999 ]]; then
555 NINJAOPTS+=" -j ${jobs}"
556 fi
557 if [[ ${MAKEOPTS} == *-l* && ${loadavg} != 999 ]]; then
558 NINJAOPTS+=" -l ${loadavg}"
559 fi
560 fi
561 set -- ninja -v ${NINJAOPTS} "$@"
562 echo "$@"
563 "$@"
564 }
565
566 src_compile() {
567 local ninja_targets="chrome chrome_sandbox chromedriver"
568
569 # Build mksnapshot and pax-mark it.
570 eninja -C out/Release mksnapshot || die
571 pax-mark m out/Release/mksnapshot
572
573 # Even though ninja autodetects number of CPUs, we respect
574 # user's options, for debugging with -j 1 or any other reason.
575 eninja -C out/Release ${ninja_targets} || die
576
577 pax-mark m out/Release/chrome
578 }
579
580 src_install() {
581 exeinto "${CHROMIUM_HOME}"
582 doexe out/Release/chrome || die
583
584 newexe out/Release/chrome_sandbox chrome-sandbox || die
585 fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
586
587 doexe out/Release/chromedriver || die
588
589 # if ! use arm; then
590 # doexe out/Release/nacl_helper{,_bootstrap} || die
591 # insinto "${CHROMIUM_HOME}"
592 # doins out/Release/nacl_irt_*.nexe || die
593 # doins out/Release/libppGoogleNaClPluginChrome.so || die
594 # fi
595
596 local sedargs=( -e "s:/usr/lib/:/usr/$(get_libdir)/:g" )
597 if [[ -n ${CHROMIUM_SUFFIX} ]]; then
598 sedargs+=(
599 -e "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g"
600 -e "s:chromium.desktop:chromium${CHROMIUM_SUFFIX}.desktop:g"
601 -e "s:plugins:plugins --user-data-dir=\${HOME}/.config/chromium${CHROMIUM_SUFFIX}:"
602 )
603 fi
604 sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r3.sh" > chromium-launcher.sh || die
605 doexe chromium-launcher.sh
606
607 # It is important that we name the target "chromium-browser",
608 # xdg-utils expect it; bug #355517.
609 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser${CHROMIUM_SUFFIX} || die
610 # keep the old symlink around for consistency
611 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium${CHROMIUM_SUFFIX} || die
612
613 dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver${CHROMIUM_SUFFIX} || die
614
615 # Allow users to override command-line options, bug #357629.
616 dodir /etc/chromium || die
617 insinto /etc/chromium
618 newins "${FILESDIR}/chromium.default" "default" || die
619
620 pushd out/Release/locales > /dev/null || die
621 chromium_remove_language_paks
622 popd
623
624 insinto "${CHROMIUM_HOME}"
625 doins out/Release/*.bin || die
626 doins out/Release/*.pak || die
627
628 doins -r out/Release/locales || die
629 doins -r out/Release/resources || die
630
631 newman out/Release/chrome.1 chromium${CHROMIUM_SUFFIX}.1 || die
632 newman out/Release/chrome.1 chromium-browser${CHROMIUM_SUFFIX}.1 || 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 }