diff --git a/perl-threads.spec b/perl-threads.spec new file mode 100644 index 0000000000000000000000000000000000000000..4e89d2779c21bb2c4405f2d58553d9a1be769028 --- /dev/null +++ b/perl-threads.spec @@ -0,0 +1,81 @@ +%define anolis_release 1 +%global base_version 2.21 +Name: perl-threads +Epoch: 1 +Version: 2.21 +Release: %{anolis_release}%{?dist} +Summary: Perl interpreter-based threads +License: GPL+ or Artistic +URL: https://metacpan.org/release/threads +Source0: https://cpan.metacpan.org/authors/id/J/JD/JDHEDDEN/threads-%{base_version}.tar.gz +BuildRequires: coreutils +BuildRequires: findutils +BuildRequires: gcc +BuildRequires: make +BuildRequires: perl-devel +BuildRequires: perl-generators +BuildRequires: perl-interpreter +BuildRequires: perl(Config) +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 +BuildRequires: perl(File::Spec) +BuildRequires: perl(strict) +BuildRequires: perl(warnings) +# Run-time: +BuildRequires: perl(Carp) +BuildRequires: perl(overload) +BuildRequires: perl(XSLoader) +# Tests only: +BuildRequires: perl(blib) +BuildRequires: perl(Cwd) +BuildRequires: perl(ExtUtils::testlib) +BuildRequires: perl(File::Path) +BuildRequires: perl(Hash::Util) +BuildRequires: perl(IO::File) +BuildRequires: perl(POSIX) +BuildRequires: perl(Test::More) +# Optional tests: +BuildRequires: perl(Thread::Queue) +BuildRequires: perl(Thread::Semaphore) +BuildRequires: perl(threads::shared) +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) +Requires: perl(Carp) + +%{?perl_default_filter} + +%description +Since Perl 5.8, thread programming has been available using a model called +interpreter threads which provides a new Perl interpreter for each thread, +and, by default, results in no data or state information being shared +between threads. + +(Prior to Perl 5.8, 5005threads was available through the "Thread.pm" API. +This threading model has been deprecated, and was removed as of Perl 5.10.0.) + +%prep +%setup -q -n threads-%{base_version} +chmod -x examples/* + +%build +perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 OPTIMIZE="$RPM_OPT_FLAGS" +%{make_build} + +%install +%{make_install} +find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -delete +%{_fixperms} $RPM_BUILD_ROOT/* + +%check +unset GIT_DIR PERL_BUILD_PACKAGING PERL_CORE PERL_RUNPERL_DEBUG \ + PERL5_ITHREADS_STACK_SIZE RUN_MAINTAINER_TESTS +make test + +%files +%doc Changes examples README +%{perl_vendorarch}/auto/* +%{perl_vendorarch}/threads* +%{_mandir}/man3/* + +%changelog +* Tue Mar 08 2022 mgb01105731 - 1:2.21-1 +- Init from upstream version 2.21 + diff --git a/threads-2.21.tar.gz b/threads-2.21.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..dee1c39f5e03d6bbb6b5c1d23c53ceae10ada756 Binary files /dev/null and b/threads-2.21.tar.gz differ