]> git.imager.perl.org - imager.git/blobdiff - FT2/Makefile.PL
Change note for strerror() fix
[imager.git] / FT2 / Makefile.PL
index 651401005327afb9ca96e4f159f01609e06d16f0..b2925be5cf3b1b3b00fdc164bfcb8fbd06541143 100644 (file)
@@ -1,6 +1,6 @@
 #!perl -w
 use strict;
-use ExtUtils::MakeMaker qw(WriteMakefile WriteEmptyMakefile);
+use ExtUtils::MakeMaker;
 use Getopt::Long;
 use Config;
 
@@ -13,8 +13,7 @@ GetOptions("incpath=s", \@incpaths,
            "verbose|v" => \$verbose);
 
 our $BUILDING_IMAGER;
-
-$DB::single = 1;
+our %IMAGER_LIBS;
 
 my $MM_ver = eval $ExtUtils::MakeMaker::VERSION;
 
@@ -39,7 +38,7 @@ else {
   $opts{TYPEMAPS} = [ Imager::ExtUtils->typemap ];
 
   # Imager required configure through use
-  my @Imager_req = ( Imager => "0.77" );
+  my @Imager_req = ( Imager => "0.95" );
   if ($MM_ver >= 6.46) {
     $opts{META_MERGE} =
       {
@@ -55,17 +54,15 @@ else {
        resources =>
        {
        homepage => "http://imager.perl.org/",
-       repository =>
-       {
-        url => "http://imager.perl.org/svn/trunk/Imager/FT2",
-        web => "http://imager.perl.org/svnweb/public/browse/trunk/Imager/FT2",
-        type => "svn",
-       },
+       repository => "git://git.imager.perl.org/imager.git",
+       bugtracker => "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Imager",
        },
       };
     $opts{PREREQ_PM} =
       {
        @Imager_req,
+       'Scalar::Util' => 1.00,
+       XSLoader => 0,
       };
   }
 }
@@ -93,25 +90,32 @@ my %probe =
      incsuffix => "freetype",
     },
    ],
+   verbose => $verbose,
   );
 
 my $probe_res = Imager::Probe->probe(\%probe);
 if ($probe_res) {
+  $IMAGER_LIBS{FT2} = 1;
+
   push @inc, $probe_res->{INC};
   $opts{LIBS} = $probe_res->{LIBS};
-
+  $opts{DEFINE} = $probe_res->{DEFINE};
   $opts{INC} = "@inc";
+  $opts{LDDLFLAGS} = $probe_res->{LDDLFLAGS}
+    if $probe_res->{LDDLFLAGS};
 
   if ($MM_ver > 6.06) {
-    $opts{AUTHOR} = 'Tony Cook <tony@imager.perl.org>';
+    $opts{AUTHOR} = 'Tony Cook <tonyc@cpan.org>';
     $opts{ABSTRACT} = 'FreeType 2 font driver for Imager';
   }
   
   WriteMakefile(%opts);
 }
 else {
+  $IMAGER_LIBS{FT2} = 0;
+
   if ($BUILDING_IMAGER) {
-    WriteEmptyMakefile(%opts);
+    ExtUtils::MakeMaker::WriteEmptyMakefile(%opts);
   }
   else {
     # fail in good way
@@ -152,10 +156,13 @@ 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) {
-      -x catfile($dir, "$name$suffix")
+      -x File::Spec->catfile($dir, "$name$suffix")
        and return 1;
     }
   }