commit 95ba8dd39475023d86672cfee5e7ecd02b6d39af
Author: Jitka Plesnikova <jples...@redhat.com>
Date:   Tue Jan 7 08:41:48 2014 +0100

    Apply upstream case sensitivity patch (CPAN RT#84982)

 ...ight-Engine-Kate-0.08-RT84982-insensitive.patch |   52 ++++++++++++++++++++
 perl-Syntax-Highlight-Engine-Kate.spec             |   10 +++-
 2 files changed, 60 insertions(+), 2 deletions(-)
---
diff --git a/Syntax-Highlight-Engine-Kate-0.08-RT84982-insensitive.patch 
b/Syntax-Highlight-Engine-Kate-0.08-RT84982-insensitive.patch
new file mode 100644
index 0000000..9bfdff7
--- /dev/null
+++ b/Syntax-Highlight-Engine-Kate-0.08-RT84982-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>);
+ 
diff --git a/perl-Syntax-Highlight-Engine-Kate.spec 
b/perl-Syntax-Highlight-Engine-Kate.spec
index b030f39..a471401 100644
--- a/perl-Syntax-Highlight-Engine-Kate.spec
+++ b/perl-Syntax-Highlight-Engine-Kate.spec
@@ -1,11 +1,13 @@
 Name:           perl-Syntax-Highlight-Engine-Kate
 Version:        0.08
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Port to Perl of the syntax highlight engine of the Kate text 
editor
 License:        GPL+ or Artistic
 Group:          Development/Libraries
 URL:            http://search.cpan.org/dist/Syntax-Highlight-Engine-Kate/
 Source0:        
http://www.cpan.org/authors/id/S/SZ/SZABGAB/Syntax-Highlight-Engine-Kate-%{version}.tar.gz
+# Add support case insensitive names (CPAN RT#84982)
+Patch0:         Syntax-Highlight-Engine-Kate-0.08-RT84982-insensitive.patch
 BuildArch:      noarch
 BuildRequires:  perl
 BuildRequires:  perl(Config)
@@ -44,6 +46,7 @@ engine of the Kate text editor.
 
 %prep
 %setup -q -n Syntax-Highlight-Engine-Kate-%{version}
+%patch0 -p1
 find -type f -exec chmod -c -x {} +
 
 %build
@@ -64,6 +67,9 @@ make test
 %{_mandir}/man3/*
 
 %changelog
+* Tue Jan 07 2014 Jitka Plesnikova <jples...@redhat.com> - 0.08-4
+- Apply upstream case sensitivity patch (CPAN RT#84982) - jfe...@redhat.com
+
 * Sun Aug 04 2013 Fedora Release Engineering <rel-...@lists.fedoraproject.org> 
- 0.08-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 
@@ -128,7 +134,7 @@ make test
 * Mon May  4 2009 Marcela Mašláňová <mmasl...@redhat.com> 0.04-3
 - noarch, remove doubled Alerts
 
-* Wed Apr 23 2009 Marcela Mašláňová <mmasl...@redhat.com> 0.04-2
+* Wed Apr 22 2009 Marcela Mašláňová <mmasl...@redhat.com> 0.04-2
 - generate again new spec
 
 * Wed Apr 22 2009 Marcela Mašláňová <mmasl...@redhat.com> 0.04-1
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/perl-devel

Reply via email to