]> git.imager.perl.org - imager.git/blobdiff - PNG/Makefile.PL
Imager is moving to github
[imager.git] / PNG / Makefile.PL
index df6e32667c5df306c13c30e6d17d8df2c86b9d5f..38ed07faa3c26f22515bb5927c03d4d140189585 100644 (file)
@@ -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 <tonyc@cpan.org>';
+  $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://github.com/tonycoz/imager.git",
+       web => "https://github.com/tonycoz/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 <tonyc@cpan.org>';
-    $opts{ABSTRACT} = 'PNG Image file support';
-  }
-  
+
   WriteMakefile(%opts);
 }
 else {