Accepting request 295734 from devel:languages:perl:autoupdate
update OBS-URL: https://build.opensuse.org/request/show/295734 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-String-Diff?expand=0&rev=4
This commit is contained in:
committed by
Git OBS Bridge
parent
df65162320
commit
658ad90e9d
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:b6712f65cb9ab09d0a83c9cf968992031effd1263cdf8b8bcb9f17016e7eb321
|
|
||||||
size 40009
|
|
3
String-Diff-0.06.tar.gz
Normal file
3
String-Diff-0.06.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:be9eb2844bbf8e1e7e7bd101d19177015e23a75840c9ad836ee9dbfeb4fa6c44
|
||||||
|
size 30772
|
@@ -1,3 +1,17 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 13 16:11:02 UTC 2015 - coolo@suse.com
|
||||||
|
|
||||||
|
- updated to 0.06
|
||||||
|
see /usr/share/doc/packages/perl-String-Diff/Changes
|
||||||
|
|
||||||
|
0.06 2012-06-28T10:51:01+09:00
|
||||||
|
- add escape option for diff/diff_merge RT #55265 (TINITA++)
|
||||||
|
- fixed bug, quotemeta being quoted is the IDEOGRAPHIC COMMA (U+3001)(、) RT #76371 (ANDK++)
|
||||||
|
|
||||||
|
0.05 2012-06-22T15:55:30+09:00
|
||||||
|
- modern Makefile.PL
|
||||||
|
- fixed Bugs RT #71678
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Nov 29 18:31:06 UTC 2010 - coolo@novell.com
|
Mon Nov 29 18:31:06 UTC 2010 - coolo@novell.com
|
||||||
|
|
||||||
|
@@ -1,51 +1,96 @@
|
|||||||
# norootforbuild
|
#
|
||||||
|
# spec file for package perl-String-Diff
|
||||||
|
#
|
||||||
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
Name: perl-String-Diff
|
Name: perl-String-Diff
|
||||||
Version: 0.04
|
Version: 0.06
|
||||||
Release: 0
|
Release: 0
|
||||||
|
%define cpan_name String-Diff
|
||||||
Summary: Simple diff to String
|
Summary: Simple diff to String
|
||||||
Source: http://search.cpan.org/CPAN/authors/id/Y/YA/YAPPO/String-Diff-%{version}.tar.gz
|
License: Artistic-1.0 or GPL-1.0+
|
||||||
URL: http://search.cpan.org/dist/String-Diff/
|
|
||||||
Group: Development/Libraries/Perl
|
Group: Development/Libraries/Perl
|
||||||
License: Perl License
|
Url: http://search.cpan.org/dist/String-Diff/
|
||||||
BuildRoot: %{_tmppath}/build-%{name}-%{version}
|
Source: http://www.cpan.org/authors/id/Y/YA/YAPPO/%{cpan_name}-%{version}.tar.gz
|
||||||
BuildRequires: make perl perl-macros perl-YAML
|
BuildArch: noarch
|
||||||
Requires: perl
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
BuildRequires: perl
|
||||||
|
BuildRequires: perl-macros
|
||||||
|
BuildRequires: perl(Algorithm::Diff)
|
||||||
|
BuildRequires: perl(Test::Base)
|
||||||
|
BuildRequires: perl(YAML)
|
||||||
|
Requires: perl(Algorithm::Diff)
|
||||||
|
%{perl_requires}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
String::Diff is the difference of a consecutive string is made. after general
|
String::Diff is the difference of a consecutive string is made. after
|
||||||
diff is done, the difference in the line is searchable.
|
general diff is done, the difference in the line is searchable.
|
||||||
|
|
||||||
The mark of the addition and the deletion can be freely changed. the color is
|
the mark of the addition and the deletion can be freely changed. the color
|
||||||
colored to the terminal with ANSI, using the HTML display it.
|
is colored to the terminal with ANSI, using the HTML display it.
|
||||||
|
|
||||||
|
after the line is divided, diff is taken when 'linebreak' option is
|
||||||
|
specified.
|
||||||
|
|
||||||
|
my($old_string, $new_string) = String::Diff::diff_fully('this is Perl', 'this is Ruby', linebreak => 1);
|
||||||
|
my($old_string, $new_string) = String::Diff::diff('this is Perl', 'this is Ruby', linebreak => 1);
|
||||||
|
my $string = String::Diff::diff_merge('this is Perl', 'this is Ruby', linebreak => 1);
|
||||||
|
my $string = String::Diff::diff_regexp('this is Perl', 'this is Ruby', linebreak => 1);
|
||||||
|
|
||||||
|
In diff and diff_merge methods the mark of the difference can be changed.
|
||||||
|
|
||||||
|
my $diff = String::Diff::diff('this is Perl', 'this is Ruby',{
|
||||||
|
remove_open => '<del>',
|
||||||
|
remove_close => '</del>',
|
||||||
|
append_open => '<ins>',
|
||||||
|
append_close => '</ins>',
|
||||||
|
});
|
||||||
|
|
||||||
|
You can escape callback set to diff function and diff_merge function.
|
||||||
|
|
||||||
|
use HTML::Entities
|
||||||
|
my($diff_old, $diff_new) = String::Diff::diff(
|
||||||
|
'this is <b>Perl</b>',
|
||||||
|
'this is <b><BIG>R</BIG>uby</b>',
|
||||||
|
remove_open => '<del>',
|
||||||
|
remove_close => '</del>',
|
||||||
|
append_open => '<ins>',
|
||||||
|
append_close => '</ins>',
|
||||||
|
escape => sub { encode_entities($_[0]) },
|
||||||
|
});
|
||||||
|
is($diff_old, 'this is <b><del>Perl</del></b>');
|
||||||
|
is($diff_new, 'this is <b><ins><BIG>R</BIG>uby</ins></b>');
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n "String-Diff-%{version}"
|
%setup -q -n %{cpan_name}-%{version}
|
||||||
%__sed -i '/^auto_install/d' Makefile.PL
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%__perl Makefile.PL PREFIX="%{_prefix}"
|
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
||||||
%__make %{?jobs:-j%{jobs}}
|
%{__make} %{?_smp_mflags}
|
||||||
|
|
||||||
|
%check
|
||||||
|
%{__make} test
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%perl_make_install
|
%perl_make_install
|
||||||
%perl_process_packlist
|
%perl_process_packlist
|
||||||
|
%perl_gen_filelist
|
||||||
|
|
||||||
%clean
|
%files -f %{name}.files
|
||||||
%__rm -rf "%{buildroot}"
|
%defattr(-,root,root,755)
|
||||||
|
%doc Changes README README.mkdn
|
||||||
%files
|
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc Changes README
|
|
||||||
%dir %{perl_vendorlib}/String
|
|
||||||
%{perl_vendorlib}/String/Diff.pm
|
|
||||||
%dir %{perl_vendorarch}/auto/String
|
|
||||||
%{perl_vendorarch}/auto/String/Diff
|
|
||||||
%doc %{perl_man3dir}/String::Diff.%{perl_man3ext}%{ext_man}
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
# vim: set sw=3 ts=3 noet:
|
|
||||||
# Local Variables:
|
|
||||||
# mode: rpm-spec
|
|
||||||
# tab-width: 3
|
|
||||||
# End:
|
|
||||||
|
Reference in New Issue
Block a user