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-23.0.1271.95.ebuild ChangeLog chromium-23.0.1271.64.ebuild
Date: Fri, 30 Nov 2012 00:33:13
Message-Id: 20121130003303.40F7820C65@flycatcher.gentoo.org
1 floppym 12/11/30 00:33:03
2
3 Modified: ChangeLog
4 Added: chromium-23.0.1271.95.ebuild
5 Removed: chromium-23.0.1271.64.ebuild
6 Log:
7 Stable channel bump.
8
9 (Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4)
10
11 Revision Changes Path
12 1.759 www-client/chromium/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.759&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?rev=1.759&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/ChangeLog?r1=1.758&r2=1.759
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v
21 retrieving revision 1.758
22 retrieving revision 1.759
23 diff -u -r1.758 -r1.759
24 --- ChangeLog 27 Nov 2012 21:32:06 -0000 1.758
25 +++ ChangeLog 30 Nov 2012 00:33:03 -0000 1.759
26 @@ -1,6 +1,12 @@
27 # ChangeLog for www-client/chromium
28 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.758 2012/11/27 21:32:06 floppym Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.759 2012/11/30 00:33:03 floppym Exp $
31 +
32 +*chromium-23.0.1271.95 (30 Nov 2012)
33 +
34 + 30 Nov 2012; Mike Gilbert <floppym@g.o> +chromium-23.0.1271.95.ebuild,
35 + -chromium-23.0.1271.64.ebuild:
36 + Stable channel bump.
37
38 *chromium-24.0.1312.25 (27 Nov 2012)
39
40
41
42
43 1.1 www-client/chromium/chromium-23.0.1271.95.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-23.0.1271.95.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/chromium-23.0.1271.95.ebuild?rev=1.1&content-type=text/plain
47
48 Index: chromium-23.0.1271.95.ebuild
49 ===================================================================
50 # Copyright 1999-2012 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-23.0.1271.95.ebuild,v 1.1 2012/11/30 00:33:03 floppym Exp $
53
54 EAPI="4"
55 PYTHON_DEPEND="2:2.6"
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 chromium eutils flag-o-matic multilib \
62 pax-utils portability python toolchain-funcs versionator virtualx
63
64 DESCRIPTION="Open-source version of Google Chrome web browser"
65 HOMEPAGE="http://chromium.org/"
66 SRC_URI="http://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.bz2"
67
68 LICENSE="BSD"
69 SLOT="0"
70 KEYWORDS="~amd64 ~x86"
71 IUSE="bindist cups gnome gnome-keyring kerberos pulseaudio selinux tcmalloc"
72
73 RDEPEND="app-arch/bzip2
74 cups? (
75 dev-libs/libgcrypt
76 >=net-print/cups-1.3.11
77 )
78 >=dev-lang/v8-3.11.10.6
79 >=dev-libs/elfutils-0.149
80 dev-libs/expat
81 >=dev-libs/icu-49.1.1-r1
82 >=dev-libs/libevent-1.4.13
83 dev-libs/libxml2[icu]
84 dev-libs/libxslt
85 >=dev-libs/nss-3.12.3
86 gnome? ( >=gnome-base/gconf-2.24.0 )
87 gnome-keyring? ( >=gnome-base/gnome-keyring-2.28.2 )
88 >=media-libs/alsa-lib-1.0.19
89 media-libs/flac
90 >=media-libs/libjpeg-turbo-1.2.0-r1
91 media-libs/libpng
92 >=media-libs/libwebp-0.2.0_rc1
93 media-libs/speex
94 pulseaudio? ( media-sound/pulseaudio )
95 sys-apps/dbus
96 sys-fs/udev
97 virtual/libusb:1
98 x11-libs/gtk+:2
99 x11-libs/libXinerama
100 x11-libs/libXScrnSaver
101 x11-libs/libXtst
102 kerberos? ( virtual/krb5 )
103 selinux? (
104 sec-policy/selinux-chromium
105 sys-libs/libselinux
106 )"
107 DEPEND="${RDEPEND}
108 >=dev-lang/nacl-toolchain-newlib-0_p9093
109 dev-lang/perl
110 dev-lang/yasm
111 dev-python/ply
112 dev-python/simplejson
113 >=dev-util/gperf-3.0.3
114 >=sys-devel/bison-2.4.3
115 sys-devel/flex
116 >=sys-devel/make-3.81-r2
117 virtual/pkgconfig
118 test? ( dev-python/pyftpdlib )"
119 RDEPEND+="
120 !=www-client/chromium-9999
121 x11-misc/xdg-utils
122 virtual/ttf-fonts"
123
124 if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
125 EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
126 fi
127
128 pkg_setup() {
129 if [[ "${SLOT}" == "0" ]]; then
130 CHROMIUM_SUFFIX=""
131 else
132 CHROMIUM_SUFFIX="-${SLOT}"
133 fi
134 CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser${CHROMIUM_SUFFIX}"
135
136 # Make sure the build system will use the right tools, bug #340795.
137 tc-export AR CC CXX RANLIB
138
139 # Make sure the build system will use the right python, bug #344367.
140 python_set_active_version 2
141 python_pkg_setup
142
143 if ! use selinux; then
144 chromium_suid_sandbox_check_kernel_config
145 fi
146
147 if use bindist; then
148 elog "bindist enabled: H.264 video support will be disabled."
149 else
150 elog "bindist disabled: Resulting binaries may not be legal to re-distribute."
151 fi
152 }
153
154 src_prepare() {
155 if ! use arm; then
156 ebegin "Preparing NaCl newlib toolchain"
157 pushd "${T}" >/dev/null || die
158 mkdir sdk || die
159 cp -a /usr/$(get_libdir)/nacl-toolchain-newlib sdk/nacl-sdk || die
160 mkdir -p "${S}"/native_client/toolchain/.tars || die
161 tar czf "${S}"/native_client/toolchain/.tars/naclsdk_linux_x86.tgz sdk || die
162 popd >/dev/null || die
163 eend $?
164 fi
165
166 # zlib-1.2.5.1-r1 renames the OF macro in zconf.h, bug 383371.
167 # sed -i '1i#define OF(x) x' \
168 # third_party/zlib/contrib/minizip/{ioapi,{,un}zip}.h || die
169
170 # Fix build without NaCl glibc toolchain.
171 epatch "${FILESDIR}/${PN}-ppapi-r0.patch"
172
173 # Fix unnecessary dependency on dbus-glib, bug #434346.
174 epatch "${FILESDIR}/${PN}-dbus-glib-r0.patch"
175
176 # Fix build with system ICU.
177 epatch "${FILESDIR}/${PN}-system-icu-r0.patch"
178
179 # Fix build with system speex, bug #432748.
180 epatch "${FILESDIR}/${PN}-system-speex-r0.patch"
181
182 # Missing gyp files in tarball.
183 # https://code.google.com/p/chromium/issues/detail?id=144823
184 if [[ -e chrome/test/data/nacl/nacl_test_data.gyp ]]; then
185 die "tarball fixed, please remove workaround"
186 fi
187
188 mkdir -p chrome/test/data/nacl
189 cat > chrome/test/data/nacl/nacl_test_data.gyp <<-EOF
190 {
191 'targets': [
192 {
193 'target_name': 'nacl_tests',
194 'type': 'none',
195 },
196 ],
197 }
198 EOF
199
200 epatch_user
201
202 # Remove most bundled libraries. Some are still needed.
203 find third_party -type f \! -iname '*.gyp*' \
204 \! -path 'third_party/WebKit/*' \
205 \! -path 'third_party/angle/*' \
206 \! -path 'third_party/cacheinvalidation/*' \
207 \! -path 'third_party/cld/*' \
208 \! -path 'third_party/ffmpeg/*' \
209 \! -path 'third_party/flac/flac.h' \
210 \! -path 'third_party/flot/*' \
211 \! -path 'third_party/gpsd/*' \
212 \! -path 'third_party/harfbuzz/*' \
213 \! -path 'third_party/hunspell/*' \
214 \! -path 'third_party/hyphen/*' \
215 \! -path 'third_party/iccjpeg/*' \
216 \! -path 'third_party/jsoncpp/*' \
217 \! -path 'third_party/khronos/*' \
218 \! -path 'third_party/launchpad_translations/*' \
219 \! -path 'third_party/leveldatabase/*' \
220 \! -path 'third_party/libjingle/*' \
221 \! -path 'third_party/libphonenumber/*' \
222 \! -path 'third_party/libsrtp/*' \
223 \! -path 'third_party/libusb/libusb.h' \
224 \! -path 'third_party/libva/*' \
225 \! -path 'third_party/libvpx/*' \
226 \! -path 'third_party/libxml/chromium/*' \
227 \! -path 'third_party/libXNVCtrl/*' \
228 \! -path 'third_party/libyuv/*' \
229 \! -path 'third_party/lss/*' \
230 \! -path 'third_party/mesa/*' \
231 \! -path 'third_party/modp_b64/*' \
232 \! -path 'third_party/mongoose/*' \
233 \! -path 'third_party/mt19937ar/*' \
234 \! -path 'third_party/npapi/*' \
235 \! -path 'third_party/openmax/*' \
236 \! -path 'third_party/ots/*' \
237 \! -path 'third_party/protobuf/*' \
238 \! -path 'third_party/qcms/*' \
239 \! -path 'third_party/re2/*' \
240 \! -path 'third_party/scons-2.0.1/*' \
241 \! -path 'third_party/sfntly/*' \
242 \! -path 'third_party/skia/*' \
243 \! -path 'third_party/smhasher/*' \
244 \! -path 'third_party/speex/speex.h' \
245 \! -path 'third_party/sqlite/*' \
246 \! -path 'third_party/tcmalloc/*' \
247 \! -path 'third_party/tlslite/*' \
248 \! -path 'third_party/trace-viewer/*' \
249 \! -path 'third_party/undoview/*' \
250 \! -path 'third_party/v8-i18n/*' \
251 \! -path 'third_party/webdriver/*' \
252 \! -path 'third_party/webgl_conformance/*' \
253 \! -path 'third_party/webrtc/*' \
254 \! -path 'third_party/zlib/*' \
255 -delete || die
256
257 local v8_bundled="$(chromium_bundled_v8_version)"
258 local v8_installed="$(chromium_installed_v8_version)"
259 einfo "V8 version: bundled - ${v8_bundled}; installed - ${v8_installed}"
260
261 # Remove bundled v8.
262 find v8 -type f \! -iname '*.gyp*' -delete || die
263
264 # The implementation files include v8 headers with full path,
265 # like #include "v8/include/v8.h". Make sure the system headers
266 # will be used.
267 # TODO: find a solution that can be upstreamed.
268 rmdir v8/include || die
269 ln -s /usr/include v8/include || die
270
271 # Make sure the build system will use the right python, bug #344367.
272 # Only convert directories that need it, to save time.
273 python_convert_shebangs -q -r 2 build tools
274 }
275
276 src_configure() {
277 local myconf=""
278
279 # Never tell the build system to "enable" SSE2, it has a few unexpected
280 # additions, bug #336871.
281 myconf+=" -Ddisable_sse2=1"
282
283 # Optional tcmalloc. Note it causes problems with e.g. NVIDIA
284 # drivers, bug #413637.
285 myconf+=" $(gyp_use tcmalloc linux_use_tcmalloc)"
286
287 # Disable glibc Native Client toolchain, we don't need it (bug #417019).
288 myconf+=" -Ddisable_glibc=1"
289
290 # TODO: also build with pnacl
291 myconf+=" -Ddisable_pnacl=1"
292
293 # Make it possible to remove third_party/adobe.
294 echo > "${T}/flapper_version.h" || die
295 myconf+=" -Dflapper_version_h_file=${T}/flapper_version.h"
296
297 # Use system-provided libraries.
298 # TODO: use_system_ffmpeg
299 # TODO: use_system_hunspell (upstream changes needed).
300 # TODO: use_system_speex (needs additional shims, bug #432748).
301 # TODO: use_system_ssl (http://crbug.com/58087).
302 # TODO: use_system_sqlite (http://crbug.com/22208).
303 # TODO: use_system_vpx
304 # TODO: use_system_zlib (forked, bug #432746).
305 myconf+="
306 -Duse_system_bzip2=1
307 -Duse_system_flac=1
308 -Duse_system_icu=1
309 -Duse_system_libevent=1
310 -Duse_system_libjpeg=1
311 -Duse_system_libpng=1
312 -Duse_system_libusb=1
313 -Duse_system_libwebp=1
314 -Duse_system_libxml=1
315 -Duse_system_speex=1
316 -Duse_system_v8=1
317 -Duse_system_xdg_utils=1
318 -Duse_system_yasm=1
319 -Duse_system_zlib=0"
320
321 # Optional dependencies.
322 # TODO: linux_link_kerberos, bug #381289.
323 myconf+="
324 $(gyp_use cups)
325 $(gyp_use gnome use_gconf)
326 $(gyp_use gnome-keyring use_gnome_keyring)
327 $(gyp_use gnome-keyring linux_link_gnome_keyring)
328 $(gyp_use kerberos)
329 $(gyp_use pulseaudio)
330 $(gyp_use selinux selinux)"
331
332 # Use explicit library dependencies instead of dlopen.
333 # This makes breakages easier to detect by revdep-rebuild.
334 myconf+="
335 -Dlinux_link_gsettings=1"
336
337 if ! use selinux; then
338 # Enable SUID sandbox.
339 myconf+="
340 -Dlinux_sandbox_path=${CHROMIUM_HOME}/chrome_sandbox
341 -Dlinux_sandbox_chrome_path=${CHROMIUM_HOME}/chrome"
342 fi
343
344 # Never use bundled gold binary. Disable gold linker flags for now.
345 myconf+="
346 -Dlinux_use_gold_binary=0
347 -Dlinux_use_gold_flags=0"
348
349 if ! use bindist; then
350 # Enable H.624 support in bundled ffmpeg.
351 myconf+=" -Dproprietary_codecs=1 -Dffmpeg_branding=Chrome"
352 fi
353
354 local myarch="$(tc-arch)"
355 if [[ $myarch = amd64 ]] ; then
356 myconf+=" -Dtarget_arch=x64"
357 elif [[ $myarch = x86 ]] ; then
358 myconf+=" -Dtarget_arch=ia32"
359 elif [[ $myarch = arm ]] ; then
360 # TODO: re-enable NaCl (NativeClient).
361 myconf+=" -Dtarget_arch=arm
362 -Darm_neon=0
363 -Ddisable_nacl=1"
364 else
365 die "Failed to determine target arch, got '$myarch'."
366 fi
367
368 # Make sure that -Werror doesn't get added to CFLAGS by the build system.
369 # Depending on GCC version the warnings are different and we don't want
370 # the build to fail because of that.
371 myconf+=" -Dwerror="
372
373 # Avoid CFLAGS problems, bug #352457, bug #390147.
374 if ! use custom-cflags; then
375 replace-flags "-Os" "-O2"
376 strip-flags
377 fi
378
379 egyp_chromium ${myconf} || die
380 }
381
382 src_compile() {
383 local test_targets
384 for x in base cacheinvalidation crypto \
385 googleurl gpu media net printing sql; do
386 test_targets+=" ${x}_unittests"
387 done
388
389 local make_targets="chrome chromedriver"
390 if ! use selinux; then
391 make_targets+=" chrome_sandbox"
392 fi
393 if use test; then
394 make_targets+=$test_targets
395 fi
396
397 # See bug #410883 for more info about the .host mess.
398 emake ${make_targets} BUILDTYPE=Release V=1 \
399 CC.host="$(tc-getCC)" CFLAGS.host="${CFLAGS}" \
400 CXX.host="$(tc-getCXX)" CXXFLAGS.host="${CXXFLAGS}" \
401 LINK.host="$(tc-getCXX)" LDFLAGS.host="${LDFLAGS}" \
402 AR.host="$(tc-getAR)" || die
403
404 pax-mark m out/Release/chrome
405 if use test; then
406 for x in $test_targets; do
407 pax-mark m out/Release/${x}
408 done
409 fi
410 }
411
412 src_test() {
413 # For more info see bug #350349.
414 local mylocale='en_US.utf8'
415 if ! locale -a | grep -q "$mylocale"; then
416 eerror "${PN} requires ${mylocale} locale for tests"
417 eerror "Please read the following guides for more information:"
418 eerror " http://www.gentoo.org/doc/en/guide-localization.xml"
419 eerror " http://www.gentoo.org/doc/en/utf-8.xml"
420 die "locale ${mylocale} is not supported"
421 fi
422
423 # For more info see bug #370957.
424 if [[ $UID -eq 0 ]]; then
425 die "Tests must be run as non-root. Please use FEATURES=userpriv."
426 fi
427
428 runtest() {
429 local cmd=$1
430 shift
431 local filter="--gtest_filter=$(IFS=:; echo "-${*}")"
432 einfo "${cmd}" "${filter}"
433 LC_ALL="${mylocale}" VIRTUALX_COMMAND="${cmd}" virtualmake "${filter}"
434 }
435
436 local excluded_base_unittests=(
437 "ICUStringConversionsTest.*" # bug #350347
438 "MessagePumpLibeventTest.*" # bug #398591
439 )
440 runtest out/Release/base_unittests "${excluded_base_unittests[@]}"
441
442 runtest out/Release/cacheinvalidation_unittests
443 runtest out/Release/crypto_unittests
444 runtest out/Release/googleurl_unittests
445 runtest out/Release/gpu_unittests
446 runtest out/Release/media_unittests
447
448 local excluded_net_unittests=(
449 "NetUtilTest.IDNToUnicode*" # bug 361885
450 "NetUtilTest.FormatUrl*" # see above
451 "DnsConfigServiceTest.GetSystemConfig" # bug #394883
452 "CertDatabaseNSSTest.ImportServerCert_SelfSigned" # bug #399269
453 "URLFetcher*" # bug #425764
454 "HTTPSOCSPTest.*" # bug #426630
455 "HTTPSEVCRLSetTest.*" # see above
456 "HTTPSCRLSetTest.*" # see above
457 )
458 runtest out/Release/net_unittests "${excluded_net_unittests[@]}"
459
460 runtest out/Release/printing_unittests
461 runtest out/Release/sql_unittests
462 }
463
464 src_install() {
465 exeinto "${CHROMIUM_HOME}"
466 doexe out/Release/chrome || die
467
468 if ! use selinux; then
469 doexe out/Release/chrome_sandbox || die
470 fperms 4755 "${CHROMIUM_HOME}/chrome_sandbox"
471 fi
472
473 doexe out/Release/chromedriver || die
474
475 if ! use arm; then
476 doexe out/Release/nacl_helper{,_bootstrap} || die
477 insinto "${CHROMIUM_HOME}"
478 doins out/Release/nacl_irt_*.nexe || die
479 doins out/Release/libppGoogleNaClPluginChrome.so || die
480 fi
481
482 newexe "${FILESDIR}"/chromium-launcher-r2.sh chromium-launcher.sh || die
483 if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then
484 sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" \
485 -i "${ED}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die
486 sed "s:chromium.desktop:chromium${CHROMIUM_SUFFIX}.desktop:g" \
487 -i "${ED}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die
488 sed "s:plugins:plugins --user-data-dir=\${HOME}/.config/chromium${CHROMIUM_SUFFIX}:" \
489 -i "${ED}"/"${CHROMIUM_HOME}"/chromium-launcher.sh || die
490 fi
491
492 # It is important that we name the target "chromium-browser",
493 # xdg-utils expect it; bug #355517.
494 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser${CHROMIUM_SUFFIX} || die
495 # keep the old symlink around for consistency
496 dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium${CHROMIUM_SUFFIX} || die
497
498 # Allow users to override command-line options, bug #357629.
499 dodir /etc/chromium || die
500 insinto /etc/chromium
501 newins "${FILESDIR}/chromium.default" "default" || die
502
503 pushd out/Release/locales > /dev/null || die
504 chromium_remove_language_paks
505 popd
506
507 insinto "${CHROMIUM_HOME}"
508 doins out/Release/*.pak || die
509
510 doins -r out/Release/locales || die
511 doins -r out/Release/resources || die
512
513 newman out/Release/chrome.1 chromium${CHROMIUM_SUFFIX}.1 || die
514 newman out/Release/chrome.1 chromium-browser${CHROMIUM_SUFFIX}.1 || die
515
516 doexe out/Release/libffmpegsumo.so || die
517
518 # Install icons and desktop entry.
519 local branding size
520 for size in 16 22 24 32 48 64 128 256 ; do
521 case ${size} in
522 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
523 *) branding="chrome/app/theme/chromium" ;;
524 esac
525 newicon -s ${size} "${branding}/product_logo_${size}.png" \
526 chromium-browser${CHROMIUM_SUFFIX}.png
527 done
528
529 local mime_types="text/html;text/xml;application/xhtml+xml;"
530 mime_types+="x-scheme-handler/http;x-scheme-handler/https;" # bug #360797
531 mime_types+="x-scheme-handler/ftp;" # bug #412185
532 mime_types+="x-scheme-handler/mailto;x-scheme-handler/webcal;" # bug #416393
533 make_desktop_entry \
534 chromium-browser${CHROMIUM_SUFFIX} \
535 "Chromium${CHROMIUM_SUFFIX}" \
536 chromium-browser${CHROMIUM_SUFFIX} \
537 "Network;WebBrowser" \
538 "MimeType=${mime_types}\nStartupWMClass=chromium-browser"
539 sed -e "/^Exec/s/$/ %U/" -i "${ED}"/usr/share/applications/*.desktop || die
540
541 # Install GNOME default application entry (bug #303100).
542 if use gnome; then
543 dodir /usr/share/gnome-control-center/default-apps || die
544 insinto /usr/share/gnome-control-center/default-apps
545 newins "${FILESDIR}"/chromium-browser.xml chromium-browser${CHROMIUM_SUFFIX}.xml || die
546 if [[ "${CHROMIUM_SUFFIX}" != "" ]]; then
547 sed "s:chromium-browser:chromium-browser${CHROMIUM_SUFFIX}:g" -i \
548 "${ED}"/usr/share/gnome-control-center/default-apps/chromium-browser${CHROMIUM_SUFFIX}.xml
549 fi
550 fi
551 }