[w3c-markup-validator] Apply upstream patch to avoid lc(undef) warnings with Perl >= 5.12.
Ville Skyttä
scop at fedoraproject.org
Sun Mar 13 11:28:20 UTC 2011
commit eb3a3bbad7c1157d814d4cda35d8bc2f46774dd2
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Sun Mar 13 13:18:45 2011 +0200
Apply upstream patch to avoid lc(undef) warnings with Perl >= 5.12.
w3c-markup-validator-1.2-perl512-warnings.patch | 28 +++++++++++++++++++++++
w3c-markup-validator.spec | 8 +++++-
2 files changed, 35 insertions(+), 1 deletions(-)
---
diff --git a/w3c-markup-validator-1.2-perl512-warnings.patch b/w3c-markup-validator-1.2-perl512-warnings.patch
new file mode 100644
index 0000000..85a0cb4
--- /dev/null
+++ b/w3c-markup-validator-1.2-perl512-warnings.patch
@@ -0,0 +1,28 @@
+# HG changeset patch
+# User Ville Skyttä <ville.skytta at iki.fi>
+# Date 1299936020 -7200
+# Node ID 1a0d7586fd5d899295ea60047aacbbf2e02277cb
+# Parent c2a8c311f2b40e56a03b18815c6feb03b3d933ba
+Avoid lc(undef) warnings with Perl >= 5.12.
+
+diff -r c2a8c311f2b4 -r 1a0d7586fd5d httpd/cgi-bin/check
+--- a/httpd/cgi-bin/check Thu Mar 10 22:48:10 2011 +0200
++++ b/httpd/cgi-bin/check Sat Mar 12 15:20:20 2011 +0200
+@@ -1878,7 +1878,7 @@
+ $File->{ContentLang} = $res->content_language;
+ $File->{ContentLoc} = $res->header('Content-Location');
+ $File->{TransferEnc} = $res->header('Client-Transfer-Encoding');
+- $File->{Charset}->{HTTP} = lc $charset;
++ $File->{Charset}->{HTTP} = lc $charset if defined $charset;
+ $File->{Modified} = $res->header('Last-Modified');
+ $File->{Server} = scalar $res->server;
+
+@@ -1921,7 +1921,7 @@
+ $File->{Bytes} = $file;
+ $File->{Mode} = $mode;
+ $File->{ContentType} = $ct;
+- $File->{Charset}->{HTTP} = lc $charset;
++ $File->{Charset}->{HTTP} = lc $charset if defined $charset;
+ $File->{Modified} = $q->http('Last-Modified');
+ $File->{Server} = $q->http('User-Agent'); # Fake a "server". :-)
+ $File->{Size} = $q->http('Content-Length');
diff --git a/w3c-markup-validator.spec b/w3c-markup-validator.spec
index e7d3bc6..0097202 100644
--- a/w3c-markup-validator.spec
+++ b/w3c-markup-validator.spec
@@ -1,6 +1,6 @@
Name: w3c-markup-validator
Version: 1.2
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: W3C Markup Validator
Group: Applications/Internet
@@ -21,6 +21,8 @@ Patch2: %{name}-1.0-valid-icons.patch
Patch3: %{name}-0.8.6-iso-html.patch
# Not upstreamable, kept until Encode::HanExtra is packaged
Patch4: %{name}-1.0-hanextra.patch
+# From upstream post-1.2 hg (commit 3214)
+Patch5: %{name}-1.2-perl512-warnings.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -60,6 +62,7 @@ rm htdocs/images/markup_validation_service.psd
%patch2 -p1
%patch3 -p1
%patch4 -p1
+%patch5 -p1
find . -type f -name "*.orig" -delete # patch backup files
mv htdocs/sgml-lib .
@@ -147,6 +150,9 @@ done
%changelog
+* Sun Mar 13 2011 Ville Skyttä <ville.skytta at iki.fi> - 1.2-2
+- Apply upstream patch to avoid lc(undef) warnings with Perl >= 5.12.
+
* Wed Mar 9 2011 Ville Skyttä <ville.skytta at iki.fi> - 1.2-1
- Update to 1.2.
More information about the perl-devel
mailing list