[clc-intercal] Patch to fix a character set detection bug revealed under Perl 5.18

Iain Arnell iarnell at fedoraproject.org
Fri Aug 2 20:02:41 UTC 2013


commit c7943985a16e8f2d0cd774cb5f3de3f948f407ad
Author: Iain Arnell <iarnell at gmail.com>
Date:   Fri Aug 2 14:01:58 2013 -0600

    Patch to fix a character set detection bug revealed under Perl 5.18

 clc-intercal-guess-charset.patch |   12 ++++++++++++
 clc-intercal.spec                |    8 +++++++-
 2 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/clc-intercal-guess-charset.patch b/clc-intercal-guess-charset.patch
new file mode 100644
index 0000000..0b2dd31
--- /dev/null
+++ b/clc-intercal-guess-charset.patch
@@ -0,0 +1,12 @@
+diff -up CLC-INTERCAL-1.-94.-2/CLC-INTERCAL-Base-1.-94.-2/INTERCAL/Sick.pm.orig CLC-INTERCAL-1.-94.-2/CLC-INTERCAL-Base-1.-94.-2/INTERCAL/Sick.pm
+--- CLC-INTERCAL-1.-94.-2/CLC-INTERCAL-Base-1.-94.-2/INTERCAL/Sick.pm.orig	2008-03-29 11:09:06.000000000 -0600
++++ CLC-INTERCAL-1.-94.-2/CLC-INTERCAL-Base-1.-94.-2/INTERCAL/Sick.pm	2013-08-02 13:55:41.952276530 -0600
+@@ -709,7 +709,7 @@ sub _guess_charset {
+ 	    my $count = 0;
+ 	    while ((my $line = $fh->write_binary(4096)) ne '') {
+ 		    my $cl = &$cnv($line);
+-		    $count++ while $line =~ /DO|PLEASE/ig;
++		    $count++ while $cl =~ /DO|PLEASE/ig;
+ 	    }
+ 	    $counts{$name} = $count;
+ 	};
diff --git a/clc-intercal.spec b/clc-intercal.spec
index c812a38..43af3d6 100644
--- a/clc-intercal.spec
+++ b/clc-intercal.spec
@@ -1,7 +1,7 @@
 %define         perversion      1.-94.-2
 Name:           clc-intercal
 Version:        0
-Release:        0.12.%(echo %{perversion}|sed -e's/-/_/g')%{?dist}
+Release:        0.13.%(echo %{perversion}|sed -e's/-/_/g')%{?dist}
 Summary:        Compiler for the INTERCAL language
 License:        BSD
 Group:          Development/Libraries
@@ -10,6 +10,8 @@ Source0:        http://overload.intercal.org.uk/clc/CLC-INTERCAL-%{perversion}/C
 # under perl-5.12, uc warns when passed undef
 # (and patch doesn't work in build)
 Source1:        %{name}-perl-5-12.patch
+# fix a charset detection bug
+Source2:        %{name}-guess-charset.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
 BuildRequires:  perl(ExtUtils::MakeMaker)
@@ -51,6 +53,7 @@ although a future release of "sick" will be able to use it as well.
 %build
 %{__perl} Makefile.PL INSTALLDIRS=vendor
 patch -s -p1 --fuzz=0 <%{SOURCE1}
+patch -s -p1 --fuzz=0 <%{SOURCE2}
 # parallel build fails - don't use -j
 make
 
@@ -111,6 +114,9 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Fri Aug 02 2013 Iain Arnell <iarnell at gmail.com> 0-0.13.1._94._2
+- Patch to fix a character set detection bug revealed under Perl 5.18
+
 * Mon Jul 22 2013 Petr Pisar <ppisar at redhat.com> - 0-0.12.1._94._2
 - Perl 5.18 rebuild
 


More information about the scm-commits mailing list