diff --git a/dev-perl/Coro/Coro-6.570.0-r1.ebuild b/dev-perl/Coro/Coro-6.570.0-r1.ebuild new file mode 100644 index 0000000000000..3de3eb2d2a4d1 --- /dev/null +++ b/dev-perl/Coro/Coro-6.570.0-r1.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DIST_AUTHOR=MLEHMANN +DIST_VERSION=6.57 +DIST_EXAMPLES=( "eg/*" ) +inherit perl-module + +DESCRIPTION="The only real threads in perl" + +LICENSE="|| ( Artistic GPL-1+ ) LGPL-2.1+ || ( BSD-2 GPL-2+ )" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+ev event valgrind" + +RDEPEND=" + >=dev-perl/AnyEvent-7 + ev? ( >=dev-perl/EV-4.0.0 ) + event? ( >=dev-perl/Event-1.80.0 ) + >=dev-perl/Guard-0.500.0 + virtual/perl-Scalar-List-Utils + >=virtual/perl-Storable-2.150.0 + dev-perl/common-sense +" +DEPEND=" + valgrind? ( dev-debug/valgrind ) +" +BDEPEND=" + ${RDEPEND} + dev-perl/Canary-Stability + >=virtual/perl-ExtUtils-MakeMaker-6.520.0 +" + +PATCHES=( + "${FILESDIR}/6.514.0-ev-config.patch" + "${FILESDIR}/6.570.0-FORTIFY_SOURCE.patch" + "${FILESDIR}/6.570.0-c23.patch" +) + +src_configure() { + local myopts=() + use ev && myopts+=("EV") + use event && myopts+=( "Event" ) + + export CORO_USE_VALGRIND=$(usex valgrind y n) + + GENTOO_OPTS="${myopts[@]}" perl-module_src_configure +} diff --git a/dev-perl/Coro/files/6.570.0-FORTIFY_SOURCE.patch b/dev-perl/Coro/files/6.570.0-FORTIFY_SOURCE.patch new file mode 100644 index 0000000000000..3fa1369237983 --- /dev/null +++ b/dev-perl/Coro/files/6.570.0-FORTIFY_SOURCE.patch @@ -0,0 +1,41 @@ +https://src.fedoraproject.org/rpms/perl-Coro/blob/rawhide/f/Coro-6.512-Disable-disabling-FORTIFY_SOURCE.patch + +From 7accb61160334aa89bf771323c91e40f42af8574 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Fri, 14 Jul 2017 14:59:32 +0200 +Subject: [PATCH] Disable disabling FORTIFY_SOURCE +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +6.512 started to disable FORTIFY_SOURCE feature because it breaks +jumps on some C standard libraries. + +Signed-off-by: Petr Písař +--- a/Coro/Makefile.PL ++++ b/Coro/Makefile.PL +@@ -219,7 +219,6 @@ if ($iface eq "u") { + print "\nUsing ucontext implementation\n\n"; + conftest ("TEST_makecontext"); + } elsif ($iface eq "s") { +- $DEFINE .= " -D_FORTIFY_SOURCE=0"; + $DEFINE .= " -DCORO_SJLJ"; + print "\nUsing setjmp/longjmp/sigaltstack implementation\n\n"; + conftest ("TEST_sigaltstack"); +--- a/Coro/libcoro/coro.h ++++ b/Coro/libcoro/coro.h +@@ -342,12 +342,6 @@ struct coro_context + # define _GNU_SOURCE /* for glibc */ + # endif + +-/* try to disable well-meant but buggy checks in some libcs */ +-# ifdef _FORTIFY_SOURCE +-# undef _FORTIFY_SOURCE +-# undef __USE_FORTIFY_LEVEL /* helps some more when too much has been included already */ +-# endif +- + # if !CORO_LOSER + # include + # endif +-- +2.9.4 diff --git a/dev-perl/Coro/files/6.570.0-c23.patch b/dev-perl/Coro/files/6.570.0-c23.patch new file mode 100644 index 0000000000000..1061383e8f8c0 --- /dev/null +++ b/dev-perl/Coro/files/6.570.0-c23.patch @@ -0,0 +1,51 @@ +https://bugs.gentoo.org/981304 +https://rt.cpan.org/Public/Bug/Display.html?id=158609 +https://src.fedoraproject.org/rpms/perl-Coro/raw/rawhide/f/Coro-6.57-c23.patch +--- a/Coro/State.xs ++++ b/Coro/State.xs +@@ -156,7 +156,7 @@ static void *coro_thx; + # include + #endif + +-static double (*nvtime)(); /* so why doesn't it take void? */ ++static double (*nvtime)(pTHX); /* so why doesn't it take void? */ + static void (*u2time)(pTHX_ UV ret[2]); + + /* we hijack an hopefully unused CV flag for our purposes */ +@@ -391,7 +391,7 @@ coro_u2time (pTHX_ UV ret[2]) + } + + ecb_inline double +-coro_nvtime (void) ++coro_nvtime (pTHX) + { + struct timeval tv; + gettimeofday (&tv, 0); +@@ -420,7 +420,7 @@ time_init (pTHX) + if (!svp) croak ("Time::HiRes is required, but missing. Caught"); + if (!SvIOK (*svp)) croak ("Time::NVtime isn't a function pointer. Caught"); + +- nvtime = INT2PTR (double (*)(), SvIV (*svp)); ++ nvtime = INT2PTR (double (*)(pTHX), SvIV (*svp)); + + svp = hv_fetch (PL_modglobal, "Time::U2time", 12, 0); + u2time = INT2PTR (void (*)(pTHX_ UV ret[2]), SvIV (*svp)); +@@ -3031,7 +3031,7 @@ PerlIOCede_pushed (pTHX_ PerlIO *f, cons + PerlIOCede *self = PerlIOSelf (f, PerlIOCede); + + self->every = SvCUR (arg) ? SvNV (arg) : 0.01; +- self->next = nvtime () + self->every; ++ self->next = nvtime (aTHX) + self->every; + + return PerlIOBuf_pushed (aTHX_ f, mode, Nullsv, tab); + } +@@ -3048,7 +3048,7 @@ static IV + PerlIOCede_flush (pTHX_ PerlIO *f) + { + PerlIOCede *self = PerlIOSelf (f, PerlIOCede); +- double now = nvtime (); ++ double now = nvtime (aTHX); + + if (now >= self->next) + { +