summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Hajdan <phajdan.jr@gentoo.org>2010-12-18 15:05:43 +0000
committerPaweł Hajdan <phajdan.jr@gentoo.org>2010-12-18 15:05:43 +0000
commitf0e3b23af288d4bfe795ef26ab4671e2c3f01f68 (patch)
tree6c5037dbde8ec84c52453e88eaee8d49ec2beeb8 /www-client
parentDelete older ebuild. (diff)
downloadgentoo-2-f0e3b23af288d4bfe795ef26ab4671e2c3f01f68.tar.gz
gentoo-2-f0e3b23af288d4bfe795ef26ab4671e2c3f01f68.tar.bz2
gentoo-2-f0e3b23af288d4bfe795ef26ab4671e2c3f01f68.zip
Version bump for dev channel release. Fixes bug #348458 by Mike Gilbert <floppymaster@gmail.com>, used modified patch by Mike Gilbert <floppymaster@gmail.com>. Remove old ebuilds and patches.
(Portage version: 2.1.9.24/cvs/Linux i686)
Diffstat (limited to 'www-client')
-rw-r--r--www-client/chromium/ChangeLog12
-rw-r--r--www-client/chromium/chromium-10.0.612.1.ebuild (renamed from www-client/chromium/chromium-9.0.597.16.ebuild)11
-rw-r--r--www-client/chromium/chromium-8.0.552.215.ebuild276
-rw-r--r--www-client/chromium/files/chromium-locale-glib-r0.patch415
-rw-r--r--www-client/chromium/files/chromium-system-icu-r2.patch36
-rw-r--r--www-client/chromium/files/chromium-tests-r0.patch11
6 files changed, 52 insertions, 709 deletions
diff --git a/www-client/chromium/ChangeLog b/www-client/chromium/ChangeLog
index 8a23789a7ed0..25a3649c8683 100644
--- a/www-client/chromium/ChangeLog
+++ b/www-client/chromium/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for www-client/chromium
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.243 2010/12/16 15:23:43 phajdan.jr Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/ChangeLog,v 1.244 2010/12/18 15:05:43 phajdan.jr Exp $
+
+*chromium-10.0.612.1 (18 Dec 2010)
+
+ 18 Dec 2010; Pawel Hajdan jr <phajdan.jr@gentoo.org>
+ -files/chromium-locale-glib-r0.patch, -chromium-8.0.552.215.ebuild,
+ +files/chromium-system-icu-r2.patch, -chromium-9.0.597.16.ebuild,
+ -files/chromium-tests-r0.patch, +chromium-10.0.612.1.ebuild:
+ Version bump for dev channel release. Fixes bug #348458 by Mike Gilbert
+ <floppymaster@gmail.com>, used modified patch by Mike Gilbert
+ <floppymaster@gmail.com>. Remove old ebuilds and patches.
16 Dec 2010; Pawel Hajdan jr <phajdan.jr@gentoo.org>
chromium-9.0.597.19.ebuild:
diff --git a/www-client/chromium/chromium-9.0.597.16.ebuild b/www-client/chromium/chromium-10.0.612.1.ebuild
index 7f996eedce5c..a537609067c8 100644
--- a/www-client/chromium/chromium-9.0.597.16.ebuild
+++ b/www-client/chromium/chromium-10.0.612.1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-9.0.597.16.ebuild,v 1.1 2010/12/10 19:50:12 alexxy Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-10.0.612.1.ebuild,v 1.1 2010/12/18 15:05:43 phajdan.jr Exp $
EAPI="3"
PYTHON_DEPEND="2:2.6"
@@ -14,14 +14,14 @@ SRC_URI="http://build.chromium.org/buildbot/official/${P}.tar.bz2"
LICENSE="BSD"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~x86"
+KEYWORDS="~amd64 ~x86"
IUSE="cups +gecko-mediaplayer gnome gnome-keyring system-sqlite system-v8"
RDEPEND="app-arch/bzip2
system-sqlite? (
- >=dev-db/sqlite-3.6.23.1[fts3,icu,secure-delete,threadsafe]
+ >=dev-db/sqlite-3.7.2[fts3,icu,secure-delete,threadsafe]
)
- system-v8? ( >=dev-lang/v8-2.5.9.1 )
+ system-v8? ( >=dev-lang/v8-3.0.0.1 )
dev-libs/dbus-glib
>=dev-libs/icu-4.4.1
>=dev-libs/libevent-1.4.13
@@ -107,8 +107,7 @@ src_prepare() {
# Make sure we don't use bundled libvpx headers.
epatch "${FILESDIR}"/${PN}-system-vpx-r1.patch
- # Small fixes to make tests compile, to be upstreamed.
- epatch "${FILESDIR}"/${PN}-tests-r0.patch
+ epatch "${FILESDIR}"/${PN}-system-icu-r2.patch
remove_bundled_lib "third_party/bzip2"
remove_bundled_lib "third_party/codesighs"
diff --git a/www-client/chromium/chromium-8.0.552.215.ebuild b/www-client/chromium/chromium-8.0.552.215.ebuild
deleted file mode 100644
index f3aa503872fb..000000000000
--- a/www-client/chromium/chromium-8.0.552.215.ebuild
+++ /dev/null
@@ -1,276 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-client/chromium/chromium-8.0.552.215.ebuild,v 1.3 2010/12/09 16:14:13 rich0 Exp $
-
-EAPI="2"
-
-inherit eutils flag-o-matic multilib pax-utils portability toolchain-funcs
-
-DESCRIPTION="Open-source version of Google Chrome web browser"
-HOMEPAGE="http://chromium.org/"
-SRC_URI="http://build.chromium.org/buildbot/official/${P}.tar.bz2"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 ~arm x86"
-IUSE="cups +gecko-mediaplayer gnome gnome-keyring system-sqlite system-v8"
-
-RDEPEND="app-arch/bzip2
- system-sqlite? (
- >=dev-db/sqlite-3.6.23.1[fts3,icu,secure-delete,threadsafe]
- )
- system-v8? ( ~dev-lang/v8-2.4.9.13 )
- >=dev-libs/icu-4.4.1
- >=dev-libs/libevent-1.4.13
- dev-libs/libxml2
- dev-libs/libxslt
- >=dev-libs/nss-3.12.3
- >=gnome-base/gconf-2.24.0
- gnome-keyring? ( >=gnome-base/gnome-keyring-2.28.2 )
- >=media-libs/alsa-lib-1.0.19
- virtual/jpeg
- media-libs/libpng
- >=media-video/ffmpeg-0.6_p25423[threads]
- cups? ( >=net-print/cups-1.3.11 )
- sys-libs/zlib
- >=x11-libs/gtk+-2.14.7
- x11-libs/libXScrnSaver"
-DEPEND="${RDEPEND}
- dev-lang/perl
- >=dev-util/gperf-3.0.3
- >=dev-util/pkgconfig-0.23
- sys-devel/flex"
-RDEPEND+="
- || (
- x11-themes/gnome-icon-theme
- x11-themes/oxygen-molecule
- x11-themes/tango-icon-theme
- x11-themes/xfce4-icon-theme
- )
- x11-misc/xdg-utils
- virtual/ttf-fonts
- gecko-mediaplayer? ( !www-plugins/gecko-mediaplayer[gnome] )"
-
-remove_bundled_lib() {
- einfo "Removing bundled library $1 ..."
- local out
- out="$(find $1 -type f \! -iname '*.gyp' -print -delete)" \
- || die "failed to remove bundled library $1"
- if [[ -z $out ]]; then
- die "no files matched when removing bundled library $1"
- fi
-}
-
-pkg_setup() {
- CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser"
-
- # Make sure the build system will use the right tools, bug #340795.
- tc-export AR CC CXX RANLIB
-
- # Prevent user problems like bug #299777.
- if ! grep -q /dev/shm <<< $(get_mounts); then
- ewarn "You don't have tmpfs mounted at /dev/shm."
- ewarn "${PN} may fail to start in that configuration."
- ewarn "Please uncomment the /dev/shm entry in /etc/fstab,"
- ewarn "and run 'mount /dev/shm'."
- fi
- if [ `stat -c %a /dev/shm` -ne 1777 ]; then
- ewarn "/dev/shm does not have correct permissions."
- ewarn "${PN} may fail to start in that configuration."
- ewarn "Please run 'chmod 1777 /dev/shm'."
- fi
-}
-
-src_prepare() {
- # Small fix to the system-provided icu support,
- # to be upstreamed.
- epatch "${FILESDIR}"/${PN}-system-icu-r1.patch
-
- # Enable optional support for gecko-mediaplayer.
- epatch "${FILESDIR}"/${PN}-gecko-mediaplayer-r0.patch
-
- # Backport a fix for bug #343971.
- epatch "${FILESDIR}"/${PN}-locale-glib-r1.patch
-
- remove_bundled_lib "third_party/bzip2"
- remove_bundled_lib "third_party/codesighs"
- remove_bundled_lib "third_party/icu"
- remove_bundled_lib "third_party/jemalloc"
- remove_bundled_lib "third_party/lcov"
- remove_bundled_lib "third_party/libevent"
- remove_bundled_lib "third_party/libjpeg"
- remove_bundled_lib "third_party/libpng"
- remove_bundled_lib "third_party/libxml"
- remove_bundled_lib "third_party/libxslt"
- remove_bundled_lib "third_party/lzma_sdk"
- remove_bundled_lib "third_party/molokocacao"
- remove_bundled_lib "third_party/ocmock"
- remove_bundled_lib "third_party/pyftpdlib"
- remove_bundled_lib "third_party/simplejson"
- remove_bundled_lib "third_party/tlslite"
- # TODO: also remove third_party/ffmpeg (needs to be compile-tested).
- # TODO: also remove third_party/zlib. For now the compilation fails if we
- # remove it (minizip-related).
-
- if use system-sqlite; then
- remove_bundled_lib "third_party/sqlite/src"
- remove_bundled_lib "third_party/sqlite/preprocessed"
- fi
-
- if use system-v8; then
- # Provide our own gyp file that links with the system v8.
- # TODO: move this upstream.
- cp "${FILESDIR}"/v8.gyp v8/tools/gyp || die
-
- remove_bundled_lib "v8"
-
- # The implementation files include v8 headers with full path,
- # like #include "v8/include/v8.h". Make sure the system headers
- # will be used.
- # TODO: find a solution that can be upstreamed.
- rmdir v8/include || die
- ln -s /usr/include v8/include || die
- fi
-}
-
-src_configure() {
- local myconf=""
-
- # Never tell the build system to "enable" SSE2, it has a few unexpected
- # additions, bug #336871.
- myconf+=" -Ddisable_sse2=1"
-
- # Use system-provided libraries.
- # TODO: use_system_hunspell (upstream changes needed).
- # TODO: use_system_ssl (need to consult upstream).
- myconf+="
- -Duse_system_bzip2=1
- -Duse_system_ffmpeg=1
- -Duse_system_icu=1
- -Duse_system_libevent=1
- -Duse_system_libjpeg=1
- -Duse_system_libpng=1
- -Duse_system_libxml=1
- -Duse_system_zlib=1"
-
- if use system-sqlite; then
- myconf+=" -Duse_system_sqlite=1"
- fi
-
- # The dependency on cups is optional, see bug #324105.
- if use cups; then
- myconf+=" -Duse_cups=1"
- else
- myconf+=" -Duse_cups=0"
- fi
-
- if use "gnome-keyring"; then
- myconf+=" -Duse_gnome_keyring=1 -Dlinux_link_gnome_keyring=1"
- else
- # TODO: we should also disable code trying to dlopen
- # gnome-keyring in that case.
- myconf+=" -Duse_gnome_keyring=0 -Dlinux_link_gnome_keyring=0"
- fi
-
- # Enable sandbox.
- myconf+="
- -Dlinux_sandbox_path=${CHROMIUM_HOME}/chrome_sandbox
- -Dlinux_sandbox_chrome_path=${CHROMIUM_HOME}/chrome"
-
- if host-is-pax; then
- # Prevent the build from failing (bug #301880). The performance
- # difference is very small.
- myconf+=" -Dv8_use_snapshot=0"
- fi
-
- if use gecko-mediaplayer; then
- # Disable hardcoded blacklist for gecko-mediaplayer.
- # When www-plugins/gecko-mediaplayer is compiled with USE=gnome, it causes
- # the browser to hang. We can handle the situation via dependencies,
- # thus making it possible to use gecko-mediaplayer.
- append-flags -DGENTOO_CHROMIUM_ENABLE_GECKO_MEDIAPLAYER
- fi
-
- # Our system ffmpeg should support more codecs than the bundled one
- # for Chromium.
- myconf+=" -Dproprietary_codecs=1"
-
- # Use target arch detection logic from bug #296917.
- local myarch="$ABI"
- [[ $myarch = "" ]] && myarch="$ARCH"
-
- if [[ $myarch = amd64 ]] ; then
- myconf+=" -Dtarget_arch=x64"
- elif [[ $myarch = x86 ]] ; then
- myconf+=" -Dtarget_arch=ia32"
- elif [[ $myarch = arm ]] ; then
- # TODO: check this again after
- # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39509 is fixed.
- append-flags -fno-tree-sink
-
- myconf+=" -Dtarget_arch=arm -Ddisable_nacl=1 -Dlinux_use_tcmalloc=0"
- else
- die "Failed to determine target arch, got '$myarch'."
- fi
-
- if [[ "$(gcc-major-version)$(gcc-minor-version)" == "44" ]]; then
- myconf+=" -Dno_strict_aliasing=1 -Dgcc_version=44"
- fi
-
- # Work around a likely GCC bug, see bug #331945.
- if [[ "$(gcc-major-version)$(gcc-minor-version)" == "45" ]]; then
- append-flags -fno-ipa-cp
- fi
-
- # Make sure that -Werror doesn't get added to CFLAGS by the build system.
- # Depending on GCC version the warnings are different and we don't want
- # the build to fail because of that.
- myconf+=" -Dwerror="
-
- build/gyp_chromium --depth=. ${myconf} || die
-}
-
-src_compile() {
- emake chrome chrome_sandbox BUILDTYPE=Release V=1 || die
-}
-
-src_install() {
- exeinto "${CHROMIUM_HOME}"
- pax-mark m out/Release/chrome
- doexe out/Release/chrome
- doexe out/Release/chrome_sandbox || die
- fperms 4755 "${CHROMIUM_HOME}/chrome_sandbox"
- doexe out/Release/xdg-settings || die
- doexe "${FILESDIR}"/chromium-launcher.sh || die
-
- insinto "${CHROMIUM_HOME}"
- doins out/Release/chrome.pak || die
- doins out/Release/resources.pak || die
-
- doins -r out/Release/locales || die
- doins -r out/Release/resources || die
-
- # chrome.1 is for chromium --help
- newman out/Release/chrome.1 chrome.1 || die
- newman out/Release/chrome.1 chromium.1 || die
-
- # Chromium looks for these in its folder
- # See media_posix.cc and base_paths_linux.cc
- dosym /usr/$(get_libdir)/libavcodec.so.52 "${CHROMIUM_HOME}" || die
- dosym /usr/$(get_libdir)/libavformat.so.52 "${CHROMIUM_HOME}" || die
- dosym /usr/$(get_libdir)/libavutil.so.50 "${CHROMIUM_HOME}" || die
-
- # Install icon and desktop entry.
- newicon out/Release/product_logo_48.png ${PN}-browser.png || die
- dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium || die
- make_desktop_entry chromium "Chromium" ${PN}-browser "Network;WebBrowser" \
- "MimeType=text/html;text/xml;application/xhtml+xml;"
- sed -e "/^Exec/s/$/ %U/" -i "${D}"/usr/share/applications/*.desktop || die
-
- # Install GNOME default application entry (bug #303100).
- if use gnome; then
- dodir /usr/share/gnome-control-center/default-apps || die
- insinto /usr/share/gnome-control-center/default-apps
- doins "${FILESDIR}"/chromium.xml || die
- fi
-}
diff --git a/www-client/chromium/files/chromium-locale-glib-r0.patch b/www-client/chromium/files/chromium-locale-glib-r0.patch
deleted file mode 100644
index eb9bc7dc7312..000000000000
--- a/www-client/chromium/files/chromium-locale-glib-r0.patch
+++ /dev/null
@@ -1,415 +0,0 @@
-Index: app/l10n_util.cc
-===================================================================
---- app/l10n_util.cc (revision 63359)
-+++ app/l10n_util.cc (working copy)
-@@ -4,6 +4,10 @@
-
- #include "app/l10n_util.h"
-
-+#if defined(TOOLKIT_USES_GTK)
-+#include <glib/gutils.h>
-+#endif
-+
- #include <cstdlib>
-
- #include "app/app_paths.h"
-@@ -384,43 +335,71 @@
- namespace l10n_util {
-
- std::string GetApplicationLocale(const std::string& pref_locale) {
--#if !defined(OS_MACOSX)
-+#if defined(OS_MACOSX)
-+
-+ // Use any override (Cocoa for the browser), otherwise use the preference
-+ // passed to the function.
-+ std::string app_locale = l10n_util::GetLocaleOverride();
-+ if (app_locale.empty())
-+ app_locale = pref_locale;
-+
-+ // The above should handle all of the cases Chrome normally hits, but for some
-+ // unit tests, we need something to fall back too.
-+ if (app_locale.empty())
-+ app_locale = "en-US";
-+
-+ // Windows/Linux call SetICUDefaultLocale after determining the actual locale
-+ // with CheckAndResolveLocal to make ICU APIs work in that locale.
-+ // Mac doesn't use a locale directory tree of resources (it uses Mac style
-+ // resources), so mirror the Windows/Linux behavior of calling
-+ // SetICUDefaultLocale.
-+ base::i18n::SetICUDefaultLocale(app_locale);
-+ return app_locale;
-+
-+#else
-+
- FilePath locale_path;
- PathService::Get(app::DIR_LOCALES, &locale_path);
- std::string resolved_locale;
- std::vector<std::string> candidates;
-- const std::string system_locale = GetSystemLocale();
-
- // We only use --lang and the app pref on Windows. On Linux, we only
- // look at the LC_*/LANG environment variables. We do, however, pass --lang
- // to renderer and plugin processes so they know what language the parent
- // process decided to use.
-+
- #if defined(OS_WIN)
-+
- // First, try the preference value.
- if (!pref_locale.empty())
- candidates.push_back(pref_locale);
-
- // Next, try the system locale.
-- candidates.push_back(system_locale);
-+ candidates.push_back(base::i18n::GetConfiguredLocale());
-
- #elif defined(OS_CHROMEOS)
-+
- // On ChromeOS, use the application locale preference.
- if (!pref_locale.empty())
- candidates.push_back(pref_locale);
-
--#elif defined(OS_POSIX)
-- // On POSIX, we also check LANGUAGE environment variable, which is supported
-- // by gettext to specify a priority list of prefered languages.
-- const char* env_language = ::getenv("LANGUAGE");
-- if (env_language)
-- SplitAndNormalizeLanguageList(env_language, &candidates);
-+#elif defined(OS_POSIX) && defined(TOOLKIT_USES_GTK)
-
-- // Only fallback to the system locale if LANGUAGE is not specified.
-- // We emulate gettext's behavior here, which ignores LANG/LC_MESSAGES/LC_ALL
-- // when LANGUAGE is specified. If no language specified in LANGUAGE is valid,
-- // then just fallback to the locale based on LC_ALL/LANG.
-- if (candidates.empty())
-- candidates.push_back(system_locale);
-+ // GLib implements correct environment variable parsing with
-+ // the precedence order: LANGUAGE, LC_ALL, LC_MESSAGES and LANG.
-+ // We used to use our custom parsing code along with ICU for this purpose.
-+ // If we have a port that does not depend on GTK, we have to
-+ // restore our custom code for that port.
-+ const char* const* languages = g_get_language_names();
-+ DCHECK(languages); // A valid pointer is guaranteed.
-+ DCHECK(*languages); // At least one entry, "C", is guaranteed.
-+
-+ for (; *languages != NULL; ++languages) {
-+ candidates.push_back(base::i18n::GetCanonicalLocale(*languages));
-+ }
-+
-+#else
-+#error Unsupported platform, see build/build_config.h
- #endif
-
- std::vector<std::string>::const_iterator i = candidates.begin();
-@@ -443,27 +422,7 @@
-
- return std::string();
-
--#else // !defined(OS_MACOSX)
--
-- // Use any override (Cocoa for the browser), otherwise use the preference
-- // passed to the function.
-- std::string app_locale = l10n_util::GetLocaleOverride();
-- if (app_locale.empty())
-- app_locale = pref_locale;
--
-- // The above should handle all of the cases Chrome normally hits, but for some
-- // unit tests, we need something to fall back too.
-- if (app_locale.empty())
-- app_locale = "en-US";
--
-- // Windows/Linux call SetICUDefaultLocale after determining the actual locale
-- // with CheckAndResolveLocal to make ICU APIs work in that locale.
-- // Mac doesn't use a locale directory tree of resources (it uses Mac style
-- // resources), so mirror the Windows/Linux behavior of calling
-- // SetICUDefaultLocale.
-- base::i18n::SetICUDefaultLocale(app_locale);
-- return app_locale;
--#endif // !defined(OS_MACOSX)
-+#endif
- }
-
- string16 GetDisplayNameForLocale(const std::string& locale,
-Index: app/l10n_util_unittest.cc
-===================================================================
---- app/l10n_util_unittest.cc (revision 63359)
-+++ app/l10n_util_unittest.cc (working copy)
-@@ -100,7 +100,17 @@
- // The meaning of that API, on the Mac, is "the locale used by Cocoa's main
- // nib file", which clearly can't be stubbed by a test app that doesn't use
- // Cocoa.
-+
-+void SetDefaultLocaleForTest(const std::string& tag, base::Environment* env) {
-+#if defined(OS_POSIX) && !defined(OS_CHROMEOS)
-+ env->SetVar("LANGUAGE", tag);
-+#else
-+ SetICUDefaultLocale(tag);
-+#endif
-+}
-+
- TEST_F(L10nUtilTest, GetAppLocale) {
-+ scoped_ptr<base::Environment> env;
- // Use a temporary locale dir so we don't have to actually build the locale
- // dlls for this test.
- FilePath orig_locale_dir;
-@@ -140,7 +150,7 @@
- icu::Locale locale = icu::Locale::getDefault();
-
- #if defined(OS_POSIX) && !defined(OS_CHROMEOS)
-- scoped_ptr<base::Environment> env(base::Environment::Create());
-+ env.reset(base::Environment::Create());
-
- // Test the support of LANGUAGE environment variable.
- SetICUDefaultLocale("en-US");
-@@ -163,15 +173,25 @@
- env->SetVar("LANGUAGE", "/fr:zh_CN");
- EXPECT_EQ("zh-CN", l10n_util::GetApplicationLocale(""));
-
-- // Make sure the follow tests won't be affected by LANGUAGE environment
-- // variable.
-+ // Test prioritization of the different environment variables.
-+ env->SetVar("LANGUAGE", "fr");
-+ env->SetVar("LC_ALL", "es");
-+ env->SetVar("LC_MESSAGES", "he");
-+ env->SetVar("LANG", "nb");
-+ EXPECT_EQ("fr", l10n_util::GetApplicationLocale(""));
- env->UnSetVar("LANGUAGE");
-+ EXPECT_EQ("es", l10n_util::GetApplicationLocale(""));
-+ env->UnSetVar("LC_ALL");
-+ EXPECT_EQ("he", l10n_util::GetApplicationLocale(""));
-+ env->UnSetVar("LC_MESSAGES");
-+ EXPECT_EQ("nb", l10n_util::GetApplicationLocale(""));
-+ env->UnSetVar("LANG");
- #endif // defined(OS_POSIX) && !defined(OS_CHROMEOS)
-
-- SetICUDefaultLocale("en-US");
-+ SetDefaultLocaleForTest("en-US", env.get());
- EXPECT_EQ("en-US", l10n_util::GetApplicationLocale(""));
-
-- SetICUDefaultLocale("xx");
-+ SetDefaultLocaleForTest("xx", env.get());
- EXPECT_EQ("en-US", l10n_util::GetApplicationLocale(""));
-
- #if defined(OS_CHROMEOS)
-@@ -184,31 +204,31 @@
- EXPECT_EQ("en-GB", l10n_util::GetApplicationLocale("en-GB"));
-
- #else // defined(OS_CHROMEOS)
-- SetICUDefaultLocale("en-GB");
-+ SetDefaultLocaleForTest("en-GB", env.get());
- EXPECT_EQ("en-GB", l10n_util::GetApplicationLocale(""));
-
-- SetICUDefaultLocale("fr-CA");
-+ SetDefaultLocaleForTest("fr-CA", env.get());
- EXPECT_EQ("fr", l10n_util::GetApplicationLocale(""));
-
-- SetICUDefaultLocale("es-MX");
-+ SetDefaultLocaleForTest("es-MX", env.get());
- EXPECT_EQ("es-419", l10n_util::GetApplicationLocale(""));
-
-- SetICUDefaultLocale("es-AR");
-+ SetDefaultLocaleForTest("es-AR", env.get());
- EXPECT_EQ("es-419", l10n_util::GetApplicationLocale(""));
-
-- SetICUDefaultLocale("es-ES");
-+ SetDefaultLocaleForTest("es-ES", env.get());
- EXPECT_EQ("es", l10n_util::GetApplicationLocale(""));
-
-- SetICUDefaultLocale("es");
-+ SetDefaultLocaleForTest("es", env.get());
- EXPECT_EQ("es", l10n_util::GetApplicationLocale(""));
-
-- SetICUDefaultLocale("zh-HK");
-+ SetDefaultLocaleForTest("zh-HK", env.get());
- EXPECT_EQ("zh-TW", l10n_util::GetApplicationLocale(""));
-
-- SetICUDefaultLocale("zh-MK");
-+ SetDefaultLocaleForTest("zh-MK", env.get());
- EXPECT_EQ("zh-TW", l10n_util::GetApplicationLocale(""));
-
-- SetICUDefaultLocale("zh-SG");
-+ SetDefaultLocaleForTest("zh-SG", env.get());
- EXPECT_EQ("zh-CN", l10n_util::GetApplicationLocale(""));
- #endif // defined (OS_CHROMEOS)
-
-Index: base/i18n/rtl.cc
-===================================================================
---- base/i18n/rtl.cc (revision 63359)
-+++ base/i18n/rtl.cc (working copy)
-@@ -18,26 +18,58 @@
- #include <gtk/gtk.h>
- #endif
-
-+namespace {
-+
-+// Extract language and country, ignore keywords, concatenate using dash.
-+std::string GetLocaleString(const icu::Locale& locale) {
-+ const char* language = locale.getLanguage();
-+ const char* country = locale.getCountry();
-+
-+ std::string result =
-+ (language != NULL && *language != '\0') ? language : "und";
-+
-+ if (country != NULL && *country != '\0') {
-+ result += '-';
-+ result += country;
-+ }
-+
-+ return result;
-+}
-+
-+} // namespace
-+
- namespace base {
- namespace i18n {
-
- // Represents the locale-specific ICU text direction.
- static TextDirection g_icu_text_direction = UNKNOWN_DIRECTION;
-
-+#if defined(OS_WIN)
- void GetLanguageAndRegionFromOS(std::string* lang, std::string* region) {
- // Later we may have to change this to be OS-dependent so that
- // it's not affected by ICU's default locale. It's all right
- // to do this way because SetICUDefaultLocale is internal
- // to this file and we know that it's not yet called when this function
- // is called.
-- icu::Locale locale = icu::Locale::getDefault();
-+ const icu::Locale& locale = icu::Locale::getDefault();
- const char* language = locale.getLanguage();
- const char* country = locale.getCountry();
- DCHECK(language);
- *lang = language;
- *region = country;
- }
-+#endif
-
-+// Convert the ICU default locale to a string.
-+std::string GetConfiguredLocale() {
-+ return GetLocaleString(icu::Locale::getDefault());
-+}
-+
-+// Convert the ICU canonicalized locale to a string.
-+std::string GetCanonicalLocale(const char* locale) {
-+ return GetLocaleString(icu::Locale::createCanonical(locale));
-+}
-+
- // Convert Chrome locale name to ICU locale name
- std::string ICULocaleName(const std::string& locale_string) {
- // If not Spanish, just return it.
-@@ -50,13 +82,14 @@
- // locale. If it's es-RR other than es-ES, map to es-RR. Otherwise, map
- // to es-MX (the most populous in Spanish-speaking Latin America).
- if (LowerCaseEqualsASCII(locale_string, "es-419")) {
-- std::string lang, region;
-- GetLanguageAndRegionFromOS(&lang, &region);
-- if (LowerCaseEqualsASCII(lang, "es") &&
-- !LowerCaseEqualsASCII(region, "es")) {
-- lang.append("-");
-- lang.append(region);
-- return lang;
-+ const icu::Locale& locale = icu::Locale::getDefault();
-+ std::string language = locale.getLanguage();
-+ const char* country = locale.getCountry();
-+ if (LowerCaseEqualsASCII(language, "es") &&
-+ !LowerCaseEqualsASCII(country, "es")) {
-+ language += '-';
-+ language += country;
-+ return language;
- }
- return "es-MX";
- }
-Index: base/i18n/rtl.h
-===================================================================
---- base/i18n/rtl.h (revision 63359)
-+++ base/i18n/rtl.h (working copy)
-@@ -29,9 +29,19 @@
- LEFT_TO_RIGHT,
- };
-
--// Get language and region from the OS.
-+#if defined(OS_WIN)
-+// Get language and region from the OS. Used by Chrome Frame.
- void GetLanguageAndRegionFromOS(std::string* lang, std::string* region);
-+#endif
-
-+// Get the locale that the currently running process has been configured to use.
-+// The return value is of the form language[-country] (e.g., en-US) where the
-+// language is the 2 or 3 letter code from ISO-639.
-+std::string GetConfiguredLocale();
-+
-+// Canonicalize a string (eg. a POSIX locale string) to a Chrome locale name.
-+std::string GetCanonicalLocale(const char* locale);
-+
- // Sets the default locale of ICU.
- // Once the application locale of Chrome in GetApplicationLocale is determined,
- // the default locale of ICU need to be changed to match the application locale
-@@ -136,7 +146,7 @@
- // string is wrapped with LRE (Left-To-Right Embedding) and PDF (Pop
- // Directional Formatting) marks and returned. In LTR locale, the string itself
- // is returned.
--string16 GetDisplayStringInLTRDirectionality(const string16& text)
-+string16 GetDisplayStringInLTRDirectionality(const string16& text)
- WARN_UNUSED_RESULT;
-
- // Strip the beginning (U+202A..U+202B, U+202D..U+202E) and/or ending (U+202C)
---- app/l10n_util.cc.orig 2010-11-04 13:19:45.000000000 +0100
-+++ app/l10n_util.cc 2010-11-04 13:20:46.000000000 +0100
-@@ -313,59 +313,6 @@
- return false;
- }
-
--// Get the locale of the operating system. The return value is of the form
--// language[-country] (e.g., en-US) where the language is the 2 letter code from
--// ISO-639.
--std::string GetSystemLocale() {
-- std::string language, region;
-- base::i18n::GetLanguageAndRegionFromOS(&language, &region);
-- std::string ret;
-- if (!language.empty())
-- ret.append(language);
-- if (!region.empty()) {
-- ret.append("-");
-- ret.append(region);
-- }
-- return ret;
--}
--
--#if defined(OS_POSIX) && !defined(OS_MACOSX)
--// Split and normalize the language list specified by LANGUAGE environment.
--// LANGUAGE environment specifies a priority list of user prefered locales for
--// application UI messages. Locales are separated by ':' character. The format
--// of a locale is: language[_territory[.codeset]][@modifier]
--//
--// This function splits the language list and normalizes each locale into
--// language[-territory] format, eg. fr, zh-CN, etc.
--void SplitAndNormalizeLanguageList(const std::string& env_language,
-- std::vector<std::string>* result) {
-- std::vector<std::string> langs;
-- SplitString(env_language, ':', &langs);
-- std::vector<std::string>::iterator i = langs.begin();
-- for (; i != langs.end(); ++i) {
-- size_t end_pos = i->find_first_of(".@");
-- // Erase encoding and modifier part.
-- if (end_pos != std::string::npos)
-- i->erase(end_pos);
--
-- if (!i->empty()) {
-- std::string locale;
-- size_t sep = i->find_first_of("_-");
-- if (sep != std::string::npos) {
-- // language part is always in lower case.
-- locale = StringToLowerASCII(i->substr(0, sep));
-- locale.append("-");
-- // territory part is always in upper case.
-- locale.append(StringToUpperASCII(i->substr(sep + 1)));
-- } else {
-- locale = StringToLowerASCII(*i);
-- }
-- result->push_back(locale);
-- }
-- }
--}
--#endif
--
- // On Linux, the text layout engine Pango determines paragraph directionality
- // by looking at the first strongly-directional character in the text. This
- // means text such as "Google Chrome foo bar..." will be layed out LTR even
diff --git a/www-client/chromium/files/chromium-system-icu-r2.patch b/www-client/chromium/files/chromium-system-icu-r2.patch
new file mode 100644
index 000000000000..778eeaed81ff
--- /dev/null
+++ b/www-client/chromium/files/chromium-system-icu-r2.patch
@@ -0,0 +1,36 @@
+--- base/i18n/word_iterator.cc.orig 2010-12-17 07:27:02.000000000 +0000
++++ base/i18n/word_iterator.cc 2010-12-17 07:29:03.000000000 +0000
+@@ -21,7 +21,7 @@
+
+ WordIterator::~WordIterator() {
+ if (iter_)
+- ubrk_close(iter_);
++ ubrk_close(static_cast<UBreakIterator*>(iter_));
+ }
+
+ bool WordIterator::Init() {
+@@ -45,13 +45,13 @@
+ NOTREACHED() << "ubrk_open failed";
+ return false;
+ }
+- ubrk_first(iter_); // Move the iterator to the beginning of the string.
++ ubrk_first(static_cast<UBreakIterator*>(iter_)); // Move the iterator to the beginning of the string.
+ return true;
+ }
+
+ bool WordIterator::Advance() {
+ prev_ = pos_;
+- const int32_t pos = ubrk_next(iter_);
++ const int32_t pos = ubrk_next(static_cast<UBreakIterator*>(iter_));
+ if (pos == UBRK_DONE) {
+ pos_ = npos;
+ return false;
+@@ -62,7 +62,7 @@
+ }
+
+ bool WordIterator::IsWord() const {
+- return (ubrk_getRuleStatus(iter_) != UBRK_WORD_NONE);
++ return (ubrk_getRuleStatus(static_cast<UBreakIterator*>(iter_)) != UBRK_WORD_NONE);
+ }
+
+ string16 WordIterator::GetWord() const {
diff --git a/www-client/chromium/files/chromium-tests-r0.patch b/www-client/chromium/files/chromium-tests-r0.patch
deleted file mode 100644
index c8461366adc1..000000000000
--- a/www-client/chromium/files/chromium-tests-r0.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- base/watchdog_unittest.cc.orig 2010-12-09 10:31:32.000000000 +0000
-+++ base/watchdog_unittest.cc 2010-12-09 10:31:53.000000000 +0000
-@@ -86,7 +86,7 @@
-
- // Make sure a basic alarm fires when the time has expired.
- TEST_F(WatchdogTest, AlarmPriorTimeTest) {
-- WatchdogCounter watchdog(TimeDelta::TimeDelta(), "Enabled2", true);
-+ WatchdogCounter watchdog(TimeDelta(), "Enabled2", true);
- // Set a time in the past.
- watchdog.ArmSomeTimeDeltaAgo(TimeDelta::FromSeconds(2));
- // It should instantly go off, but certainly in less than 5 minutes.