From 500202ebcaa869408ec68a307a1b8c25e89eedfc Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Mon, 30 Nov 2020 15:20:33 +0000 Subject: [PATCH] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/perl-XML-LibXML.git#2b41f8b959168b4307c1919545fd0735e146f929 --- ...e-pkgconfig-instead-of-Alien-Libxml2.patch | 48 +++++++++++++++++++ perl-XML-LibXML.spec | 11 +++-- 2 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 XML-LibXML-2.0206-Use-pkgconfig-instead-of-Alien-Libxml2.patch diff --git a/XML-LibXML-2.0206-Use-pkgconfig-instead-of-Alien-Libxml2.patch b/XML-LibXML-2.0206-Use-pkgconfig-instead-of-Alien-Libxml2.patch new file mode 100644 index 0000000..ee10e18 --- /dev/null +++ b/XML-LibXML-2.0206-Use-pkgconfig-instead-of-Alien-Libxml2.patch @@ -0,0 +1,48 @@ +diff -up XML-LibXML-2.0206/Makefile.PL.orig XML-LibXML-2.0206/Makefile.PL +--- XML-LibXML-2.0206/Makefile.PL.orig 2020-09-15 10:00:42.000000000 +0200 ++++ XML-LibXML-2.0206/Makefile.PL 2020-11-30 15:54:20.965335954 +0100 +@@ -17,15 +17,31 @@ use warnings; + + require 5.008001; + +-use Alien::Base::Wrapper qw( Alien::Libxml2 ); + use ExtUtils::MakeMaker; + use Config; + + my $SKIP_SAX_INSTALL = $ENV{SKIP_SAX_INSTALL}; + ++my $libs = ''; ++my $inc = ''; ++if (`xml2-config --modules 2>/dev/null`) { ++ $libs = `xml2-config --libs 2>/dev/null`; ++ $inc = `xml2-config --cflags 2>/dev/null`; ++} ++elsif (`pkg-config --modversion libcrypto 2>/dev/null`) { ++ $libs = `pkg-config --libs libxml-2.0 2>/dev/null`; ++ $inc = `pkg-config --cflags libxml-2.0 2>/dev/null`; ++} ++ ++$libs =~ s/[\r\n]+/ /g; ++$inc =~ s/[\r\n]+/ /g; ++ ++die "Could not determine location of libxml2 libs." ++ unless $libs =~ /^-/; ++die "Could not determine location of libxml2 headers." ++ unless $inc =~ /^-/; ++ + my %ConfigReqs = ( +- "Alien::Libxml2" => '0.14', +- "Alien::Base::Wrapper" => 0, + "Config" => 0, + "ExtUtils::MakeMaker" => 0, + ); +@@ -71,7 +87,8 @@ my %prereqs = ( + my %xsbuild = ( + DEFINE => '-DHAVE_UTF8', + OBJECT => '$(O_FILES)', +- Alien::Base::Wrapper->mm_args, ++ LIBS => $libs, ++ INC => $inc, + ); + + my %WriteMakefileArgs = ( diff --git a/perl-XML-LibXML.spec b/perl-XML-LibXML.spec index b095e00..08abfa4 100644 --- a/perl-XML-LibXML.spec +++ b/perl-XML-LibXML.spec @@ -8,7 +8,7 @@ Name: perl-XML-LibXML # it might not be needed anymore # this module is maintained, the other is not Version: 2.0206 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 1 Summary: Perl interface to the libxml2 library License: (GPL+ or Artistic) and MIT @@ -17,6 +17,8 @@ Source0: https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/XML-LibXML-%{v # Fix parsing ampersand entities in SAX interface, CPAN RT#131498, # posted to the upstream. Patch0: XML-LibXML-2.0202-Parse-an-ampersand-entity-in-SAX-interface.patch +# To reduce dependencies replace Alien::Libxml2 with pkg-config +Patch1: XML-LibXML-2.0206-Use-pkgconfig-instead-of-Alien-Libxml2.patch BuildRequires: coreutils BuildRequires: findutils BuildRequires: glibc-common @@ -26,11 +28,10 @@ BuildRequires: make BuildRequires: perl-devel BuildRequires: perl-generators BuildRequires: perl-interpreter -BuildRequires: perl(Alien::Base::Wrapper) -BuildRequires: perl(Alien::Libxml2) >= 0.14 BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 BuildRequires: perl(strict) BuildRequires: perl(warnings) +BuildRequires: pkgconfig(libxml-2.0) # Run-time BuildRequires: perl(base) BuildRequires: perl(Carp) @@ -93,6 +94,7 @@ validating XML parser and the high performance DOM implementation. %prep %setup -q -n XML-LibXML-%{version} %patch0 -p1 +%patch1 -p1 chmod -x *.c for i in Changes; do /usr/bin/iconv -f iso8859-1 -t utf-8 $i > $i.conv && /bin/mv -f $i.conv $i @@ -133,6 +135,9 @@ fi %{_mandir}/man3/*.3* %changelog +* Mon Nov 30 2020 Jitka Plesnikova - 1:2.0206-2 +- Replace using of Alien::Libxml2 with pkg-config + * Tue Sep 15 2020 Jitka Plesnikova - 1:2.0206-1 - 2.0206 bump