1#!/usr/bin/perl
2
3use strict;
4use warnings;
5use ExtUtils::MakeMaker;
6
7WriteMakefile1(
8
9    NAME            => 'PAR',
10    VERSION_FROM    => 'lib/PAR.pm',
11    ABSTRACT_FROM   => 'lib/PAR.pm',
12    LICENSE         => 'perl_5',
13    AUTHOR          => [ 'Audrey Tang <cpan@audreyt.org>' ],
14
15    MIN_PERL_VERSION => '5.008001',
16    PREREQ_PM       => {
17        'File::Temp'     => '0.05',
18        'Compress::Zlib' => ($^O eq 'MSWin32') ? '1.16' : '1.30',
19        'Archive::Zip'   => '1.00',
20        'PAR::Dist'      => '0.32',
21        'AutoLoader'     => '5.66_02',
22        'Digest::SHA'    => '5.45',
23    },
24    TEST_REQUIRES   => {
25      'Test::More'       => 0,
26    },
27
28    META_MERGE      => {
29      'meta-spec'        => { version => 2 },
30      resources          => {
31        repository  => {
32          type => 'git',
33          url  => 'git://github.com/rschupp/PAR.git',
34          web  => 'https://github.com/rschupp/PAR',
35        },
36        MailingList => 'mailto:par@perl.org',
37        bugtracker => { web => 'https://github.com/rschupp/PAR/issues' },
38      },
39    },
40
41    clean           => { FILES => 't/hello.par' },
42);
43
44
45sub MY::postamble {
46    return <<'...';
47pure_all :: t/hello.par
48t/hello.par:
49	$(PERL) t/gen-hello-par.pl
50...
51}
52
53sub WriteMakefile1 {  #Compatibility code for old versions of EU::MM. Written by Alexandr Ciornii, version 2. Added by eumm-upgrade.
54    my %params=@_;
55    my $eumm_version=$ExtUtils::MakeMaker::VERSION;
56    $eumm_version=eval $eumm_version;
57    die "EXTRA_META is deprecated" if exists $params{EXTRA_META};
58    die "License not specified" if not exists $params{LICENSE};
59    if ($params{AUTHOR} and ref($params{AUTHOR}) eq 'ARRAY' and $eumm_version < 6.5705) {
60        $params{META_ADD}->{author}=$params{AUTHOR};
61        $params{AUTHOR}=join(', ',@{$params{AUTHOR}});
62    }
63    if ($params{TEST_REQUIRES} and $eumm_version < 6.64) {
64        $params{BUILD_REQUIRES}={ %{$params{BUILD_REQUIRES} || {}} , %{$params{TEST_REQUIRES}} };
65        delete $params{TEST_REQUIRES};
66    }
67    if ($params{BUILD_REQUIRES} and $eumm_version < 6.5503) {
68        #EUMM 6.5502 has problems with BUILD_REQUIRES
69        $params{PREREQ_PM}={ %{$params{PREREQ_PM} || {}} , %{$params{BUILD_REQUIRES}} };
70        delete $params{BUILD_REQUIRES};
71    }
72    delete $params{CONFIGURE_REQUIRES} if $eumm_version < 6.52;
73    delete $params{MIN_PERL_VERSION} if $eumm_version < 6.48;
74    delete $params{META_MERGE} if $eumm_version < 6.46;
75    delete $params{META_ADD} if $eumm_version < 6.46;
76    delete $params{LICENSE} if $eumm_version < 6.31;
77
78    WriteMakefile(%params);
79}
80
81