Upgrade to 0.28 as provided in perl-5.25.12

This commit is contained in:
Petr Písař 2017-05-11 09:05:05 +02:00
parent 5a2c9f1ea4
commit b7c83ac533
2 changed files with 159 additions and 10 deletions

View File

@ -0,0 +1,144 @@
From 29183497d2d3b99c7aba9792d10ca40bc172dba0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Thu, 11 May 2017 08:59:13 +0200
Subject: [PATCH] Upgrade to 0.28
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Unbundled from perl-5.25.12.
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
V.pm | 24 +++++++++++-------------
t/30_plv5240.t | 11 +++++++++--
2 files changed, 20 insertions(+), 15 deletions(-)
diff --git a/V.pm b/V.pm
index c396f31..9e9c09c 100644
--- a/V.pm
+++ b/V.pm
@@ -8,8 +8,8 @@ use warnings;
use Config;
use Exporter;
use vars qw($VERSION @ISA @EXPORT_OK %EXPORT_TAGS);
-$VERSION = "0.27";
-@ISA = ("Exporter");
+$VERSION = "0.28";
+@ISA = qw( Exporter );
@EXPORT_OK = qw( plv2hash summary myconfig signature );
%EXPORT_TAGS = (
all => [ @EXPORT_OK ],
@@ -161,7 +161,7 @@ my @config_vars = qw(
useithreads usemultiplicity
useperlio d_sfio uselargefiles usesocks
use64bitint use64bitall uselongdouble
- usemymalloc bincompat5005
+ usemymalloc default_inc_excludes_dot bincompat5005
cc ccflags
optimize
@@ -190,8 +190,7 @@ my %empty_build = (
patches => [],
);
-sub _make_derived
-{
+sub _make_derived {
my $conf = shift;
for ( [ lseektype => "Off_t" ],
@@ -230,11 +229,12 @@ sub _make_derived
$conf->{config}{git_describe} ||= $conf->{config}{perl_patchlevel};
}
+ $conf->{config}{$_} ||= "undef" for grep m/^(?:use|def)/ => @config_vars;
+
$conf;
} # _make_derived
-sub plv2hash
-{
+sub plv2hash {
my %config;
my $pv = join "\n" => @_;
@@ -308,8 +308,7 @@ sub plv2hash
});
} # plv2hash
-sub summary
-{
+sub summary {
my $conf = shift || myconfig ();
ref $conf eq "HASH" &&
exists $conf->{config} && exists $conf->{build} or return;
@@ -321,14 +320,14 @@ sub summary
d_longdbl d_longlong use64bitall use64bitint useithreads
uselongdouble usemultiplicity usemymalloc useperlio useshrplib
doublesize intsize ivsize nvsize longdblsize longlongsize lseeksize
+ default_inc_excludes_dot
);
$info{$_}++ for grep { $conf->{build}{options}{$_} } keys %{$conf->{build}{options}};
return \%info;
} # summary
-sub signature
-{
+sub signature {
eval { require Digest::MD5 };
$@ and return "00000000000000000000000000000000";
@@ -339,8 +338,7 @@ sub signature
} sort keys %$conf);
} # signature
-sub myconfig
-{
+sub myconfig {
my $args = shift;
my %args = ref $args eq "HASH" ? %$args :
ref $args eq "ARRAY" ? @$args : ();
diff --git a/t/30_plv5240.t b/t/30_plv5240.t
index a730d24..b43b46f 100644
--- a/t/30_plv5240.t
+++ b/t/30_plv5240.t
@@ -5,7 +5,7 @@ use warnings;
BEGIN {
use Test::More;
- my $tests = 117;
+ my $tests = 125;
unless ($ENV{PERL_CORE}) {
require Test::NoWarnings;
Test::NoWarnings->import ();
@@ -15,7 +15,7 @@ BEGIN {
plan tests => $tests;
}
-use Config::Perl::V;
+use Config::Perl::V qw( summary );
ok (my $conf = Config::Perl::V::plv2hash (<DATA>), "Read perl -v block");
ok (exists $conf->{$_}, "Has $_ entry") for qw( build environment config inc );
@@ -64,9 +64,16 @@ my %check = (
osvers => "4.5.2-1-default",
use64bitall => "define",
use64bitint => "define",
+ usemymalloc => "n",
+ default_inc_excludes_dot
+ => "undef",
);
is ($conf->{config}{$_}, $check{$_}, "reconstructed \$Config{$_}") for sort keys %check;
+ok (my $info = summary ($conf), "A summary");
+ok (exists $info->{$_}, "Summary has $_") for qw( cc config_args usemymalloc default_inc_excludes_dot );
+is ($info->{default_inc_excludes_dot}, "undef", "This build has . in INC");
+
__END__
Summary of my perl5 (revision 5 version 24 subversion 0) configuration:
--
2.9.3

View File

@ -1,20 +1,21 @@
%global cpan_version 0.27
Name: perl-Config-Perl-V
Version: 0.27
Release: 2%{?dist}
Version: 0.28
Release: 1%{?dist}
Summary: Structured data retrieval of perl -V output
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/Config-Perl-V/
Source0: http://www.cpan.org/authors/id/H/HM/HMBRAND/Config-Perl-V-%{version}.tgz
Source0: http://www.cpan.org/authors/id/H/HM/HMBRAND/Config-Perl-V-%{cpan_version}.tgz
# Unbundled from perl-5.25.12
Patch0: Config-Perl-V-0.27-Upgrade-to-0.28.patch
# Correct example
Patch0: Config-Perl-V-0.24-Remove-invalid-shellbang.patch
Patch1: Config-Perl-V-0.24-Remove-invalid-shellbang.patch
BuildArch: noarch
BuildRequires: coreutils
BuildRequires: findutils
BuildRequires: make
BuildRequires: perl
BuildRequires: perl-generators
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
BuildRequires: perl(strict)
# Run-time:
BuildRequires: perl(Config)
@ -27,6 +28,7 @@ BuildRequires: perl(warnings)
BuildRequires: perl(Test::More)
BuildRequires: perl(Test::NoWarnings)
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Suggests: perl(Digest::MD5)
Conflicts: perl < 4:5.22.0-347
%description
@ -36,17 +38,17 @@ but only available to the perl binary itself. This package provides Perl
module that will return you the output of "perl -V" in a structure.
%prep
%setup -q -n Config-Perl-V-%{version}
%setup -q -n Config-Perl-V-%{cpan_version}
%patch0 -p1
%patch1 -p1
chmod -x examples/*
%build
perl Makefile.PL INSTALLDIRS=vendor
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1
make %{?_smp_mflags}
%install
make pure_install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -delete
%{_fixperms} $RPM_BUILD_ROOT/*
%check
@ -58,6 +60,9 @@ make test
%{_mandir}/man3/*
%changelog
* Thu May 11 2017 Petr Pisar <ppisar@redhat.com> - 0.28-1
- Upgrade to 0.28 as provided in perl-5.25.12
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.27-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild