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: chromium-45.0.2438.3-r1.ebuild ChangeLog
Date: Mon, 06 Jul 2015 19:38:17
Message-Id: 20150706193809.95ED2750@oystercatcher.gentoo.org
1 phajdan.jr 15/07/06 19:38:09
2
3 Modified: ChangeLog
4 Added: chromium-45.0.2438.3-r1.ebuild
5 Log:
6 Use system libsrtp, bug #459932 by Andrius Stikonas.
7
8 (Portage version: 2.2.14/cvs/Linux i686, signed Manifest commit with key 0x4F1A2555EA71991D!)
9
10 Revision Changes Path
11 1.1265 www-client/chromium/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.1265&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.1265&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?r1=1.1264&r2=1.1265
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v
20 retrieving revision 1.1264
21 retrieving revision 1.1265
22 diff -u -r1.1264 -r1.1265
23 --- ChangeLog 2 Jul 2015 15:01:48 -0000 1.1264
24 +++ ChangeLog 6 Jul 2015 19:38:09 -0000 1.1265
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.1264 2015/07/02 15:01:48 floppym Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.1265 2015/07/06 19:38:09 phajdan.jr Exp $
30 +
31 +*chromium-45.0.2438.3-r1 (06 Jul 2015)
32 +
33 + 06 Jul 2015; Pawel Hajdan jr <phajdan.jr@g.o>
34 + +chromium-45.0.2438.3-r1.ebuild:
35 + Use system libsrtp, bug #459932 by Andrius Stikonas.
36
37 *chromium-44.0.2403.61 (02 Jul 2015)
38
39
40
41
42 1.1 www-client/chromium/chromium-45.0.2438.3-r1.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-45.0.2438.3-r1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-45.0.2438.3-r1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: chromium-45.0.2438.3-r1.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.2438.3-r1.ebuild,v 1.1 2015/07/06 19:38:09 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}-lite.tar.xz"
66
67 LICENSE="BSD hotwording? ( no-source-code )"
68 SLOT="0"
69 KEYWORDS="~amd64 ~arm ~x86"
70 IUSE="cups gnome gnome-keyring hidpi hotwording 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/icu-55.1:=
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/speex:=
107 net-libs/libsrtp:=
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/libudev' \
289 'third_party/libusb' \
290 'third_party/libvpx' \
291 'third_party/libvpx/source/libvpx/third_party/x86inc' \
292 'third_party/libxml/chromium' \
293 'third_party/libyuv' \
294 'third_party/lss' \
295 'third_party/lzma_sdk' \
296 'third_party/mesa' \
297 'third_party/modp_b64' \
298 'third_party/mojo' \
299 'third_party/mt19937ar' \
300 'third_party/npapi' \
301 'third_party/openmax_dl' \
302 'third_party/opus' \
303 'third_party/ots' \
304 'third_party/pdfium' \
305 'third_party/pdfium/third_party/agg23' \
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/usrsctp' \
328 'third_party/web-animations-js' \
329 'third_party/webdriver' \
330 'third_party/webrtc' \
331 'third_party/widevine' \
332 'third_party/x86inc' \
333 'third_party/zlib/google' \
334 'url/third_party/mozilla' \
335 'v8/src/third_party/fdlibm' \
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_libusb (http://crbug.com/266149).
367 # TODO: use_system_libvpx (http://crbug.com/494939).
368 # TODO: use_system_opus (https://code.google.com/p/webrtc/issues/detail?id=3077).
369 # TODO: use_system_protobuf (bug #525560).
370 # TODO: use_system_ssl (http://crbug.com/58087).
371 # TODO: use_system_sqlite (http://crbug.com/22208).
372 myconf+="
373 -Duse_system_bzip2=1
374 -Duse_system_flac=1
375 -Duse_system_harfbuzz=1
376 -Duse_system_icu=1
377 -Duse_system_jsoncpp=1
378 -Duse_system_libevent=1
379 -Duse_system_libjpeg=1
380 -Duse_system_libpng=1
381 -Duse_system_libsrtp=1
382 -Duse_system_libwebp=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 hotwording enable_hotwording)
411 $(gyp_use kerberos)
412 $(gyp_use pulseaudio)
413 $(gyp_use tcmalloc use_allocator tcmalloc none)"
414
415 # Use explicit library dependencies instead of dlopen.
416 # This makes breakages easier to detect by revdep-rebuild.
417 myconf+="
418 -Dlinux_link_gsettings=1
419 -Dlinux_link_libpci=1
420 -Dlinux_link_libspeechd=1
421 -Dlibspeechd_h_prefix=speech-dispatcher/"
422
423 # TODO: use the file at run time instead of effectively compiling it in.
424 myconf+="
425 -Dusb_ids_path=/usr/share/misc/usb.ids"
426
427 # Save space by removing DLOG and DCHECK messages (about 6% reduction).
428 myconf+="
429 -Dlogging_like_official_build=1"
430
431 if [[ $(tc-getCC) == *clang* ]]; then
432 myconf+=" -Dclang=1"
433 else
434 myconf+=" -Dclang=0"
435 fi
436
437 # Never use bundled gold binary. Disable gold linker flags for now.
438 # Do not use bundled clang.
439 myconf+="
440 -Dclang_use_chrome_plugins=0
441 -Dhost_clang=0
442 -Dlinux_use_bundled_binutils=0
443 -Dlinux_use_bundled_gold=0
444 -Dlinux_use_gold_flags=0"
445
446 ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)"
447 myconf+=" -Dproprietary_codecs=1 -Dffmpeg_branding=${ffmpeg_branding}"
448
449 # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys .
450 # Note: these are for Gentoo use ONLY. For your own distribution,
451 # please get your own set of keys. Feel free to contact chromium@g.o
452 # for more info.
453 myconf+=" -Dgoogle_api_key=AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc
454 -Dgoogle_default_client_id=329227923882.apps.googleusercontent.com
455 -Dgoogle_default_client_secret=vgKG0NNv7GoDpbtoFNLxCUXu"
456
457 local myarch="$(tc-arch)"
458 if [[ $myarch = amd64 ]] ; then
459 target_arch=x64
460 ffmpeg_target_arch=x64
461 elif [[ $myarch = x86 ]] ; then
462 target_arch=ia32
463 ffmpeg_target_arch=ia32
464 elif [[ $myarch = arm ]] ; then
465 target_arch=arm
466 ffmpeg_target_arch=$(usex neon arm-neon arm)
467 # TODO: re-enable NaCl (NativeClient).
468 local CTARGET=${CTARGET:-${CHOST}}
469 if [[ $(tc-is-softfloat) == "no" ]]; then
470
471 myconf+=" -Darm_float_abi=hard"
472 fi
473 filter-flags "-mfpu=*"
474 use neon || myconf+=" -Darm_fpu=${ARM_FPU:-vfpv3-d16}"
475
476 if [[ ${CTARGET} == armv[78]* ]]; then
477 myconf+=" -Darmv7=1"
478 else
479 myconf+=" -Darmv7=0"
480 fi
481 myconf+=" -Dsysroot=
482 $(gyp_use neon arm_neon)
483 -Ddisable_nacl=1"
484 else
485 die "Failed to determine target arch, got '$myarch'."
486 fi
487
488 myconf+=" -Dtarget_arch=${target_arch}"
489
490 # Make sure that -Werror doesn't get added to CFLAGS by the build system.
491 # Depending on GCC version the warnings are different and we don't want
492 # the build to fail because of that.
493 myconf+=" -Dwerror="
494
495 # Disable fatal linker warnings, bug 506268.
496 myconf+=" -Ddisable_fatal_linker_warnings=1"
497
498 # Avoid CFLAGS problems, bug #352457, bug #390147.
499 if ! use custom-cflags; then
500 replace-flags "-Os" "-O2"
501 strip-flags
502
503 # Prevent linker from running out of address space, bug #471810 .
504 if use x86; then
505 filter-flags "-g*"
506 fi
507
508 # Prevent libvpx build failures. Bug 530248, 544702, 546984.
509 if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then
510 filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx2
511 fi
512 fi
513
514 # Make sure the build system will use the right tools, bug #340795.
515 tc-export AR CC CXX RANLIB
516
517 # Tools for building programs to be executed on the build system, bug #410883.
518 export AR_host=$(tc-getBUILD_AR)
519 export CC_host=$(tc-getBUILD_CC)
520 export CXX_host=$(tc-getBUILD_CXX)
521 export LD_host=${CXX_host}
522
523 # Bug 491582.
524 export TMPDIR="${WORKDIR}/temp"
525 mkdir -m 755 "${TMPDIR}" || die
526
527 local build_ffmpeg_args=""
528 if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then
529 build_ffmpeg_args+=" --disable-asm"
530 fi
531
532 # Re-configure bundled ffmpeg. See bug #491378 for example reasons.
533 einfo "Configuring bundled ffmpeg..."
534 pushd third_party/ffmpeg > /dev/null || die
535 chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \
536 --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die
537 chromium/scripts/copy_config.sh || die
538 chromium/scripts/generate_gyp.py || die
539 popd > /dev/null || die
540
541 third_party/libaddressinput/chromium/tools/update-strings.py || die
542
543 einfo "Configuring Chromium..."
544 build/linux/unbundle/replace_gyp_files.py ${myconf} || die
545 egyp_chromium ${myconf} || die
546 }
547
548 eninja() {
549 if [[ -z ${NINJAOPTS+set} ]]; then
550 local jobs=$(makeopts_jobs)
551 local loadavg=$(makeopts_loadavg)
552
553 if [[ ${MAKEOPTS} == *-j* && ${jobs} != 999 ]]; then
554 NINJAOPTS+=" -j ${jobs}"
555 fi
556 if [[ ${MAKEOPTS} == *-l* && ${loadavg} != 999 ]]; then
557 NINJAOPTS+=" -l ${loadavg}"
558 fi
559 fi
560 set -- ninja -v ${NINJAOPTS} "$@"
561 echo "$@"
562 "$@"
563 }
564
565 src_compile() {
566 local ninja_targets="chrome chrome_sandbox chromedriver"
567
568 # Build mksnapshot and pax-mark it.
569 eninja -C out/Release mksnapshot || die
570 pax-mark m out/Release/mksnapshot
571
572 # Even though ninja autodetects number of CPUs, we respect
573 # user's options, for debugging with -j 1 or any other reason.
574 eninja -C out/Release ${ninja_targets} || die
575
576 pax-mark m out/Release/chrome
577 }
578
579 src_install() {
580 exeinto "${CHROMIUM_HOME}"
581 doexe out/Release/chrome || die
582
583 newexe out/Release/chrome_sandbox chrome-sandbox || die
584 fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
585
586 doexe out/Release/chromedriver || die
587
588 # if ! use arm; then
589 # doexe out/Release/nacl_helper{,_bootstrap} || die
590 # insinto "${CHROMIUM_HOME}"
591 # doins out/Release/nacl_irt_*.nexe || die
592 # doins out/Release/libppGoogleNaClPluginChrome.so || die
593 # fi
594
595 local sedargs=( -e "s:/usr/lib/:/usr/$(get_libdir)/:g" )
596 if [[ -n ${CHROMIUM_SUFFIX} ]]; then
597 sedargs+=(
598 -e "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g"
599 -e "s:chromium.desktop:chromium${CHROMIUM_SUFFIX}.desktop:g"
600 -e "s:plugins:plugins --user-data-dir=\${HOME}/.config/chromium${CHROMIUM_SUFFIX}:"
601 )
602 fi
603 sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r3.sh" > chromium-launcher.sh || die
604 doexe chromium-launcher.sh
605
606 # It is important that we name the target "chromium-browser",
607 # xdg-utils expect it; bug #355517.
608 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser${CHROMIUM_SUFFIX} || die
609 # keep the old symlink around for consistency
610 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium${CHROMIUM_SUFFIX} || die
611
612 dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver${CHROMIUM_SUFFIX} || die
613
614 # Allow users to override command-line options, bug #357629.
615 dodir /etc/chromium || die
616 insinto /etc/chromium
617 newins "${FILESDIR}/chromium.default" "default" || die
618
619 pushd out/Release/locales > /dev/null || die
620 chromium_remove_language_paks
621 popd
622
623 insinto "${CHROMIUM_HOME}"
624 doins out/Release/*.bin || die
625 doins out/Release/*.pak || die
626
627 doins -r out/Release/locales || die
628 doins -r out/Release/resources || die
629
630 newman out/Release/chrome.1 chromium${CHROMIUM_SUFFIX}.1 || die
631 newman out/Release/chrome.1 chromium-browser${CHROMIUM_SUFFIX}.1 || 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 }