Blame SPECS/perl-Specio.spec

0eee09
# Run optional test
0eee09
%if ! (0%{?rhel})
0eee09
%bcond_without perl_Specio_enables_optional_test
0eee09
%else
0eee09
%bcond_with perl_Specio_enables_optional_test
0eee09
%endif
0eee09
0eee09
Name:		perl-Specio
0eee09
Version:	0.47
0eee09
Release:	3%{?dist}
0eee09
Summary:	Type constraints and coercions for Perl
0eee09
# lib/Specio/PartialDump.pm:	GPL+ or Artistic
0eee09
#				<https://github.com/houseabsolute/Specio/issues/17>
0eee09
# other files:			Artistic 2.0
0eee09
License:	Artistic 2.0 and (GPL+ or Artistic)
0eee09
URL:		https://metacpan.org/release/Specio
0eee09
Source0:	https://cpan.metacpan.org/modules/by-module/Test/Specio-%{version}.tar.gz
0eee09
BuildArch:	noarch
0eee09
# Module Build
0eee09
BuildRequires:	coreutils
0eee09
BuildRequires:	make
0eee09
BuildRequires:	perl-generators
0eee09
BuildRequires:	perl-interpreter
0eee09
BuildRequires:	perl(ExtUtils::MakeMaker) >= 6.76
0eee09
# Module Runtime
0eee09
BuildRequires:	perl(Carp)
0eee09
BuildRequires:	perl(Devel::StackTrace)
0eee09
BuildRequires:	perl(Eval::Closure)
0eee09
BuildRequires:	perl(Exporter)
0eee09
BuildRequires:	perl(IO::File)
0eee09
BuildRequires:	perl(List::Util) >= 1.33
0eee09
BuildRequires:	perl(Module::Runtime)
0eee09
BuildRequires:	perl(MRO::Compat)
0eee09
BuildRequires:	perl(overload)
0eee09
BuildRequires:	perl(parent)
0eee09
BuildRequires:	perl(re)
0eee09
BuildRequires:	perl(Ref::Util) >= 0.112
0eee09
BuildRequires:	perl(Role::Tiny) >= 1.003003
0eee09
BuildRequires:	perl(Role::Tiny::With)
0eee09
BuildRequires:	perl(Scalar::Util)
0eee09
BuildRequires:	perl(Storable)
0eee09
BuildRequires:	perl(strict)
0eee09
BuildRequires:	perl(Sub::Quote)
0eee09
BuildRequires:	perl(Sub::Util) >= 1.40
0eee09
BuildRequires:	perl(Test::Fatal)
0eee09
BuildRequires:	perl(Test::More) >= 0.96
0eee09
BuildRequires:	perl(Try::Tiny)
0eee09
BuildRequires:	perl(version) >= 0.83
0eee09
BuildRequires:	perl(warnings)
0eee09
BuildRequires:	perl(XString)
0eee09
# Test Suite
0eee09
BuildRequires:	perl(File::Spec)
0eee09
BuildRequires:	perl(FindBin)
0eee09
BuildRequires:	perl(lib)
0eee09
BuildRequires:	perl(open)
0eee09
BuildRequires:	perl(Test::Needs)
0eee09
BuildRequires:	perl(utf8)
0eee09
%if %{with perl_Specio_enables_optional_test}
0eee09
# Optional Tests
0eee09
BuildRequires:	perl(CPAN::Meta) >= 2.120900
0eee09
BuildRequires:	perl(CPAN::Meta::Prereqs)
0eee09
BuildRequires:	perl(Moo)
0eee09
%if !%{defined perl_bootstrap}
0eee09
# Break cycle: perl-Moose → perl-DateTime → perl-Specio
0eee09
BuildRequires:	perl(Moose) >= 2.1207
0eee09
# Break cycle: perl-Mouse → perl-Moose → perl-DateTime → perl-Specio
0eee09
BuildRequires:	perl(Mouse)
0eee09
%endif
0eee09
BuildRequires:	perl(namespace::autoclean)
0eee09
%endif
0eee09
# Dependencies
0eee09
Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
0eee09
Requires:	perl(Ref::Util) >= 0.112
0eee09
Requires:	perl(Sub::Util) >= 1.40
0eee09
Requires:	perl(XString)
0eee09
0eee09
# Avoid provides for private packages
0eee09
%global __provides_exclude ^perl\\(_T::.*\\)
0eee09
0eee09
%description
0eee09
The Specio distribution provides classes for representing type constraints
0eee09
and coercion, along with syntax sugar for declaring them.
0eee09
0eee09
Note that this is not a proper type system for Perl. Nothing in this
0eee09
distribution will magically make the Perl interpreter start checking a value's
0eee09
type on assignment to a variable. In fact, there's no built-in way to apply a
0eee09
type to a variable at all.
0eee09
0eee09
Instead, you can explicitly check a value against a type, and optionally coerce
0eee09
values to that type.
0eee09
0eee09
%package -n perl-Test-Specio
0eee09
Summary:	Test helpers for Specio
0eee09
License:	Artistic 2.0
0eee09
Requires:	%{name} = %{version}-%{release}
0eee09
0eee09
%description -n perl-Test-Specio
0eee09
This package provides some helper functions and variables for testing Specio
0eee09
types.
0eee09
0eee09
%prep
0eee09
%setup -q -n Specio-%{version}
0eee09
0eee09
%build
0eee09
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
0eee09
%{make_build}
0eee09
0eee09
%install
0eee09
%{make_install}
0eee09
%{_fixperms} -c %{buildroot}
0eee09
0eee09
%check
0eee09
make test
0eee09
0eee09
%files
0eee09
%license LICENSE
0eee09
%doc Changes CODE_OF_CONDUCT.md CONTRIBUTING.md README.md TODO.md
0eee09
%{perl_vendorlib}/Specio.pm
0eee09
%{perl_vendorlib}/Specio/
0eee09
%{_mandir}/man3/Specio.3*
0eee09
%{_mandir}/man3/Specio::Coercion.3*
0eee09
%{_mandir}/man3/Specio::Constraint::AnyCan.3*
0eee09
%{_mandir}/man3/Specio::Constraint::AnyDoes.3*
0eee09
%{_mandir}/man3/Specio::Constraint::AnyIsa.3*
0eee09
%{_mandir}/man3/Specio::Constraint::Enum.3*
0eee09
%{_mandir}/man3/Specio::Constraint::Intersection.3*
0eee09
%{_mandir}/man3/Specio::Constraint::ObjectCan.3*
0eee09
%{_mandir}/man3/Specio::Constraint::ObjectDoes.3*
0eee09
%{_mandir}/man3/Specio::Constraint::ObjectIsa.3*
0eee09
%{_mandir}/man3/Specio::Constraint::Parameterizable.3*
0eee09
%{_mandir}/man3/Specio::Constraint::Parameterized.3*
0eee09
%{_mandir}/man3/Specio::Constraint::Role::CanType.3*
0eee09
%{_mandir}/man3/Specio::Constraint::Role::DoesType.3*
0eee09
%{_mandir}/man3/Specio::Constraint::Role::Interface.3*
0eee09
%{_mandir}/man3/Specio::Constraint::Role::IsaType.3*
0eee09
%{_mandir}/man3/Specio::Constraint::Simple.3*
0eee09
%{_mandir}/man3/Specio::Constraint::Structurable.3*
0eee09
%{_mandir}/man3/Specio::Constraint::Structured.3*
0eee09
%{_mandir}/man3/Specio::Constraint::Union.3*
0eee09
%{_mandir}/man3/Specio::Declare.3*
0eee09
%{_mandir}/man3/Specio::DeclaredAt.3*
0eee09
%{_mandir}/man3/Specio::Exception.3*
0eee09
%{_mandir}/man3/Specio::Exporter.3*
0eee09
%{_mandir}/man3/Specio::Helpers.3*
0eee09
%{_mandir}/man3/Specio::Library::Builtins.3*
0eee09
%{_mandir}/man3/Specio::Library::Numeric.3*
0eee09
%{_mandir}/man3/Specio::Library::Perl.3*
0eee09
%{_mandir}/man3/Specio::Library::String.3*
0eee09
%{_mandir}/man3/Specio::Library::Structured.3*
0eee09
%{_mandir}/man3/Specio::Library::Structured::Dict.3*
0eee09
%{_mandir}/man3/Specio::Library::Structured::Map.3*
0eee09
%{_mandir}/man3/Specio::Library::Structured::Tuple.3*
0eee09
%{_mandir}/man3/Specio::OO.3*
0eee09
%{_mandir}/man3/Specio::PartialDump.3*
0eee09
%{_mandir}/man3/Specio::Registry.3*
0eee09
%{_mandir}/man3/Specio::Role::Inlinable.3*
0eee09
%{_mandir}/man3/Specio::Subs.3*
0eee09
%{_mandir}/man3/Specio::TypeChecks.3*
0eee09
0eee09
%files -n perl-Test-Specio
0eee09
%{perl_vendorlib}/Test/
0eee09
%{_mandir}/man3/Test::Specio.3*
0eee09
0eee09
%changelog
0eee09
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0.47-3
0eee09
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
0eee09
  Related: rhbz#1991688
