[collectl] updated for Perl 5.14

Dan Horák sharkcz at fedoraproject.org
Thu Aug 4 09:34:29 UTC 2011


commit 4331b78cfdf79e5808e27b032968ce071becbfdf
Author: Dan Horák <dan at danny.cz>
Date:   Thu Aug 4 11:34:13 2011 +0200

    updated for Perl 5.14

 collectl-3.5.1-switch.patch |   32 ++++++++++++++++++++++++++++++++
 collectl.spec               |    8 +++++++-
 2 files changed, 39 insertions(+), 1 deletions(-)
---
diff --git a/collectl-3.5.1-switch.patch b/collectl-3.5.1-switch.patch
new file mode 100644
index 0000000..9169ad5
--- /dev/null
+++ b/collectl-3.5.1-switch.patch
@@ -0,0 +1,32 @@
+diff -up collectl-3.5.1/readS.orig collectl-3.5.1/readS
+--- collectl-3.5.1/readS.orig	2011-08-02 10:51:09.000000000 +0200
++++ collectl-3.5.1/readS	2011-08-02 10:56:35.000000000 +0200
+@@ -5,7 +5,7 @@
+ # readS may be copied only under the terms of either the Artistic License
+ # or the GNU General Public License, which may be found in the source kit
+ 
+-use Switch;
++use feature qw(switch);
+ use Getopt::Std;
+ 
+ my $Version=  '1.0';
+@@ -75,13 +75,13 @@ while ($catvar ne '+')
+   print "  Oper: $oper  Expr: $expr  Leftover: $catvar\n"    if $debug;
+ 
+   # take appropriate action, aborting when unkown operator
+-  switch ($oper)
++  given ($oper)
+   {
+-    case '+' { $result+=$value; }
+-    case '-' { $result-=$value; }
+-    case 'X' { $result*=$value; }
+-    case '/' { $result/=$value; }
+-    else { error("Unkown operator '$oper', aborting..."); }
++    when ('+') { $result+=$value; }
++    when ('-') { $result-=$value; }
++    when ('X') { $result*=$value; }
++    when ('/') { $result/=$value; }
++    default { error("Unkown operator '$oper', aborting..."); }
+   }
+   print "  Value: $value  Subtotal: $result\n"    if $debug;
+ }
diff --git a/collectl.spec b/collectl.spec
index e96dabf..d674043 100644
--- a/collectl.spec
+++ b/collectl.spec
@@ -1,12 +1,14 @@
 Summary: A utility to collect various Linux performance data
 Name: collectl
 Version: 3.5.1
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPLv2+ or Artistic
 Group: Applications/System
 Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.src.tar.gz
 Source1: %{name}.initd
 Source2: %{name}.sysconfig
+# update for Perl 5.14
+Patch0: %{name}-3.5.1-switch.patch
 URL: http://collectl.sourceforge.net
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch: noarch
@@ -22,6 +24,7 @@ A utility to collect Linux performance data
 
 %prep
 %setup -q
+%patch0 -p1
 
 # rename directory for easier inclusion
 mv docs html
@@ -95,6 +98,9 @@ fi
 
 
 %changelog
+* Thu Aug 04 2011 Dan Horák <dan[at]danny.cz> 3.5.1-2
+- updated for Perl 5.14
+
 * Thu Jun 02 2011 Dan Horák <dan[at]danny.cz> 3.5.1-1
 - upgrade to upstream version 3.5.1
 


More information about the scm-commits mailing list