Resolves: rhbz#1494968 perl regex rule changes result in broken en_US dict

This commit is contained in:
Caolán McNamara 2017-09-25 12:02:26 +01:00
parent 9da435bdd4
commit 3ca3155f87
2 changed files with 29 additions and 1 deletions

View File

@ -2,7 +2,7 @@ Name: hunspell-en
Summary: English hunspell dictionaries Summary: English hunspell dictionaries
%global upstreamid 20140811.1 %global upstreamid 20140811.1
Version: 0.%{upstreamid} Version: 0.%{upstreamid}
Release: 8%{?dist} Release: 9%{?dist}
Source0: https://github.com/kevina/wordlist/archive/rel-2014.08.11.1.tar.gz Source0: https://github.com/kevina/wordlist/archive/rel-2014.08.11.1.tar.gz
Source1: http://en-gb.pyxidium.co.uk/dictionary/en_GB.zip Source1: http://en-gb.pyxidium.co.uk/dictionary/en_GB.zip
#See http://mxr.mozilla.org/mozilla/source/extensions/spellcheck/locales/en-US/hunspell/mozilla_words.diff?raw=1 #See http://mxr.mozilla.org/mozilla/source/extensions/spellcheck/locales/en-US/hunspell/mozilla_words.diff?raw=1
@ -28,6 +28,8 @@ Patch8: hunspell-en-dont-call-git-during-build.patch
Patch9: hunspell-en-fixbuild.patch Patch9: hunspell-en-fixbuild.patch
#rhbz#1492306 for better or worse treat etc the same in US and GB #rhbz#1492306 for better or worse treat etc the same in US and GB
Patch10: en_GB.etc.patch Patch10: en_GB.etc.patch
#rhbz#1494968 perl tightened up regex rules
Patch11: perl.regex.patch
URL: http://wordlist.sourceforge.net/ URL: http://wordlist.sourceforge.net/
License: LGPLv2+ and LGPLv2 and BSD License: LGPLv2+ and LGPLv2 and BSD
BuildArch: noarch BuildArch: noarch
@ -68,6 +70,7 @@ UK English hunspell dictionaries
%patch8 -p1 -b .nogit %patch8 -p1 -b .nogit
%patch9 -p1 -b .fixbuild %patch9 -p1 -b .fixbuild
%patch10 -p1 -b .etc %patch10 -p1 -b .etc
%patch11 -p1 -b .regex
%build %build
export PERL5LIB=`pwd`/scowl/r/varcon${PERL5LIB:+:${PERL5LIB}} export PERL5LIB=`pwd`/scowl/r/varcon${PERL5LIB:+:${PERL5LIB}}
@ -120,6 +123,9 @@ popd
%{_datadir}/myspell/en_GB.* %{_datadir}/myspell/en_GB.*
%changelog %changelog
* Mon Sep 25 2017 Caolán McNamara <caolanm@redhat.com> - 0.20140811.1-9
- Resolves: rhbz#1494968 perl regex rule changes result in broken en_US dict
* Thu Sep 21 2017 Caolán McNamara <caolanm@redhat.com> - 0.20140811.1-8 * Thu Sep 21 2017 Caolán McNamara <caolanm@redhat.com> - 0.20140811.1-8
- Resolves: rhbz#1492306 for better or worse treat etc the same in US and GB - Resolves: rhbz#1492306 for better or worse treat etc the same in US and GB

22
perl.regex.patch Normal file
View File

@ -0,0 +1,22 @@
--- a/scowl/src/add-affixes 2017-09-25 11:58:46.898706402 +0100
+++ b/scowl/src/add-affixes 2017-09-25 11:59:46.952904766 +0100
@@ -72,7 +72,7 @@
next unless $q eq '' || $use_all >= 2;
my @a = split /, | \| /, $a;
@a = grep {my ($word,$tags,$level)
- = /^([A-Za-z\']+)([~<!?]*)(| [\d.]+)(| {\S+})$/ or die $_;
+ = /^([A-Za-z\']+)([~<!?]*)(| [\d.]+)(| \{\S+\})$/ or die $_;
$_ = $word;
$tags !~ /~|\?|!</ && $level <= $inc_level} @a;
@a = grep {not $remove{"$w:$p:$_"}} @a;
--- a/scowl/src/add-other-forms 2017-09-25 12:04:44.139040499 +0100
+++ b/scowl/src/add-other-forms 2017-09-25 12:04:55.521509492 +0100
@@ -11,7 +11,7 @@
splice @a0, -1, 0, "'" if $p eq 'V' && @a0 >= 3; # insert placeholder
@a = ();
foreach (@a0) {
- s/ {.+?}//g; s/ \(.+?\)//g;
+ s/ \{.+?\}//g; s/ \(.+?\)//g;
s/ \| / /g; s/ \/ / /g;
push @a, (split / /, $_);
}