1 |
floppym 14/01/28 04:03:07 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: chromium-32.0.1700.102.ebuild |
5 |
Log: |
6 |
Stable channel bump. |
7 |
|
8 |
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1015 www-client/chromium/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.1015&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.1015&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?r1=1.1014&r2=1.1015 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v |
20 |
retrieving revision 1.1014 |
21 |
retrieving revision 1.1015 |
22 |
diff -u -r1.1014 -r1.1015 |
23 |
--- ChangeLog 23 Jan 2014 05:00:41 -0000 1.1014 |
24 |
+++ ChangeLog 28 Jan 2014 04:03:06 -0000 1.1015 |
25 |
@@ -1,6 +1,11 @@ |
26 |
# ChangeLog for www-client/chromium |
27 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.1014 2014/01/23 05:00:41 floppym Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.1015 2014/01/28 04:03:06 floppym Exp $ |
30 |
+ |
31 |
+*chromium-32.0.1700.102 (28 Jan 2014) |
32 |
+ |
33 |
+ 28 Jan 2014; Mike Gilbert <floppym@g.o> +chromium-32.0.1700.102.ebuild: |
34 |
+ Stable channel bump. |
35 |
|
36 |
*chromium-33.0.1750.46 (23 Jan 2014) |
37 |
|
38 |
|
39 |
|
40 |
|
41 |
1.1 www-client/chromium/chromium-32.0.1700.102.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-32.0.1700.102.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-32.0.1700.102.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: chromium-32.0.1700.102.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2014 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-32.0.1700.102.ebuild,v 1.1 2014/01/28 04:03:06 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 |
test? ( https://commondatastorage.googleapis.com/chromium-browser-official/${P}-testdata.tar.xz )" |
66 |
|
67 |
LICENSE="BSD" |
68 |
SLOT="0" |
69 |
KEYWORDS="~amd64 ~arm ~x86" |
70 |
IUSE="bindist cups gnome gnome-keyring kerberos neon pulseaudio selinux +tcmalloc" |
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:= |
84 |
>=net-print/cups-1.3.11:= |
85 |
) |
86 |
>=dev-libs/elfutils-0.149 |
87 |
dev-libs/expat:= |
88 |
>=dev-libs/icu-49.1.1-r1:= |
89 |
>=dev-libs/jsoncpp-0.5.0-r1:= |
90 |
>=dev-libs/libevent-1.4.13:= |
91 |
dev-libs/libxml2:=[icu] |
92 |
dev-libs/libxslt:= |
93 |
dev-libs/nspr:= |
94 |
>=dev-libs/nss-3.14.3:= |
95 |
>=dev-libs/protobuf-2.5.0:= |
96 |
dev-libs/re2:= |
97 |
gnome? ( >=gnome-base/gconf-2.24.0:= ) |
98 |
gnome-keyring? ( >=gnome-base/gnome-keyring-2.28.2:= ) |
99 |
>=media-libs/alsa-lib-1.0.19:= |
100 |
media-libs/flac:= |
101 |
media-libs/harfbuzz:=[icu(+)] |
102 |
>=media-libs/libjpeg-turbo-1.2.0-r1:= |
103 |
media-libs/libpng:0= |
104 |
media-libs/opus:= |
105 |
media-libs/speex:= |
106 |
pulseaudio? ( media-sound/pulseaudio:= ) |
107 |
sys-apps/dbus:= |
108 |
sys-apps/pciutils:= |
109 |
>=sys-libs/libcap-2.22:= |
110 |
sys-libs/zlib:=[minizip] |
111 |
virtual/udev |
112 |
x11-libs/gtk+:2= |
113 |
>=x11-libs/libXi-1.6.0:= |
114 |
x11-libs/libXinerama:= |
115 |
x11-libs/libXScrnSaver:= |
116 |
x11-libs/libXtst:= |
117 |
kerberos? ( virtual/krb5 ) |
118 |
selinux? ( sec-policy/selinux-chromium )" |
119 |
DEPEND="${RDEPEND} |
120 |
!arm? ( |
121 |
dev-lang/yasm |
122 |
) |
123 |
dev-lang/perl |
124 |
dev-perl/JSON |
125 |
>=dev-util/gperf-3.0.3 |
126 |
dev-util/ninja |
127 |
sys-apps/hwids |
128 |
>=sys-devel/bison-2.4.3 |
129 |
sys-devel/flex |
130 |
virtual/pkgconfig |
131 |
test? ( |
132 |
dev-libs/openssl:0 |
133 |
)" |
134 |
# For nvidia-drivers blocker, see bug #413637 . |
135 |
RDEPEND+=" |
136 |
!=www-client/chromium-9999 |
137 |
x11-misc/xdg-utils |
138 |
virtual/ttf-fonts |
139 |
tcmalloc? ( !<x11-drivers/nvidia-drivers-331.20 )" |
140 |
|
141 |
# Python dependencies. The DEPEND part needs to be kept in sync |
142 |
# with python_check_deps. |
143 |
DEPEND+=" $(python_gen_any_dep ' |
144 |
>=dev-python/jinja-2.7[${PYTHON_USEDEP}] |
145 |
dev-python/ply[${PYTHON_USEDEP}] |
146 |
dev-python/simplejson[${PYTHON_USEDEP}] |
147 |
test? ( dev-python/pyftpdlib[${PYTHON_USEDEP}] ) |
148 |
')" |
149 |
python_check_deps() { |
150 |
has_version ">=dev-python/jinja-2.7[${PYTHON_USEDEP}]" && \ |
151 |
has_version "dev-python/ply[${PYTHON_USEDEP}]" && \ |
152 |
has_version "dev-python/simplejson[${PYTHON_USEDEP}]" && \ |
153 |
{ ! use test || has_version "dev-python/pyftpdlib[${PYTHON_USEDEP}]"; } |
154 |
} |
155 |
|
156 |
if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then |
157 |
EBUILD_DEATH_HOOKS+=" chromium_pkg_die"; |
158 |
fi |
159 |
|
160 |
DISABLE_AUTOFORMATTING="yes" |
161 |
DOC_CONTENTS=" |
162 |
Some web pages may require additional fonts to display properly. |
163 |
Try installing some of the following packages if some characters |
164 |
are not displayed properly: |
165 |
- media-fonts/arphicfonts |
166 |
- media-fonts/bitstream-cyberbit |
167 |
- media-fonts/droid |
168 |
- media-fonts/ipamonafont |
169 |
- media-fonts/ja-ipafonts |
170 |
- media-fonts/takao-fonts |
171 |
- media-fonts/wqy-microhei |
172 |
- media-fonts/wqy-zenhei |
173 |
|
174 |
Depending on your desktop environment, you may need |
175 |
to install additional packages to get icons on the Downloads page. |
176 |
|
177 |
For KDE, the required package is kde-base/oxygen-icons. |
178 |
|
179 |
For other desktop environments, try one of the following: |
180 |
- x11-themes/gnome-icon-theme |
181 |
- x11-themes/tango-icon-theme |
182 |
" |
183 |
|
184 |
pkg_setup() { |
185 |
if [[ "${SLOT}" == "0" ]]; then |
186 |
CHROMIUM_SUFFIX="" |
187 |
else |
188 |
CHROMIUM_SUFFIX="-${SLOT}" |
189 |
fi |
190 |
CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser${CHROMIUM_SUFFIX}" |
191 |
|
192 |
# Make sure the build system will use the right python, bug #344367. |
193 |
python-any-r1_pkg_setup |
194 |
|
195 |
chromium_suid_sandbox_check_kernel_config |
196 |
|
197 |
if use bindist; then |
198 |
elog "bindist enabled: H.264 video support will be disabled." |
199 |
else |
200 |
elog "bindist disabled: Resulting binaries may not be legal to re-distribute." |
201 |
fi |
202 |
} |
203 |
|
204 |
src_prepare() { |
205 |
# if ! use arm; then |
206 |
# mkdir -p out/Release/gen/sdk/toolchain || die |
207 |
# # Do not preserve SELinux context, bug #460892 . |
208 |
# cp -a --no-preserve=context /usr/$(get_libdir)/nacl-toolchain-newlib \ |
209 |
# out/Release/gen/sdk/toolchain/linux_x86_newlib || die |
210 |
# touch out/Release/gen/sdk/toolchain/linux_x86_newlib/stamp.untar || die |
211 |
# fi |
212 |
|
213 |
epatch "${FILESDIR}/${PN}-system-jinja-r2.patch" |
214 |
epatch "${FILESDIR}/${PN}-build_ffmpeg-r0.patch" |
215 |
|
216 |
epatch_user |
217 |
|
218 |
# Remove most bundled libraries. Some are still needed. |
219 |
build/linux/unbundle/remove_bundled_libraries.py \ |
220 |
'base/third_party/dmg_fp' \ |
221 |
'base/third_party/dynamic_annotations' \ |
222 |
'base/third_party/icu' \ |
223 |
'base/third_party/nspr' \ |
224 |
'base/third_party/symbolize' \ |
225 |
'base/third_party/valgrind' \ |
226 |
'base/third_party/xdg_mime' \ |
227 |
'base/third_party/xdg_user_dirs' \ |
228 |
'breakpad/src/third_party/curl' \ |
229 |
'chrome/third_party/mozilla_security_manager' \ |
230 |
'crypto/third_party/nss' \ |
231 |
'net/third_party/mozilla_security_manager' \ |
232 |
'net/third_party/nss' \ |
233 |
'third_party/WebKit' \ |
234 |
'third_party/angle_dx11' \ |
235 |
'third_party/cacheinvalidation' \ |
236 |
'third_party/cld' \ |
237 |
'third_party/cros_system_api' \ |
238 |
'third_party/ffmpeg' \ |
239 |
'third_party/flot' \ |
240 |
'third_party/hunspell' \ |
241 |
'third_party/iccjpeg' \ |
242 |
'third_party/jstemplate' \ |
243 |
'third_party/khronos' \ |
244 |
'third_party/leveldatabase' \ |
245 |
'third_party/libjingle' \ |
246 |
'third_party/libphonenumber' \ |
247 |
'third_party/libsrtp' \ |
248 |
'third_party/libusb' \ |
249 |
'third_party/libvpx' \ |
250 |
'third_party/libwebp' \ |
251 |
'third_party/libxml/chromium' \ |
252 |
'third_party/libXNVCtrl' \ |
253 |
'third_party/libyuv' \ |
254 |
'third_party/lss' \ |
255 |
'third_party/lzma_sdk' \ |
256 |
'third_party/mesa' \ |
257 |
'third_party/modp_b64' \ |
258 |
'third_party/mt19937ar' \ |
259 |
'third_party/npapi' \ |
260 |
'third_party/ots' \ |
261 |
'third_party/pywebsocket' \ |
262 |
'third_party/qcms' \ |
263 |
'third_party/sfntly' \ |
264 |
'third_party/skia' \ |
265 |
'third_party/smhasher' \ |
266 |
'third_party/sqlite' \ |
267 |
'third_party/tcmalloc' \ |
268 |
'third_party/tlslite' \ |
269 |
'third_party/trace-viewer' \ |
270 |
'third_party/undoview' \ |
271 |
'third_party/usrsctp' \ |
272 |
'third_party/webdriver' \ |
273 |
'third_party/webrtc' \ |
274 |
'third_party/widevine' \ |
275 |
'third_party/x86inc' \ |
276 |
'third_party/zlib/google' \ |
277 |
'url/third_party/mozilla' \ |
278 |
'v8/src/third_party/valgrind' \ |
279 |
--do-remove || die |
280 |
} |
281 |
|
282 |
src_configure() { |
283 |
local myconf="" |
284 |
|
285 |
# Never tell the build system to "enable" SSE2, it has a few unexpected |
286 |
# additions, bug #336871. |
287 |
myconf+=" -Ddisable_sse2=1" |
288 |
|
289 |
# Disable nacl, we can't build without pnacl (http://crbug.com/269560). |
290 |
myconf+=" -Ddisable_nacl=1" |
291 |
|
292 |
# Disable glibc Native Client toolchain, we don't need it (bug #417019). |
293 |
# myconf+=" -Ddisable_glibc=1" |
294 |
|
295 |
# TODO: also build with pnacl |
296 |
# myconf+=" -Ddisable_pnacl=1" |
297 |
|
298 |
# It would be awkward for us to tar the toolchain and get it untarred again |
299 |
# during the build. |
300 |
# myconf+=" -Ddisable_newlib_untar=1" |
301 |
|
302 |
# Make it possible to remove third_party/adobe. |
303 |
echo > "${T}/flapper_version.h" || die |
304 |
myconf+=" -Dflapper_version_h_file=${T}/flapper_version.h" |
305 |
|
306 |
# Use system-provided libraries. |
307 |
# TODO: use_system_hunspell (upstream changes needed). |
308 |
# TODO: use_system_libsrtp (bug #459932). |
309 |
# TODO: use_system_libusb (http://crbug.com/266149). |
310 |
# TODO: use_system_libvpx (bug #487926). |
311 |
# TODO: use_system_ssl (http://crbug.com/58087). |
312 |
# TODO: use_system_sqlite (http://crbug.com/22208). |
313 |
# TODO: use_system_libwebp (http://crbug.com/288019). |
314 |
myconf+=" |
315 |
-Duse_system_bzip2=1 |
316 |
-Duse_system_flac=1 |
317 |
-Duse_system_harfbuzz=1 |
318 |
-Duse_system_icu=1 |
319 |
-Duse_system_jsoncpp=1 |
320 |
-Duse_system_libevent=1 |
321 |
-Duse_system_libjpeg=1 |
322 |
-Duse_system_libpng=1 |
323 |
-Duse_system_libxml=1 |
324 |
-Duse_system_libxslt=1 |
325 |
-Duse_system_minizip=1 |
326 |
-Duse_system_nspr=1 |
327 |
-Duse_system_openssl=1 |
328 |
-Duse_system_opus=1 |
329 |
-Duse_system_protobuf=1 |
330 |
-Duse_system_re2=1 |
331 |
-Duse_system_snappy=1 |
332 |
-Duse_system_speex=1 |
333 |
-Duse_system_xdg_utils=1 |
334 |
-Duse_system_zlib=1" |
335 |
|
336 |
# TODO: patch gyp so that this arm conditional is not needed. |
337 |
if ! use arm; then |
338 |
myconf+=" |
339 |
-Duse_system_yasm=1" |
340 |
fi |
341 |
|
342 |
# Optional dependencies. |
343 |
# TODO: linux_link_kerberos, bug #381289. |
344 |
myconf+=" |
345 |
$(gyp_use cups) |
346 |
$(gyp_use gnome use_gconf) |
347 |
$(gyp_use gnome-keyring use_gnome_keyring) |
348 |
$(gyp_use gnome-keyring linux_link_gnome_keyring) |
349 |
$(gyp_use kerberos) |
350 |
$(gyp_use pulseaudio) |
351 |
$(gyp_use tcmalloc linux_use_tcmalloc)" |
352 |
|
353 |
# Use explicit library dependencies instead of dlopen. |
354 |
# This makes breakages easier to detect by revdep-rebuild. |
355 |
myconf+=" |
356 |
-Dlinux_link_gsettings=1 |
357 |
-Dlinux_link_libpci=1 |
358 |
-Dlinux_link_libspeechd=1 |
359 |
-Dlibspeechd_h_prefix=speech-dispatcher/" |
360 |
|
361 |
# TODO: use the file at run time instead of effectively compiling it in. |
362 |
myconf+=" |
363 |
-Dusb_ids_path=/usr/share/misc/usb.ids" |
364 |
|
365 |
# Save space by removing DLOG and DCHECK messages (about 6% reduction). |
366 |
myconf+=" |
367 |
-Dlogging_like_official_build=1" |
368 |
|
369 |
# Never use bundled gold binary. Disable gold linker flags for now. |
370 |
myconf+=" |
371 |
-Dlinux_use_gold_binary=0 |
372 |
-Dlinux_use_gold_flags=0" |
373 |
|
374 |
# Always support proprietary codecs. |
375 |
myconf+=" -Dproprietary_codecs=1" |
376 |
|
377 |
# Set python version and libdir so that python_arch.sh can find libpython. |
378 |
# Bug 492864. |
379 |
myconf+=" |
380 |
-Dpython_ver=${EPYTHON#python} |
381 |
-Dsystem_libdir=$(get_libdir)" |
382 |
|
383 |
if ! use bindist; then |
384 |
# Enable H.264 support in bundled ffmpeg. |
385 |
myconf+=" -Dffmpeg_branding=Chrome" |
386 |
fi |
387 |
|
388 |
# Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys . |
389 |
# Note: these are for Gentoo use ONLY. For your own distribution, |
390 |
# please get your own set of keys. Feel free to contact chromium@g.o |
391 |
# for more info. |
392 |
myconf+=" -Dgoogle_api_key=AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc |
393 |
-Dgoogle_default_client_id=329227923882.apps.googleusercontent.com |
394 |
-Dgoogle_default_client_secret=vgKG0NNv7GoDpbtoFNLxCUXu" |
395 |
|
396 |
local myarch="$(tc-arch)" |
397 |
if [[ $myarch = amd64 ]] ; then |
398 |
target_arch=x64 |
399 |
ffmpeg_target_arch=x64 |
400 |
elif [[ $myarch = x86 ]] ; then |
401 |
target_arch=ia32 |
402 |
ffmpeg_target_arch=ia32 |
403 |
elif [[ $myarch = arm ]] ; then |
404 |
target_arch=arm |
405 |
ffmpeg_target_arch=$(usex neon arm-neon arm) |
406 |
# TODO: re-enable NaCl (NativeClient). |
407 |
local CTARGET=${CTARGET:-${CHOST}} |
408 |
if [[ $(tc-is-softfloat) == "no" ]]; then |
409 |
|
410 |
myconf+=" -Darm_float_abi=hard" |
411 |
fi |
412 |
filter-flags "-mfpu=*" |
413 |
use neon || myconf+=" -Darm_fpu=${ARM_FPU:-vfpv3-d16}" |
414 |
|
415 |
if [[ ${CTARGET} == armv[78]* ]]; then |
416 |
myconf+=" -Darmv7=1" |
417 |
else |
418 |
myconf+=" -Darmv7=0" |
419 |
fi |
420 |
myconf+=" -Dsysroot= |
421 |
$(gyp_use neon arm_neon) |
422 |
-Ddisable_nacl=1" |
423 |
else |
424 |
die "Failed to determine target arch, got '$myarch'." |
425 |
fi |
426 |
|
427 |
myconf+=" -Dtarget_arch=${target_arch}" |
428 |
|
429 |
# Make sure that -Werror doesn't get added to CFLAGS by the build system. |
430 |
# Depending on GCC version the warnings are different and we don't want |
431 |
# the build to fail because of that. |
432 |
myconf+=" -Dwerror=" |
433 |
|
434 |
# Avoid CFLAGS problems, bug #352457, bug #390147. |
435 |
if ! use custom-cflags; then |
436 |
replace-flags "-Os" "-O2" |
437 |
strip-flags |
438 |
|
439 |
# Prevent linker from running out of address space, bug #471810 . |
440 |
if use x86; then |
441 |
filter-flags "-g*" |
442 |
fi |
443 |
fi |
444 |
|
445 |
# Make sure the build system will use the right tools, bug #340795. |
446 |
tc-export AR CC CXX RANLIB |
447 |
|
448 |
# Tools for building programs to be executed on the build system, bug #410883. |
449 |
export AR_host=$(tc-getBUILD_AR) |
450 |
export CC_host=$(tc-getBUILD_CC) |
451 |
export CXX_host=$(tc-getBUILD_CXX) |
452 |
export LD_host=${CXX_host} |
453 |
|
454 |
# Bug 491582. |
455 |
export TMPDIR="${WORKDIR}/temp" |
456 |
mkdir -m 755 "${TMPDIR}" || die |
457 |
|
458 |
# Re-configure bundled ffmpeg. See bug #491378 for example reasons. |
459 |
einfo "Configuring bundled ffmpeg..." |
460 |
pushd third_party/ffmpeg > /dev/null || die |
461 |
chromium/scripts/build_ffmpeg.sh linux ${ffmpeg_target_arch} "${PWD}" config-only || die |
462 |
chromium/scripts/copy_config.sh || die |
463 |
popd > /dev/null || die |
464 |
|
465 |
einfo "Configuring Chromium..." |
466 |
build/linux/unbundle/replace_gyp_files.py ${myconf} || die |
467 |
egyp_chromium ${myconf} || die |
468 |
} |
469 |
|
470 |
src_compile() { |
471 |
# TODO: add media_unittests after fixing compile (bug #462546). |
472 |
local test_targets="" |
473 |
for x in base cacheinvalidation content crypto \ |
474 |
gpu net printing sql; do |
475 |
test_targets+=" ${x}_unittests" |
476 |
done |
477 |
|
478 |
local ninja_targets="chrome chrome_sandbox chromedriver" |
479 |
if use test; then |
480 |
ninja_targets+=" $test_targets" |
481 |
fi |
482 |
|
483 |
# Build mksnapshot and pax-mark it. |
484 |
ninja -C out/Release -v -j $(makeopts_jobs) mksnapshot.${target_arch} || die |
485 |
pax-mark m out/Release/mksnapshot.${target_arch} |
486 |
|
487 |
# Even though ninja autodetects number of CPUs, we respect |
488 |
# user's options, for debugging with -j 1 or any other reason. |
489 |
ninja -C out/Release -v -j $(makeopts_jobs) ${ninja_targets} || die |
490 |
|
491 |
pax-mark m out/Release/chrome |
492 |
if use test; then |
493 |
for x in $test_targets; do |
494 |
pax-mark m out/Release/${x} |
495 |
done |
496 |
fi |
497 |
} |
498 |
|
499 |
src_test() { |
500 |
# For more info see bug #350349. |
501 |
local LC_ALL="en_US.utf8" |
502 |
|
503 |
if ! locale -a | grep -q "${LC_ALL}"; then |
504 |
eerror "${PN} requires ${LC_ALL} locale for tests" |
505 |
eerror "Please read the following guides for more information:" |
506 |
eerror " http://www.gentoo.org/doc/en/guide-localization.xml" |
507 |
eerror " http://www.gentoo.org/doc/en/utf-8.xml" |
508 |
die "locale ${LC_ALL} is not supported" |
509 |
fi |
510 |
|
511 |
# If we have the right locale, export it to the environment |
512 |
export LC_ALL |
513 |
|
514 |
# For more info see bug #370957. |
515 |
if [[ $UID -eq 0 ]]; then |
516 |
die "Tests must be run as non-root. Please use FEATURES=userpriv." |
517 |
fi |
518 |
|
519 |
# virtualmake dies on failure, so we run our tests in a function |
520 |
VIRTUALX_COMMAND="chromium_test" virtualmake |
521 |
} |
522 |
|
523 |
chromium_test() { |
524 |
# Keep track of the cumulative exit status for all tests |
525 |
local exitstatus=0 |
526 |
|
527 |
runtest() { |
528 |
local cmd=$1 |
529 |
shift |
530 |
local IFS=: |
531 |
set -- "${cmd}" "--gtest_filter=-$*" |
532 |
einfo "$@" |
533 |
"$@" |
534 |
local st=$? |
535 |
(( st )) && eerror "${cmd} failed" |
536 |
(( exitstatus |= st )) |
537 |
} |
538 |
|
539 |
runtest out/Release/base_unittests |
540 |
runtest out/Release/cacheinvalidation_unittests |
541 |
|
542 |
local excluded_content_unittests=( |
543 |
"RendererDateTimePickerTest.*" # bug #465452 |
544 |
) |
545 |
runtest out/Release/content_unittests "${excluded_content_unittests[@]}" |
546 |
|
547 |
runtest out/Release/crypto_unittests |
548 |
runtest out/Release/gpu_unittests |
549 |
|
550 |
# TODO: add media_unittests after fixing compile (bug #462546). |
551 |
# runtest out/Release/media_unittests |
552 |
|
553 |
local excluded_net_unittests=( |
554 |
"NetUtilTest.IDNToUnicode*" # bug 361885 |
555 |
"NetUtilTest.FormatUrl*" # see above |
556 |
"SpdyFramerTests/SpdyFramerTest.CreatePushPromiseCompressed/2" # bug #478168 |
557 |
"HostResolverImplTest.FlushCacheOnIPAddressChange" # bug #481812 |
558 |
"HostResolverImplTest.ResolveFromCache" # see above |
559 |
"ProxyResolverV8TracingTest.*" # see above |
560 |
"SSLClientSocketTest.ConnectMismatched" # see above |
561 |
"UDPSocketTest.*" # see above |
562 |
"*EndToEndTest*" # see above |
563 |
) |
564 |
runtest out/Release/net_unittests "${excluded_net_unittests[@]}" |
565 |
|
566 |
runtest out/Release/printing_unittests |
567 |
runtest out/Release/sql_unittests |
568 |
|
569 |
return ${exitstatus} |
570 |
} |
571 |
|
572 |
src_install() { |
573 |
exeinto "${CHROMIUM_HOME}" |
574 |
doexe out/Release/chrome || die |
575 |
|
576 |
newexe out/Release/chrome_sandbox chrome-sandbox || die |
577 |
fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox" |
578 |
|
579 |
doexe out/Release/chromedriver || die |
580 |
|
581 |
# if ! use arm; then |
582 |
# doexe out/Release/nacl_helper{,_bootstrap} || die |
583 |
# insinto "${CHROMIUM_HOME}" |
584 |
# doins out/Release/nacl_irt_*.nexe || die |
585 |
# doins out/Release/libppGoogleNaClPluginChrome.so || die |
586 |
# fi |
587 |
|
588 |
local sedargs=( -e "s:/usr/lib/:/usr/$(get_libdir)/:g" ) |
589 |
if [[ -n ${CHROMIUM_SUFFIX} ]]; then |
590 |
sedargs+=( |
591 |
-e "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" |
592 |
-e "s:chromium.desktop:chromium${CHROMIUM_SUFFIX}.desktop:g" |
593 |
-e "s:plugins:plugins --user-data-dir=\${HOME}/.config/chromium${CHROMIUM_SUFFIX}:" |
594 |
) |
595 |
fi |
596 |
sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r3.sh" > chromium-launcher.sh || die |
597 |
doexe chromium-launcher.sh |
598 |
|
599 |
# It is important that we name the target "chromium-browser", |
600 |
# xdg-utils expect it; bug #355517. |
601 |
dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser${CHROMIUM_SUFFIX} || die |
602 |
# keep the old symlink around for consistency |
603 |
dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium${CHROMIUM_SUFFIX} || die |
604 |
|
605 |
# Allow users to override command-line options, bug #357629. |
606 |
dodir /etc/chromium || die |
607 |
insinto /etc/chromium |
608 |
newins "${FILESDIR}/chromium.default" "default" || die |
609 |
|
610 |
pushd out/Release/locales > /dev/null || die |
611 |
chromium_remove_language_paks |
612 |
popd |
613 |
|
614 |
insinto "${CHROMIUM_HOME}" |
615 |
doins out/Release/*.pak || die |
616 |
|
617 |
doins -r out/Release/locales || die |
618 |
doins -r out/Release/resources || die |
619 |
|
620 |
newman out/Release/chrome.1 chromium${CHROMIUM_SUFFIX}.1 || die |
621 |
newman out/Release/chrome.1 chromium-browser${CHROMIUM_SUFFIX}.1 || die |
622 |
|
623 |
doexe out/Release/libffmpegsumo.so || die |
624 |
|
625 |
# Install icons and desktop entry. |
626 |
local branding size |
627 |
for size in 16 22 24 32 48 64 128 256 ; do |
628 |
case ${size} in |
629 |
16|32) branding="chrome/app/theme/default_100_percent/chromium" ;; |
630 |
*) branding="chrome/app/theme/chromium" ;; |
631 |
esac |
632 |
newicon -s ${size} "${branding}/product_logo_${size}.png" \ |
633 |
chromium-browser${CHROMIUM_SUFFIX}.png |
634 |
done |
635 |
|
636 |
local mime_types="text/html;text/xml;application/xhtml+xml;" |
637 |
mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797 |
638 |
mime_types+="x-scheme-handler/ftp;" # bug #412185 |
639 |
mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393 |
640 |
make_desktop_entry \ |
641 |
chromium-browser${CHROMIUM_SUFFIX} \ |
642 |
"Chromium${CHROMIUM_SUFFIX}" \ |
643 |
chromium-browser${CHROMIUM_SUFFIX} \ |
644 |
"Network;WebBrowser" \ |
645 |
"MimeType=${mime_types}\nStartupWMClass=chromium-browser" |
646 |
sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die |
647 |
|
648 |
# Install GNOME default application entry (bug #303100). |
649 |
if use gnome; then |
650 |
dodir /usr/share/gnome-control-center/default-apps || die |
651 |
insinto /usr/share/gnome-control-center/default-apps |
652 |
newins "${FILESDIR}"/chromium-browser.xml chromium-browser${CHROMIUM_SUFFIX}.xml || die |
653 |
if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then |
654 |
sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" -i \ |
655 |
"${ED}"/usr/share/gnome-control-center/default-apps/chromium-browser${CHROMIUM_SUFFIX}.xml |
656 |
fi |
657 |
fi |
658 |
|
659 |
readme.gentoo_create_doc |
660 |
} |
661 |
|
662 |
pkg_postinst() { |
663 |
fdo-mime_desktop_database_update |
664 |
gnome2_icon_cache_update |
665 |
readme.gentoo_print_elog |
666 |
} |