revert to previous formatting
[p5sagit/strictures.git] / Makefile.PL
index d55bb19..9c341ac 100644 (file)
@@ -4,6 +4,15 @@ use ExtUtils::MakeMaker;
 
 (do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
 
+my %extra_prereqs = (
+  indirect => 0,
+  multidimensional => 0,
+  'bareword::filehandles' => 0,
+);
+my $have_compiler
+  = eval { require ExtUtils::CBuilder; 1 }
+  && ExtUtils::CBuilder->new->have_compiler;
+
 WriteMakefile(
   NAME => 'strictures',
   VERSION_FROM => 'lib/strictures.pm',
@@ -11,18 +20,34 @@ WriteMakefile(
 
   META_MERGE => {
     'meta-spec' => { version => 2 },
-    dynamic_config => 0,
+    dynamic_config => 1,
 
     resources => {
       # r/w: p5sagit@git.shadowcat.co.uk:strictures.git
-      repository => 'git://git.shadowcat.co.uk/p5sagit/strictures.git',
-      homepage => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/strictures.git',
+      repository => {
+        url => 'git://git.shadowcat.co.uk/p5sagit/strictures.git',
+        web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/strictures.git',
+        type => 'git',
+      },
+      bugtracker => {
+          mailto => 'bug-strictures@rt.cpan.org',
+          web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=strictures',
+      },
     },
 
-    recommends => {
-        indirect => 0,
-        multidimensional => 0,
-        'bareword::filehandles' => 0,
+    prereqs => {
+      configure => {
+        requires => {
+          'ExtUtils::CBuilder' => 0,
+        },
+      },
+      runtime => {
+        ( $] >= 5.008004 && !$have_compiler
+          ? ( recommends => \%extra_prereqs ) : () ),
+      },
     },
   },
+
+  ($] >= 5.008004 && $have_compiler
+    ? ( PREREQ_PM => \%extra_prereqs ) : () ),
 );