devel/p5-Lexical-Var: Update to 0.010

- Convert REINPLACE_CMD to patch files

Changes:	https://metacpan.org/dist/Lexical-Var/changes
This commit is contained in:
Po-Chuan Hsieh 2023-04-09 21:34:50 +08:00
parent 87ef3c2f0f
commit 40d59e9b30
No known key found for this signature in database
GPG key ID: 9A4BD10F002DD04B
5 changed files with 24 additions and 65 deletions

View file

@ -1,6 +1,5 @@
PORTNAME= Lexical-Var
PORTVERSION= 0.009
PORTREVISION= 2
PORTVERSION= 0.010
CATEGORIES= devel perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
@ -15,9 +14,6 @@ LICENSE_COMB= dual
USES= perl5
USE_PERL5= modbuild
post-patch:
@${REINPLACE_CMD} -e '/Lexical::SealRequireHints/d' ${WRKSRC}/Build.PL ${WRKSRC}/lib/Lexical/Var.pm
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}/auto/Lexical/Var/Var.so

View file

@ -1,2 +1,3 @@
SHA256 (Lexical-Var-0.009.tar.gz) = 3a88efbef138dd7392169ed155c340db10d4d7c784b5e13eb7ec094ced98e319
SIZE (Lexical-Var-0.009.tar.gz) = 31859
TIMESTAMP = 1680726440
SHA256 (Lexical-Var-0.010.tar.gz) = 26f7e63a19508d23588ddbda7a35bdf803424955badb05ddcbd3c75151e40a9a
SIZE (Lexical-Var-0.010.tar.gz) = 40757

View file

@ -0,0 +1,10 @@
--- Build.PL.orig 2023-03-24 10:09:57 UTC
+++ Build.PL
@@ -23,7 +23,6 @@ Module::Build->new(
"warnings" => 0,
},
requires => {
- "Lexical::SealRequireHints" => "0.012",
"XSLoader" => 0,
"perl" => "5.006",
"strict" => 0,

View file

@ -0,0 +1,10 @@
--- lib/Lexical/Var.pm.orig 2023-03-24 10:09:57 UTC
+++ lib/Lexical/Var.pm
@@ -63,7 +63,6 @@ variable for each invocation of a function, use C<my>.
package Lexical::Var;
{ use 5.006; }
-use Lexical::SealRequireHints 0.012;
use warnings;
use strict;

View file

@ -1,58 +0,0 @@
--- lib/Lexical/Var.xs.orig 2013-08-25 18:51:34 UTC
+++ lib/Lexical/Var.xs
@@ -62,7 +62,12 @@ typedef AV PAD;
#endif /* !COP_SEQ_RANGE_LOW */
#ifndef COP_SEQ_RANGE_LOW_set
-# if PERL_VERSION_GE(5,9,5)
+# ifdef newPADNAMEpvn
+# define COP_SEQ_RANGE_LOW_set(sv,val) \
+ do { (sv)->xpadn_low = (val); } while(0)
+# define COP_SEQ_RANGE_HIGH_set(sv,val) \
+ do { (sv)->xpadn_high = (val); } while(0)
+# elif PERL_VERSION_GE(5,9,5)
# define COP_SEQ_RANGE_LOW_set(sv,val) \
do { ((XPVNV*)SvANY(sv))->xnv_u.xpad_cop_seq.xlow = val; } while(0)
# define COP_SEQ_RANGE_HIGH_set(sv,val) \
@@ -95,6 +100,12 @@ static SV *THX_newSV_type(pTHX_ svtype t
# define GV_NOTQUAL 0
#endif /* !GV_NOTQUAL */
+#ifndef padnamelist_store
+ /* Note that the return values are different. If we ever call it in non-
+ void context, we would have to change it to *av_store. */
+# define padnamelist_store av_store
+#endif
+
/*
* scalar classification
*
@@ -460,13 +471,18 @@ static void THX_setup_pad(pTHX_ CV *comp
PADNAMELIST *padname = PadlistNAMES(padlist);
PAD *padvar = PadlistARRAY(padlist)[1];
PADOFFSET ouroffset;
- SV *ourname, *ourvar;
+ PADNAME *ourname;
+ SV *ourvar;
HV *stash;
ourvar = *av_fetch(padvar, PadMAX(padvar) + 1, 1);
SvPADMY_on(ourvar);
ouroffset = PadMAX(padvar);
+#ifdef newPADNAMEpvn
+ ourname = newPADNAMEpvn(name, strlen(name));
+#else
ourname = newSV_type(SVt_PADNAME);
sv_setpv(ourname, name);
+#endif
SvPAD_OUR_on(ourname);
stash = name[0] == '$' ? stash_lex_sv :
name[0] == '@' ? stash_lex_av : stash_lex_hv;
@@ -474,7 +490,7 @@ static void THX_setup_pad(pTHX_ CV *comp
COP_SEQ_RANGE_LOW_set(ourname, PL_cop_seqmax);
COP_SEQ_RANGE_HIGH_set(ourname, pad_max());
PL_cop_seqmax++;
- av_store(padname, ouroffset, ourname);
+ padnamelist_store(padname, ouroffset, ourname);
#ifdef PadnamelistMAXNAMED
PadnamelistMAXNAMED(padname) = ouroffset;
#endif /* PadnamelistMAXNAMED */