0eee09
0eee09
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.47-2
0eee09
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
0eee09
0eee09
* Sun Jan 31 2021 Paul Howarth <paul@city-fan.org> - 0.47-1
0eee09
- Update to 0.47
0eee09
  - Change Specio constraint object's stringification overloading to return the
0eee09
    type name rather than the default Perl object stringification, which gives
0eee09
    you something like
0eee09
    "Specio::Constraint::Parameterized=HASH(0x564d258efb48)"; anonymous are
0eee09
    special cased to return something you can print
0eee09
  - All types now overload the 'eq' comparison operator: Moose expects types to
0eee09
    be comparable in this manner when doing role summation (GH#18)
0eee09
0eee09
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.46-5
0eee09
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
0eee09
0eee09
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.46-4
0eee09
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
0eee09
0eee09
* Fri Jun 26 2020 Jitka Plesnikova <jplesnik@redhat.com> - 0.46-3
0eee09
- Perl 5.32 re-rebuild of bootstrapped packages
0eee09
0eee09
* Tue Jun 23 2020 Jitka Plesnikova <jplesnik@redhat.com> - 0.46-2
0eee09
- Perl 5.32 rebuild
0eee09
0eee09
* Sat Mar 14 2020 Paul Howarth <paul@city-fan.org> - 0.46-1
0eee09
- Update to 0.46
0eee09
  - Correct license of Specio::PartialDump (GH#17)
0eee09
0eee09
* Tue Feb 18 2020 Petr Pisar <ppisar@redhat.com> - 0.45-3
0eee09
- Correct a perl-Specio license to "Artistic 2.0 and (GPL+ or Artistic)"
0eee09
0eee09
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.45-2
0eee09
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
0eee09
0eee09
* Mon Nov 25 2019 Paul Howarth <paul@city-fan.org> - 0.45-1
0eee09
- Update to 0.45
0eee09
  - Made XString a prereq if installing with Perl 5.10+
0eee09
0eee09
* Thu Aug 15 2019 Paul Howarth <paul@city-fan.org> - 0.44-1
0eee09
- Update to 0.44
0eee09
  - Replaced the use of B with XString if it is installed; the latter is much
0eee09
    smaller and provides the one subroutine from B we cared about (based on
0eee09
    GH#15)
0eee09
- Use %%{make_build} and %%{make_install}
0eee09
0eee09
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.43-5
0eee09
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
0eee09
0eee09
* Sun Jun 02 2019 Jitka Plesnikova <jplesnik@redhat.com> - 0.43-4
0eee09
- Perl 5.30 re-rebuild of bootstrapped packages
0eee09
0eee09
* Fri May 31 2019 Jitka Plesnikova <jplesnik@redhat.com> - 0.43-3
0eee09
- Perl 5.30 rebuild
0eee09
0eee09
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.43-2
0eee09
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
0eee09
0eee09
* Sun Oct 28 2018 Paul Howarth <paul@city-fan.org> - 0.43-1
0eee09
- Update to 0.43
0eee09
  - Optimized compile-time operations to make Specio itself quicker to load;
0eee09
    Specio's load time is a non-trivial part of the load time of DateTime (and
0eee09
    presumably other things that use it)
0eee09
  - Based on https://github.com/houseabsolute/DateTime.pm/issues/85
0eee09
- Package new CODE_OF_CONDUCT.md file
0eee09
0eee09
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.42-5
0eee09
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
0eee09
0eee09
* Sun Jul 01 2018 Jitka Plesnikova <jplesnik@redhat.com> - 0.42-4
0eee09
- Perl 5.28 re-rebuild of bootstrapped packages
0eee09
0eee09
* Fri Jun 29 2018 Jitka Plesnikova <jplesnik@redhat.com> - 0.42-3
0eee09
- Perl 5.28 rebuild
0eee09
0eee09
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.42-2
0eee09
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
0eee09
0eee09
* Mon Nov  6 2017 Paul Howarth <paul@city-fan.org> - 0.42-1
0eee09
- Update to 0.42
0eee09
  - Fixed checks for whether a class is loaded in light of upcoming
0eee09
    optimization in Perl 5.28 (GH#12)
0eee09
  - The Perl library claimed it provided types named LaxVersionStr and
0eee09
    StrictVersionStr but they were really named LaxVersion and StrictVersion;
0eee09
    the names have now been fixed to match the documentation, so they are
0eee09
    LaxVersionStr and StrictVersionStr
0eee09
0eee09
* Fri Aug  4 2017 Paul Howarth <paul@city-fan.org> - 0.40-1
0eee09
- Update to 0.40
0eee09
  - Fixed more bugs with {any,object}_{can,does,isa}_type
0eee09
    - When passed a glob (not a globref) they would die in their type check
0eee09
    - On Perl 5.16 or earlier, passing a number to an any_* type would also die
0eee09
  - Fixed subification overloading: if Sub::Quote was loaded, this would be
0eee09
    used, but any environment variables needed for the closure would not be
0eee09
    included, which broke enums, among other things
0eee09
0eee09
* Thu Aug  3 2017 Paul Howarth <paul@city-fan.org> - 0.39-1
0eee09
- Update to 0.39
0eee09
  - Many bug fixes and improvements to the types created by
0eee09
    {any,object}_{can,does,isa}_type; in some cases, an invalid value could
0eee09
    cause an exception in type check itself, and in other cases, a value that
0eee09
    failed a type check would cause an exception when generating a message
0eee09
    describing the failure
0eee09
  - The messages describing a failure for all of these types have been improved
0eee09
  - You can now create anonymous *_does and *_isa types using the exports from
0eee09
    Specio::Declare
0eee09
0eee09
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.38-2
0eee09
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
0eee09
0eee09
* Sat Jul  1 2017 Paul Howarth <paul@city-fan.org> - 0.38-1
0eee09
- Update to 0.38
0eee09
  - Simplify checks for overloading to not call overload::Overloaded(); just
0eee09
    checking the return value of overload::Method() is sufficient
0eee09
0eee09
* Wed Jun 07 2017 Jitka Plesnikova <jplesnik@redhat.com> - 0.37-3
0eee09
- Perl 5.26 re-rebuild of bootstrapped packages
0eee09
0eee09
* Mon Jun 05 2017 Jitka Plesnikova <jplesnik@redhat.com> - 0.37-2
0eee09
- Perl 5.26 rebuild
0eee09
0eee09
* Tue May  9 2017 Paul Howarth <paul@city-fan.org> - 0.37-1
0eee09
- Update to 0.37
0eee09
  - Possible fix for very weird failures seen under threaded Perls with some
0eee09
    modules that use Specio
0eee09
0eee09
* Mon Feb 20 2017 Paul Howarth <paul@city-fan.org> - 0.36-1
0eee09
- Update to 0.36
0eee09
  - Inlined coercions would attempt to coerce for every type that matched the
0eee09
    value given, instead of stopping after the first type (GH#11)
0eee09
  - Inlined coercions did not include the inline environment variables needed
0eee09
    by the type from which the coercion was being performed (GH#8)
0eee09
  - When you use the same type repeatedly as coderef (for example, as a
0eee09
    constraint with Moo), it will only generate its subified form once, rather
0eee09
    than regenerating it each time it is de-referenced
0eee09
  - Added an API to Specio::Subs to allow you to combine type libraries and
0eee09
    helper subs in one package for exporting; see the Specio::Exporter docs for
0eee09
    more detail
0eee09
0eee09
* Mon Feb 13 2017 Paul Howarth <paul@city-fan.org> - 0.35-1
0eee09
- Update to 0.35
0eee09
  - Added Specio::Subs, a module that allows you to turn one or more library's
0eee09
    types into subroutines like is_Int() and to_Int()
0eee09
  - Added an inline_coercion method to Specio constraints
0eee09
0eee09
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.34-2
0eee09
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
0eee09
0eee09
* Mon Jan 30 2017 Paul Howarth <paul@city-fan.org> - 0.34-1
0eee09
- Update to 0.34
0eee09
  - Packages with Specio::Exporter can now specify additional arbitrary subs to
0eee09
    exporter; see the Specio::Exporter docs for details
0eee09
  - Importing the same library twice in a given package would throw an
0eee09
    exception; the second attempt to import is now ignored
0eee09
0eee09
* Wed Jan 25 2017 Paul Howarth <paul@city-fan.org> - 0.33-1
0eee09
- Update to 0.33
0eee09
  - Fixed a mistake in the SYNOPSIS for Specio::Declare; the example for the
0eee09
    *_isa_type helpers was not correct
0eee09
  - Removed the alpha warning from the docs; this is being used by enough of my
0eee09
    modules on CPAN that I don't plan on doing any big breaking changes without
0eee09
    a deprecation first
0eee09
0eee09
* Fri Jan 13 2017 Paul Howarth <paul@city-fan.org> - 0.32-1
0eee09
- Update to 0.32
0eee09
  - Fixed a bug in the inlining for types create by any_can_type() and
0eee09
    object_can_type(); this inlining mostly worked by accident because of some
0eee09
    List::Util XS magic, but this broke under the debugger (GH#6,
0eee09
    https://github.com/houseabsolute/DateTime.pm/issues/49)
0eee09
0eee09
* Mon Nov  7 2016 Paul Howarth <paul@city-fan.org> - 0.31-1
0eee09
- Update to 0.31
0eee09
  - The stack trace contained by Specio::Exception objects no longer includes
0eee09
    stack frames for the Specio::Exception package
0eee09
  - Made the inline_environment() and description() methods public on type and
0eee09
    coercion objects
0eee09
0eee09
* Thu Oct 20 2016 Petr Pisar <ppisar@redhat.com> - 0.30-2
0eee09
- Break build cycle: perl-Moose → perl-DateTime → perl-Specio
0eee09
0eee09
* Sun Oct 16 2016 Paul Howarth <paul@city-fan.org> - 0.30-1
0eee09
- Update to 0.30
0eee09
  - Fix a bug with the Sub::Quoted sub returned by $type->coercion_sub; if a
0eee09
    type had more than one coercion, the generated sub could end up coercing
0eee09
    the value to undef some of the time and, depending on hash key ordering,
0eee09
    this could end up being a heisenbug that only occurred some of the time
0eee09
0eee09
* Mon Oct 10 2016 Paul Howarth <paul@city-fan.org> - 0.29-1
0eee09
- Update to 0.29
0eee09
  - Document Specio::PartialDump because you may want to use it as part of the
0eee09
    failure message generation code for a type
0eee09
0eee09
* Mon Oct  3 2016 Paul Howarth <paul@city-fan.org> - 0.28-1
0eee09
- Update to 0.28
0eee09
  - Added a Test::Specio module to provide helpers for testing Specio libraries
0eee09
  - Fixed another bug with a subtype of special types and inlining
0eee09
- Introduce sub-package perl-Test-Specio to avoid dependencies on Test::Fatal
0eee09
  and Test::More in main package
0eee09
0eee09
* Sun Oct  2 2016 Paul Howarth <paul@city-fan.org> - 0.27-1
0eee09
- Update to 0.27
0eee09
  - Cloning a type with coercions defined on it would cause an exception
0eee09
  - Creating a subtype of a special type created by *_isa_type, *_can_type, or
0eee09
    *_does_type, or enum would die when trying to inline type constraint
0eee09
  - Removed the never-documented Any type
0eee09
  - Added documentation for each type in Specio::Library::Builtins
0eee09
0eee09
* Mon Sep 26 2016 Paul Howarth <paul@city-fan.org> - 0.26-1
0eee09
- Update to 0.26
0eee09
  - Require Role::Tiny 1.003003, which should fix some test failures
0eee09
0eee09
* Mon Sep  5 2016 Paul Howarth <paul@city-fan.org> - 0.25-1
0eee09
- Update to 0.25
0eee09
  - Calling {any,object}_{isa,does}_type repeatedly in a package with the same
0eee09
    class or role name would die; these subs are now special-cased to simply
0eee09
    return an existing type for the given name when they receive a single
0eee09
    argument (the name of the class or role)
0eee09
0eee09
* Fri Jul  1 2016 Paul Howarth <paul@city-fan.org> - 0.24-2
0eee09
- Sanitize for Fedora submission
0eee09
0eee09
* Fri Jul  1 2016 Paul Howarth <paul@city-fan.org> - 0.24-1
0eee09
- Initial RPM version