From: Tony Cook Date: Sat, 3 Nov 2018 03:59:27 +0000 (+1100) Subject: improve all Makefile.PLs X-Git-Tag: v1.007~10 X-Git-Url: http://git.imager.perl.org/imager.git/commitdiff_plain/572d5255c534ca70a22a62cb896a525ac45ab6a7 improve all Makefile.PLs --- diff --git a/FT2/FT2.pm b/FT2/FT2.pm index 288a2e06..e89b1470 100644 --- a/FT2/FT2.pm +++ b/FT2/FT2.pm @@ -6,7 +6,7 @@ use vars qw($VERSION @ISA); @ISA = qw(Imager::Font); BEGIN { - $VERSION = "0.94"; + $VERSION = "0.95"; require XSLoader; XSLoader::load('Imager::Font::FT2', $VERSION); diff --git a/FT2/Makefile.PL b/FT2/Makefile.PL index b2925be5..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.."; @@ -39,23 +66,40 @@ else { # Imager required configure through use my @Imager_req = ( Imager => "0.95" ); - if ($MM_ver >= 6.46) { - $opts{META_MERGE} = + 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, + 'Scalar::Util' => 1.00, + "Test::More" => "0.47", + } }, - resources => + runtime => { - homepage => "http://imager.perl.org/", - repository => "git://git.imager.perl.org/imager.git", - bugtracker => "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Imager", + requires => + { + @Imager_req, + 'Scalar::Util' => 1.00, + } + }, + test => + { + requires => + { + "Test::More" => "0.47", + 'Scalar::Util' => 1.00, + } }, }; $opts{PREREQ_PM} = @@ -104,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 { diff --git a/GIF/GIF.pm b/GIF/GIF.pm index ee8936a6..d7df5d5c 100644 --- a/GIF/GIF.pm +++ b/GIF/GIF.pm @@ -4,7 +4,7 @@ use Imager; use vars qw($VERSION @ISA); BEGIN { - $VERSION = "0.91"; + $VERSION = "0.92"; require XSLoader; XSLoader::load('Imager::File::GIF', $VERSION); diff --git a/GIF/Makefile.PL b/GIF/Makefile.PL index 3eee679d..bc384163 100644 --- a/GIF/Makefile.PL +++ b/GIF/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::File::GIF', @@ -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} = 'GIF Image file support 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) { unshift @inc, "-I.."; @@ -39,23 +66,37 @@ else { # Imager required configure through use my @Imager_req = ( Imager => "0.94" ); - if ($MM_ver >= 6.46) { - $opts{META_MERGE} = + 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 => "git://git.imager.perl.org/imager.git", - bugtracker => "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Imager", + requires => + { + @Imager_req, + } + }, + test => + { + requires => + { + "Test::More" => "0.47", + } }, }; $opts{PREREQ_PM} = @@ -88,12 +129,7 @@ if ($probe_res) { $opts{LIBS} = $probe_res->{LIBS}; $opts{DEFINE} = $probe_res->{DEFINE}; $opts{INC} = "@inc"; - - if ($MM_ver > 6.06) { - $opts{AUTHOR} = 'Tony Cook '; - $opts{ABSTRACT} = 'GIF Image file support'; - } - + WriteMakefile(%opts); } else { diff --git a/JPEG/JPEG.pm b/JPEG/JPEG.pm index 97262115..ffedae64 100644 --- a/JPEG/JPEG.pm +++ b/JPEG/JPEG.pm @@ -4,7 +4,7 @@ use Imager; use vars qw($VERSION @ISA); BEGIN { - $VERSION = "0.90"; + $VERSION = "0.91"; require XSLoader; XSLoader::load('Imager::File::JPEG', $VERSION); diff --git a/JPEG/Makefile.PL b/JPEG/Makefile.PL index b87c484a..14a13417 100644 --- a/JPEG/Makefile.PL +++ b/JPEG/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::File::JPEG', @@ -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} = 'JPEG Image file support 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.."; @@ -39,23 +66,37 @@ else { # Imager required configure through use my @Imager_req = ( Imager => "0.86" ); - if ($MM_ver >= 6.46) { - $opts{META_MERGE} = + 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 => "git://git.imager.perl.org/imager.git", - bugtracker => "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Imager", + requires => + { + @Imager_req, + } + }, + test => + { + requires => + { + "Test::More" => "0.47", + } }, }; $opts{PREREQ_PM} = @@ -88,12 +129,7 @@ if ($probe_res) { $opts{LIBS} = $probe_res->{LIBS}; $opts{DEFINE} = $probe_res->{DEFINE}; $opts{INC} = "@inc"; - - if ($MM_ver > 6.06) { - $opts{AUTHOR} = 'Tony Cook '; - $opts{ABSTRACT} = 'JPEG Image file support'; - } - + WriteMakefile(%opts); } else { diff --git a/Makefile.PL b/Makefile.PL index ffc7c33f..2b14c27f 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -261,6 +261,25 @@ if (eval { ExtUtils::MakeMaker->VERSION('6.46'); 1 }) { { "Parse::RecDescent" => 0 }, + requires => + { + 'Scalar::Util' => "1.00", + XSLoader => 0, + }, + }, + build => + { + requires => + { + XSLoader => 0, + }, + }, + test => + { + requires => + { + 'Test::More' => "0.99", + }, }, }, dynamic_config => 0, @@ -289,6 +308,7 @@ if (eval { ExtUtils::MakeMaker->VERSION('6.46'); 1 }) { bugtracker => { web => "https://rt.cpan.org/Dist/Display.html?Name=Imager", + mailto => 'bug-Imager@rt.cpan.org', }, }, }; diff --git a/PNG/Makefile.PL b/PNG/Makefile.PL index df6e3266..dc17470e 100644 --- a/PNG/Makefile.PL +++ b/PNG/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::File::PNG', @@ -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} = 'PNG Image file support 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.."; @@ -39,23 +66,37 @@ else { # Imager required configure through use my @Imager_req = ( Imager => "0.90" ); - if ($MM_ver >= 6.46) { - $opts{META_MERGE} = + if (eval { ExtUtils::MakeMaker->VERSION('6.46'); 1 }) { + $opts{META_MERGE}{prereqs} = { - configure_requires => + configure => + { + requires => + { + @Imager_req, + }, + }, + build => { - @Imager_req, + requires => + { + @Imager_req, + "Test::More" => "0.47", + } }, - build_requires => + runtime => { - @Imager_req, - "Test::More" => "0.47", + requires => + { + @Imager_req, + } }, - 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", + } }, }; $opts{PREREQ_PM} = @@ -135,12 +176,7 @@ if ($probe_res) { $opts{LIBS} = $probe_res->{LIBS}; $opts{DEFINE} = $probe_res->{DEFINE}; $opts{INC} = "@inc"; - - if ($MM_ver > 6.06) { - $opts{AUTHOR} = 'Tony Cook '; - $opts{ABSTRACT} = 'PNG Image file support'; - } - + WriteMakefile(%opts); } else { diff --git a/PNG/PNG.pm b/PNG/PNG.pm index f145d0ee..c7ece8f2 100644 --- a/PNG/PNG.pm +++ b/PNG/PNG.pm @@ -4,7 +4,7 @@ use Imager; use vars qw($VERSION @ISA); BEGIN { - $VERSION = "0.93"; + $VERSION = "0.94"; require XSLoader; XSLoader::load('Imager::File::PNG', $VERSION); diff --git a/T1/Makefile.PL b/T1/Makefile.PL index fd8fa648..0d326971 100644 --- a/T1/Makefile.PL +++ b/T1/Makefile.PL @@ -25,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.."; @@ -39,23 +68,37 @@ else { # Imager required configure through use my @Imager_req = ( Imager => "0.95" ); - if ($MM_ver >= 6.46) { - $opts{META_MERGE} = + 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 => "git://git.imager.perl.org/imager.git", - bugtracker => "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Imager", + requires => + { + @Imager_req, + } + }, + test => + { + requires => + { + "Test::More" => "0.47", + } }, }; $opts{PREREQ_PM} = @@ -90,11 +133,6 @@ if ($probe_res) { $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 { @@ -120,4 +158,3 @@ T1_CloseLib(); return 0; CODE } - diff --git a/T1/T1.pm b/T1/T1.pm index 11ef74d5..cee3a3fa 100644 --- a/T1/T1.pm +++ b/T1/T1.pm @@ -6,7 +6,7 @@ use vars qw(@ISA $VERSION); use Scalar::Util (); BEGIN { - $VERSION = "1.024"; + $VERSION = "1.025"; require XSLoader; XSLoader::load('Imager::Font::T1', $VERSION); diff --git a/TIFF/Makefile.PL b/TIFF/Makefile.PL index 82fb46a5..86270259 100644 --- a/TIFF/Makefile.PL +++ b/TIFF/Makefile.PL @@ -15,8 +15,6 @@ GetOptions("incpath=s", \@incpaths, our $BUILDING_IMAGER; our %IMAGER_LIBS; -my $MM_ver = eval $ExtUtils::MakeMaker::VERSION; - my $define = ""; my $fp_rep = unpack("H*", pack("f", 1.25)); if ($fp_rep eq "0000a03f" || $fp_rep eq "3fa00000") { @@ -32,6 +30,35 @@ my %opts = clean => { FILES => 'testout' }, ); +if (eval { ExtUtils::MakeMaker->VERSION('6.46'); 1 }) { + $opts{LICENSE} = "perl_5"; + $opts{AUTHOR} = 'Tony Cook '; + $opts{ABSTRACT} = 'TIFF image file support 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.."; @@ -46,23 +73,37 @@ else { # Imager required configure through use my @Imager_req = ( Imager => "0.94" ); - if ($MM_ver >= 6.46) { - $opts{META_MERGE} = + if (eval { ExtUtils::MakeMaker->VERSION('6.46'); 1 }) { + $opts{META_MERGE}{prereqs} = { - configure_requires => + configure => + { + requires => + { + @Imager_req, + }, + }, + build => { - @Imager_req, + requires => + { + @Imager_req, + "Test::More" => "0.47", + } }, - build_requires => + runtime => { - @Imager_req, - "Test::More" => "0.47", + requires => + { + @Imager_req, + } }, - 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", + } }, }; $opts{PREREQ_PM} = @@ -96,11 +137,6 @@ if ($probe_res) { $opts{DEFINE} .= " $probe_res->{DEFINE}"; $opts{INC} = "@inc"; - if ($MM_ver > 6.06) { - $opts{AUTHOR} = 'Tony Cook '; - $opts{ABSTRACT} = 'TIFF image file support for Imager'; - } - WriteMakefile(%opts); } else { diff --git a/TIFF/TIFF.pm b/TIFF/TIFF.pm index f31103a5..48bcca8a 100644 --- a/TIFF/TIFF.pm +++ b/TIFF/TIFF.pm @@ -4,7 +4,7 @@ use Imager; use vars qw($VERSION @ISA); BEGIN { - $VERSION = "0.89"; + $VERSION = "0.91"; require XSLoader; XSLoader::load('Imager::File::TIFF', $VERSION); diff --git a/W32/Makefile.PL b/W32/Makefile.PL index c729a4ad..07a6609e 100644 --- a/W32/Makefile.PL +++ b/W32/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::W32', @@ -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} = 'Win32 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.."; @@ -39,23 +66,37 @@ else { # Imager required configure through use my @Imager_req = ( Imager => "0.95" ); - if ($MM_ver >= 6.46) { - $opts{META_MERGE} = + if (eval { ExtUtils::MakeMaker->VERSION('6.46'); 1 }) { + $opts{META_MERGE}{prereqs} = { - configure_requires => + configure => + { + requires => + { + @Imager_req, + }, + }, + build => { - @Imager_req, + requires => + { + @Imager_req, + "Test::More" => "0.47", + } }, - build_requires => + runtime => { - @Imager_req, - "Test::More" => "0.47", + requires => + { + @Imager_req, + } }, - 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", + } }, }; $opts{PREREQ_PM} = @@ -89,11 +130,6 @@ if ($probe_res) { $opts{DEFINE} = $probe_res->{DEFINE}; $opts{INC} = "@inc"; - if ($MM_ver > 6.06) { - $opts{AUTHOR} = 'Tony Cook '; - $opts{ABSTRACT} = 'Win32 font file support for Imager'; - } - WriteMakefile(%opts); } else { diff --git a/W32/W32.pm b/W32/W32.pm index 89feecea..331006bc 100644 --- a/W32/W32.pm +++ b/W32/W32.pm @@ -5,7 +5,7 @@ use vars qw($VERSION @ISA); @ISA = qw(Imager::Font); BEGIN { - $VERSION = "0.89"; + $VERSION = "0.90"; require XSLoader; XSLoader::load('Imager::Font::W32', $VERSION); diff --git a/t/950-kwalitee/070-mymeta.t b/t/950-kwalitee/070-mymeta.t new file mode 100644 index 00000000..14217102 --- /dev/null +++ b/t/950-kwalitee/070-mymeta.t @@ -0,0 +1,19 @@ +#!perl -w +use strict; +use Test::More; +plan skip_all => "Only run as part of the dist" + unless -f "MYMETA.json"; +eval "use CPAN::Meta 2.110580;"; +plan skip_all => "CPAN::Meta required for testing META.json" + if $@; +plan skip_all => "Only if automated or author testing" + unless $ENV{AUTOMATED_TESTING} || -d ".git"; +plan tests => 1; + +my $meta; +unless (ok(eval { + $meta = CPAN::Meta->load_file("MYMETA.json", + { lazy_validation => 0 }) }, + "loaded MYMETA.json successfully")) { + diag($@); +}