aboutsummaryrefslogtreecommitdiffstats
path: root/chromium
diff options
context:
space:
mode:
authorTing-Wei Lan <lantw44@gmail.com>2015-12-02 20:42:25 +0800
committerTing-Wei Lan <lantw44@gmail.com>2015-12-02 22:12:48 +0800
commitde29f302b9a3554021d6f5f7aaabf1a99eaadfc2 (patch)
tree9b7e0ab3491bfc1f87ae6c6dabb6f83670c05ff5 /chromium
parent21fb62bf2263b8514451fbc1436767231bd14fa9 (diff)
downloadcopr-rpm-spec-de29f302b9a3554021d6f5f7aaabf1a99eaadfc2.tar
copr-rpm-spec-de29f302b9a3554021d6f5f7aaabf1a99eaadfc2.tar.gz
copr-rpm-spec-de29f302b9a3554021d6f5f7aaabf1a99eaadfc2.tar.bz2
copr-rpm-spec-de29f302b9a3554021d6f5f7aaabf1a99eaadfc2.tar.lz
copr-rpm-spec-de29f302b9a3554021d6f5f7aaabf1a99eaadfc2.tar.xz
copr-rpm-spec-de29f302b9a3554021d6f5f7aaabf1a99eaadfc2.tar.zst
copr-rpm-spec-de29f302b9a3554021d6f5f7aaabf1a99eaadfc2.zip
chromium: Apply a patch from Arch Linux
Diffstat (limited to 'chromium')
-rw-r--r--chromium/chromium/chromium-fix-print-preview-on-en_GB-locale.patch17
-rw-r--r--chromium/chromium/chromium.spec16
2 files changed, 31 insertions, 2 deletions
diff --git a/chromium/chromium/chromium-fix-print-preview-on-en_GB-locale.patch b/chromium/chromium/chromium-fix-print-preview-on-en_GB-locale.patch
new file mode 100644
index 0000000..9ebc089
--- /dev/null
+++ b/chromium/chromium/chromium-fix-print-preview-on-en_GB-locale.patch
@@ -0,0 +1,17 @@
+Index: chrome/browser/ui/webui/print_preview/print_preview_handler.cc
+diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
+index 6cfd861387c9f8b145fb33472b10025537986213..c936a9c1dadb13c00418e8ae79a8a1987c1d36cd 100644
+--- a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
++++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
+@@ -1222,7 +1222,10 @@ void PrintPreviewHandler::GetNumberFormatAndMeasurementSystem(
+ UErrorCode errorCode = U_ZERO_ERROR;
+ const char* locale = g_browser_process->GetApplicationLocale().c_str();
+ UMeasurementSystem system = ulocdata_getMeasurementSystem(locale, &errorCode);
+- if (errorCode > U_ZERO_ERROR || system == UMS_LIMIT)
++ // On error, assume the units are SI.
++ // Since the only measurement units print preview's WebUI cares about are
++ // those for measuring distance, assume anything non-US is SI.
++ if (errorCode > U_ZERO_ERROR || system != UMS_US)
+ system = UMS_SI;
+
+ // Getting the number formatting based on the locale and writing to
diff --git a/chromium/chromium/chromium.spec b/chromium/chromium/chromium.spec
index ed2795b..3f5b08c 100644
--- a/chromium/chromium/chromium.spec
+++ b/chromium/chromium/chromium.spec
@@ -8,7 +8,7 @@
Name: chromium
Version: 47.0.2526.73
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: An open-source project that aims to build a safer, faster, and more stable browser
Group: Applications/Internet
@@ -21,6 +21,11 @@ Source0: https://commondatastorage.googleapis.com/chromium-browser-official/c
Source1: chromium-browser.sh
Source2: chromium-browser.desktop
+# Add a patch from Arch Linux
+# https://code.google.com/p/chromium/issues/detail?id=480415
+# https://projects.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/chromium&id=37c3842
+Patch0: chromium-fix-print-preview-on-en_GB-locale.patch
+
# I don't have time to test whether it work on other architectures
ExclusiveArch: x86_64
@@ -48,7 +53,7 @@ BuildRequires: jsoncpp-devel
BuildRequires: libevent-devel
BuildRequires: libjpeg-turbo-devel
BuildRequires: libpng-devel
-# Chromium requires libvpx 1.5.0
+# Chromium requires libvpx 1.5.0 and some non-default options
# BuildRequires: libvpx-devel
BuildRequires: libwebp-devel
BuildRequires: pkgconfig(libxslt), pkgconfig(libxml-2.0)
@@ -76,7 +81,11 @@ Requires: hicolor-icon-theme
%prep
%setup -q
+%patch0 -p1
touch chrome/test/data/webui/i18n_process_css_test.html
+# https://code.google.com/p/chromium/issues/detail?id=541273
+# https://projects.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/chromium&id=37c3842
+sed -i "/'target_name': 'libvpx'/s/libvpx/&_new/" build/linux/unbundle/libvpx.gyp
%build
./build/linux/unbundle/replace_gyp_files.py \
@@ -239,6 +248,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%changelog
+* Wed Dec 02 2015 - Ting-Wei Lan <lantw44@gmail.com> - 47.0.2526.73-2
+- Apply patch that fixes print preview with the en_GB locale
+
* Wed Dec 02 2015 - Ting-Wei Lan <lantw44@gmail.com> - 47.0.2526.73-1
- Update to 47.0.2526.73