From 290b8be07a3798045ff97f785c27ef10a0286bd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= ppisar@redhat.com Date: Tue, 6 Oct 2015 15:01:10 +0200 Subject: Import
diff --git a/.gitignore b/.gitignore index e69de29..e2e6505 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/Coro-Multicore-0.02.tar.gz diff --git a/Coro-Multicore-0.02-Convert-to-UTF-8.patch b/Coro-Multicore-0.02-Convert-to-UTF-8.patch new file mode 100644 index 0000000..c190a4d --- /dev/null +++ b/Coro-Multicore-0.02-Convert-to-UTF-8.patch @@ -0,0 +1,28 @@ +From 97df37be0e94f5de203826cdcfc8b77fd286c1c4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= ppisar@redhat.com +Date: Mon, 5 Oct 2015 15:12:05 +0200 +Subject: [PATCH] Convert to UTF-8 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Petr Písař ppisar@redhat.com +--- + README | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/README b/README +index e35ee30..7858ffa 100644 +--- a/README ++++ b/README +@@ -150,6 +150,6 @@ AUTHOR + Marc Lehmann schmorp@schmorp.de + http://software.schmorp.de/pkg/AnyEvent-XSThreadPool.html + +- Additional thanks to Zsb�n Ambrus, who gave considerable desing input ++ Additional thanks to Zsbán Ambrus, who gave considerable desing input + for this module and the perl multicore specification. + +-- +2.4.3 + diff --git a/Coro-Multicore-0.02-Declare-POD-encoding.patch b/Coro-Multicore-0.02-Declare-POD-encoding.patch new file mode 100644 index 0000000..6fe5722 --- /dev/null +++ b/Coro-Multicore-0.02-Declare-POD-encoding.patch @@ -0,0 +1,26 @@ +From 70ed7929018bf228c70932ba077f6d6bf12e8176 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= ppisar@redhat.com +Date: Mon, 5 Oct 2015 15:05:17 +0200 +Subject: [PATCH] Declare POD encoding +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Petr Písař ppisar@redhat.com +--- + Multicore.pm | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Multicore.pm b/Multicore.pm +index 4b1b091..ae76ed5 100644 +--- a/Multicore.pm ++++ b/Multicore.pm +@@ -1,3 +1,5 @@ ++=encoding utf8 ++ + =head1 NAME + + Coro::Multicore - make coro threads on multiple cores with specially supported modules +-- +2.4.3 + diff --git a/perl-Coro-Multicore.spec b/perl-Coro-Multicore.spec new file mode 100644 index 0000000..d0ab580 --- /dev/null +++ b/perl-Coro-Multicore.spec @@ -0,0 +1,107 @@ +Name: perl-Coro-Multicore +Version: 0.02 +Release: 1%{?dist} +Summary: Make Coro threads on multiple cores with specially supported modules +# COPYING: GPL+ or Artistic +# perlmulticore.h: Public Domain or CC0 +License: (GPL+ or Artistic) and (Public Domain or CC0) +Group: Development/Libraries +URL: http://search.cpan.org/dist/Coro-Multicore/ +Source0: http://www.cpan.org/authors/id/M/ML/MLEHMANN/Coro-Multicore-%%7Bversion%7D.t... +# Declare POD encoding, submitted to upstream, +# http://lists.schmorp.de/pipermail/anyevent/2015q4/000780.html +Patch0: Coro-Multicore-0.02-Declare-POD-encoding.patch +# Normalize documentation encoding +Patch1: Coro-Multicore-0.02-Convert-to-UTF-8.patch +BuildRequires: coreutils +BuildRequires: findutils +BuildRequires: gcc +BuildRequires: make +BuildRequires: perl +BuildRequires: perl-devel +BuildRequires: perl-podlators +BuildRequires: perl(Canary::Stability) +BuildRequires: perl(Coro::MakeMaker) +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.52 +# Run-time: +BuildRequires: perl(AnyEvent) >= 7 +BuildRequires: perl(Carp) +BuildRequires: perl(Coro) >= 6.44 +BuildRequires: perl(XSLoader) +# Tests: +BuildRequires: perl(Coro::AnyEvent) +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) +Requires: perl(AnyEvent) >= 7 +Requires: perl(Carp) +Requires: perl(Coro) >= 6.44 + +# Filter under-specified dependecies +%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\((AnyEvent|Coro)\)$ + +%description +While Coro threads (unlike ithreads) provide real threads similar to +pthreads, python threads and so on, they do not run in parallel to each +other even on machines with multiple CPUs or multiple CPU cores. + +This module lifts this restriction under two very specific but useful +conditions: firstly, the coro thread executes in XS code and does not +touch any perl data structures, and secondly, the XS code is specially +prepared to allow this. + +# We package perlmulticore.h because it is bundled by perl-Compress-LZF-3.8. +# We deliver it from Coro-Multicore because perlmulticore.h's documentation +# points to Coro-Multicore CVS tree. +%package -n perlmulticore-devel +Summary: Perl Multicore specification and implementation +License: Public Domain or CC0 +# Packaging guidelines require header-only packages: +# to be architecture-specific, to deliver headers in -devel package, to +# provide -static symbol for reverse build-requires. +Provides: perlmulticore-static = %{?epoch:%{epoch}:}%{version}-%{release} + +%description -n perlmulticore-devel +This header file implements a simple mechanism for XS modules to allow +re-use of the perl interpreter for other threads while doing some lengthy +operation, such as cryptography, SQL queries, disk I/O and so on. + +%prep +%setup -q -n Coro-Multicore-%{version} +%patch0 -p1 +%patch1 -p1 + +%build +PERL_CANARY_STABILITY_NOPROMPT=1 perl Makefile.PL INSTALLDIRS=vendor \ + OPTIMIZE="$RPM_OPT_FLAGS" +make %{?_smp_mflags} + +# perlmulticore-devel: +pod2man perlmulticore.h >perlmulticore.h.3 + +%install +make pure_install DESTDIR=$RPM_BUILD_ROOT +find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ; +find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} ; +%{_fixperms} $RPM_BUILD_ROOT/* + +# perlmulticore-devel: +install -d $RPM_BUILD_ROOT/%{_includedir} +install -m 0644 perlmulticore.h $RPM_BUILD_ROOT/%{_includedir} +install -d $RPM_BUILD_ROOT/%{_mandir}/man3 +install -m 0644 perlmulticore.h.3 $RPM_BUILD_ROOT/%{_mandir}/man3 + +%check +make test + +%files +%doc Changes COPYING README +%{perl_vendorarch}/auto/* +%{perl_vendorarch}/Coro* +%{_mandir}/man3/Coro::Multicore.3* + +%files -n perlmulticore-devel +%{_includedir}/perlmulticore.h +%{_mandir}/man3/perlmulticore.h.3* + +%changelog +* Mon Oct 05 2015 Petr Pisar ppisar@redhat.com 0.02-1 +- Specfile autogenerated by cpanspec 1.78. diff --git a/sources b/sources index e69de29..3e4bfe5 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +3d0a042d7cd940c46d9830c7b67ca937 Coro-Multicore-0.02.tar.gz