X-Git-Url: http://git.imager.perl.org/imager.git/blobdiff_plain/32d74dbefcf44f42fc5ba3f4ae215fd0612cc47e..504721f30ef723739a4e772a8945c1b4e19e10a3:/FT2/Makefile.PL diff --git a/FT2/Makefile.PL b/FT2/Makefile.PL index 676ae6e6..c655098b 100644 --- a/FT2/Makefile.PL +++ b/FT2/Makefile.PL @@ -15,8 +15,6 @@ GetOptions("incpath=s", \@incpaths, our $BUILDING_IMAGER; our %IMAGER_LIBS; -my $MM_ver = eval $ExtUtils::MakeMaker::VERSION; - my %opts = ( NAME => 'Imager::Font::FT2', @@ -25,6 +23,35 @@ my %opts = clean => { FILES => 'testout' }, ); +if (eval { ExtUtils::MakeMaker->VERSION('6.46'); 1 }) { + $opts{LICENSE} = "perl_5"; + $opts{AUTHOR} = 'Tony Cook '; + $opts{ABSTRACT} = 'FreeType 2 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.."; @@ -38,29 +65,48 @@ else { $opts{TYPEMAPS} = [ Imager::ExtUtils->typemap ]; # Imager required configure through use - my @Imager_req = ( Imager => "0.86" ); - 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 => + { + requires => + { + @Imager_req, + }, + }, + build => { - @Imager_req, + requires => + { + @Imager_req, + 'Scalar::Util' => 1.00, + "Test::More" => "0.47", + } }, - build_requires => + runtime => { - @Imager_req, - "Test::More" => "0.47", + requires => + { + @Imager_req, + 'Scalar::Util' => 1.00, + } }, - resources => + test => { - homepage => "http://imager.perl.org/", - repository => "git://git.imager.perl.org/imager.git", - bugtracker => "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Imager", + requires => + { + "Test::More" => "0.47", + 'Scalar::Util' => 1.00, + } }, }; $opts{PREREQ_PM} = { @Imager_req, + 'Scalar::Util' => 1.00, + XSLoader => 0, }; } } @@ -88,6 +134,7 @@ my %probe = incsuffix => "freetype", }, ], + verbose => $verbose, ); my $probe_res = Imager::Probe->probe(\%probe); @@ -101,11 +148,6 @@ if ($probe_res) { $opts{LDDLFLAGS} = $probe_res->{LDDLFLAGS} if $probe_res->{LDDLFLAGS}; - if ($MM_ver > 6.06) { - $opts{AUTHOR} = 'Tony Cook '; - $opts{ABSTRACT} = 'FreeType 2 font driver for Imager'; - } - WriteMakefile(%opts); } else { @@ -153,6 +195,9 @@ sub is_exe { if ($^O eq 'MSWin32') { push @exe_suffix, qw/.bat .cmd/; } + elsif ($^O eq 'cygwin') { + push @exe_suffix, ""; + } for my $dir (File::Spec->path) { for my $suffix (@exe_suffix) {