aboutsummaryrefslogtreecommitdiffstats
path: root/chromium
diff options
context:
space:
mode:
authorTing-Wei Lan <lantw44@gmail.com>2015-06-24 21:15:34 +0800
committerTing-Wei Lan <lantw44@gmail.com>2015-06-24 21:47:52 +0800
commitc2a6fa098707043d3476e74b349f6255c0382e30 (patch)
tree80969ceddb7418f95ff675c7d5db2fa829ac4f2a /chromium
parent16309ba04b0cc524340f980e27195ab3c3b955c9 (diff)
downloadcopr-rpm-spec-c2a6fa098707043d3476e74b349f6255c0382e30.tar
copr-rpm-spec-c2a6fa098707043d3476e74b349f6255c0382e30.tar.gz
copr-rpm-spec-c2a6fa098707043d3476e74b349f6255c0382e30.tar.bz2
copr-rpm-spec-c2a6fa098707043d3476e74b349f6255c0382e30.tar.lz
copr-rpm-spec-c2a6fa098707043d3476e74b349f6255c0382e30.tar.xz
copr-rpm-spec-c2a6fa098707043d3476e74b349f6255c0382e30.tar.zst
copr-rpm-spec-c2a6fa098707043d3476e74b349f6255c0382e30.zip
chromium: Drop GCC 5.1 workaround and disable hotwording
Diffstat (limited to 'chromium')
-rw-r--r--chromium/chromium/chromium-disable-hotwording.patch120
-rw-r--r--chromium/chromium/chromium.spec31
2 files changed, 139 insertions, 12 deletions
diff --git a/chromium/chromium/chromium-disable-hotwording.patch b/chromium/chromium/chromium-disable-hotwording.patch
new file mode 100644
index 0000000..55bb8a3
--- /dev/null
+++ b/chromium/chromium/chromium-disable-hotwording.patch
@@ -0,0 +1,120 @@
+Index: build/common.gypi
+diff --git a/build/common.gypi b/build/common.gypi
+index b26d0e1aaf3baa8c0bea2aa21795051e0767bb39..bac0544541b1ffbd4c9a072e86425476f01fa3d9 100644
+--- a/build/common.gypi
++++ b/build/common.gypi
+@@ -391,6 +391,9 @@
+ # Web speech is enabled by default. Set to 0 to disable.
+ 'enable_web_speech%': 1,
+
++ # 'Ok Google' hotwording is enabled by default. Set to 0 to disable.
++ 'enable_hotwording%': 1,
++
+ # Notifications are compiled in by default. Set to 0 to disable.
+ 'notifications%' : 1,
+
+@@ -1136,6 +1139,7 @@
+ 'configuration_policy%': '<(configuration_policy)',
+ 'safe_browsing%': '<(safe_browsing)',
+ 'enable_web_speech%': '<(enable_web_speech)',
++ 'enable_hotwording%': '<(enable_hotwording)',
+ 'notifications%': '<(notifications)',
+ 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
+ 'mac_want_real_dsym%': '<(mac_want_real_dsym)',
+Index: chrome/browser/BUILD.gn
+diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
+index 30127a3a2ee6836ffb108fd2859707b765d42cb8..867dc390d0b7f623423ed64bfbbe5f938fbc0659 100644
+--- a/chrome/browser/BUILD.gn
++++ b/chrome/browser/BUILD.gn
+@@ -19,6 +19,11 @@ if (is_desktop_linux) {
+ import("//build/config/linux/pkg_config.gni")
+ }
+
++declare_args() {
++ # 'Ok Google' hotwording is enabled.
++ enable_hotwording = true
++}
++
+ about_credits_file = "$target_gen_dir/about_credits.html"
+ additional_modules_list_file =
+ "$root_gen_dir/chrome/browser/internal/additional_modules_list.txt"
+@@ -452,6 +457,10 @@ source_set("browser") {
+ }
+ }
+
++ if (enable_hotwording) {
++ defines += [ "ENABLE_HOTWORDING" ]
++ }
++
+ if (is_linux) {
+ deps += [
+ "//device/media_transfer_protocol",
+Index: chrome/browser/search/hotword_service.cc
+diff --git a/chrome/browser/search/hotword_service.cc b/chrome/browser/search/hotword_service.cc
+index d222b150fbae877fe74598681e956e6e624890fa..5b08027ef4c198480f703a9420a55068e88aa435 100644
+--- a/chrome/browser/search/hotword_service.cc
++++ b/chrome/browser/search/hotword_service.cc
+@@ -639,7 +639,11 @@ bool HotwordService::IsServiceAvailable() {
+ if (group == hotword_internal::kHotwordFieldTrialDisabledGroupName)
+ return false;
+
++#if defined(ENABLE_HOTWORDING)
+ return DoesHotwordSupportLanguage(profile_);
++#else
++ return false;
++#endif
+ }
+
+ bool HotwordService::IsOptedIntoAudioLogging() {
+Index: chrome/browser/search/hotword_service_unittest.cc
+diff --git a/chrome/browser/search/hotword_service_unittest.cc b/chrome/browser/search/hotword_service_unittest.cc
+index 588706c1c186e7f410230b12f649a6b8853da2fb..84444468e2f7634ad895d0752355303babf0c7d7 100644
+--- a/chrome/browser/search/hotword_service_unittest.cc
++++ b/chrome/browser/search/hotword_service_unittest.cc
+@@ -157,6 +157,7 @@ INSTANTIATE_TEST_CASE_P(HotwordServiceTests,
+ extension_misc::kHotwordSharedModuleId));
+
+ TEST_P(HotwordServiceTest, IsHotwordAllowedLocale) {
++#if defined(ENABLE_HOTWORDING)
+ TestingProfile::Builder profile_builder;
+ scoped_ptr<TestingProfile> profile = profile_builder.Build();
+
+@@ -187,6 +188,7 @@ TEST_P(HotwordServiceTest, IsHotwordAllowedLocale) {
+ Profile* otr_profile = profile->GetOffTheRecordProfile();
+ SetApplicationLocale(otr_profile, "en");
+ EXPECT_FALSE(HotwordServiceFactory::IsHotwordAllowed(otr_profile));
++#endif // defined(ENABLE_HOTWORDING)
+ }
+
+ TEST_P(HotwordServiceTest, ShouldReinstallExtension) {
+@@ -243,6 +245,7 @@ TEST_P(HotwordServiceTest, PreviousLanguageSetOnInstall) {
+ }
+
+ TEST_P(HotwordServiceTest, UninstallReinstallTriggeredCorrectly) {
++#if defined(ENABLE_HOTWORDING)
+ InitializeEmptyExtensionService();
+ service_->Init();
+
+@@ -313,6 +316,7 @@ TEST_P(HotwordServiceTest, UninstallReinstallTriggeredCorrectly) {
+ EXPECT_TRUE(HotwordServiceFactory::IsHotwordAllowed(profile()));
+ EXPECT_FALSE(hotword_service->MaybeReinstallHotwordExtension());
+ EXPECT_EQ(1, hotword_service->uninstall_count()); // no change
++#endif // defined(ENABLE_HOTWORDING)
+ }
+
+ TEST_P(HotwordServiceTest, DisableAlwaysOnOnLanguageChange) {
+Index: chrome/chrome_browser.gypi
+diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
+index 4070c8c38867d2394d3a2a60b1cd17361ccea1c3..b589e9a52e0ca183da7bee5a644c0de8f61a0d89 100644
+--- a/chrome/chrome_browser.gypi
++++ b/chrome/chrome_browser.gypi
+@@ -3573,6 +3573,9 @@
+ ['enable_session_service==1', {
+ 'sources': [ '<@(chrome_browser_session_service_sources)' ],
+ }],
++ ['enable_hotwording==1', {
++ 'defines': [ 'ENABLE_HOTWORDING' ],
++ }],
+ ['OS!="android" and OS!="ios" and chromeos==0', {
+ 'sources': [ '<@(chrome_browser_desktop_sources)' ],
+ }],
diff --git a/chromium/chromium/chromium.spec b/chromium/chromium/chromium.spec
index 3066af1..527ef0d 100644
--- a/chromium/chromium/chromium.spec
+++ b/chromium/chromium/chromium.spec
@@ -6,9 +6,12 @@
# Get the version number of latest stable version
# $ curl -s 'https://omahaproxy.appspot.com/all?os=linux&channel=stable' | sed 1d | cut -d , -f 3
+# I don't want to modify patches provided by others
+%global _default_patch_fuzz 2
+
Name: chromium
Version: 43.0.2357.130
-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,9 +24,18 @@ Source0: https://commondatastorage.googleapis.com/chromium-browser-official/c
Source1: chromium-browser.sh
Source2: chromium-browser.desktop
+# Add a modified upstream patch from Arch Linux to allow disabling 'Ok Google'
+# hotwording feature
+# https://code.google.com/p/chromium/issues/detail?id=491435
+Patch0: chromium-disable-hotwording.patch
+
# I don't have time to test whether it work on other architectures
ExclusiveArch: x86_64
+# Make sure we don't encounter GCC 5.1 bug
+%if 0%{?fedora} >= 22
+BuildRequires: gcc >= 5.1.1-2
+%endif
# Basic tools and libraries
BuildRequires: ninja-build, bison, gperf
BuildRequires: libgcc(x86-32), glibc(x86-32)
@@ -68,6 +80,7 @@ Requires: hicolor-icon-theme
%prep
%setup -q
+%patch0 -p1
%build
@@ -127,6 +140,7 @@ GYP_GENERATORS=ninja ./build/gyp_chromium --depth=. \
-Dclang=0 \
-Dwerror= \
-Ddisable_fatal_linker_warnings=1 \
+ -Denable_hotwording=0 \
-Dgoogle_api_key=AIzaSyCcK3laItm4Ik9bm6IeGFC6tVgy4eut0_o \
-Dgoogle_default_client_id=82546407293.apps.googleusercontent.com \
-Dgoogle_default_client_secret=GuvPB069ONrHxN7Y_y0txLKn \
@@ -134,17 +148,6 @@ GYP_GENERATORS=ninja ./build/gyp_chromium --depth=. \
./build/download_nacl_toolchains.py --packages \
nacl_x86_glibc,nacl_x86_newlib,pnacl_newlib,pnacl_translator sync --extract
-# Workaround the GCC 5.1 -Wno-narrowing regression
-# https://code.google.com/p/chromium/issues/detail?id=466760
-# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65801
-%if 0%{?fedora} >= 22
-sed -i 's|-std=gnu++11|-std=gnu++03|' out/Release/obj/third_party/cld_2/*.ninja
-sed -i 's|0xFFFFFFFF|-1|' \
- third_party/WebKit/Source/core/dom/NodeFilter.h \
- third_party/WebKit/Source/core/dom/NodeFilter.idl \
- third_party/WebKit/Source/core/html/canvas/WebGL2RenderingContextBase.idl
-%endif
-
ninja-build -C out/Release chrome chrome_sandbox chromedriver
@@ -221,6 +224,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%changelog
+* Wed Jun 24 2015 - Ting-Wei Lan <lantw44@gmail.com> - 43.0.2357.130-2
+- Remove workaround for GCC 5.1
+- Disable 'Ok Google' hotwording feature
+
* Tue Jun 23 2015 - Ting-Wei Lan <lantw44@gmail.com> - 43.0.2357.130-1
- Update to 43.0.2357.130