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