forked from pool/perl-String-Approx
Accepting request 494773 from devel:languages:perl:autoupdate
- updated to 3.28 see /usr/share/doc/packages/perl-String-Approx/ChangeLog 2017-04-16 Jarkko Hietaniemi <jhi@iki.fi> * Resolve https://rt.cpan.org/Public/Bug/Display.html?id=121033 Fails tests with no '.' in @INC * Released as 3.28. OBS-URL: https://build.opensuse.org/request/show/494773 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-String-Approx?expand=0&rev=13
This commit is contained in:
committed by
Git OBS Bridge
parent
d5cee43813
commit
dc148f6089
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:2b8c1acd24fa9681ebba0ccb3c49f16289de1d579af8a0c898ea8f8d1baf5d36
|
|
||||||
size 45497
|
|
3
String-Approx-3.28.tar.gz
Normal file
3
String-Approx-3.28.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:43201e762d8699cb0ac2c0764a5454bdc2306c0771014d6c8fba821480631342
|
||||||
|
size 45093
|
28
cpanspec.yml
Normal file
28
cpanspec.yml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
---
|
||||||
|
#description_paragraphs: 3
|
||||||
|
#description: |-
|
||||||
|
# override description from CPAN
|
||||||
|
#summary: override summary from CPAN
|
||||||
|
#no_testing: broken upstream
|
||||||
|
#sources:
|
||||||
|
# - source1
|
||||||
|
# - source2
|
||||||
|
#patches:
|
||||||
|
# foo.patch: -p1
|
||||||
|
# bar.patch:
|
||||||
|
#preamble: |-
|
||||||
|
# BuildRequires: gcc-c++
|
||||||
|
#post_prep: |-
|
||||||
|
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
|
||||||
|
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
|
||||||
|
#post_build: |-
|
||||||
|
# rm unused.files
|
||||||
|
#post_install: |-
|
||||||
|
# sed on %{name}.files
|
||||||
|
license: LGPL-2.0 OR Artistic-2.0
|
||||||
|
#skip_noarch: 1
|
||||||
|
#custom_build: |-
|
||||||
|
#./Build build flags=%{?_smp_mflags} --myflag
|
||||||
|
#custom_test: |-
|
||||||
|
#startserver && make test
|
||||||
|
#ignore_requires: Bizarre::Module
|
@@ -1,3 +1,16 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 17 06:36:07 UTC 2017 - coolo@suse.com
|
||||||
|
|
||||||
|
- updated to 3.28
|
||||||
|
see /usr/share/doc/packages/perl-String-Approx/ChangeLog
|
||||||
|
|
||||||
|
2017-04-16 Jarkko Hietaniemi <jhi@iki.fi>
|
||||||
|
|
||||||
|
* Resolve https://rt.cpan.org/Public/Bug/Display.html?id=121033
|
||||||
|
Fails tests with no '.' in @INC
|
||||||
|
|
||||||
|
* Released as 3.28.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Mar 26 15:38:16 UTC 2013 - pgajdos@suse.com
|
Tue Mar 26 15:38:16 UTC 2013 - pgajdos@suse.com
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package perl-String-Approx
|
# spec file for package perl-String-Approx
|
||||||
#
|
#
|
||||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -17,37 +17,74 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: perl-String-Approx
|
Name: perl-String-Approx
|
||||||
|
Version: 3.28
|
||||||
|
Release: 0
|
||||||
%define cpan_name String-Approx
|
%define cpan_name String-Approx
|
||||||
Summary: Perl extension for approximate matching (fuzzy matching)
|
Summary: Perl extension for approximate matching (fuzzy matching)
|
||||||
License: Artistic-1.0 or GPL-2.0+
|
License: LGPL-2.0 OR Artistic-2.0
|
||||||
Group: Development/Libraries/Perl
|
Group: Development/Libraries/Perl
|
||||||
Version: 3.27
|
Url: http://search.cpan.org/dist/String-Approx/
|
||||||
Release: 0
|
Source0: https://cpan.metacpan.org/authors/id/J/JH/JHI/%{cpan_name}-%{version}.tar.gz
|
||||||
Url: http://search.cpan.org/dist/String-Approx
|
Source1: cpanspec.yml
|
||||||
Source0: %{cpan_name}-%{version}.tar.gz
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
%{perl_requires}
|
|
||||||
BuildRequires: perl
|
BuildRequires: perl
|
||||||
BuildRequires: perl-macros
|
BuildRequires: perl-macros
|
||||||
BuildRequires: perl(Test::More)
|
%{perl_requires}
|
||||||
Requires: perl(Test::More)
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
String::Approx lets you match and substitute strings approximately.
|
String::Approx lets you match and substitute strings approximately. With
|
||||||
With this you can emulate errors: typing errorrs, speling errors,
|
this you can emulate errors: typing errorrs, speling errors, closely
|
||||||
closely related vocabularies (colour color),
|
related vocabularies (colour color), genetic mutations (GAG ACT),
|
||||||
genetic mutations (GAG ACT), abbreviations (McScot, MacScot).
|
abbreviations (McScot, MacScot).
|
||||||
|
|
||||||
NOTE: String::Approx suits the task of string matching,
|
NOTE: String::Approx suits the task of *string matching*, not *string
|
||||||
not string comparison, and it works for strings, not for text.
|
comparison*, and it works for *strings*, not for *text*.
|
||||||
|
|
||||||
Authors: Jarkko Hietaniemi <jhi@iki.fi>
|
If you want to compare strings for similarity, you probably just want the
|
||||||
|
Levenshtein edit distance (explained below), the Text::Levenshtein and
|
||||||
|
Text::LevenshteinXS modules in CPAN. See also Text::WagnerFischer and
|
||||||
|
Text::PhraseDistance. (There are functions for this in String::Approx, e.g.
|
||||||
|
adist(), but their results sometimes differ from the bare Levenshtein et
|
||||||
|
al.)
|
||||||
|
|
||||||
|
If you want to compare things like text or source code, consisting of
|
||||||
|
*words* or *tokens* and *phrases* and *sentences*, or *expressions* and
|
||||||
|
*statements*, you should probably use some other tool than String::Approx,
|
||||||
|
like for example the standard UNIX diff(1) tool, or the Algorithm::Diff
|
||||||
|
module from CPAN.
|
||||||
|
|
||||||
|
The measure of *approximateness* is the _Levenshtein edit distance_. It is
|
||||||
|
the total number of "edits": insertions,
|
||||||
|
|
||||||
|
word world
|
||||||
|
|
||||||
|
deletions,
|
||||||
|
|
||||||
|
monkey money
|
||||||
|
|
||||||
|
and substitutions
|
||||||
|
|
||||||
|
sun fun
|
||||||
|
|
||||||
|
required to transform a string to another string. For example, to transform
|
||||||
|
_"lead"_ into _"gold"_, you need three edits:
|
||||||
|
|
||||||
|
lead gead goad gold
|
||||||
|
|
||||||
|
The edit distance of "lead" and "gold" is therefore three, or 75%.
|
||||||
|
|
||||||
|
*String::Approx* uses the Levenshtein edit distance as its measure, but
|
||||||
|
String::Approx is not well-suited for comparing strings of different
|
||||||
|
length, in other words, if you want a "fuzzy eq", see above. String::Approx
|
||||||
|
is more like regular expressions or index(), it finds substrings that are
|
||||||
|
close matches.>
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{cpan_name}-%{version}
|
%setup -q -n %{cpan_name}-%{version}
|
||||||
|
find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
|
||||||
|
|
||||||
%build
|
%build
|
||||||
CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL
|
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
|
||||||
%{__make} %{?_smp_mflags}
|
%{__make} %{?_smp_mflags}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
@@ -58,11 +95,9 @@ CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL
|
|||||||
%perl_process_packlist
|
%perl_process_packlist
|
||||||
%perl_gen_filelist
|
%perl_gen_filelist
|
||||||
|
|
||||||
%clean
|
|
||||||
%{__rm} -rf %{buildroot}
|
|
||||||
|
|
||||||
%files -f %{name}.files
|
%files -f %{name}.files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root,755)
|
||||||
%doc Artistic ChangeLog README
|
%doc ChangeLog COPYRIGHT COPYRIGHT.agrep LGPL PROBLEMS README README.apse
|
||||||
|
%license Artistic
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user