# 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.814 Release: 1%{dist} Summary: Simple syntax for lexical slot-based objects License: GPL-1.0-or-later OR Artistic-1.0-Perl 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.18 BuildRequires: perl(Config) %if %{with perl_Object_Pad_enables_Devel_MAT} BuildRequires: perl(Devel::MAT::Dumper::Helper) >= 0.45 %endif BuildRequires: perl(ExtUtils::CBuilder) BuildRequires: perl(Module::Build) BuildRequires: perl(strict) BuildRequires: perl(warnings) %define xs_parse_keyword_min_ver 0.46 BuildRequires: perl(XS::Parse::Keyword::Builder) >= %{xs_parse_keyword_min_ver} %define xs_parse_sublike_min_ver 0.25 BuildRequires: perl(XS::Parse::Sublike::Builder) >= %{xs_parse_sublike_min_ver} # Run-time: BuildRequires: perl(Carp) BuildRequires: perl(DynaLoader) # experimental since perl 5.20 BuildRequires: perl(experimental) BuildRequires: perl(Exporter) BuildRequires: perl(feature) # File::ShareDir 1.00 not used at tests # File::Spec not used at tests # indirect not used (only with 5.20.0 <= perl < 5.31.9) BuildRequires: perl(mro) # Object::Pad::MetaFunctions only loads Scalar::Util if "builtin" module does # exist (i.e. perl < 5.35.7). # 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) >= %{xs_parse_keyword_min_ver} # 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) >= %{xs_parse_sublike_min_ver} # Tests: BuildRequires: perl(attributes) BuildRequires: perl(base) BuildRequires: perl(constant) BuildRequires: perl(Data::Dumper) BuildRequires: perl(lib) BuildRequires: perl(Scalar::Util) BuildRequires: perl(Test2::V0) >= 0.000148 BuildRequires: perl(Test2::IPC) BuildRequires: perl(threads) 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: %define future_min_ver 0.49 BuildRequires: perl(Future) >= %{future_min_ver} %define future_asyncawait_min_ver 0.45 BuildRequires: perl(Future::AsyncAwait) >= %{future_asyncawait_min_ver} # Some tests are skipped with Future::XS < 0.08 BuildRequires: perl(Moo) BuildRequires: perl(Sublike::Extended) %define syntax_keyword_dynamically_min_ver 0.04 BuildRequires: perl(Syntax::Keyword::Dynamically) >= %{syntax_keyword_dynamically_min_ver} BuildRequires: perl(Test::MemoryGrowth) BuildRequires: perl(Test::Pod) >= 1.00 %endif %if %{with perl_Object_Pad_enables_optional_test} && %{with perl_Object_Pad_enables_Devel_MAT} BuildRequires: perl(Devel::MAT) >= 0.46 BuildRequires: perl(Devel::MAT::Dumper) BuildRequires: perl(List::Util) %endif # experimental since perl 5.20 Requires: perl(experimental) Requires: perl(strict) Requires: perl(XS::Parse::Keyword) >= %{xs_parse_keyword_min_ver} %if %{defined perl_XS_Parse_Keyword_ABI} Requires: %{perl_XS_Parse_Keyword_ABI} %endif Requires: perl(XS::Parse::Sublike) >= %{xs_parse_sublike_min_ver} # This module maintains multiple ABIs. Plugins pin to an ABI with # OBJECTPAD_ABIVERSION macro defined in share/include/object_pad.h. # The ABI range is checked at run time against ClassHookFuncs.ver # field by ObjectPad_register_field_attribute(). Provides: perl(:Object_Pad_ABI) = 0.57 Provides: perl(:Object_Pad_ABI) = 0.76 Provides: perl(:Object_Pad_ABI) = 0.810 # Filter private modules %global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\((91rt141483Role|ARole|BaseClass|Example)\\) %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(Config) Requires: perl(strict) %if %{with perl_Object_Pad_enables_optional_test} && !%{defined perl_bootstrap} Requires: perl(Future) >= %{future_min_ver} Requires: perl(Future::AsyncAwait) >= %{future_asyncawait_min_ver} Requires: perl(Sublike::Extended) Requires: perl(Syntax::Keyword::Dynamically) >= %{syntax_keyword_dynamically_min_ver} Requires: perl(Test::MemoryGrowth) %endif %if %{with perl_Object_Pad_enables_optional_test} && %{with perl_Object_Pad_enables_Devel_MAT} Requires: perl(Devel::MAT) >= 0.46 Requires: perl(Devel::MAT::Dumper) Requires: perl(List::Util) %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(File::ShareDir) >= 1.00 Requires: perl(File::Spec) Requires: perl(Object::Pad) # 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} for F in \ %if !%{with perl_Object_Pad_enables_optional_test} || %{defined perl_bootstrap} t/08subclass-Moo.t t/80async-method.t t/80dynamically+Object-Pad.t \ t/80extended+Object-Pad.t t/81async-method+dynamically.t \ t/90leak.t t/99pod.t \ %endif %if !%{with perl_Object_Pad_enables_optional_test} || !%{with perl_Object_Pad_enables_Devel_MAT} t/82devel-mat-dumper-helper.t \ %endif ; do rm "$F" perl -i -ne 'print $_ unless m{^\Q'"$F"'\E\b}' MANIFEST done 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 %dir %{perl_vendorarch}/auto/Object %{perl_vendorarch}/auto/Object/Pad %dir %{perl_vendorarch}/Object %{perl_vendorarch}/Object/Pad.pm %dir %{perl_vendorarch}/Object/Pad %{perl_vendorarch}/Object/Pad/MetaFunctions.pm %{perl_vendorarch}/Object/Pad/MOP %{_mandir}/man3/Object::Pad.* %{_mandir}/man3/Object::Pad::MetaFunctions* %{_mandir}/man3/Object::Pad::MOP::* %files ExtensionBuilder %dir %{perl_vendorarch}/auto/share %dir %{perl_vendorarch}/auto/share/module %{perl_vendorarch}/auto/share/module/Object-Pad %{perl_vendorarch}/Object/Pad/ExtensionBuilder* %{_mandir}/man3/Object::Pad::ExtensionBuilder* %{_rpmmacrodir}/macros.%{name} %files tests %{_libexecdir}/%{name} %changelog * Mon Sep 23 2024 Petr Pisar - 0.814-1 - 0.814 bump * Fri Sep 06 2024 Petr Pisar - 0.813-1 - 0.813 bump * Mon Sep 02 2024 Petr Pisar - 0.812-1 - 0.812 bump * Thu Aug 22 2024 Petr Pisar - 0.811-1 - 0.811 bump * Mon Aug 12 2024 Petr Pisar - 0.810-1 - 0.810 bump * Fri Jul 19 2024 Fedora Release Engineering - 0.809-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Mon Jul 15 2024 Petr Pisar - 0.809-1 - 0.809 bump * Wed Jun 12 2024 Jitka Plesnikova - 0.808-5 - Perl 5.40 re-rebuild of bootstrapped packages * Tue Jun 11 2024 Jitka Plesnikova - 0.808-4 - Perl 5.40 rebuild * Thu Jan 25 2024 Fedora Release Engineering - 0.808-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Jan 21 2024 Fedora Release Engineering - 0.808-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Wed Jan 10 2024 Petr Pisar - 0.808-1 - 0.808 bump * Wed Nov 15 2023 Petr Pisar - 0.806-1 - 0.806 bump * Mon Oct 23 2023 Petr Pisar - 0.805-1 - 0.805 bump * Thu Oct 05 2023 Petr Pisar - 0.804-1 - 0.804 bump * Thu Sep 21 2023 Petr Pisar - 0.803-1 - 0.803 bump * Wed Aug 23 2023 Petr Pisar - 0.802-1 - 0.802 bump * Fri Aug 11 2023 Petr Pisar - 0.801-1 - 0.801 bump * Thu Aug 10 2023 Petr Pisar - 0.800-1 - 0.800 bump * Fri Jul 21 2023 Fedora Release Engineering - 0.79-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Wed Jul 12 2023 Jitka Plesnikova - 0.79-3 - Perl 5.38 re-rebuild of bootstrapped packages * Tue Jul 11 2023 Jitka Plesnikova - 0.79-2 - Perl 5.38 rebuild * Mon May 15 2023 Petr Pisar - 0.79-1 - 0.79 bump * Fri Jan 20 2023 Fedora Release Engineering - 0.78-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jan 13 2023 Petr Pisar - 0.78-1 - 0.78 bump * Tue Jan 03 2023 Petr Pisar - 0.77-1 - 0.77 bump * Mon Dec 05 2022 Petr Pisar - 0.74-1 - 0.74 bump * Thu Dec 01 2022 Petr Pisar - 0.72-1 - 0.72 bump * Tue Nov 01 2022 Petr Pisar - 0.71-1 - 0.71 bump * Tue Nov 01 2022 Petr Pisar - 0.70-1 - 0.70 bump * Wed Oct 26 2022 Petr Pisar - 0.69-2 - Remove a dependency on a private module 91rt141483Role from perl-Object-Pad-tests * Wed Oct 26 2022 Petr Pisar - 0.69-1 - 0.69 bump * Wed Aug 17 2022 Petr Pisar - 0.68-1 - 0.68 bump * Fri Jul 22 2022 Fedora Release Engineering - 0.66-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Thu Jul 07 2022 Petr Pisar - 0.66-1 - 0.66 bump * Fri Jun 03 2022 Jitka Plesnikova - 0.65-3 - Perl 5.36 re-rebuild of bootstrapped packages * Tue May 31 2022 Jitka Plesnikova - 0.65-2 - Perl 5.36 rebuild * Thu May 12 2022 Petr Pisar - 0.65-1 - 0.65 bump * Mon Apr 04 2022 Petr Pisar - 0.64-1 - 0.64 bump * Tue Mar 08 2022 Petr Pisar - 0.63-1 - 0.63 bump * Wed Mar 02 2022 Petr Pisar - 0.62-1 - 0.62 bump * Thu Feb 17 2022 Petr Pisar - 0.61-1 - 0.61 bump * Wed Feb 02 2022 Petr Pisar - 0.60-1 - 0.60 bump (ABI 0.51 removed) * Fri Jan 21 2022 Fedora Release Engineering - 0.59-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Thu Dec 16 2021 Petr Pisar - 0.59-1 - 0.59 bump * Fri Nov 26 2021 Petr Pisar - 0.58-1 - 0.58 bump * Fri Nov 19 2021 Petr Pisar - 0.57-1 - 0.57 bump (ABI 0.50 removed, ABI 0.57 added) * Mon Oct 25 2021 Petr Pisar - 0.56-1 - 0.56 bump * Tue Oct 12 2021 Petr Pisar - 0.55-1 - 0.55 bump (bug #2013049) * Fri Oct 08 2021 Petr Pisar - 0.54-1 - 0.54 bump * Wed Sep 29 2021 Petr Pisar - 0.53-1 - 0.53 bump * Tue Aug 31 2021 Petr Pisar - 0.52-2 - Require perl(strict) * Thu Aug 26 2021 Jitka Plesnikova - 0.52-1 - 0.52 bump * Tue Aug 17 2021 Petr Pisar - 0.51-3 - Finish bootstrap against perl-XS-Parse-Keyword-0.12 (bug #1994077) * Tue Aug 17 2021 Petr Pisar - 0.51-2 - Bootstrap against perl-XS-Parse-Keyword-0.12 (bug #1994077) * Tue Aug 10 2021 Petr Pisar - 0.51-1 - 0.51 bump * Mon Aug 09 2021 Petr Pisar - 0.50-1 - 0.50 bump * Tue Aug 03 2021 Petr Pisar - 0.48-1 - 0.48 bump * Thu Jul 29 2021 Petr Pisar - 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 - 0.46-1 - 0.46 bump * Thu Jul 22 2021 Fedora Release Engineering - 0.45-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Mon Jul 19 2021 Petr Pisar - 0.45-1 - 0.45 bump * Thu Jul 15 2021 Petr Pisar - 0.44-1 - 0.44 bump * Wed Jul 07 2021 Petr Pisar - 0.43-1 - 0.43 bump * Fri Jul 02 2021 Petr Pisar - 0.42-1 - 0.42 bump * Tue Jun 22 2021 Petr Pisar - 0.41-1 - 0.41 bump * Thu Jun 03 2021 Petr Pisar - 0.40-1 - 0.40 bump * Tue May 25 2021 Petr Pisar - 0.39-1 - 0.39 bump * Mon May 24 2021 Jitka Plesnikova - 0.38-3 - Perl 5.34 re-rebuild of bootstrapped packages * Fri May 21 2021 Jitka Plesnikova - 0.38-2 - Perl 5.34 rebuild * Fri May 14 2021 Petr Pisar - 0.38-1 - 0.38 bump * Tue Apr 06 2021 Petr Pisar - 0.37-1 - 0.37 bump * Fri Feb 19 2021 Petr Pisar - 0.36-1 - 0.36 bump - Package tests * Wed Jan 27 2021 Fedora Release Engineering - 0.35-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Tue Jan 05 2021 Petr Pisar - 0.35-1 - 0.35 bump * Thu Nov 05 2020 Petr Pisar - 0.34-1 - 0.34 bump * Wed Sep 16 2020 Petr Pisar - 0.33-1 - 0.33 bump * Tue Jul 28 2020 Petr Pisar - 0.31-2 - Finish a bootstrap * Wed Jul 15 2020 Petr Pisar 0.31-1 - Specfile autogenerated by cpanspec 1.78.