perl-Specio-vl.spec 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. # Run optional test
  2. %bcond_with perl_Specio_enables_optional_test
  3. Name: perl-Specio
  4. Version: 0.43
  5. Release: 3%{?_dist_release}
  6. Summary: Type constraints and coercions for Perl
  7. License: Artistic 2.0
  8. URL: https://metacpan.org/release/Specio
  9. Source0: https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Specio-%{version}.tar.gz
  10. Vendor: Project Vine
  11. Distribution: Vine Linux
  12. BuildArch: noarch
  13. # Module Build
  14. BuildRequires: coreutils
  15. BuildRequires: make
  16. BuildRequires: perl >= 2:5.26.2
  17. BuildRequires: perl(ExtUtils::MakeMaker)
  18. # Module Runtime
  19. BuildRequires: perl(B)
  20. BuildRequires: perl(Carp)
  21. BuildRequires: perl(Devel::StackTrace)
  22. BuildRequires: perl(Eval::Closure)
  23. BuildRequires: perl(Exporter)
  24. BuildRequires: perl(IO::File)
  25. BuildRequires: perl(List::Util)
  26. BuildRequires: perl(Module::Runtime)
  27. BuildRequires: perl(MRO::Compat)
  28. BuildRequires: perl(overload)
  29. BuildRequires: perl(parent)
  30. BuildRequires: perl(re)
  31. BuildRequires: perl(Ref::Util) >= 0.112
  32. BuildRequires: perl(Role::Tiny) >= 1.003003
  33. BuildRequires: perl(Role::Tiny::With)
  34. BuildRequires: perl(Scalar::Util)
  35. BuildRequires: perl(Storable)
  36. BuildRequires: perl(strict)
  37. BuildRequires: perl(Sub::Quote)
  38. BuildRequires: perl(Sub::Util)
  39. BuildRequires: perl(Test::Fatal)
  40. BuildRequires: perl(Test::More)
  41. BuildRequires: perl(Try::Tiny)
  42. BuildRequires: perl(version)
  43. BuildRequires: perl(warnings)
  44. # Test Suite
  45. BuildRequires: perl(File::Spec)
  46. BuildRequires: perl(lib)
  47. BuildRequires: perl(open)
  48. BuildRequires: perl(Test::Needs)
  49. BuildRequires: perl(utf8)
  50. %if %{with perl_Specio_enables_optional_test}
  51. # Optional Tests
  52. BuildRequires: perl(CPAN::Meta)
  53. BuildRequires: perl(CPAN::Meta::Prereqs)
  54. BuildRequires: perl(Moo)
  55. %if !%{defined perl_bootstrap}
  56. # Break cycle: perl-Moose → perl-DateTime → perl-Specio
  57. BuildRequires: perl(Moose)
  58. # Break cycle: perl-Mouse → perl-Moose → perl-DateTime → perl-Specio
  59. BuildRequires: perl(Mouse)
  60. %endif
  61. BuildRequires: perl(namespace::autoclean)
  62. %endif
  63. # Dependencies
  64. Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
  65. Requires: perl(Ref::Util) >= 0.112
  66. Requires: perl(Sub::Util) >= 1.40
  67. # Avoid provides for private packages
  68. %global __provides_exclude ^perl\\(_T::.*\\)
  69. %description
  70. The Specio distribution provides classes for representing type constraints
  71. and coercion, along with syntax sugar for declaring them.
  72. Note that this is not a proper type system for Perl. Nothing in this
  73. distribution will magically make the Perl interpreter start checking a value's
  74. type on assignment to a variable. In fact, there's no built-in way to apply a
  75. type to a variable at all.
  76. Instead, you can explicitly check a value against a type, and optionally coerce
  77. values to that type.
  78. %package -n perl-Test-Specio
  79. Summary: Test helpers for Specio
  80. License: Artistic 2.0
  81. Requires: %{name} = %{version}-%{release}
  82. %description -n perl-Test-Specio
  83. This package provides some helper functions and variables for testing Specio
  84. types.
  85. %prep
  86. %setup -q -n Specio-%{version}
  87. %build
  88. perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
  89. make %{?_smp_mflags}
  90. %install
  91. make install DESTDIR=%{buildroot}
  92. %{_fixperms} -c %{buildroot}
  93. %check
  94. make test
  95. %files
  96. %license LICENSE
  97. %doc Changes CODE_OF_CONDUCT.md CONTRIBUTING.md README.md TODO.md
  98. %{perl_vendorlib}/Specio.pm
  99. %{perl_vendorlib}/Specio/
  100. %{_mandir}/man3/Specio.3*
  101. %{_mandir}/man3/Specio::Coercion.3*
  102. %{_mandir}/man3/Specio::Constraint::AnyCan.3*
  103. %{_mandir}/man3/Specio::Constraint::AnyDoes.3*
  104. %{_mandir}/man3/Specio::Constraint::AnyIsa.3*
  105. %{_mandir}/man3/Specio::Constraint::Enum.3*
  106. %{_mandir}/man3/Specio::Constraint::Intersection.3*
  107. %{_mandir}/man3/Specio::Constraint::ObjectCan.3*
  108. %{_mandir}/man3/Specio::Constraint::ObjectDoes.3*
  109. %{_mandir}/man3/Specio::Constraint::ObjectIsa.3*
  110. %{_mandir}/man3/Specio::Constraint::Parameterizable.3*
  111. %{_mandir}/man3/Specio::Constraint::Parameterized.3*
  112. %{_mandir}/man3/Specio::Constraint::Role::CanType.3*
  113. %{_mandir}/man3/Specio::Constraint::Role::DoesType.3*
  114. %{_mandir}/man3/Specio::Constraint::Role::Interface.3*
  115. %{_mandir}/man3/Specio::Constraint::Role::IsaType.3*
  116. %{_mandir}/man3/Specio::Constraint::Simple.3*
  117. %{_mandir}/man3/Specio::Constraint::Structurable.3*
  118. %{_mandir}/man3/Specio::Constraint::Structured.3*
  119. %{_mandir}/man3/Specio::Constraint::Union.3*
  120. %{_mandir}/man3/Specio::Declare.3*
  121. %{_mandir}/man3/Specio::DeclaredAt.3*
  122. %{_mandir}/man3/Specio::Exception.3*
  123. %{_mandir}/man3/Specio::Exporter.3*
  124. %{_mandir}/man3/Specio::Helpers.3*
  125. %{_mandir}/man3/Specio::Library::Builtins.3*
  126. %{_mandir}/man3/Specio::Library::Numeric.3*
  127. %{_mandir}/man3/Specio::Library::Perl.3*
  128. %{_mandir}/man3/Specio::Library::String.3*
  129. %{_mandir}/man3/Specio::Library::Structured.3*
  130. %{_mandir}/man3/Specio::Library::Structured::Dict.3*
  131. %{_mandir}/man3/Specio::Library::Structured::Map.3*
  132. %{_mandir}/man3/Specio::Library::Structured::Tuple.3*
  133. %{_mandir}/man3/Specio::OO.3*
  134. %{_mandir}/man3/Specio::PartialDump.3*
  135. %{_mandir}/man3/Specio::Registry.3*
  136. %{_mandir}/man3/Specio::Role::Inlinable.3*
  137. %{_mandir}/man3/Specio::Subs.3*
  138. %{_mandir}/man3/Specio::TypeChecks.3*
  139. %files -n perl-Test-Specio
  140. %{perl_vendorlib}/Test/
  141. %{_mandir}/man3/Test::Specio.3*
  142. %changelog
  143. * Sat May 18 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net>- 0.43-3
  144. - initial build for Vine Linux.
  145. * Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.43-2
  146. - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
  147. * Sun Oct 28 2018 Paul Howarth <paul@city-fan.org> - 0.43-1
  148. - Update to 0.43
  149. - Optimized compile-time operations to make Specio itself quicker to load;
  150. Specio's load time is a non-trivial part of the load time of DateTime (and
  151. presumably other things that use it)
  152. - Based on https://github.com/houseabsolute/DateTime.pm/issues/85
  153. - Package new CODE_OF_CONDUCT.md file
  154. * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.42-5
  155. - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
  156. * Sun Jul 01 2018 Jitka Plesnikova <jplesnik@redhat.com> - 0.42-4
  157. - Perl 5.28 re-rebuild of bootstrapped packages
  158. * Fri Jun 29 2018 Jitka Plesnikova <jplesnik@redhat.com> - 0.42-3
  159. - Perl 5.28 rebuild
  160. * Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.42-2
  161. - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
  162. * Mon Nov 6 2017 Paul Howarth <paul@city-fan.org> - 0.42-1
  163. - Update to 0.42
  164. - Fixed checks for whether a class is loaded in light of upcoming
  165. optimization in Perl 5.28 (GH#12)
  166. - The Perl library claimed it provided types named LaxVersionStr and
  167. StrictVersionStr but they were really named LaxVersion and StrictVersion;
  168. the names have now been fixed to match the documentation, so they are
  169. LaxVersionStr and StrictVersionStr
  170. * Fri Aug 4 2017 Paul Howarth <paul@city-fan.org> - 0.40-1
  171. - Update to 0.40
  172. - Fixed more bugs with {any,object}_{can,does,isa}_type
  173. - When passed a glob (not a globref) they would die in their type check
  174. - On Perl 5.16 or earlier, passing a number to an any_* type would also die
  175. - Fixed subification overloading: if Sub::Quote was loaded, this would be
  176. used, but any environment variables needed for the closure would not be
  177. included, which broke enums, among other things
  178. * Thu Aug 3 2017 Paul Howarth <paul@city-fan.org> - 0.39-1
  179. - Update to 0.39
  180. - Many bug fixes and improvements to the types created by
  181. {any,object}_{can,does,isa}_type; in some cases, an invalid value could
  182. cause an exception in type check itself, and in other cases, a value that
  183. failed a type check would cause an exception when generating a message
  184. describing the failure
  185. - The messages describing a failure for all of these types have been improved
  186. - You can now create anonymous *_does and *_isa types using the exports from
  187. Specio::Declare
  188. * Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.38-2
  189. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
  190. * Sat Jul 1 2017 Paul Howarth <paul@city-fan.org> - 0.38-1
  191. - Update to 0.38
  192. - Simplify checks for overloading to not call overload::Overloaded(); just
  193. checking the return value of overload::Method() is sufficient
  194. * Wed Jun 07 2017 Jitka Plesnikova <jplesnik@redhat.com> - 0.37-3
  195. - Perl 5.26 re-rebuild of bootstrapped packages
  196. * Mon Jun 05 2017 Jitka Plesnikova <jplesnik@redhat.com> - 0.37-2
  197. - Perl 5.26 rebuild
  198. * Tue May 9 2017 Paul Howarth <paul@city-fan.org> - 0.37-1
  199. - Update to 0.37
  200. - Possible fix for very weird failures seen under threaded Perls with some
  201. modules that use Specio
  202. * Mon Feb 20 2017 Paul Howarth <paul@city-fan.org> - 0.36-1
  203. - Update to 0.36
  204. - Inlined coercions would attempt to coerce for every type that matched the
  205. value given, instead of stopping after the first type (GH#11)
  206. - Inlined coercions did not include the inline environment variables needed
  207. by the type from which the coercion was being performed (GH#8)
  208. - When you use the same type repeatedly as coderef (for example, as a
  209. constraint with Moo), it will only generate its subified form once, rather
  210. than regenerating it each time it is de-referenced
  211. - Added an API to Specio::Subs to allow you to combine type libraries and
  212. helper subs in one package for exporting; see the Specio::Exporter docs for
  213. more detail
  214. * Mon Feb 13 2017 Paul Howarth <paul@city-fan.org> - 0.35-1
  215. - Update to 0.35
  216. - Added Specio::Subs, a module that allows you to turn one or more library's
  217. types into subroutines like is_Int() and to_Int()
  218. - Added an inline_coercion method to Specio constraints
  219. * Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.34-2
  220. - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
  221. * Mon Jan 30 2017 Paul Howarth <paul@city-fan.org> - 0.34-1
  222. - Update to 0.34
  223. - Packages with Specio::Exporter can now specify additional arbitrary subs to
  224. exporter; see the Specio::Exporter docs for details
  225. - Importing the same library twice in a given package would throw an
  226. exception; the second attempt to import is now ignored
  227. * Wed Jan 25 2017 Paul Howarth <paul@city-fan.org> - 0.33-1
  228. - Update to 0.33
  229. - Fixed a mistake in the SYNOPSIS for Specio::Declare; the example for the
  230. *_isa_type helpers was not correct
  231. - Removed the alpha warning from the docs; this is being used by enough of my
  232. modules on CPAN that I don't plan on doing any big breaking changes without
  233. a deprecation first
  234. * Fri Jan 13 2017 Paul Howarth <paul@city-fan.org> - 0.32-1
  235. - Update to 0.32
  236. - Fixed a bug in the inlining for types create by any_can_type() and
  237. object_can_type(); this inlining mostly worked by accident because of some
  238. List::Util XS magic, but this broke under the debugger (GH#6,
  239. https://github.com/houseabsolute/DateTime.pm/issues/49)
  240. * Mon Nov 7 2016 Paul Howarth <paul@city-fan.org> - 0.31-1
  241. - Update to 0.31
  242. - The stack trace contained by Specio::Exception objects no longer includes
  243. stack frames for the Specio::Exception package
  244. - Made the inline_environment() and description() methods public on type and
  245. coercion objects
  246. * Thu Oct 20 2016 Petr Pisar <ppisar@redhat.com> - 0.30-2
  247. - Break build cycle: perl-Moose → perl-DateTime → perl-Specio
  248. * Sun Oct 16 2016 Paul Howarth <paul@city-fan.org> - 0.30-1
  249. - Update to 0.30
  250. - Fix a bug with the Sub::Quoted sub returned by $type->coercion_sub; if a
  251. type had more than one coercion, the generated sub could end up coercing
  252. the value to undef some of the time and, depending on hash key ordering,
  253. this could end up being a heisenbug that only occurred some of the time
  254. * Mon Oct 10 2016 Paul Howarth <paul@city-fan.org> - 0.29-1
  255. - Update to 0.29
  256. - Document Specio::PartialDump because you may want to use it as part of the
  257. failure message generation code for a type
  258. * Mon Oct 3 2016 Paul Howarth <paul@city-fan.org> - 0.28-1
  259. - Update to 0.28
  260. - Added a Test::Specio module to provide helpers for testing Specio libraries
  261. - Fixed another bug with a subtype of special types and inlining
  262. - Introduce sub-package perl-Test-Specio to avoid dependencies on Test::Fatal
  263. and Test::More in main package
  264. * Sun Oct 2 2016 Paul Howarth <paul@city-fan.org> - 0.27-1
  265. - Update to 0.27
  266. - Cloning a type with coercions defined on it would cause an exception
  267. - Creating a subtype of a special type created by *_isa_type, *_can_type, or
  268. *_does_type, or enum would die when trying to inline type constraint
  269. - Removed the never-documented Any type
  270. - Added documentation for each type in Specio::Library::Builtins
  271. * Mon Sep 26 2016 Paul Howarth <paul@city-fan.org> - 0.26-1
  272. - Update to 0.26
  273. - Require Role::Tiny 1.003003, which should fix some test failures
  274. * Mon Sep 5 2016 Paul Howarth <paul@city-fan.org> - 0.25-1
  275. - Update to 0.25
  276. - Calling {any,object}_{isa,does}_type repeatedly in a package with the same
  277. class or role name would die; these subs are now special-cased to simply
  278. return an existing type for the given name when they receive a single
  279. argument (the name of the class or role)
  280. * Fri Jul 1 2016 Paul Howarth <paul@city-fan.org> - 0.24-2
  281. - Sanitize for Fedora submission
  282. * Fri Jul 1 2016 Paul Howarth <paul@city-fan.org> - 0.24-1
  283. - Initial RPM version