From be982aa20700fa62e241f7bc2b4eed6a2e6b28e8 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 14 Jan 2015 09:31:05 +0100 Subject: [PATCH] Update to 31.4.0 --- .gitignore | 2 ++ mozilla-1097550-dict-fix.patch | 59 ++++++++++++++++++++++++++++++++++ sources | 4 +-- thunderbird.spec | 9 ++++-- 4 files changed, 70 insertions(+), 4 deletions(-) create mode 100644 mozilla-1097550-dict-fix.patch diff --git a/.gitignore b/.gitignore index 9f767de..4ab9bbe 100644 --- a/.gitignore +++ b/.gitignore @@ -103,3 +103,5 @@ thunderbird-langpacks-3.1.2-20100803.tar.bz2 /thunderbird-31.2.0.source.tar.bz2 /thunderbird-31.3.0.source.tar.bz2 /thunderbird-langpacks-31.3.0-20141201.tar.xz +/thunderbird-31.4.0.source.tar.bz2 +/thunderbird-langpacks-31.4.0-20150114.tar.xz diff --git a/mozilla-1097550-dict-fix.patch b/mozilla-1097550-dict-fix.patch new file mode 100644 index 0000000..f0001f1 --- /dev/null +++ b/mozilla-1097550-dict-fix.patch @@ -0,0 +1,59 @@ +diff -up comm-esr31/mozilla/editor/composer/src/nsEditorSpellCheck.cpp.dict-fix comm-esr31/mozilla/editor/composer/src/nsEditorSpellCheck.cpp +--- comm-esr31/mozilla/editor/composer/src/nsEditorSpellCheck.cpp.dict-fix 2014-11-27 23:16:41.000000000 +0100 ++++ comm-esr31/mozilla/editor/composer/src/nsEditorSpellCheck.cpp 2014-12-11 13:06:02.679106492 +0100 +@@ -102,6 +102,23 @@ GetLoadContext(nsIEditor* aEditor) + } + + /** ++ * Helper function for converting underscore to dash in dictionary name, ++ * ie. en_CA to en-CA. This is required for some Linux distributions which ++ * use underscore as separator in system-wide installed dictionaries. ++ * We use it for nsStyleUtil::DashMatchCompare. ++ */ ++static nsString ++GetDictNameWithDash(const nsAString& aDictName) ++{ ++ nsString dictNameWithDash(aDictName); ++ int32_t underScore = dictNameWithDash.FindChar('_'); ++ if (underScore != -1) { ++ dictNameWithDash.Replace(underScore, 1, '-'); ++ } ++ return dictNameWithDash; ++} ++ ++/** + * Fetches the dictionary stored in content prefs and maintains state during the + * fetch, which is asynchronous. + */ +@@ -603,8 +620,8 @@ nsEditorSpellCheck::SetCurrentDictionary + } else { + langCode.Assign(aDictionary); + } +- +- if (mPreferredLang.IsEmpty() || !nsStyleUtil::DashMatchCompare(mPreferredLang, langCode, comparator)) { ++ if (mPreferredLang.IsEmpty() || ++ !nsStyleUtil::DashMatchCompare(GetDictNameWithDash(mPreferredLang), langCode, comparator)) { + // When user sets dictionary manually, we store this value associated + // with editor url. + StoreCurrentDictionary(mEditor, aDictionary); +@@ -790,8 +807,8 @@ nsEditorSpellCheck::DictionaryFetched(Di + + // try dictionary.spellchecker preference if it starts with langCode (and + // if we haven't tried it already) +- if (!preferedDict.IsEmpty() && !dictName.Equals(preferedDict) && +- nsStyleUtil::DashMatchCompare(preferedDict, langCode, comparator)) { ++ if (!preferedDict.IsEmpty() && !dictName.Equals(preferedDict) && ++ nsStyleUtil::DashMatchCompare(GetDictNameWithDash(preferedDict), langCode, comparator)) { + rv = SetCurrentDictionary(preferedDict); + } + +@@ -819,8 +836,7 @@ nsEditorSpellCheck::DictionaryFetched(Di + // We have already tried it + continue; + } +- +- if (nsStyleUtil::DashMatchCompare(dictStr, langCode, comparator) && ++ if (nsStyleUtil::DashMatchCompare(GetDictNameWithDash(dictStr), langCode, comparator) && + NS_SUCCEEDED(SetCurrentDictionary(dictStr))) { + break; + } diff --git a/sources b/sources index 2d5df9d..2ac3ad0 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -3781dfb541412c7f6b530a654b834ce5 thunderbird-31.3.0.source.tar.bz2 -9924d9192a6daf31237450383a11988c thunderbird-langpacks-31.3.0-20141201.tar.xz +da9c86271bb498c5feb02ce9c360669f thunderbird-31.4.0.source.tar.bz2 +d6714794261394ec0ceb7438144902bd thunderbird-langpacks-31.4.0-20150114.tar.xz diff --git a/thunderbird.spec b/thunderbird.spec index ab1d60a..7991533 100644 --- a/thunderbird.spec +++ b/thunderbird.spec @@ -57,14 +57,14 @@ Summary: Mozilla Thunderbird mail/newsgroup client Name: thunderbird -Version: 31.3.0 +Version: 31.4.0 Release: 1%{?dist} URL: http://www.mozilla.org/projects/thunderbird/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet Source0: ftp://ftp.mozilla.org/pub/thunderbird/releases/%{version}%{?pre_version}/source/thunderbird-%{version}%{?pre_version}.source.tar.bz2 %if %{build_langpacks} -Source1: thunderbird-langpacks-%{version}-20141201.tar.xz +Source1: thunderbird-langpacks-%{version}-20150114.tar.xz %endif Source10: thunderbird-mozconfig Source11: thunderbird-mozconfig-branded @@ -75,6 +75,7 @@ Source21: thunderbird.sh.in # Mozilla (XULRunner) patches Patch0: thunderbird-install-dir.patch Patch9: mozilla-build-arm.patch +Patch10: mozilla-1097550-dict-fix.patch # Build patches Patch100: thunderbird-objdir.patch @@ -174,6 +175,7 @@ cd %{tarballdir} # Mozilla (XULRunner) patches cd mozilla %patch9 -p2 -b .arm +%patch10 -p2 -b .dict-fix %patch300 -p2 -b .852698 %patch400 -p1 -b .966424 %patch401 -p1 -b .858919 @@ -458,6 +460,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #=============================================================================== %changelog +* Wed Jan 14 2015 Jan Horak - 31.4.0-1 +- Update to 31.4.0 + * Mon Dec 1 2014 Jan Horak - 31.3.0-1 - Update to 31.3.0