--- Makefile.PL +++ Makefile.PL @@ -17,17 +17,16 @@ use warnings; require 5.008001; -use Alien::Base::Wrapper qw( Alien::Libxml2 ); use ExtUtils::MakeMaker; +use ExtUtils::PkgConfig; use Config; my $SKIP_SAX_INSTALL = $ENV{SKIP_SAX_INSTALL}; my %ConfigReqs = ( - "Alien::Libxml2" => '0.14', - "Alien::Base::Wrapper" => 0, "Config" => 0, "ExtUtils::MakeMaker" => 0, + "ExtUtils::PkgConfig" => 0, ); my %DevReqs = ( 'Test::CPAN::Changes' => 0, @@ -68,15 +67,12 @@ my %prereqs = ( "warnings" => 0, ); -my %xsbuild_concat = ( +my %xsbuild = ( DEFINE => '-DHAVE_UTF8', OBJECT => '$(O_FILES)', + CCFLAGS => ExtUtils::PkgConfig->cflags_only_I('libxml-2.0') . " $Config{ccflags}", + LIBS => [ ExtUtils::PkgConfig->libs_only_l('libxml-2.0') ], ); -my %xsbuild = Alien::Base::Wrapper->mm_args; # Might contain a definition of DEFINE, must thus concatenate. -while (my ($k, $v) = each %xsbuild_concat) { - my $base_val = $xsbuild{$k}; - $xsbuild{$k} = (defined($base_val) ? ($base_val . ' ' . $v) : $v); -} my %WriteMakefileArgs = ( "NAME" => "XML::LibXML", --- META.json +++ META.json @@ -45,10 +45,9 @@ }, "configure" : { "requires" : { - "Alien::Base::Wrapper" : "0", - "Alien::Libxml2" : "0.14", "Config" : "0", - "ExtUtils::MakeMaker" : "0" + "ExtUtils::MakeMaker" : "0", + "ExtUtils::PkgConfig" : "0" } }, "runtime" : { --- META.yml +++ META.yml @@ -14,10 +14,9 @@ build_requires: locale: '0' utf8: '0' configure_requires: - Alien::Base::Wrapper: '0' - Alien::Libxml2: '0.14' Config: '0' ExtUtils::MakeMaker: '0' + ExtUtils::PkgConfig: '0' dynamic_config: 0 generated_by: 'ExtUtils::MakeMaker version 7.70, CPAN::Meta::Converter version 2.150010' keywords: