diff --git a/perl-HTML-Lint-fix-tests-on-newer-perl-version.patch b/perl-HTML-Lint-fix-tests-on-newer-perl-version.patch
new file mode 100644
index 0000000..eafae14
--- /dev/null
+++ b/perl-HTML-Lint-fix-tests-on-newer-perl-version.patch
@@ -0,0 +1,43 @@
+From f5115c7369627fbbd8f28f453f695af02beb0582 Mon Sep 17 00:00:00 2001
+From: Andy Lester
+Date: Tue, 7 Apr 2015 09:57:09 -0500
+Subject: [PATCH] doc-tag-required errors are now sorted by tag name.
+
+---
+ Changes | 9 +++++++++
+ lib/HTML/Lint/Parser.pm | 2 +-
+ 2 files changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/Changes b/Changes
+index 01f254c..3093c8a 100644
+--- a/Changes
++++ b/Changes
+@@ -6,6 +6,15 @@ NOTE: All bugs and requests are now being handled through GitHub.
+
+ Please DO NOT send bug reports to http://rt.cpan.org/.
+
++NEXT
++
++ [FIXES]
++ Errors of the type doc-tag-required did not come out in any defined
++ order. They are now sorted by tag name. This was discovered
++ because hash randomization caused tests to fail on Perl 5.18 and
++ above. Thanks, Slaven Rezic and Andrew Main.
++
++
+ 2.22 Mon Apr 6 15:47:11 CDT 2015
+ [CHANGES THAT COULD BREAK YOUR CODE]
+ Previously, html_ok() would not check the entire structure of a web
+diff --git a/lib/HTML/Lint/Parser.pm b/lib/HTML/Lint/Parser.pm
+index aa1e337..5c60915 100644
+--- a/lib/HTML/Lint/Parser.pm
++++ b/lib/HTML/Lint/Parser.pm
+@@ -102,7 +102,7 @@ sub _start_document {
+ sub _end_document {
+ my ($self,$line,$column) = @_;
+
+- for my $tag ( keys %isRequired ) {
++ for my $tag ( sort keys %isRequired ) {
+ if ( !$self->{_first_seen}->{$tag} ) {
+ $self->gripe( 'doc-tag-required', tag => $tag );
+ }
diff --git a/perl-HTML-Lint.changes b/perl-HTML-Lint.changes
index 3716e5b..7f25adf 100644
--- a/perl-HTML-Lint.changes
+++ b/perl-HTML-Lint.changes
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Wed Nov 25 17:31:29 UTC 2015 - mardnh@gmx.de
+
+- add patch: perl-HTML-Lint-fix-tests-on-newer-perl-version.patch
+ see https://github.com/petdance/html-lint/issues/39
+
-------------------------------------------------------------------
Mon Apr 20 06:47:58 UTC 2015 - coolo@suse.com
diff --git a/perl-HTML-Lint.spec b/perl-HTML-Lint.spec
index 5956de9..a1e9ddc 100644
--- a/perl-HTML-Lint.spec
+++ b/perl-HTML-Lint.spec
@@ -26,6 +26,8 @@ Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/HTML-Lint/
Source0: http://www.cpan.org/authors/id/P/PE/PETDANCE/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
+# PATCH-FIX-UPSTREAM perl-HTML-Lint-fix-tests-on-newer-perl-version.patch - https://github.com/petdance/html-lint/issues/39
+Patch0: perl-HTML-Lint-fix-tests-on-newer-perl-version.patch
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
@@ -43,6 +45,7 @@ check for HTML errors in a string or file
%prep
%setup -q -n %{cpan_name}-%{version}
+%patch0 -p1
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor