bump version to 0.82 and prepare for release
[catagits/fcgi2.git] / perl / Makefile.PL
index a7b5be3..a389f0c 100644 (file)
@@ -1,5 +1,6 @@
 # $Id: Makefile.PL,v 1.33 2002/12/15 19:40:19 skimo Exp $
 
+use 5.006;
 use ExtUtils::MakeMaker;
 use IO::File;
 use Config;
@@ -10,7 +11,7 @@ use File::Copy qw(copy);
 @h1 = qw(fastcgi.h fcgiapp.h fcgimisc.h fcgios.h);
 @h = (@h1, 'fcgi_config.h');
 @o = qw(FCGI.o);
-@dist1 = qw(LICENSE.TERMS);
+@dist1 = qw(LICENSE);
 @dist2 = qw(fcgiapp.c os_unix.c os_win32.c);
 @dist3 = (@h1, qw(fcgi_config_x86.h));
 
@@ -69,11 +70,37 @@ push(@extras,
 ) if ($ExtUtils::MakeMaker::VERSION >= 5.4301);
 
 push @extras, META_MERGE => {
+    'meta-spec' => { version => 2 },
+    dynamic_config => 0,
     resources => {
-        repository => 'git://git.shadowcat.co.uk/catagits/fcgi2.git',
+        repository => {
+            # this is the real repository
+            # r/w: catagits@git.shadowcat.co.uk:fcgi2.git
+            # r/o: git://git.shadowcat.co.uk/catagits/fcgi2.git
+            # web: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits/fcgi2.git
+            # this is a mirror, but can receive pull requests
+            url => 'https://github.com/perl-catalyst/FCGI.git',
+            web => 'https://github.com/perl-catalyst/FCGI',
+            type => 'git',
+        },
+        bugtracker => {
+            mailto => 'bug-FCGI@rt.cpan.org',
+            web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=FCGI',
+        },
     },
 } if $ExtUtils::MakeMaker::VERSION >= 6.46;
 
+push(@extras,
+    MIN_PERL_VERSION => '5.006',
+) if $ExtUtils::MakeMaker::VERSION >= 6.48;
+
+# not strictly necessary as everything is in core...
+#push(@extras,
+#    CONFIGURE_REQUIRES => {
+#        ...
+#    },
+#) if $ExtUtils::MakeMaker::VERSION >= 6.51_03;
+
 if ("$sys" eq "win32") {
     push @libs, ":nosearch -lws2_32";
     push @extras, 'DEFINE' => '-DDLLAPI=__declspec(dllexport)';
@@ -104,9 +131,19 @@ WriteMakefile(
                   'POSTOP' => 
                 '$(MV) MANIFEST.old MANIFEST',
     },
-    'clean'        => { FILES => 'config.cache fcgi_config.h' .
-                      ' FCGI.c ' },
+    'clean'        => { FILES => 'config.cache fcgi_config.h fcgi_config.h.in' .
+                      ' FCGI.c aclocal.m4 autom4te.cache config.log config.status' .
+                      ' FCGI.cfg' },
+    'realclean'    => { FILES => 'configure MANIFEST.SKIP.bak MANIFEST.bak Makefile.old' },
     PM            => {'FCGI.pm' => '$(INST_ARCHLIBDIR)/FCGI.pm'},
+    PREREQ_PM     => {'XSLoader' => '0'},
+    TEST_REQUIRES => {
+        'Config' => 0,
+        'FCGI::Client' => 0.09,
+        'File::Temp' => 0,
+        'IO::Socket' => 0,
+        'Test::More' => 0,
+    },
     @extras,
 );
 
@@ -126,6 +163,11 @@ if ($sys eq "win32") {
     print "Please read configure.readme for information on how to run it yourself\n";
 
     $ENV{'CC'} = $Config{'cc'};
+    if ( $^O eq 'android' && !$ENV{'TMPDIR'} ) {
+        # See http://stackoverflow.com/a/15417261
+        require File::Spec;
+        $ENV{'TMPDIR'} = File::Spec->tmpdir();
+    }
     system("$Config{sh} configure");
 }