jplesnik pushed to perl-Devel-SmallProf (master). "Fixed RT#98192; Modernize spec"
notifications at fedoraproject.org
notifications at fedoraproject.org
Thu Apr 23 09:22:20 UTC 2015
>From 7c1586e0b7f0379744bc617309a066ea971ea78d Mon Sep 17 00:00:00 2001
From: Jitka Plesnikova <jplesnik at redhat.com>
Date: Thu, 23 Apr 2015 11:22:05 +0200
Subject: Fixed RT#98192; Modernize spec
diff --git a/Devel-SmallProf-2.02-Don-t-use-defined-array.patch b/Devel-SmallProf-2.02-Don-t-use-defined-array.patch
new file mode 100644
index 0000000..cf6078b
--- /dev/null
+++ b/Devel-SmallProf-2.02-Don-t-use-defined-array.patch
@@ -0,0 +1,25 @@
+From 3c81ee06e91d2a4efc52b7b4a9eff7411039c283 Mon Sep 17 00:00:00 2001
+From: Brian Fraser <fraserbn at gmail.com>
+Date: Wed, 20 Aug 2014 00:33:46 +0200
+Subject: [PATCH] Don't use defined(@array)
+
+---
+ lib/Devel/SmallProf.pm | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/Devel/SmallProf.pm b/lib/Devel/SmallProf.pm
+index cee1211..2b5d091 100644
+--- a/lib/Devel/SmallProf.pm
++++ b/lib/Devel/SmallProf.pm
+@@ -32,7 +32,7 @@ sub DB {
+ # evals which do not define subroutines will disappear.
+ no strict 'refs';
+ $listings{$filename} = \@{"main::_<$filename"}
+- if defined(@{"main::_<$filename"});
++ if @{"main::_<$filename"};
+ use strict 'refs';
+
+ my($delta);
+--
+1.7.12.4 (Apple Git-37)
+
diff --git a/perl-Devel-SmallProf.spec b/perl-Devel-SmallProf.spec
index 2ab375e..50c1835 100644
--- a/perl-Devel-SmallProf.spec
+++ b/perl-Devel-SmallProf.spec
@@ -1,23 +1,21 @@
Name: perl-Devel-SmallProf
Version: 2.02
-Release: 19%{?dist}
+Release: 20%{?dist}
Summary: Per-line Perl profiler
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/Devel-SmallProf/
Source0: http://www.cpan.org/authors/id/S/SA/SALVA/Devel-SmallProf-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+# defined() should not be used for array RT#98192
+Patch1: Devel-SmallProf-2.02-Don-t-use-defined-array.patch
BuildArch: noarch
BuildRequires: perl(ExtUtils::MakeMaker)
+BuildRequires: perl(strict)
BuildRequires: perl(Test::More)
BuildRequires: perl(Time::HiRes)
-Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
-# Filter bogus provide of perl(DB) (rpm < 4.9)
-%global provfilt /bin/sh -c "%{__perl_provides} | sed -e '/perl(DB)/d'"
-%define __perl_provides %{provfilt}
-
-# Equivalent filter for rpm 4.9 onwards
+# Filter bogus provide of perl(DB)
%global __provides_exclude ^perl\\(DB\\)
%description
@@ -28,37 +26,32 @@ and also in terms of being simple to use.
%prep
%setup -q -n Devel-SmallProf-%{version}
+%patch1 -p1
iconv -f iso8859-1 -t utf-8 README >README.conv && mv -f README.conv README
-
%build
-%{__perl} Makefile.PL INSTALLDIRS=vendor
+perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}
%install
-rm -rf $RPM_BUILD_ROOT
-
-make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
-
+make pure_install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
-find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
-
%{_fixperms} $RPM_BUILD_ROOT/*
%check
make test
-%clean
-rm -rf $RPM_BUILD_ROOT
-
%files
-%defattr(-,root,root,-)
%doc Changes README TODO
%{perl_vendorlib}/Devel/
%{_mandir}/man3/*
%changelog
+* Thu Apr 23 2015 Jitka Plesnikova <jplesnik at redhat.com> - 2.02-20
+- Fixed RT#98192
+- Modernize spec
+
* Wed Aug 27 2014 Jitka Plesnikova <jplesnik at redhat.com> - 2.02-19
- Perl 5.20 rebuild
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/perl-Devel-SmallProf.git/commit/?h=master&id=7c1586e0b7f0379744bc617309a066ea971ea78d
More information about the perl-devel
mailing list