]> git.vpit.fr Git - perl/modules/indirect.git/blob - Makefile.PL
Add BUILD_REQUIRES to WriteMakefile()
[perl/modules/indirect.git] / Makefile.PL
1 use 5.008001;
2
3 use strict;
4 use warnings;
5 use ExtUtils::MakeMaker;
6
7 my @DEFINES;
8
9 # Threads, Windows and 5.8.x don't seem to be best friends
10 if ($^O eq 'MSWin32' and "$]" < 5.009) {
11  push @DEFINES, '-DI_MULTIPLICITY=0';
12 }
13
14 # Fork emulation got "fixed" in 5.10.1
15 if ($^O eq 'MSWin32' and "$]" < 5.010_001) {
16  push @DEFINES, '-DI_FORKSAFE=0';
17 }
18
19 @DEFINES = (DEFINE => join ' ', @DEFINES) if @DEFINES;
20
21 my $dist = 'indirect';
22
23 (my $name = $dist) =~ s{-}{::}g;
24
25 (my $file = $dist) =~ s{-}{/}g;
26 $file = "lib/$file.pm";
27
28 my %PREREQ_PM = (
29  'Carp'     => 0,
30  'XSLoader' => 0,
31 );
32
33 my %BUILD_REQUIRES =(
34  'ExtUtils::MakeMaker' => 0,
35  'Test::More'          => 0,
36  %PREREQ_PM,
37 );
38
39 my %META = (
40  configure_requires => {
41   'ExtUtils::MakeMaker' => 0,
42  },
43  build_requires => {
44   %BUILD_REQUIRES,
45  },
46  dynamic_config => 1,
47  resources => {
48   bugtracker => "http://rt.cpan.org/NoAuth/ReportBug.html?Queue=$dist",
49   homepage   => "http://search.cpan.org/dist/$dist/",
50   license    => 'http://dev.perl.org/licenses/',
51   repository => "http://git.profvince.com/?p=perl%2Fmodules%2F$dist.git",
52  },
53 );
54
55 WriteMakefile(
56  NAME             => $name,
57  AUTHOR           => 'Vincent Pit <perl@profvince.com>',
58  LICENSE          => 'perl',
59  VERSION_FROM     => $file,
60  ABSTRACT_FROM    => $file,
61  PL_FILES         => {},
62  @DEFINES,
63  BUILD_REQUIRES   => \%BUILD_REQUIRES,
64  PREREQ_PM        => \%PREREQ_PM,
65  MIN_PERL_VERSION => '5.008001',
66  META_MERGE       => \%META,
67  dist             => {
68   PREOP    => "pod2text -u $file > \$(DISTVNAME)/README",
69   COMPRESS => 'gzip -9f', SUFFIX => 'gz'
70  },
71  clean            => {
72   FILES => "$dist-* *.gcov *.gcda *.gcno cover_db Debian_CPANTS.txt*"
73  },
74 );