diff --git a/Devel-PPPort-3.68.tar.gz b/Devel-PPPort-3.68.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..f8717f8d15c6325d9a2759229f1246d159367fa7 Binary files /dev/null and b/Devel-PPPort-3.68.tar.gz differ diff --git a/perl-Devel-PPPort.spec b/perl-Devel-PPPort.spec new file mode 100644 index 0000000000000000000000000000000000000000..ffe6b5020c48cfcefbac39ccbc0493917190edde --- /dev/null +++ b/perl-Devel-PPPort.spec @@ -0,0 +1,114 @@ +%define anolis_release 1 +# Perform optional tests +%bcond_without perl_Devel_PPPort_enables_optional_test + +Name: perl-Devel-PPPort +Version: 3.68 +Release: %{anolis_release}%{?dist} +Summary: Perl Pollution Portability header generator +License: GPL+ or Artistic +URL: https://metacpan.org/release/Devel-PPPort +Source0: https://cpan.metacpan.org/authors/id/A/AT/ATOOMIC/Devel-PPPort-%{version}.tar.gz +BuildRequires: coreutils +BuildRequires: findutils +BuildRequires: gcc +BuildRequires: make +BuildRequires: perl-devel +BuildRequires: perl-generators +BuildRequires: perl-interpreter +BuildRequires: perl(:VERSION) >= 5.3 +BuildRequires: perl(Config) +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 +BuildRequires: perl(strict) +BuildRequires: perl(vars) +# Run-time: +# warnings in PPPort.pm not used +# Tests: +BuildRequires: perl(DynaLoader) +BuildRequires: perl(File::Path) +BuildRequires: perl(FindBin) +BuildRequires: perl(less) +BuildRequires: perl(lib) +BuildRequires: perl(Tie::Hash) +BuildRequires: perl(utf8) +BuildRequires: perl(warnings) +%if %{with perl_Devel_PPPort_enables_optional_test} && !%{defined %perl_bootstrap} +# Optional tests: +# File::Spec not helpful +BuildRequires: perl(Test::Pod) >= 0.95 +%endif +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) + +# Filter modules bundled for tests +%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}perl\\(.::parts/.*\\) + +%description +Perl's API has changed over time, gaining new features, new functions, +increasing its flexibility, and reducing the impact on the C name space +environment (reduced pollution). The header file written by this module, +typically ppport.h, attempts to bring some of the newer Perl API features +to older versions of Perl, so that you can worry less about keeping track +of old releases, but users can still reap the benefit. + +%package tests +Summary: Tests for %{name} +Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: perl-Test-Harness +Requires: perl(File::Spec) +Requires: perl(less) +Requires: perl(utf8) + +%description tests +Tests from %{name}. Execute them +with "%{_libexecdir}/%{name}/test". + +%{?perl_default_filter} + +%prep +%setup -q -n Devel-PPPort-%{version} + +# Help generators to recognize Perl scripts +for F in t/*.t t/*.pl parts/*.pl; 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 NO_PACKLIST=1 NO_PERLLOCAL=1 OPTIMIZE="$RPM_OPT_FLAGS" +%{make_build} + +%install +%{make_install} +find %{buildroot} -type f -name '*.bs' -empty -delete +%{_fixperms} %{buildroot}/* + +# Install tests +mkdir -p %{buildroot}%{_libexecdir}/%{name} +cp -a t parts %{buildroot}%{_libexecdir}/%{name} +perl -i -pe 's{(ppptmp)}{/tmp/$1}' %{buildroot}%{_libexecdir}/%{name}/t/ppphtest.t +rm %{buildroot}%{_libexecdir}/%{name}/t/podtest.t +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 +unset PERL_CORE SKIP_SLOW_TESTS +export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}') +make regen_tests +make test + +%files +# README.md is useless +%doc Changes HACKERS README soak TODO +%{perl_vendorarch}/auto/* +%{perl_vendorarch}/Devel* +%{_mandir}/man3/* + +%files tests +%{_libexecdir}/%{name} + +%changelog +* Wed Apr 20 2022 Chunmei Xu - 3.68-1 +- init from upstream