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