add ExtUtils::CBuilder to configure requires, and change to dynamic config
[p5sagit/strictures.git] / Makefile.PL
index 52928f6..6e5f866 100644 (file)
@@ -10,18 +10,44 @@ WriteMakefile(
   MIN_PERL_VERSION => '5.006',
 
   META_MERGE => {
-    dynamic_config => 0,
+    'meta-spec' => { version => 2 },
+    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 => {
+      runtime => {
+        recommends => {
+          indirect => 0,
+          multidimensional => 0,
+          'bareword::filehandles' => 0,
+        },
+      },
+      configure => {
+        requires => {
+          'ExtUtils::CBuilder' => 0,
+        },
+      },
     },
   },
+
+  (eval { require ExtUtils::CBuilder; 1 }
+      and ExtUtils::CBuilder->new->have_compiler)
+      ? (PREREQ_PM => {
+            indirect => 0,
+            multidimensional => 0,
+            'bareword::filehandles' => 0,
+      })
+      : (),
 );