>From 11071284f1702bcfc9e06e49ed7a6648d6fa162a Mon Sep 17 00:00:00 2001
From: Jitka Plesnikova <jples...@redhat.com>
Date: Tue, 5 May 2015 14:42:36 +0200
Subject: Fix regex and test (CPAN RT#104229)


diff --git a/perl-threads-lite.spec b/perl-threads-lite.spec
index 7f68440..647f1a1 100644
--- a/perl-threads-lite.spec
+++ b/perl-threads-lite.spec
@@ -1,11 +1,13 @@
 Name:           perl-threads-lite
 Version:        0.033
-Release:        7%{?dist}
+Release:        8%{?dist}
 Summary:        Actor model threading for Perl
 License:        GPL+ or Artistic
 Group:          Development/Libraries
 URL:            http://search.cpan.org/dist/threads-lite/
 Source0:        
http://www.cpan.org/authors/id/L/LE/LEONT/threads-lite-%{version}.tar.gz
+# Fix invalid regex and test's issue (CPAN RT#104229)
+Patch0:         threads-lite-0.033-Fix-regex-and-test.patch
 BuildRequires:  perl
 BuildRequires:  perl(Config)
 BuildRequires:  perl(ExtUtils::CBuilder)
@@ -38,6 +40,7 @@ queues. It thus facilitates a message passing style of 
multi-threading.
 
 %prep
 %setup -q -n threads-lite-%{version}
+%patch0 -p1
 
 %build
 perl Build.PL installdirs=vendor optimize="$RPM_OPT_FLAGS"
@@ -54,12 +57,16 @@ find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm 
-f {} \;
 %endif
 
 %files
-%doc Changes examples LICENSE README
+%license LICENSE
+%doc Changes examples README
 %{perl_vendorarch}/auto/*
 %{perl_vendorarch}/threads*
 %{_mandir}/man3/*
 
 %changelog
+* Tue May 05 2015 Jitka Plesnikova <jples...@redhat.com> - 0.033-8
+- Fix regex and test for Perl 5.22 (CPAN RT#104229)
+
 * Wed Feb 11 2015 Karsten Hopp <kars...@redhat.com> 0.033-7
 - disable checks on ppc64le, (rhbz#719874)
 
diff --git a/threads-lite-0.033-Fix-regex-and-test.patch 
b/threads-lite-0.033-Fix-regex-and-test.patch
new file mode 100644
index 0000000..4ce56ce
--- /dev/null
+++ b/threads-lite-0.033-Fix-regex-and-test.patch
@@ -0,0 +1,34 @@
+diff -up threads-lite-0.033/src/tables.h.PL.orig 
threads-lite-0.033/src/tables.h.PL
+--- threads-lite-0.033/src/tables.h.PL.orig    2015-05-05 10:52:26.659277898 
+0200
++++ threads-lite-0.033/src/tables.h.PL 2015-05-05 10:52:46.222506532 +0200
+@@ -228,6 +228,6 @@ STATIC void S_${name}_db_free(pTHX_ ${na
+ #define ${name}_db_free(t) S_${name}_db_free(aTHX_ t)
+ 
+ END
+-      $entry =~ s/ \$ { (\w+) } /$replacements{$1}/gxe;
++      $entry =~ s/ \$ \{ (\w+) \} /$replacements{$1}/gxe;
+       print $entry;
+ }
+diff -up threads-lite-0.033/t/10-basics.t.orig threads-lite-0.033/t/10-basics.t
+--- threads-lite-0.033/t/10-basics.t.orig      2015-05-05 14:21:23.752796837 
+0200
++++ threads-lite-0.033/t/10-basics.t   2015-05-05 14:22:01.727260997 +0200
+@@ -6,17 +6,16 @@ use experimental 'smartmatch';
+ 
+ use Test::More tests => 6;
+ use Test::Differences;
+-use Time::HiRes qw/sleep/;
+ 
+ use threads::lite qw/spawn receive self/;
+ 
+-my $thread = spawn({ modules => ['Carp'], monitor => 1 }, \&thread );
++my $thread = spawn({ modules => ['Carp', 'Time::HiRes'], monitor => 1 }, 
\&thread );
+ 
+ $thread->send(self());
+ 
+ sub thread {
+       my $other = threads::lite::receiveq;
+-      sleep .1;
++      Time::HiRes::sleep(.1);
+       $other->send('foo');
+       $other->send('bar');
+       $other->send('something else');
-- 
cgit v0.10.2


        
http://pkgs.fedoraproject.org/cgit/perl-threads-lite.git/commit/?h=master&id=11071284f1702bcfc9e06e49ed7a6648d6fa162a
--
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