commit f192c271542e811483d53b6a4c76099467ccbd00
Author: Jakub Bogusz <[email protected]>
Date:   Sat Mar 8 11:38:45 2014 +0100

    - added insensitive patch (already in post-0.08+ git, required for publican)
    - release 2

 ...-Syntax-Highlight-Engine-Kate-insensitive.patch | 52 ++++++++++++++++++++++
 perl-Syntax-Highlight-Engine-Kate.spec             |  4 +-
 2 files changed, 55 insertions(+), 1 deletion(-)
---
diff --git a/perl-Syntax-Highlight-Engine-Kate.spec 
b/perl-Syntax-Highlight-Engine-Kate.spec
index 40c80b9..ce06727 100644
--- a/perl-Syntax-Highlight-Engine-Kate.spec
+++ b/perl-Syntax-Highlight-Engine-Kate.spec
@@ -9,12 +9,13 @@ Summary:      Syntax::Highlight::Engine::Kate - a port to 
Perl of the syntax highligh
 Summary(pl.UTF-8):     Syntax::Highlight::Engine::Kate - perlowy port silnika 
podświetlania składni z edytora Kate
 Name:          perl-Syntax-Highlight-Engine-Kate
 Version:       0.08
-Release:       1
+Release:       2
 # same as perl 5.8.3+
 License:       GPL v1+ or Artistic
 Group:         Development/Languages/Perl
 Source0:       
http://www.cpan.org/modules/by-module/Syntax/%{pdir}-%{pnam}-%{version}.tar.gz
 # Source0-md5: 717f969580fb5894c818fbbc627cc37e
+Patch0:                %{name}-insensitive.patch
 URL:           http://search.cpan.org/dist/Syntax-Highlight-Engine-Kate/
 BuildRequires: perl-ExtUtils-MakeMaker >= 6.59
 BuildRequires: perl-devel >= 1:5.8.0
@@ -44,6 +45,7 @@ modułu.
 
 %prep
 %setup -q -n %{pdir}-%{pnam}-%{version}
+%patch0 -p1
 
 %build
 %{__perl} Makefile.PL \
diff --git a/perl-Syntax-Highlight-Engine-Kate-insensitive.patch 
b/perl-Syntax-Highlight-Engine-Kate-insensitive.patch
new file mode 100644
index 0000000..9bfdff7
--- /dev/null
+++ b/perl-Syntax-Highlight-Engine-Kate-insensitive.patch
@@ -0,0 +1,52 @@
+--- Syntax-Highlight-Engine-Kate-0.07/lib/Syntax/Highlight/Engine/Kate.pm      
2012-09-23 20:01:18.000000000 +1000
++++ Syntax-Highlight-Engine-Kate-inse/lib/Syntax/Highlight/Engine/Kate.pm      
2013-05-02 11:47:22.117779928 +1000
+@@ -616,11 +616,30 @@
+ }
+ 
+ sub languagePlug {
+-      my ($self, $req) = @_;
++      my ($self, $req, $insensitive) = @_;
++
+       unless (exists($self->{'syntaxes'}->{$req})) {
+-              warn "undefined language: $req";
+-              return undef;
++              if (defined($insensitive) && $insensitive) {
++                      my $matched = 0;
++                      foreach my $key (keys(%{$self->{'syntaxes'}})) {
++                              if ($key =~ /^$req$/i) {
++                                      warn "substituting language $key for 
$req";
++                                      $req = $key;
++                                      $matched = 1;
++                                      last;
++                              }
++                      }
++
++                      unless ($matched) {
++                              warn "undefined language: $req";
++                              return undef;
++                      }
++              } else {
++                      warn "undefined language: $req";
++                      return undef;
++              }
+       }
++
+       return $self->{'syntaxes'}->{$req};
+ }
+ 
+@@ -804,9 +823,13 @@
+ 
+ returns a list of languages for which plugins have been defined.
+ 
+-=item B<languagePlug>(I<$language>);
++=item B<languagePlug>(I<$language>, I<?$insensitive?>);
++
++Returns the module name of the plugin for B<$language>.
++
++If B<$insensitive> is set it will also try to match names ignoring case and 
return the correct module name of the plugin.
+ 
+-returns the module name of the plugin for B<$language>
++e.g. $highlighter->languagePlug('HtMl', 1); will return 'HTML'.
+ 
+ =item B<languagePropose>(I<$filename>);
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/perl-Syntax-Highlight-Engine-Kate.git/commitdiff/f192c271542e811483d53b6a4c76099467ccbd00

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to