Skip to content

Commit

Permalink
Updating CBL-Mariner import Fedora 41 (Version 0.32 -> 0.34).
Browse files Browse the repository at this point in the history
- Added "License verified" statement to the changelog.
  • Loading branch information
v-smalavathu committed Dec 17, 2024
1 parent 05db65d commit b4c1010
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"Signatures": {
"Scope-Upper-0.32.tar.gz": "ccaff3251c092f2af8b5ad840b76655c4bc4ccf504ff7bde233811822a40abcf"
"Scope-Upper-0.34.tar.gz": "581d8bc510debd0c456a5fc7952cb7138ae667bf38f3a77e96d773dc3196a41e"
}
}
}
67 changes: 52 additions & 15 deletions SPECS-EXTENDED/perl-Scope-Upper/perl-Scope-Upper.spec
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -35,43 +35,80 @@ 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
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 <[email protected]> 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 <[email protected]> - 0.32-4
- Initial CBL-Mariner import from Fedora 32 (license: MIT).

Expand Down
4 changes: 2 additions & 2 deletions cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
},
Expand Down

0 comments on commit b4c1010

Please sign in to comment.