diff --git a/.perl-Switch.metadata b/.perl-Switch.metadata new file mode 100644 index 0000000..dd37fac --- /dev/null +++ b/.perl-Switch.metadata @@ -0,0 +1 @@ +2737a2b5e64a9d715528fa50a8d967710106220e SOURCES/Switch-2.16.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/Switch-2.16-perl514.patch b/SOURCES/Switch-2.16-perl514.patch new file mode 100644 index 0000000..90e96cb --- /dev/null +++ b/SOURCES/Switch-2.16-perl514.patch @@ -0,0 +1,11 @@ +--- Switch-2.16-wjgfvU/Switch.pm 2009-10-23 00:52:51.000000000 -0700 ++++ Switch-2.16-wjgfvUcopy/Switch.pm 2010-08-15 17:41:38.000000000 -0700 +@@ -146,7 +146,7 @@ sub filter_blocks + die "Bad $keyword statement (problem in the code block?) near $Switch::file line ", line(substr($source,0, pos $source), $line), "\n"; + }; + my $code = filter_blocks(substr($source,$pos[0],$pos[4]-$pos[0]),line(substr($source,0,$pos[0]),$line)); +- $code =~ s/{/{ local \$::_S_W_I_T_C_H; Switch::switch $arg;/; ++ $code =~ s/{/{ local \$::_S_W_I_T_C_H; Switch::switch($arg);/; + $text .= $code . 'continue {last}'; + next component; + } diff --git a/SPECS/perl-Switch.spec b/SPECS/perl-Switch.spec new file mode 100644 index 0000000..83bda7d --- /dev/null +++ b/SPECS/perl-Switch.spec @@ -0,0 +1,75 @@ +Name: perl-Switch +Version: 2.16 +Release: 6%{?dist} +Summary: A switch statement for Perl +Group: Development/Libraries +License: GPL+ or Artistic +URL: http://search.cpan.org/dist/Switch/ +Source0: http://search.cpan.org/CPAN/authors/id/R/RG/RGARCIA/Switch-%{version}.tar.gz +# From OpenSUSE, fix test failures with perl 5.14 +Patch0: Switch-2.16-perl514.patch +BuildRequires: perl +%if 0%(perl -e 'print $] > 5.011') +BuildRequires: perl(deprecate) +%endif +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Filter::Util::Call) +BuildRequires: perl(if) +BuildRequires: perl(overload) +BuildRequires: perl(Text::Balanced) +BuildRequires: perl(vars) +BuildRequires: perl(strict) +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +Requires: perl(overload) +BuildArch: noarch + +%description +Switch.pm provides the syntax and semantics for an explicit case mechanism for +Perl. The syntax is minimal, introducing only the keywords C and +C and conforming to the general pattern of existing Perl control +structures. The semantics are particularly rich, allowing any one (or more) of +nearly 30 forms of matching to be used when comparing a switch value with its +various cases. + +%prep +%setup -q -n Switch-%{version} +%patch0 -p1 -b .514 + +%build +%{__perl} Makefile.PL INSTALLDIRS=vendor +make %{?_smp_mflags} + +%install +make pure_install DESTDIR=%{buildroot} +find %{buildroot} -type f -name .packlist -exec rm -f {} ';' +find %{buildroot} -type f -name '*.bs' -a -size 0 -exec rm -f {} ';' +chmod -R u+w %{buildroot}/* + +%check +make test + +%files +%doc Changes README +%{perl_vendorlib}/Switch.pm +%{_mandir}/man3/*.3* + +%changelog +* Fri Jul 12 2013 Jitka Plesnikova - 2.16-6 +- Specify all dependencies +- Use DESTDIR rather than PERL_INSTALL_ROOT +- Remove buildroot cleaning + +* Thu Feb 14 2013 Fedora Release Engineering - 2.16-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Fri Jul 20 2012 Fedora Release Engineering - 2.16-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Jun 11 2012 Petr Pisar - 2.16-3 +- Perl 5.16 rebuild + +* Fri Jan 13 2012 Fedora Release Engineering - 2.16-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Aug 10 2011 Tom Callaway - 2.16-1 +- initial package