Gentoo Archives: gentoo-commits

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