6cb25a00fc74029c566d954c37dd9485d4e3c3a4
[p5sagit/Devel-Declare.git] / Makefile.PL
1 use strict;
2 use warnings FATAL => 'all';
3
4 use 5.008001;
5 use ExtUtils::MakeMaker;
6 (do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
7
8 use ExtUtils::Depends;
9 my $pkg = ExtUtils::Depends->new('Devel::Declare', 'B::Hooks::OP::Check');
10
11 my %TEST_DEPS = (
12     'B::Hooks::OP::Check' => '0.19',
13     'Test::More' => '0.88',
14     'Test::Requires' => '0',
15 );
16
17 # have to do this since old EUMM dev releases miss the eval $VERSION line
18 my $mymeta_works = do { no warnings; $ExtUtils::MakeMaker::VERSION >= 6.5707 };
19
20 WriteMakefile(
21     NAME => 'Devel::Declare',
22     AUTHOR => 'Matt S Trout - <mst@shadowcat.co.uk> - original author',
23     VERSION_FROM => 'lib/Devel/Declare.pm',
24     MIN_PERL_VERSION => '5.008001',
25
26     CONFIGURE_REQUIRES => {
27         # minimum version that works on Win32+gcc
28         'ExtUtils::Depends' => 0.302,
29
30         # minimum version that depends on ExtUtils::Depends 0.302
31         'B::Hooks::OP::Check' => '0.19',
32         'B::Hooks::OP::Check::Install::Files' => '0',
33     },
34
35     PREREQ_PM => {
36         'Scalar::Util' => 1.11, # set_prototype appeared in this version
37         'B::Hooks::OP::Check' => '0.19',
38         'B::Hooks::EndOfScope' => '0.05',
39         'Sub::Name' => 0,
40         ($mymeta_works ? () : (%TEST_DEPS)),
41     },
42
43     $mymeta_works ? (BUILD_REQUIRES => \%TEST_DEPS) : (),
44
45     META_MERGE => {
46         'meta-spec' => { version => 2 },
47         dynamic_config => 0,
48         resources => {
49             # GitHub mirrors from Shadowcat. We list it so we can get pull requests.
50             # The canonical repo is:
51             # r/o: git://git.shadowcat.co.uk/p5sagit/Devel-Declare.git
52             # r/w: p5sagit@git.shadowcat.co.uk:Devel-Declare.git
53             # web: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/Devel-Declare.git
54             repository => {
55                 url => 'https://github.com/p5sagit/Devel-Declare.git',
56                 web => 'https://github.com/p5sagit/Devel-Declare',
57                 type => 'git',
58             },
59             bugtracker => {
60                 mailto => 'bug-Devel-Declare@rt.cpan.org',
61                 web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Devel-Declare',
62             },
63         },
64         x_contributors => [ # manually added, from git shortlog -e -s -n
65             'Florian Ragwitz <rafl@debian.org>',
66             'Matt S Trout <mst@shadowcat.co.uk>',
67             'Karen Etheridge <ether@cpan.org>',
68             'Zefram <zefram@fysh.org>',
69             'Rhesa Rozendaal <rhesa@cpan.org>',
70             'Ash Berlin <ash@cpan.org>',
71             'Chia-liang Kao <clkao@clkao.org>',
72             'Marcus Ramberg <marcus@nordaaker.com>',
73             'Christopher Nehren <apeiron@cpan.org>',
74             'Yuval Kogman <nothingmuch@woobling.org>',
75             'Cory Watson <gphat@cpan.org>',
76             'Alexandr Ciornii <alexchorny@gmail.com>',
77             'Father Chrysostomos <sprout@cpan.org>',
78             'Graham Knop <haarg@haarg.org>',
79             'Matthew Horsfall <WolfSage@cpan.org>',
80             'Nick Perez <nperez@cpan.org>',
81             'Yanick Champoux <yanick@babyl.dyndns.org>',
82         ],
83         x_deprecated => 1,
84     },
85
86     C => [ 'Declare.c' ],
87     XS => { 'Declare.xs' => 'Declare.c' },
88     depend => { '$(OBJECT)' => 'stolen_chunk_of_toke.c' },
89
90     $pkg->get_makefile_vars,
91 );
92