Makefile.PL

filter: Statementstmt n/a Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« blib/lib/ExtUtils/Packlist.pm ↑ Summary
1 BEGIN { require 5.006; }
2 use strict;
3  
4 use lib qw(lib); # use ourself if possible not the existing stuff.
5  
6 # On Win32 things work better if Win32API::File is available.
7 # Activestate builds have it by default, but the core distro doesn't
8 # so we recommend it on Win32.
9 #
10 # * BUT *
11 #
12 # We can't recommend it on the release system as it then goes in the YAML.pl
13 # and then non-Win32 CPAN clients think they need it get upset when it fails
14 # to build on their system.
15 #
16 # Until CPAN and Module::Build and the other infrastructure has a better
17 # way to deal with this we assume UNIX when building a release.
18 #
19 # The pre-build stage will moan on Win32 anyway.
20  
21 my $Recommend_Win32API_File = $ENV{USERNAME} ne 'demerphq'
22 && ($^O eq 'MSWin32' || $^O eq 'cygwin');
23  
24 use ExtUtils::MakeMaker;
25  
26 WriteMakefile1(
27 LICENSE => 'perl',
28 #BUILD_REQUIRES => {
29 #},
30  
31 NAME => 'ExtUtils::Install',
32 AUTHOR => 'demerphq <yves@cpan.org>',
33 VERSION_FROM => 'lib/ExtUtils/Install.pm',
34 ABSTRACT => 'install files from here to there',
35  
36 # This causes failure to locate ABSTRACT with DISTNAME below set to different name
37 # ABSTRACT_FROM => 'lib/ExtUtils/Install.pm',
38  
39 DISTNAME => 'ExtUtils-Install',
40 PL_FILES => {}, # Avoid auto extracting 'Build.PL'
41  
42 PREREQ_PM => {
43 # 'vars' => 0,
44  
45 # 'AutoSplit' => 0,
46 # 'Exporter' => 0,
47  
48 'Carp' => 0,
49 # 'Config' => 0,
50  
51 'Cwd' => 0,
52  
53 'File::Basename' => 0,
54 'File::Compare' => 0,
55 'File::Copy' => 0,
56 'File::Find' => 0,
57 'File::Path' => 0,
58 'File::Spec' => 0,
59 'File::Temp' => 0,
60  
61 ($^O eq 'VMS' ? ('VMS::Filespec' => 0) : ()),
62 ($Recommend_Win32API_File ? ('Win32API::File' => 0) : ()),
63  
64 'ExtUtils::MakeMaker' => 0,
65 'Test::More' => '0.47', # Tested with perl 5.6.2
66 },
67  
68 MIN_PERL_VERSION => '5.006',
69 INSTALLDIRS => ( $] < 5.012 ? 'perl' : 'site' ),
70  
71 #NO_META => 1,
72  
73 dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
74 clean => { FILES => 'ExtUtils-Install-*' },
75  
76 META_MERGE => {
77 resources => {
78 license => 'http://dev.perl.org/licenses/',
79 homepage => 'https://metacpan.org/release/ExtUtils-Install',
80 bugtracker => 'https://rt.cpan.org/NoAuth/Bugs.html?Dist=ExtUtils-Install',
81 repository => 'https://github.com/Perl-Toolchain-Gang/ExtUtils-Install',
82 },
83 },
84 );
85  
86 {
87 package MY;
88  
89 my($lib);
90 BEGIN {
91 $lib = File::Spec->canonpath('lib/');
92 }
93  
94 # Make sure PERLRUN uses the MakeMaker about to be installed
95 # and not the currently installed one.
96 sub init_PERL {
97 my($self) = shift;
98 $self->SUPER::init_PERL;
99 $self->{ABSPERLRUN} .= qq{ "-I$lib"};
100 $self->{PERLRUN} .= qq{ "-I$lib"};
101 $self->{FULLPERLRUN} .= qq{ "-I$lib"};
102 }
103 }
104  
105 sub WriteMakefile1 { #Written by Alexandr Ciornii, version 0.21. Added by eumm-upgrade.
106 my %params=@_;
107 my $eumm_version=$ExtUtils::MakeMaker::VERSION;
108 $eumm_version=eval $eumm_version;
109 die "EXTRA_META is deprecated" if exists $params{EXTRA_META};
110 die "License not specified" if not exists $params{LICENSE};
111 if ($params{BUILD_REQUIRES} and $eumm_version < 6.5503) {
112 #EUMM 6.5502 has problems with BUILD_REQUIRES
113 $params{PREREQ_PM}={ %{$params{PREREQ_PM} || {}} , %{$params{BUILD_REQUIRES}} };
114 delete $params{BUILD_REQUIRES};
115 }
116 delete $params{CONFIGURE_REQUIRES} if $eumm_version < 6.52;
117 delete $params{MIN_PERL_VERSION} if $eumm_version < 6.48;
118 delete $params{META_MERGE} if $eumm_version < 6.46;
119 delete $params{META_ADD} if $eumm_version < 6.46;
120 delete $params{LICENSE} if $eumm_version < 6.31;
121 delete $params{AUTHOR} if $] < 5.005;
122 delete $params{ABSTRACT_FROM} if $] < 5.005;
123 delete $params{BINARY_LOCATION} if $] < 5.005;
124  
125 WriteMakefile(%params);
126 }
« blib/lib/ExtUtils/Packlist.pm ↑ Summary