File: Makefile.PL

package info (click to toggle)
libyaml-appconfig-perl 0.19-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 172 kB
  • ctags: 24
  • sloc: perl: 203; makefile: 2
file content (69 lines) | stat: -rw-r--r-- 1,891 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
use strict;
use warnings;
use ExtUtils::MakeMaker;

my %WriteMakefileArgs = (
    NAME         => 'YAML::AppConfig',
    AUTHOR       => 'Matthew O\'Connor <matthew@canonical.org>',
    ABSTRACT_FROM => 'lib/YAML/AppConfig.pm',
    VERSION_FROM => 'lib/YAML/AppConfig.pm',
    MIN_PERL_VERSION => '5.6.0',
    PREREQ_PM    => {
        get_yamls(),
        'strict'     => 0,
        'warnings'   => 0,
        'Storable'   => 0,
        'Carp'       => 0,
    },
    TEST_REQUIRES => {
        'Test::More' => 0,
    },
    LICENSE => 'perl_5',
    META_MERGE => {
        'meta-spec' => { version => 2 },
        resources => {
            repository => {
                type => 'git',
                url => 'git://github.com/Xaerxess/YAML-AppConfig.git',
                web => 'https://github.com/Xaerxess/YAML-AppConfig',
            },
            bugtracker => {
                web => 'https://rt.cpan.org/Dist/Display.html?Name=YAML-AppConfig',
            },
        },
    },
    test => {
        TESTS => "t/*.t"
    },
);

sub get_yamls {
    my @yamls;
    for my $info (['YAML::Syck' => 0], [YAML => 0.38]) {
        eval "require $info->[0]; 0;";
        push @yamls, @$info unless $@;
    }
    die "YAML >= 0.38 or YAML::Syck >= 0 required.\n" unless @yamls;
    return @yamls;
}

unless (eval { ExtUtils::MakeMaker->VERSION(6.64) }) {
    my $test_requires = delete $WriteMakefileArgs{TEST_REQUIRES};
    if (eval { ExtUtils::MakeMaker->VERSION(6.5503) }) {
        $WriteMakefileArgs{BUILD_REQUIRES} = $test_requires;
    }
}

unless (eval { ExtUtils::MakeMaker->VERSION(6.48) }) {
    delete $WriteMakefileArgs{MIN_PERL_VERSION};
}

unless (eval { ExtUtils::MakeMaker->VERSION(6.46) }) {
    delete $WriteMakefileArgs{META_MERGE};
}

unless (eval { ExtUtils::MakeMaker->VERSION(6.31) }) {
    delete $WriteMakefileArgs{LICENSE};
}

WriteMakefile(%WriteMakefileArgs);