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 = (