[perl-Coro] use ucontext backend on non-x86

Dan Horák sharkcz at fedoraproject.org
Mon Jan 10 10:37:09 UTC 2011


commit 4864129a620546885530aee9232f6783b375d165
Author: Dan Horák <dan at danny.cz>
Date:   Mon Jan 10 11:36:56 2011 +0100

    use ucontext backend on non-x86

 perl-Coro-5.25-ucontext-default.patch |   12 ++++++++++++
 perl-Coro.spec                        |   10 +++++++++-
 2 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/perl-Coro-5.25-ucontext-default.patch b/perl-Coro-5.25-ucontext-default.patch
new file mode 100644
index 0000000..8449c97
--- /dev/null
+++ b/perl-Coro-5.25-ucontext-default.patch
@@ -0,0 +1,12 @@
+diff -up Coro-5.25/Coro/Makefile.PL.ucontext Coro-5.25/Coro/Makefile.PL
+--- Coro-5.25/Coro/Makefile.PL.ucontext	2011-01-10 11:29:04.000000000 +0100
++++ Coro-5.25/Coro/Makefile.PL	2011-01-10 11:29:18.000000000 +0100
+@@ -49,7 +49,7 @@ if (exists $ENV{CORO_INTERFACE}) {
+ 
+ } elsif ($^O =~ /linux/) {
+    # everything "just works", as expected
+-   $iface = $iface_asm || "s";
++   $iface = $iface_asm || "u";
+ 
+ } elsif ($^O =~ /freebsd/) {
+    # FreeBSD 4.x has ucontext.h but no makecontext et al. (see BUGS section of
diff --git a/perl-Coro.spec b/perl-Coro.spec
index bb3f6dd..2883892 100644
--- a/perl-Coro.spec
+++ b/perl-Coro.spec
@@ -1,11 +1,12 @@
 Name:           perl-Coro
 Version:        5.25
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        The only real threads in perl
 License:        GPL+ or Artistic
 Group:          Development/Libraries
 URL:            http://search.cpan.org/dist/Coro/
 Source0:        http://search.cpan.org/CPAN/authors/id/M/ML/MLEHMANN/Coro-%{version}.tar.gz
+Patch0:         %{name}-5.25-ucontext-default.patch
 BuildRequires:  perl(AnyEvent) >= 5
 BuildRequires:  perl(common::sense)
 BuildRequires:  perl(ExtUtils::MakeMaker)
@@ -54,6 +55,10 @@ programming much safer and easier than using other thread models.
 
 %prep
 %setup -q -n Coro-%{version}
+# use ucontext backend on non-x86 (setjmp didn't work on s390(x))
+%ifnarch %{ix86} x86_64
+%patch0 -p1 -b .ucontext-default
+%endif
 %fix_shbang_line eg/myhttpd
 
 %build
@@ -82,6 +87,9 @@ make test
 %{_mandir}/man3/*
 
 %changelog
+* Mon Jan 10 2011 Dan Horák <dan[at]danny.cz> 5.25-2
+- use ucontext backend on non-x86
+
 * Tue Jan 04 2011 Petr Pisar <ppisar at redhat.com> 5.25-1
 - 5.25 import
 - Disable perl(EV) support as it's not packaged yet


More information about the scm-commits mailing list