]> git.imager.perl.org - imager.git/blobdiff - JPEG/Makefile.PL
add new comparison method rgb_difference that resembles arithmetical difference per...
[imager.git] / JPEG / Makefile.PL
index 26c50d3446c4270d818af535ff326b5818883059..385dbc96b47c7bd99967b95c1dc3fe0d3c538848 100644 (file)
@@ -15,16 +15,43 @@ GetOptions("incpath=s", \@incpaths,
 our $BUILDING_IMAGER;
 our %IMAGER_LIBS;
 
-my $MM_ver = eval $ExtUtils::MakeMaker::VERSION;
-
 my %opts = 
   (
    NAME => 'Imager::File::JPEG',
    VERSION_FROM => 'JPEG.pm',
-   OBJECT => 'JPEG.o imjpeg.o imexif.o',
+   OBJECT => 'JPEG.o imjpeg.o',
    clean => { FILES => 'testout' },
   );
 
+if (eval { ExtUtils::MakeMaker->VERSION('6.46'); 1 }) {
+  $opts{LICENSE} = "perl_5";
+  $opts{AUTHOR} = 'Tony Cook <tonyc@cpan.org>';
+  $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://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..";
@@ -38,24 +65,38 @@ 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 => "1.008" );
+  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} =
@@ -77,6 +118,7 @@ my %probe =
    testcodeheaders => [ "stdio.h", "stddef.h", "jpeglib.h" ],
    incpath => \@incpaths,
    libpath => \@libpaths,
+   verbose => $verbose,
   );
 
 my $probe_res = Imager::Probe->probe(\%probe);
@@ -87,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 <tonyc@cpan.org>';
-    $opts{ABSTRACT} = 'JPEG Image file support';
-  }
-  
+
   WriteMakefile(%opts);
 }
 else {