diff --git a/SPECS-EXTENDED/perl-Scope-Upper/perl-Scope-Upper.signatures.json b/SPECS-EXTENDED/perl-Scope-Upper/perl-Scope-Upper.signatures.json index 0e9372f36fb..9af00387a44 100644 --- a/SPECS-EXTENDED/perl-Scope-Upper/perl-Scope-Upper.signatures.json +++ b/SPECS-EXTENDED/perl-Scope-Upper/perl-Scope-Upper.signatures.json @@ -1,5 +1,5 @@ { "Signatures": { - "Scope-Upper-0.32.tar.gz": "ccaff3251c092f2af8b5ad840b76655c4bc4ccf504ff7bde233811822a40abcf" + "Scope-Upper-0.34.tar.gz": "581d8bc510debd0c456a5fc7952cb7138ae667bf38f3a77e96d773dc3196a41e" } -} +} \ No newline at end of file diff --git a/SPECS-EXTENDED/perl-Scope-Upper/perl-Scope-Upper.spec b/SPECS-EXTENDED/perl-Scope-Upper/perl-Scope-Upper.spec index a396b2080a0..207be3d9b64 100644 --- a/SPECS-EXTENDED/perl-Scope-Upper/perl-Scope-Upper.spec +++ b/SPECS-EXTENDED/perl-Scope-Upper/perl-Scope-Upper.spec @@ -1,24 +1,24 @@ -Name: perl-Scope-Upper -Summary: Act on upper scopes -Version: 0.32 -Release: 4%{?dist} -License: GPL+ or Artistic Vendor: Microsoft Corporation Distribution: Azure Linux +Name: perl-Scope-Upper +Summary: Act on upper scopes +Version: 0.34 +Release: 8%{?dist} +License: GPL-1.0-or-later OR Artistic-1.0-Perl Source0: https://cpan.metacpan.org/authors/id/V/VP/VPIT/Scope-Upper-%{version}.tar.gz URL: https://metacpan.org/release/Scope-Upper # Build +BuildRequires: coreutils BuildRequires: findutils BuildRequires: gcc BuildRequires: make -BuildRequires: perl-interpreter BuildRequires: perl-devel BuildRequires: perl-generators +BuildRequires: perl-interpreter BuildRequires: perl(Config) BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 BuildRequires: perl(strict) BuildRequires: perl(warnings) -BuildRequires: sed # Runtime BuildRequires: perl(base) BuildRequires: perl(Exporter) @@ -35,12 +35,17 @@ BuildRequires: perl(threads) BuildRequires: perl(threads::shared) # Optional tests only BuildRequires: perl(Time::HiRes) -Requires: perl(:MODULE_COMPAT_%(eval "$(perl -V:version)"; echo $version)) -Requires: perl(Exporter) Requires: perl(XSLoader) %{?perl_default_filter} +# Filter modules bundled for tests +%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{_libexecdir} +%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(Scope::Upper::TestGenerator\\) +%global __requires_exclude %{__requires_exclude}|^perl\\(Test::Leaner\\) +%global __requires_exclude %{__requires_exclude}|^perl\\(VPIT::TestHelpers\\) + + %description This module lets you defer actions that will take place when the control flow returns into an upper scope. Currently, you can hook an upper scope @@ -48,30 +53,62 @@ end, or localize variables, array/hash values or deletions of elements in higher contexts. You can also return to an upper level and know which context was in use then. +%package tests +Summary: Tests for %{name} +Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: perl-Test-Harness +Requires: perl(Time::HiRes) + +%description tests +Tests from %{name}. Execute them +with "%{_libexecdir}/%{name}/test". + %prep %setup -q -n Scope-Upper-%{version} -sed -i -e '1s,^#!.*perl,%(perl -MConfig -e 'print $Config{startperl}'),' \ - samples/* +perl -MConfig -pi -e 's|^#!.*perl|$Config{startperl}|' samples/* + +# Help generators to recognize Perl scripts +for F in t/*.t; do + perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F" + chmod +x "$F" +done %build -perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" NO_PACKLIST=1 -make %{?_smp_mflags} +perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" NO_PACKLIST=1 NO_PERLLOCAL=1 +%{make_build} %install -make pure_install DESTDIR=%{buildroot} +%{make_install} find %{buildroot} -type f -name '*.bs' -a -size 0 -delete %{_fixperms} %{buildroot}/* +# Install tests +mkdir -p %{buildroot}%{_libexecdir}/%{name} +cp -a t %{buildroot}%{_libexecdir}/%{name} +cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF' +#!/bin/sh +cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)" +EOF +chmod +x %{buildroot}%{_libexecdir}/%{name}/test + %check +export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}') make test %files -%doc README Changes samples +%doc README Changes CONTRIBUTING samples %{perl_vendorarch}/* %exclude %dir %{perl_vendorarch}/auto %{_mandir}/man3/*.3* +%files tests +%{_libexecdir}/%{name} + %changelog +* Tue Dec 17 2024 Sreenivasulu Malavathula 0.34-8 +- Initial CBL-Mariner import from Fedora 41 (license: GPL-1.0-or-later OR Artistic-1.0-Perl). +- License verified. + * Fri Oct 15 2021 Pawel Winogrodzki - 0.32-4 - Initial CBL-Mariner import from Fedora 32 (license: MIT). diff --git a/cgmanifest.json b/cgmanifest.json index 66a68e721c3..da7705985c9 100644 --- a/cgmanifest.json +++ b/cgmanifest.json @@ -19373,8 +19373,8 @@ "type": "other", "other": { "name": "perl-Scope-Upper", - "version": "0.32", - "downloadUrl": "https://cpan.metacpan.org/authors/id/V/VP/VPIT/Scope-Upper-0.32.tar.gz" + "version": "0.34", + "downloadUrl": "https://cpan.metacpan.org/authors/id/V/VP/VPIT/Scope-Upper-0.34.tar.gz" } } },