X-Git-Url: http://git.imager.perl.org/imager.git/blobdiff_plain/a556912d911731f0da70f94d373374a238471f77..f7675b46b77133b516c407fdd9f63abcca50fd45:/T1/Makefile.PL diff --git a/T1/Makefile.PL b/T1/Makefile.PL index 14577c7a..0d326971 100644 --- a/T1/Makefile.PL +++ b/T1/Makefile.PL @@ -13,6 +13,7 @@ GetOptions("incpath=s", \@incpaths, "verbose|v" => \$verbose); our $BUILDING_IMAGER; +our %IMAGER_LIBS; my $MM_ver = eval $ExtUtils::MakeMaker::VERSION; @@ -24,6 +25,35 @@ my %opts = clean => { FILES => 'testout' }, ); +if (eval { ExtUtils::MakeMaker->VERSION('6.46'); 1 }) { + $opts{LICENSE} = "perl_5"; + $opts{AUTHOR} = 'Tony Cook '; + $opts{ABSTRACT} = 'T1Lib font driver for Imager'; + $opts{META_MERGE} = + { + 'meta-spec' => + { + version => "2", + url => "https://metacpan.org/pod/CPAN::Meta::Spec", + }, + resources => + { + homepage => "http://imager.perl.org/", + repository => + { + type => "git", + url => "git://git.imager.perl.org/imager.git", + web => "http://git.imager.perl.org/imager.git", + }, + bugtracker => + { + web => "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Imager", + mailto => 'bug-Imager@rt.cpan.org', + }, + }, + }; +} + my @inc; if ($BUILDING_IMAGER) { push @inc, "-I.."; @@ -37,33 +67,44 @@ else { $opts{TYPEMAPS} = [ Imager::ExtUtils->typemap ]; # Imager required configure through use - my @Imager_req = ( Imager => "0.80_01" ); - if ($MM_ver >= 6.46) { - $opts{META_MERGE} = + my @Imager_req = ( Imager => "0.95" ); + if (eval { ExtUtils::MakeMaker->VERSION('6.46'); 1 }) { + $opts{META_MERGE}{prereqs} = { - configure_requires => + configure => { - @Imager_req, + requires => + { + @Imager_req, + }, }, - build_requires => + build => { - @Imager_req, - "Test::More" => "0.47", + requires => + { + @Imager_req, + "Test::More" => "0.47", + } }, - resources => + runtime => { - homepage => "http://imager.perl.org/", - repository => + requires => { - url => "git://git.imager.perl.org/imager-type1.git", - web => "http://git.imager.perl.org/imager-type1.git/", - type => "git", - }, + @Imager_req, + } + }, + test => + { + requires => + { + "Test::More" => "0.47", + } }, }; $opts{PREREQ_PM} = { @Imager_req, + XSLoader => 0, }; } } @@ -80,23 +121,23 @@ my %probe = testcodeheaders => [ "stdio.h", "string.h", "t1lib.h" ], incpath => \@incpaths, libpath => \@libpaths, + verbose => $verbose, ); my $probe_res = Imager::Probe->probe(\%probe); if ($probe_res) { + $IMAGER_LIBS{T1} = 1; + push @inc, $probe_res->{INC}; $opts{LIBS} = $probe_res->{LIBS}; $opts{DEFINE} = $probe_res->{DEFINE}; $opts{INC} = "@inc"; - if ($MM_ver > 6.06) { - $opts{AUTHOR} = 'Tony Cook '; - $opts{ABSTRACT} = 'T1Lib font driver for Imager'; - } - WriteMakefile(%opts); } else { + $IMAGER_LIBS{T1} = 0; + if ($BUILDING_IMAGER) { ExtUtils::MakeMaker::WriteEmptyMakefile(%opts); } @@ -117,4 +158,3 @@ T1_CloseLib(); return 0; CODE } -