[awstats] fix for perl-5.14 (#768443,#768982,#771031)
plautrba
plautrba at fedoraproject.org
Mon Jan 2 12:06:03 UTC 2012
commit f7b0f3252271f8c96a38a51b9009ebf8d1fab937
Author: Petr Lautrbach <plautrba at redhat.com>
Date: Mon Jan 2 13:04:03 2012 +0100
fix for perl-5.14 (#768443,#768982,#771031)
awstats-perl-5.14.patch | 24 ++++++++++++++++++++++++
awstats.spec | 2 ++
2 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/awstats-perl-5.14.patch b/awstats-perl-5.14.patch
new file mode 100644
index 0000000..b8cc7bf
--- /dev/null
+++ b/awstats-perl-5.14.patch
@@ -0,0 +1,24 @@
+diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl
+index bae9db6..b13a525 100755
+--- a/wwwroot/cgi-bin/awstats.pl
++++ b/wwwroot/cgi-bin/awstats.pl
+@@ -1353,9 +1353,7 @@ sub debug {
+ #------------------------------------------------------------------------------
+ sub OptimizeArray {
+ my $array = shift;
+- my @arrayunreg = map {
+- if (/\(\?[-\w]*:(.*)\)/) { $1 }
+- } @$array;
++ my @arrayunreg = map { qr/$_/ } @$array;
+ my $notcasesensitive = shift;
+ my $searchlist = 0;
+ if ($Debug) {
+@@ -7809,7 +7807,7 @@ sub DecodeEncodedString {
+ # Return: standardregex
+ #------------------------------------------------------------------------------
+ sub UnCompileRegex {
+- shift =~ /\(\?[-\w]*:(.*)\)/;
++ shift =~ /\(\?[-\^\w]*:(.*)\)/;
+ return $1;
+ }
+
diff --git a/awstats.spec b/awstats.spec
index f6a6818..cc222ae 100644
--- a/awstats.spec
+++ b/awstats.spec
@@ -8,6 +8,7 @@ URL: http://awstats.sourceforge.net
Source0: http://downloads.sourceforge.net/project/awstats/AWStats/%{version}/awstats-%{version}.tar.gz
Patch0: use-if-instead-of-switch-statement.patch
Patch1: awstats-awredir.pl-sanitize-parameters.patch
+Patch2: awstats-perl-5.14.patch
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -41,6 +42,7 @@ http://localhost/awstats/awstats.pl
%prep
%setup -q
%patch1 -p 1
+%patch2 -p 1
# Fix style sheets.
perl -pi -e 's,/icon,/awstatsicons,g' wwwroot/css/*
# Fix some bad file permissions here for convenience.
More information about the scm-commits
mailing list