From 61ebb23eab3bf80df106a99f1106915cd957fafe Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Mon, 7 Aug 2017 10:56:02 +0100 Subject: [PATCH] Update to 0.015 - New upstream release 0.015 - Port to Perl 5.19.4, where the C type of array indices has changed - Update to accommodate PERL_OP_PARENT builds of Perl 5.21.11 or later (which is the default from Perl 5.25.1) - Trigger custom op generation via Devel::CallChecker rather than by hooking the underlying op checker - Update test suite not to rely on . in @INC, which is no longer necessarily there from Perl 5.25.7 - No longer include a Makefile.PL in the distribution - Correct dynamic_config setting to 0 - Use boolSV() where appropriate in XS code - Use cBOOL() where appropriate - Consistently use THX_ prefix on internal function names - Include META.json in distribution - Add MYMETA.json to .cvsignore - Convert .cvsignore to .gitignore - Update for changed S_croak_xs_usage() prototype in ExtUtils::ParseXS 3.30, requiring the new version of that module in order to build the XS implementation - In documentation, use four-column indentation for all verbatim material - In META.{yml,json}, point to public bug tracker - Correctly classify ExtUtils::ParseXS dependency as a recommendation rather than a requirement - Avoid some compiler warnings - Classify buildreqs by usage - Drop legacy spec file elements: %defattr and Group: tag - Make %files list more explicit --- .gitignore | 1 + ...-5.25-or-5.22-24-with-PERL_OP_PARENT.patch | 95 ------------------- perl-Params-Classify.spec | 76 +++++++++++---- sources | 2 +- 4 files changed, 59 insertions(+), 115 deletions(-) delete mode 100644 Params-Classify-0.013-Fix-5.25-or-5.22-24-with-PERL_OP_PARENT.patch diff --git a/.gitignore b/.gitignore index 8a907fd..95df95c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /Params-Classify-0.012.tar.gz /Params-Classify-0.013.tar.gz +/Params-Classify-0.015.tar.gz diff --git a/Params-Classify-0.013-Fix-5.25-or-5.22-24-with-PERL_OP_PARENT.patch b/Params-Classify-0.013-Fix-5.25-or-5.22-24-with-PERL_OP_PARENT.patch deleted file mode 100644 index a3964c8..0000000 --- a/Params-Classify-0.013-Fix-5.25-or-5.22-24-with-PERL_OP_PARENT.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 0d301779bd42da52b4f8e13a667499846fc2cc55 Mon Sep 17 00:00:00 2001 -From: Reini Urban -Date: Tue, 14 Jun 2016 17:08:24 +0200 -Subject: [PATCH] Fix 5.25 or 5.22/24 with PERL_OP_PARENT -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Fixes RT #114490 - -Signed-off-by: Petr Písař ---- - lib/Params/Classify.xs | 36 ++++++++++++++++++++++++++---------- - 1 file changed, 26 insertions(+), 10 deletions(-) - -diff --git a/lib/Params/Classify.xs b/lib/Params/Classify.xs -index 15a5ad5..f4012fd 100644 ---- a/lib/Params/Classify.xs -+++ b/lib/Params/Classify.xs -@@ -123,6 +123,22 @@ static void *THX_ptr_table_fetch(pTHX_ PTR_TBL_t *tbl, void *from) - # define sv_is_regexp(sv) 0 - #endif /* <5.11.0 */ - -+ -+#ifndef OpSIBLING -+# ifdef PERL_OP_PARENT -+# define OpSIBLING(o) (0 + (o)->op_moresib ? (o)->op_sibparent : NULL) -+# define OpMAYBESIB_set(o, sib, parent) \ -+ ((o)->op_sibparent = ((o)->op_moresib = cBOOL(sib)) ? (sib) : (parent)) -+# else -+# define OpSIBLING(o) (0 + (o)->op_sibling) -+# if PERL_VERSION_GE(5,11,0) -+# define OpMAYBESIB_set(o, sib, parent) ((o)->op_sibling = (sib)) -+# else -+# define OpMAYBESIB_set(o, sib, parent) ((o)->op_moresib = cBOOL(sib), (o)->op_sibling = (sib)) -+# endif -+# endif -+#endif -+ - #define sv_is_undef(sv) (!sv_is_glob(sv) && !sv_is_regexp(sv) && !SvOK(sv)) - - #define sv_is_string(sv) \ -@@ -631,8 +647,8 @@ static OP *myck_entersub(pTHX_ OP *op) - OP *(*ppfunc)(pTHX); - I32 cvflags; - pushop = cUNOPx(op)->op_first; -- if(!pushop->op_sibling) pushop = cUNOPx(pushop)->op_first; -- for(cvop = pushop; cvop->op_sibling; cvop = cvop->op_sibling) ; -+ if(!OpSIBLING(pushop)) pushop = cUNOPx(pushop)->op_first; -+ for(cvop = pushop; OpSIBLING(cvop); cvop = OpSIBLING(cvop)) ; - if(!(cvop->op_type == OP_RV2CV && - !(cvop->op_private & OPpENTERSUB_AMPER) && - (cv = rvop_cv(cUNOPx(cvop)->op_first)) && -@@ -641,20 +657,20 @@ static OP *myck_entersub(pTHX_ OP *op) - return nxck_entersub(aTHX_ op); - cvflags = CvXSUBANY(cv).any_i32; - op = nxck_entersub(aTHX_ op); /* for prototype checking */ -- aop = pushop->op_sibling; -- bop = aop->op_sibling; -+ aop = OpSIBLING(pushop); -+ bop = OpSIBLING(aop); - if(bop == cvop) { - if(!(cvflags & PC_ALLOW_UNARY)) return op; - unary: -- pushop->op_sibling = bop; -- aop->op_sibling = NULL; -+ OpMAYBESIB_set(pushop, bop, NULL); -+ OpMAYBESIB_set(aop, NULL, NULL); - op_free(op); - op = newUNOP(OP_NULL, 0, aop); - op->op_type = OP_RAND; - op->op_ppaddr = ppfunc; - op->op_private = (U8)cvflags; - return op; -- } else if(bop && bop->op_sibling == cvop) { -+ } else if(bop && OpSIBLING(bop) == cvop) { - if(!(cvflags & PC_ALLOW_BINARY)) return op; - if(ppfunc == THX_pp_check_sclass && - (cvflags & PC_TYPE_MASK) == SCLASS_REF) { -@@ -673,9 +689,9 @@ static OP *myck_entersub(pTHX_ OP *op) - cvflags &= ~PC_TYPE_MASK; - ppfunc = THX_pp_check_dyn_battr; - } -- pushop->op_sibling = cvop; -- aop->op_sibling = NULL; -- bop->op_sibling = NULL; -+ OpMAYBESIB_set(pushop, cvop, NULL); -+ OpMAYBESIB_set(aop, NULL, NULL); -+ OpMAYBESIB_set(bop, NULL, NULL); - op_free(op); - op = newBINOP(OP_NULL, 0, aop, bop); - op->op_type = OP_RAND; --- -2.9.4 - diff --git a/perl-Params-Classify.spec b/perl-Params-Classify.spec index 96c82c3..30193af 100644 --- a/perl-Params-Classify.spec +++ b/perl-Params-Classify.spec @@ -1,27 +1,40 @@ Name: perl-Params-Classify -Version: 0.013 -Release: 21%{?dist} +Version: 0.015 +Release: 1%{?dist} Summary: Argument type classification License: GPL+ or Artistic -Group: Development/Libraries URL: http://search.cpan.org/dist/Params-Classify/ Source0: http://www.cpan.org/authors/id/Z/ZE/ZEFRAM/Params-Classify-%{version}.tar.gz -# Restore compatibility with Perl 5.26.0, CPAN RT#114490, patch from -# -Patch0: Params-Classify-0.013-Fix-5.25-or-5.22-24-with-PERL_OP_PARENT.patch +# Module Build +BuildRequires: coreutils +BuildRequires: findutils +BuildRequires: gcc BuildRequires: perl-devel BuildRequires: perl-generators -BuildRequires: perl(ExtUtils::ParseXS) >= 2.2006 +BuildRequires: perl-interpreter +BuildRequires: perl(ExtUtils::ParseXS) >= 3.30 BuildRequires: perl(Module::Build) +# Module Runtime +BuildRequires: perl(Devel::CallChecker) >= 0.003 +BuildRequires: perl(Exporter) BuildRequires: perl(parent) BuildRequires: perl(Scalar::Util) >= 1.01 +BuildRequires: perl(strict) +BuildRequires: perl(warnings) +BuildRequires: perl(XSLoader) +# Test Suite BuildRequires: perl(Test::More) +# Optional Tests BuildRequires: perl(Test::Pod) BuildRequires: perl(Test::Pod::Coverage) +# Dependencies +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) +Requires: perl(Devel::CallChecker) >= 0.003 Requires: perl(Exporter) Requires: perl(Scalar::Util) >= 1.01 -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +Requires: perl(XSLoader) +# Don't "provide" private Perl libs %{?perl_default_filter} %description @@ -33,30 +46,55 @@ functions in C++). %prep %setup -q -n Params-Classify-%{version} -%patch0 -p1 %build -%{__perl} Build.PL installdirs=vendor optimize="%{optflags}" +perl Build.PL --installdirs=vendor --optimize="%{optflags}" ./Build %install -./Build install destdir=%{buildroot} create_packlist=0 -find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; -find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \; - -%{_fixperms} %{buildroot}/* +./Build install --destdir=%{buildroot} --create_packlist=0 +find %{buildroot} -type f -name '*.bs' -empty -delete +%{_fixperms} -c %{buildroot} %check ./Build test %files -%defattr(-,root,root,-) %doc Changes README -%{perl_vendorarch}/auto/* -%{perl_vendorarch}/Params* -%{_mandir}/man3/* +%{perl_vendorarch}/auto/Params/ +%{perl_vendorarch}/Params/ +%{_mandir}/man3/Params::Classify.3* %changelog +* Mon Aug 7 2017 Paul Howarth - 0.015-1 +- Update to 0.015 + - Port to Perl 5.19.4, where the C type of array indices has changed + - Update to accommodate PERL_OP_PARENT builds of Perl 5.21.11 or later + (which is the default from Perl 5.25.1) + - Trigger custom op generation via Devel::CallChecker rather than by hooking + the underlying op checker + - Update test suite not to rely on . in @INC, which is no longer necessarily + there from Perl 5.25.7 + - No longer include a Makefile.PL in the distribution + - Correct dynamic_config setting to 0 + - Use boolSV() where appropriate in XS code + - Use cBOOL() where appropriate + - Consistently use THX_ prefix on internal function names + - Include META.json in distribution + - Add MYMETA.json to .cvsignore + - Convert .cvsignore to .gitignore + - Update for changed S_croak_xs_usage() prototype in ExtUtils::ParseXS 3.30, + requiring the new version of that module in order to build the XS + implementation + - In documentation, use four-column indentation for all verbatim material + - In META.{yml,json}, point to public bug tracker + - Correctly classify ExtUtils::ParseXS dependency as a recommendation rather + than a requirement + - Avoid some compiler warnings +- Classify buildreqs by usage +- Drop legacy spec file elements: %%defattr and Group: tag +- Make %%files list more explicit + * Thu Aug 03 2017 Fedora Release Engineering - 0.013-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild diff --git a/sources b/sources index 156a253..9b43145 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -63d24fbec775472ada49d16bce4a9b1f Params-Classify-0.013.tar.gz +SHA512 (Params-Classify-0.015.tar.gz) = 1c41590a3f06d21d5f23e12371b0aee5d4249f773bfb0738e955fbdccdccc6e495744c50d3b91305a6b470e022475446705c8eb8e8d05ca1ed037d369a67617c