254 lines
8.4 KiB
RPMSpec
254 lines
8.4 KiB
RPMSpec
%define perl_bootstrap 1
|
|
|
|
# Enable debugging with Devel::MAT
|
|
%bcond_with perl_Object_Pad_enables_Devel_MAT
|
|
# Perform optional tests
|
|
%bcond_without perl_Object_Pad_enables_optional_test
|
|
|
|
Name: perl-Object-Pad
|
|
Version: 0.51
|
|
Release: 2%{?dist}
|
|
Summary: Simple syntax for lexical slot-based objects
|
|
License: GPL+ or Artistic
|
|
URL: https://metacpan.org/release/Object-Pad
|
|
Source0: https://cpan.metacpan.org/authors/id/P/PE/PEVANS/Object-Pad-%{version}.tar.gz
|
|
Source1: macros.perl-Object-Pad
|
|
BuildRequires: coreutils
|
|
BuildRequires: perl-devel
|
|
BuildRequires: perl-generators
|
|
BuildRequires: perl-interpreter
|
|
BuildRequires: perl(:VERSION) >= 5.14
|
|
BuildRequires: perl(Config)
|
|
%if %{with perl_Object_Pad_enables_Devel_MAT}
|
|
BuildRequires: perl(Devel::MAT::Dumper::Helper) >= 0.41
|
|
%endif
|
|
BuildRequires: perl(ExtUtils::CBuilder)
|
|
BuildRequires: perl(Module::Build)
|
|
BuildRequires: perl(strict)
|
|
BuildRequires: perl(warnings)
|
|
BuildRequires: perl(XS::Parse::Keyword::Builder) >= 0.10
|
|
BuildRequires: perl(XS::Parse::Sublike::Builder) >= 0.10
|
|
# Run-time:
|
|
BuildRequires: perl(Carp)
|
|
BuildRequires: perl(DynaLoader)
|
|
# experimental since perl 5.20
|
|
BuildRequires: perl(experimental)
|
|
BuildRequires: perl(feature)
|
|
# indirect not used (only with 5.20.0 <= perl < 5.31.9)
|
|
BuildRequires: perl(mro)
|
|
# XS::Parse::Keyword is loaded from a header file generated by ./Build.PL,
|
|
# version specified in lib/Object/Pad.xs
|
|
BuildRequires: perl(XS::Parse::Keyword) >= 0.10
|
|
# XS::Parse::Sublike is loaded from a header file generated by ./Build.PL,
|
|
# version specified in lib/Object/Pad.xs
|
|
BuildRequires: perl(XS::Parse::Sublike) >= 0.10
|
|
# Tests:
|
|
BuildRequires: perl(attributes)
|
|
BuildRequires: perl(base)
|
|
BuildRequires: perl(Data::Dump)
|
|
BuildRequires: perl(Scalar::Util)
|
|
BuildRequires: perl(Test::Fatal)
|
|
BuildRequires: perl(Test::More) >= 0.88
|
|
BuildRequires: perl(Test::Refcount)
|
|
BuildRequires: perl(utf8)
|
|
%if %{with perl_Object_Pad_enables_optional_test} && !%{defined perl_bootstrap}
|
|
# A cycle: perl-Future-AsyncAwait → perl-Object-Pad
|
|
# A cycle: perl-Syntax-Keyword-Dynamically → perl-Object-Pad
|
|
# Optional tests:
|
|
BuildRequires: perl(Future)
|
|
BuildRequires: perl(Future::AsyncAwait) >= 0.45
|
|
BuildRequires: perl(Moo)
|
|
BuildRequires: perl(Syntax::Keyword::Dynamically) >= 0.04
|
|
BuildRequires: perl(Test::MemoryGrowth)
|
|
BuildRequires: perl(Test::Pod) >= 1.00
|
|
%endif
|
|
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
|
Requires: perl(experimental)
|
|
Requires: perl(XS::Parse::Keyword) >= 0.10
|
|
%if %{defined perl_XS_Parse_Keyword_ABI}
|
|
Requires: %{perl_XS_Parse_Keyword_ABI}
|
|
%endif
|
|
Requires: perl(XS::Parse::Sublike) >= 0.10
|
|
# This module maintains multiple ABIs. Plugins pin to an ABI with
|
|
# OBJECTPAD_ABIVERSION macro defined in include/object_pad.h.
|
|
# The ABI range is checked at run time against ClassHookFuncs.ver
|
|
# field by ObjectPad_register_slot_attribute().
|
|
Provides: perl(:Object_Pad_ABI) = 0.50
|
|
Provides: perl(:Object_Pad_ABI) = 0.51
|
|
|
|
# Filter private modules
|
|
%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\((ARole|BaseClass)\\)
|
|
# Filter under-specified dependencies
|
|
%global __requires_exclude %{__requires_exclude}|^perl\\(Test::More\\)$
|
|
|
|
%description
|
|
This Perl module provides a simple syntax for creating object classes, which
|
|
uses private variables that look like lexical variables for object member
|
|
fields.
|
|
|
|
%package tests
|
|
Summary: Tests for %{name}
|
|
BuildArch: noarch
|
|
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
Requires: %{name}-ExtensionBuilder = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
Requires: perl-Test-Harness
|
|
Requires: perl(Object::Pad::ExtensionBuilder)
|
|
Requires: perl(strict)
|
|
Requires: perl(Test::More) >= 0.88
|
|
%if %{with perl_Object_Pad_enables_optional_test} && !%{defined perl_bootstrap}
|
|
Requires: perl(Future)
|
|
Requires: perl(Future::AsyncAwait) >= 0.45
|
|
Requires: perl(Syntax::Keyword::Dynamically) >= 0.04
|
|
Requires: perl(Test::MemoryGrowth)
|
|
%endif
|
|
|
|
%description tests
|
|
Tests from %{name}. Execute them
|
|
with "%{_libexecdir}/%{name}/test".
|
|
|
|
%package ExtensionBuilder
|
|
Summary: Build-time support for Object::Pad plugins
|
|
Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
Requires: perl-interpreter
|
|
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
|
# rpm for /usr/lib/rpm/macros.d directory
|
|
Requires: rpm
|
|
|
|
%description ExtensionBuilder
|
|
This package provides a build-time helper to assist the authors in writing XS
|
|
plugins for Object::Pad. It prepares a Module::Build-driven distribution to be
|
|
able to make use of Object::Pad.
|
|
|
|
%prep
|
|
%autosetup -p1 -n Object-Pad-%{version}
|
|
%if !%{with perl_Object_Pad_enables_optional_test} || %{defined perl_bootstrap}
|
|
for F in t/08subclass-Moo.t t/80async-method.t t/80dynamically+Object-Pad.t \
|
|
t/81async-method+dynamically.t t/90leak.t t/99pod.t; do
|
|
rm "$F"
|
|
perl -i -ne 'print $_ unless m{^\Q'"$F"'\E\b}' MANIFEST
|
|
done
|
|
%endif
|
|
chmod +x t/*.t
|
|
|
|
%build
|
|
perl Build.PL --installdirs=vendor --optimize="$RPM_OPT_FLAGS"
|
|
./Build
|
|
|
|
%install
|
|
./Build install --destdir=%{buildroot} --create_packlist=0
|
|
find %{buildroot} -type f -name '*.bs' -size 0 -delete
|
|
%{_fixperms} %{buildroot}/*
|
|
install -D -m 0644 -t %{buildroot}%{_rpmmacrodir} %{SOURCE1}
|
|
# Install tests
|
|
mkdir -p %{buildroot}/%{_libexecdir}/%{name}
|
|
cp -a t %{buildroot}/%{_libexecdir}/%{name}
|
|
%if %{with perl_Object_Pad_enables_optional_test} && !%{defined perl_bootstrap}
|
|
rm %{buildroot}/%{_libexecdir}/%{name}/t/99pod.t
|
|
%endif
|
|
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}')
|
|
./Build test
|
|
|
|
%files
|
|
%license LICENSE
|
|
%doc Changes README
|
|
%{perl_vendorarch}/auto/*
|
|
%dir %{perl_vendorarch}/Object
|
|
%{perl_vendorarch}/Object/Pad.pm
|
|
%dir %{perl_vendorarch}/Object/Pad
|
|
%{perl_vendorarch}/Object/Pad/MOP
|
|
%{_mandir}/man3/Object::Pad.*
|
|
%{_mandir}/man3/Object::Pad::MOP::*
|
|
|
|
%files ExtensionBuilder
|
|
%{perl_vendorarch}/Object/Pad/ExtensionBuilder*
|
|
%{_mandir}/man3/Object::Pad::ExtensionBuilder*
|
|
%{_rpmmacrodir}/macros.%{name}
|
|
|
|
%files tests
|
|
%{_libexecdir}/%{name}
|
|
|
|
%changelog
|
|
* Tue Aug 17 2021 Petr Pisar <ppisar@redhat.com> - 0.51-2
|
|
- Bootstrap against perl-XS-Parse-Keyword-0.12 (bug #1994077)
|
|
|
|
* Tue Aug 10 2021 Petr Pisar <ppisar@redhat.com> - 0.51-1
|
|
- 0.51 bump
|
|
|
|
* Mon Aug 09 2021 Petr Pisar <ppisar@redhat.com> - 0.50-1
|
|
- 0.50 bump
|
|
|
|
* Tue Aug 03 2021 Petr Pisar <ppisar@redhat.com> - 0.48-1
|
|
- 0.48 bump
|
|
|
|
* Thu Jul 29 2021 Petr Pisar <ppisar@redhat.com> - 0.47-1
|
|
- 0.47 bump
|
|
- Fix a crash in when generating classes at run-time (CPAN RT#137952)
|
|
|
|
* Thu Jul 29 2021 Petr Pisar <ppisar@redhat.com> - 0.46-1
|
|
- 0.46 bump
|
|
|
|
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.45-2
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
* Mon Jul 19 2021 Petr Pisar <ppisar@redhat.com> - 0.45-1
|
|
- 0.45 bump
|
|
|
|
* Thu Jul 15 2021 Petr Pisar <ppisar@redhat.com> - 0.44-1
|
|
- 0.44 bump
|
|
|
|
* Wed Jul 07 2021 Petr Pisar <ppisar@redhat.com> - 0.43-1
|
|
- 0.43 bump
|
|
|
|
* Fri Jul 02 2021 Petr Pisar <ppisar@redhat.com> - 0.42-1
|
|
- 0.42 bump
|
|
|
|
* Tue Jun 22 2021 Petr Pisar <ppisar@redhat.com> - 0.41-1
|
|
- 0.41 bump
|
|
|
|
* Thu Jun 03 2021 Petr Pisar <ppisar@redhat.com> - 0.40-1
|
|
- 0.40 bump
|
|
|
|
* Tue May 25 2021 Petr Pisar <ppisar@redhat.com> - 0.39-1
|
|
- 0.39 bump
|
|
|
|
* Mon May 24 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.38-3
|
|
- Perl 5.34 re-rebuild of bootstrapped packages
|
|
|
|
* Fri May 21 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.38-2
|
|
- Perl 5.34 rebuild
|
|
|
|
* Fri May 14 2021 Petr Pisar <ppisar@redhat.com> - 0.38-1
|
|
- 0.38 bump
|
|
|
|
* Tue Apr 06 2021 Petr Pisar <ppisar@redhat.com> - 0.37-1
|
|
- 0.37 bump
|
|
|
|
* Fri Feb 19 2021 Petr Pisar <ppisar@redhat.com> - 0.36-1
|
|
- 0.36 bump
|
|
- Package tests
|
|
|
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.35-2
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
* Tue Jan 05 2021 Petr Pisar <ppisar@redhat.com> - 0.35-1
|
|
- 0.35 bump
|
|
|
|
* Thu Nov 05 2020 Petr Pisar <ppisar@redhat.com> - 0.34-1
|
|
- 0.34 bump
|
|
|
|
* Wed Sep 16 2020 Petr Pisar <ppisar@redhat.com> - 0.33-1
|
|
- 0.33 bump
|
|
|
|
* Tue Jul 28 2020 Petr Pisar <ppisar@redhat.com> - 0.31-2
|
|
- Finish a bootstrap
|
|
|
|
* Wed Jul 15 2020 Petr Pisar <ppisar@redhat.com> 0.31-1
|
|
- Specfile autogenerated by cpanspec 1.78.
|