0.008 bump; Modernize spec
This commit is contained in:
parent
4b66ce596b
commit
4b433f32f2
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
/Lexical-Var-0.007.tar.gz
|
||||
/Lexical-Var-0.008.tar.gz
|
||||
|
@ -1,73 +0,0 @@
|
||||
diff -rup Lexical-Var-0.007-F6v6iu/lib/Lexical/Var.xs Lexical-Var-0.007-uRRqJL/lib/Lexical/Var.xs
|
||||
--- Lexical-Var-0.007-F6v6iu/lib/Lexical/Var.xs 2012-02-04 00:58:09.000000000 -0800
|
||||
+++ Lexical-Var-0.007-uRRqJL/lib/Lexical/Var.xs 2012-10-21 07:03:18.000000000 -0700
|
||||
@@ -83,6 +83,18 @@ static SV *THX_newSV_type(pTHX_ svtype t
|
||||
# define GV_NOTQUAL 0
|
||||
#endif /* !GV_NOTQUAL */
|
||||
|
||||
+#ifndef PadARRAY
|
||||
+typedef AV PADNAMELIST;
|
||||
+# if PERL_VERSION < 8 || (PERL_VERSION == 8 && !PERL_SUBVERSION)
|
||||
+typedef AV PADLIST;
|
||||
+typedef AV PAD;
|
||||
+# endif
|
||||
+# define PadlistARRAY(pl) ((PAD **)AvARRAY(pl))
|
||||
+# define PadlistNAMES(pl) (*PadlistARRAY(pl))
|
||||
+# define PadARRAY AvARRAY
|
||||
+# define PadMAX AvFILLp
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* scalar classification
|
||||
*
|
||||
@@ -413,9 +425,10 @@ static U32 THX_pad_max(pTHX)
|
||||
static CV *THX_find_compcv(pTHX_ char const *vari_word)
|
||||
{
|
||||
GV *compgv;
|
||||
- CV *compcv;
|
||||
+ CV *compcv = PL_compcv;
|
||||
/*
|
||||
- * Given that we're being invoked from a BEGIN block,
|
||||
+ * We're being invoked from a BEGIN
|
||||
+ * block. In perl 5.17.4 and earlier,
|
||||
* PL_compcv here doesn't actually point to the sub
|
||||
* being compiled. Instead it points to the BEGIN block.
|
||||
* The code that we want to affect is the parent of that.
|
||||
@@ -424,10 +437,13 @@ static CV *THX_find_compcv(pTHX_ char co
|
||||
* runtime, or it can be non-null in a couple of
|
||||
* other situations (require, string eval).
|
||||
*/
|
||||
- if(!(PL_compcv && CvSPECIAL(PL_compcv) &&
|
||||
- (compgv = CvGV(PL_compcv)) &&
|
||||
+ if(!(compcv &&
|
||||
+#if !PERL_VERSION_GE(5,17,5)
|
||||
+ CvSPECIAL(compcv) &&
|
||||
+ (compgv = CvGV(compcv)) &&
|
||||
strEQ(GvNAME(compgv), "BEGIN") &&
|
||||
- (compcv = CvOUTSIDE(PL_compcv)) &&
|
||||
+ (compcv = CvOUTSIDE(compcv)) &&
|
||||
+#endif
|
||||
CvPADLIST(compcv)))
|
||||
croak("can't set up lexical %s outside compilation",
|
||||
vari_word);
|
||||
@@ -437,15 +453,15 @@ static CV *THX_find_compcv(pTHX_ char co
|
||||
#define setup_pad(compcv, name) THX_setup_pad(aTHX_ compcv, name)
|
||||
static void THX_setup_pad(pTHX_ CV *compcv, char const *name)
|
||||
{
|
||||
- AV *padlist = CvPADLIST(compcv);
|
||||
- AV *padname = (AV*)*av_fetch(padlist, 0, 0);
|
||||
- AV *padvar = (AV*)*av_fetch(padlist, 1, 0);
|
||||
+ PADLIST *padlist = CvPADLIST(compcv);
|
||||
+ PADNAMELIST *padname = PadlistNAMES(padlist);
|
||||
+ PAD *padvar = PadlistARRAY(padlist)[1];
|
||||
PADOFFSET ouroffset;
|
||||
SV *ourname, *ourvar;
|
||||
HV *stash;
|
||||
- ourvar = *av_fetch(padvar, AvFILLp(padvar) + 1, 1);
|
||||
+ ourvar = *av_fetch(padvar, PadMAX(padvar) + 1, 1);
|
||||
SvPADMY_on(ourvar);
|
||||
- ouroffset = AvFILLp(padvar);
|
||||
+ ouroffset = PadMAX(padvar);
|
||||
ourname = newSV_type(SVt_PADNAME);
|
||||
sv_setpv(ourname, name);
|
||||
SvPAD_OUR_on(ourname);
|
@ -1,22 +1,24 @@
|
||||
Name: perl-Lexical-Var
|
||||
Version: 0.007
|
||||
Release: 6%{?dist}
|
||||
Version: 0.008
|
||||
Release: 1%{?dist}
|
||||
Summary: Static variables without name space pollution
|
||||
License: GPL+ or Artistic
|
||||
Group: Development/Libraries
|
||||
URL: http://search.cpan.org/dist/Lexical-Var/
|
||||
Source0: http://www.cpan.org/authors/id/Z/ZE/ZEFRAM/Lexical-Var-%{version}.tar.gz
|
||||
# Perl 5.18 compatibility, CPAN RT#80309
|
||||
Patch0: Lexical-Var-0.007-perl_518.patch
|
||||
BuildRequires: perl >= 0:5.006
|
||||
BuildRequires: perl(ExtUtils::CBuilder) >= 0.15
|
||||
BuildRequires: perl(Lexical::SealRequireHints) >= 0.006
|
||||
BuildRequires: perl(Module::Build)
|
||||
BuildRequires: perl(Test::More)
|
||||
BuildRequires: perl(Test::Pod)
|
||||
BuildRequires: perl(Test::Pod::Coverage)
|
||||
BuildRequires: perl(strict)
|
||||
BuildRequires: perl(warnings)
|
||||
# Run-Time
|
||||
BuildRequires: perl(Lexical::SealRequireHints) >= 0.006
|
||||
BuildRequires: perl(XSLoader)
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
# Tests
|
||||
#BuildRequires: perl(ExtUtils::CBuilder) >= 0.15
|
||||
BuildRequires: perl(Test::More)
|
||||
BuildRequires: perl(Test::Pod) >= 1.00
|
||||
BuildRequires: perl(Test::Pod::Coverage)
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
||||
Conflicts: perl(B::Hooks::OP::Check) < 0.19
|
||||
|
||||
%{?perl_default_filter}
|
||||
@ -28,16 +30,14 @@ infrastructure for modules that manage name spaces.
|
||||
|
||||
%prep
|
||||
%setup -q -n Lexical-Var-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%{__perl} Build.PL installdirs=vendor optimize="$RPM_OPT_FLAGS"
|
||||
perl Build.PL installdirs=vendor optimize="$RPM_OPT_FLAGS"
|
||||
./Build
|
||||
|
||||
%install
|
||||
./Build install destdir=$RPM_BUILD_ROOT create_packlist=0
|
||||
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
|
||||
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
|
||||
%{_fixperms} $RPM_BUILD_ROOT/*
|
||||
|
||||
%check
|
||||
@ -50,6 +50,10 @@ find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
|
||||
%{_mandir}/man3/*
|
||||
|
||||
%changelog
|
||||
* Mon Aug 19 2013 Jitka Plesnikova <jplesnik@redhat.com> - 0.008-1
|
||||
- 0.008 bump
|
||||
- Modernize spec
|
||||
|
||||
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.007-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user