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