forked from pool/perl-XML-LibXML
Accepting request 528760 from home:scarabeus_iv:branches:devel:languages:perl
- Add patch to fix building with new libxml (from Fedora): * XML-LibXML-2.0129-Adjust-tests-to-libxml2-2.9.5.patch OBS-URL: https://build.opensuse.org/request/show/528760 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-XML-LibXML?expand=0&rev=71
This commit is contained in:
45
XML-LibXML-2.0129-Adjust-tests-to-libxml2-2.9.5.patch
Normal file
45
XML-LibXML-2.0129-Adjust-tests-to-libxml2-2.9.5.patch
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
From 14f879ec851e7f5e32f4895fc93dd391cf841eb9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||||
|
Date: Wed, 20 Sep 2017 17:17:57 +0200
|
||||||
|
Subject: [PATCH] Adjust tests to libxml2-2.9.5
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
libxml2-2.9.5 started accepting empty strings thus
|
||||||
|
t/48_reader_undef_warning_on_empty_str_rt106830.t test does not make
|
||||||
|
sense anymore and reports a faluire.
|
||||||
|
|
||||||
|
This patch skips the test when running against libnxml2 >= 2.9.5.
|
||||||
|
|
||||||
|
CPAN RT#122958
|
||||||
|
|
||||||
|
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||||
|
---
|
||||||
|
t/48_reader_undef_warning_on_empty_str_rt106830.t | 10 +++++++---
|
||||||
|
1 file changed, 7 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/t/48_reader_undef_warning_on_empty_str_rt106830.t b/t/48_reader_undef_warning_on_empty_str_rt106830.t
|
||||||
|
index 8f704c0..0f656a1 100644
|
||||||
|
--- a/t/48_reader_undef_warning_on_empty_str_rt106830.t
|
||||||
|
+++ b/t/48_reader_undef_warning_on_empty_str_rt106830.t
|
||||||
|
@@ -30,9 +30,13 @@ use XML::LibXML::Reader;
|
||||||
|
my $xml_reader = XML::LibXML::Reader->new(string => $empty_xml_doc);
|
||||||
|
|
||||||
|
# TEST
|
||||||
|
- ok (scalar(!defined($xml_reader)),
|
||||||
|
- 'xml_reader is undef',
|
||||||
|
- );
|
||||||
|
+ SKIP: {
|
||||||
|
+ skip 'libxml2 accepts empty strings since 2.9.5 version', 1
|
||||||
|
+ if (XML::LibXML::LIBXML_VERSION() >= 20905);
|
||||||
|
+ ok (scalar(!defined($xml_reader)),
|
||||||
|
+ 'xml_reader is undef',
|
||||||
|
+ );
|
||||||
|
+ }
|
||||||
|
|
||||||
|
# TEST
|
||||||
|
eq_or_diff(
|
||||||
|
--
|
||||||
|
2.13.5
|
||||||
|
|
@@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Sep 26 09:44:35 UTC 2017 - tchvatal@suse.com
|
||||||
|
|
||||||
|
- Add patch to fix building with new libxml (from Fedora):
|
||||||
|
* XML-LibXML-2.0129-Adjust-tests-to-libxml2-2.9.5.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Mar 15 08:23:30 UTC 2017 - coolo@suse.com
|
Wed Mar 15 08:23:30 UTC 2017 - coolo@suse.com
|
||||||
|
|
||||||
|
@@ -16,17 +16,17 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%define cpan_name XML-LibXML
|
||||||
Name: perl-XML-LibXML
|
Name: perl-XML-LibXML
|
||||||
Version: 2.0129
|
Version: 2.0129
|
||||||
Release: 0
|
Release: 0
|
||||||
%define cpan_name XML-LibXML
|
|
||||||
Summary: Perl Binding for libxml2
|
Summary: Perl Binding for libxml2
|
||||||
License: Artistic-1.0 or GPL-1.0+
|
License: Artistic-1.0 OR GPL-1.0+
|
||||||
Group: Development/Libraries/Perl
|
Group: Development/Libraries/Perl
|
||||||
Url: http://search.cpan.org/dist/XML-LibXML/
|
Url: http://search.cpan.org/dist/XML-LibXML/
|
||||||
Source0: https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/%{cpan_name}-%{version}.tar.gz
|
Source0: https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/%{cpan_name}-%{version}.tar.gz
|
||||||
Source1: cpanspec.yml
|
Source1: cpanspec.yml
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
Patch0: XML-LibXML-2.0129-Adjust-tests-to-libxml2-2.9.5.patch
|
||||||
BuildRequires: perl
|
BuildRequires: perl
|
||||||
BuildRequires: perl-macros
|
BuildRequires: perl-macros
|
||||||
BuildRequires: perl(XML::NamespaceSupport) >= 1.07
|
BuildRequires: perl(XML::NamespaceSupport) >= 1.07
|
||||||
@@ -44,7 +44,7 @@ Requires: perl(parent)
|
|||||||
BuildRequires: pkgconfig(libxml-2.0) >= 2.9.0
|
BuildRequires: pkgconfig(libxml-2.0) >= 2.9.0
|
||||||
Provides: perl-XML-LibXML-Common = %{version}
|
Provides: perl-XML-LibXML-Common = %{version}
|
||||||
Obsoletes: perl-XML-LibXML-Common < %{version}
|
Obsoletes: perl-XML-LibXML-Common < %{version}
|
||||||
# MANUAL END
|
# /MANUAL END
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This module is an interface to libxml2, providing XML and HTML parsers with
|
This module is an interface to libxml2, providing XML and HTML parsers with
|
||||||
@@ -55,13 +55,14 @@ stated otherwise, you only need to 'use XML::LibXML;' in your programs.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{cpan_name}-%{version}
|
%setup -q -n %{cpan_name}-%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
|
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
|
||||||
%{__make} %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%{__make} test
|
make %{?_smp_mflags} test
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%perl_make_install
|
%perl_make_install
|
||||||
@@ -69,7 +70,6 @@ stated otherwise, you only need to 'use XML::LibXML;' in your programs.
|
|||||||
%perl_gen_filelist
|
%perl_gen_filelist
|
||||||
|
|
||||||
%files -f %{name}.files
|
%files -f %{name}.files
|
||||||
%defattr(-,root,root,755)
|
|
||||||
%doc Changes docs example HACKING.txt README TODO
|
%doc Changes docs example HACKING.txt README TODO
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user