Blame SOURCES/XML-LibXML-2.0206-Use-pkgconfig-instead-of-Alien-Libxml2.patch

5fc6d7
diff -up XML-LibXML-2.0206/Makefile.PL.orig XML-LibXML-2.0206/Makefile.PL
5fc6d7
--- XML-LibXML-2.0206/Makefile.PL.orig	2020-09-15 10:00:42.000000000 +0200
5fc6d7
+++ XML-LibXML-2.0206/Makefile.PL	2020-11-30 15:54:20.965335954 +0100
5fc6d7
@@ -17,15 +17,31 @@ use warnings;
5fc6d7
 
5fc6d7
 require 5.008001;
5fc6d7
 
5fc6d7
-use Alien::Base::Wrapper qw( Alien::Libxml2 );
5fc6d7
 use ExtUtils::MakeMaker;
5fc6d7
 use Config;
5fc6d7
 
5fc6d7
 my $SKIP_SAX_INSTALL = $ENV{SKIP_SAX_INSTALL};
5fc6d7
 
5fc6d7
+my $libs = '';
5fc6d7
+my $inc  = '';
5fc6d7
+if (`xml2-config --modules 2>/dev/null`) {
5fc6d7
+  $libs = `xml2-config --libs 2>/dev/null`;
5fc6d7
+  $inc  = `xml2-config --cflags 2>/dev/null`;
5fc6d7
+}
5fc6d7
+elsif (`pkg-config --modversion libcrypto 2>/dev/null`) {
5fc6d7
+  $libs = `pkg-config --libs libxml-2.0 2>/dev/null`;
5fc6d7
+  $inc  = `pkg-config --cflags libxml-2.0 2>/dev/null`;
5fc6d7
+}
5fc6d7
+
5fc6d7
+$libs =~ s/[\r\n]+/ /g;
5fc6d7
+$inc  =~ s/[\r\n]+/ /g;
5fc6d7
+
5fc6d7
+die "Could not determine location of libxml2 libs."
5fc6d7
+  unless $libs =~ /^-/;
5fc6d7
+die "Could not determine location of libxml2 headers."
5fc6d7
+  unless $inc =~ /^-/;
5fc6d7
+
5fc6d7
 my %ConfigReqs = (
5fc6d7
-  "Alien::Libxml2" => '0.14',
5fc6d7
-  "Alien::Base::Wrapper" => 0,
5fc6d7
   "Config" => 0,
5fc6d7
   "ExtUtils::MakeMaker" => 0,
5fc6d7
 );
5fc6d7
@@ -71,7 +87,8 @@ my %prereqs = (
5fc6d7
 my %xsbuild = (
5fc6d7
   DEFINE  => '-DHAVE_UTF8',
5fc6d7
   OBJECT  => '$(O_FILES)',
5fc6d7
-  Alien::Base::Wrapper->mm_args,
5fc6d7
+  LIBS    => $libs,
5fc6d7
+  INC     => $inc,
5fc6d7
 );
5fc6d7
 
5fc6d7
 my %WriteMakefileArgs = (