]> git.imager.perl.org - imager.git/blobdiff - TIFF/Makefile.PL
fix an unsigned comparison when converting character code to a glyph index with a...
[imager.git] / TIFF / Makefile.PL
index 93733b7cb06d838a77c77251d310608bb482b063..86270259c1499b91335a26e1bc2c0a4ac0f87d2b 100644 (file)
@@ -15,16 +15,50 @@ 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") {
+  $define = "-DIEEEFP_TYPES";
+}
 
 my %opts = 
   (
    NAME => 'Imager::File::TIFF',
    VERSION_FROM => 'TIFF.pm',
    OBJECT => 'TIFF.o imtiff.o',
+   DEFINE => $define,
    clean => { FILES => 'testout' },
   );
 
+if (eval { ExtUtils::MakeMaker->VERSION('6.46'); 1 }) {
+  $opts{LICENSE} = "perl_5";
+  $opts{AUTHOR} = 'Tony Cook <tonyc@cpan.org>';
+  $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..";
@@ -38,29 +72,44 @@ else {
   $opts{TYPEMAPS} = [ Imager::ExtUtils->typemap ];
 
   # Imager required configure through use
-  my @Imager_req = ( Imager => "0.78" );
-  if ($MM_ver >= 6.46) {
-    $opts{META_MERGE} =
+  my @Imager_req = ( Imager => "0.94" );
+  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} =
       {
        @Imager_req,
+       XSLoader => 0,
       };
   }
 }
@@ -76,6 +125,7 @@ my %probe =
    testcodeheaders => [ "tiffio.h", "stdio.h", "string.h" ],
    incpath => \@incpaths,
    libpath => \@libpaths,
+   verbose => $verbose,
   );
 
 my $probe_res = Imager::Probe->probe(\%probe);
@@ -84,14 +134,9 @@ if ($probe_res) {
 
   push @inc, $probe_res->{INC};
   $opts{LIBS} = $probe_res->{LIBS};
-  $opts{DEFINE} = $probe_res->{DEFINE};
+  $opts{DEFINE} .= " $probe_res->{DEFINE}";
   $opts{INC} = "@inc";
 
-  if ($MM_ver > 6.06) {
-    $opts{AUTHOR} = 'Tony Cook <tonyc@cpan.org>';
-    $opts{ABSTRACT} = 'TIFF image file support for Imager';
-  }
-  
   WriteMakefile(%opts);
 }
 else {