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