[perl-Text-SpellChecker] Update to 0.07 and use hunspell backend
Paul Howarth
pghmcfc at fedoraproject.org
Mon Oct 4 13:11:51 UTC 2010
commit c7b01fd87bc8047dbdf05926ed90c14e7dab3379
Author: Paul Howarth <paul at city-fan.org>
Date: Mon Sep 20 13:06:45 2010 +0100
Update to 0.07 and use hunspell backend
New upstream release 0.07:
- Use hunspell backend rather than aspell
Add patch for Fedora dictionary locations
Add patch to remove dependency of Text::Aspell in test suite
Buildreq Text::Hunspell rather than Text::Aspell
Add buildreq hunspell-en
Add manual dependency on perl(Text::Hunspell)
Run test suite in verbose mode
.gitignore | 2 +-
Text-SpellChecker-0.07-dictpath.patch | 20 +++++++++++++++++
Text-SpellChecker-0.07-testsuite.patch | 22 +++++++++++++++++++
perl-Text-SpellChecker.spec | 37 ++++++++++++++++++++++++-------
sources | 2 +-
5 files changed, 72 insertions(+), 11 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 13321ce..744bea3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-/Text-SpellChecker-0.06.tar.gz
+/Text-SpellChecker-0.07.tar.gz
diff --git a/Text-SpellChecker-0.07-dictpath.patch b/Text-SpellChecker-0.07-dictpath.patch
new file mode 100644
index 0000000..a9a3829
--- /dev/null
+++ b/Text-SpellChecker-0.07-dictpath.patch
@@ -0,0 +1,20 @@
+--- Text-SpellChecker-0.07/lib/Text/SpellChecker.pm 2010-09-16 18:28:09.000000000 +0100
++++ Text-SpellChecker-0.07/lib/Text/SpellChecker.pm 2010-09-17 15:43:46.775161240 +0100
+@@ -138,7 +138,7 @@
+
+ =item $Text::SpellCheckerDictionaryPath{Hunspell}
+
+-Set this to the hunspell dictionary path. By default /usr/share/hunspell.
++Set this to the hunspell dictionary path. By default /usr/share/myspell.
+
+ This directory should have $lang.dic and $lang.aff files.
+
+@@ -182,7 +182,7 @@
+ );
+ }
+ our %DictionaryPath = (
+- Hunspell => q[/usr/share/hunspell]
++ Hunspell => q[/usr/share/myspell]
+ );
+
+ #
diff --git a/Text-SpellChecker-0.07-testsuite.patch b/Text-SpellChecker-0.07-testsuite.patch
new file mode 100644
index 0000000..3709a7c
--- /dev/null
+++ b/Text-SpellChecker-0.07-testsuite.patch
@@ -0,0 +1,22 @@
+--- Text-SpellChecker-0.07/t/Text-SpellChecker.t 2010-09-15 21:14:53.000000000 +0100
++++ Text-SpellChecker-0.07/t/Text-SpellChecker.t 2010-09-17 16:08:36.440106971 +0100
+@@ -6,11 +6,6 @@
+ my $checker = Text::SpellChecker->new(text => "Foor score and seevn yeers ago");
+ ok($checker, 'object creation' );
+
+-SKIP: {
+- skip 'English dictionary not installed', 4
+- unless (grep /^en/, Text::Aspell->new()->list_dictionaries) &&
+- Text::Aspell->new()->get_option('lang') =~ /^en/;
+-
+ ok($checker->next_word eq 'Foor', 'Catching English word');
+
+ ok($checker->next_word eq 'seevn', 'Iterator');
+@@ -23,7 +18,6 @@
+ $checker->replace(new_word => 'seven');
+
+ ok($checker->text =~ /score and seven/, 'replacement');
+-};
+
+ my $original = Text::SpellChecker->new(from_frozen => $checker->serialize);
+ my $nother = Text::SpellChecker->new_from_frozen($checker->serialize);
diff --git a/perl-Text-SpellChecker.spec b/perl-Text-SpellChecker.spec
index 8cde830..88dcc3b 100644
--- a/perl-Text-SpellChecker.spec
+++ b/perl-Text-SpellChecker.spec
@@ -1,32 +1,42 @@
Summary: OO interface for spell-checking a block of text
Name: perl-Text-SpellChecker
-Version: 0.06
+Version: 0.07
Release: 1%{?dist}
License: GPL+ or Artistic
Group: Development/Libraries
Url: http://search.cpan.org/dist/Text-SpellChecker/
Source0: http://search.cpan.org/CPAN/authors/id/B/BD/BDUGGAN/Text-SpellChecker-%{version}.tar.gz
+Patch0: Text-SpellChecker-0.07-dictpath.patch
+Patch1: Text-SpellChecker-0.07-testsuite.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
BuildArch: noarch
-BuildRequires: perl(ExtUtils::MakeMaker), perl(Text::Aspell) >= 0.04, perl(Test::More)
+BuildRequires: perl(ExtUtils::MakeMaker), perl(Text::Hunspell), perl(Test::More)
+BuildRequires: hunspell-en
+Requires: perl(Text::Hunspell)
%description
-This module is built on Text::Aspell, but adds some of the functionality
-provided by the internal gnu aspell API. This allows one to deal with blocks
-of text, rather than just words. For instance, we provide methods for
-iterating through the text, serializing the object (thus remembering where we
-left off), and highlighting the current misspelled word within the text.
+This module is a thin layer above Text::Hunspell and allows one to spellcheck
+a body of text. Whereas Text::Hunspell deals with words, Text::Spellchecker
+deals with blocks of text. For instance, we provide methods for iterating
+through the text, serializing the object (thus remembering where we left off),
+and highlighting the current misspelled word within the text.
%prep
%setup -q -n Text-SpellChecker-%{version}
+# Fedora hunspell dictionaries are in /usr/share/myspell rather than /usr/share/hunspell
+%patch0 -p1
+
+# Let the test suite work in the absence of Text::Aspell
+%patch1 -p1
+
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}
%check
-%{__make} test
+%{__make} test TEST_VERBOSE=1
%install
%{__rm} -rf %{buildroot}
@@ -45,8 +55,17 @@ left off), and highlighting the current misspelled word within the text.
%{_mandir}/man3/Text::SpellChecker.3pm*
%changelog
+* Fri Sep 17 2010 Paul Howarth <paul at city-fan.org> - 0.07-1
+- Update to 0.07 (use hunspell backend rather than aspell)
+- Add patch for Fedora dictionary locations
+- Add patch to remove dependency of Text::Aspell in test suite
+- Buildreq Text::Hunspell rather than Text::Aspell
+- Add buildreq hunspell-en
+- Add manual dependency on perl(Text::Hunspell)
+- Run test suite in verbose mode
+
* Wed Sep 15 2010 Paul Howarth <paul at city-fan.org> - 0.06-1
-- Update to 0.06
+- Update to 0.06 (made deserialization accept non-blessed refs)
* Fri May 07 2010 Marcela Maslanova <mmaslano at redhat.com> - 0.05-5
- Mass rebuild with perl-5.12.0
diff --git a/sources b/sources
index ba7766d..47c2bd4 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-aec95f851f490616c9b5f53857cfa074 Text-SpellChecker-0.06.tar.gz
+5acd8e431a8d31dc3ae70a62d4ce4177 Text-SpellChecker-0.07.tar.gz
More information about the scm-commits
mailing list