| 1 | #line 1 |
| 2 | package Module::Install::Makefilescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/; |
| 3 | |
| 4 | use strictscip-perl cpan Icon-FamFamFam-Silk 0.002001003 strict/ 'vars'; |
| 5 | use ExtUtils::MakeMakerscip-perl cpan Icon-FamFamFam-Silk 0.002001003 ExtUtils/MakeMaker/ (); |
| 6 | use Module::Install::Basescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Base/ (); |
| 7 | use Fcntlscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Fcntl/ qw/:flock :seek/; |
| 8 | |
| 9 | use varsscip-perl cpan Icon-FamFamFam-Silk 0.002001003 vars/ qw{$VERSION @ISA $ISCORE}; |
| 10 | BEGIN { |
| 11 | $VERSIONscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/$VERSION. = '1.02'; |
| 12 | @ISAscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/`@ISA`. = 'Module::Install::Base'; |
| 13 | $ISCOREscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/$ISCORE. = 1; |
| 14 | } |
| 15 | |
| 16 | sub Makefilescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/Makefile(). { $_scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/`@_`.[0] } |
| 17 | |
| 18 | my %seen = (); |
| 19 | |
| 20 | sub promptscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/prompt(). { |
| 21 | shiftscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/shift().; |
| 22 | |
| 23 | # Infinite loop protection |
| 24 | my @c = callerscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/caller().(); |
| 25 | if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) { |
| 26 | diescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/die(). "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])"; |
| 27 | } |
| 28 | |
| 29 | # In automated testing or non-interactive session, always use defaults |
| 30 | if ( ($ENVscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/`%ENV`.{AUTOMATED_TESTING} or -! -t STDIN) and ! $ENVscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/`%ENV`.{PERL_MM_USE_DEFAULT} ) { |
| 31 | local $ENVscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/`%ENV`.{PERL_MM_USE_DEFAULT} = 1; |
| 32 | goto &ExtUtils::MakeMaker::promptscip-perl cpan Icon-FamFamFam-Silk 0.002001003 ExtUtils/MakeMaker/prompt().; |
| 33 | } else { |
| 34 | goto &ExtUtils::MakeMaker::promptscip-perl cpan Icon-FamFamFam-Silk 0.002001003 ExtUtils/MakeMaker/prompt().; |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | # Store a cleaned up version of the MakeMaker version, |
| 39 | # since we need to behave differently in a variety of |
| 40 | # ways based on the MM version. |
| 41 | my $makemaker = eval $ExtUtils::MakeMaker::VERSIONscip-perl cpan Icon-FamFamFam-Silk 0.002001003 ExtUtils/MakeMaker/$VERSION.; |
| 42 | |
| 43 | # If we are passed a param, do a "newer than" comparison. |
| 44 | # Otherwise, just return the MakeMaker version. |
| 45 | sub makemakerscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/makemaker(). { |
| 46 | ( @_scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/`@_`. < 2 or $makemaker >= eval($_scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/`@_`.[1]) ) ? $makemaker : 0 |
| 47 | } |
| 48 | |
| 49 | # Ripped from ExtUtils::MakeMaker 6.56, and slightly modified |
| 50 | # as we only need to know here whether the attribute is an array |
| 51 | # or a hash or something else (which may or may not be appendable). |
| 52 | my %makemaker_argtype = ( |
| 53 | C => 'ARRAY', |
| 54 | CONFIG => 'ARRAY', |
| 55 | # CONFIGURE => 'CODE', # ignore |
| 56 | DIR => 'ARRAY', |
| 57 | DL_FUNCS => 'HASH', |
| 58 | DL_VARS => 'ARRAY', |
| 59 | EXCLUDE_EXT => 'ARRAY', |
| 60 | EXE_FILES => 'ARRAY', |
| 61 | FUNCLIST => 'ARRAY', |
| 62 | H => 'ARRAY', |
| 63 | IMPORTS => 'HASH', |
| 64 | INCLUDE_EXT => 'ARRAY', |
| 65 | LIBS => 'ARRAY', # ignore '' |
| 66 | MAN1PODS => 'HASH', |
| 67 | MAN3PODS => 'HASH', |
| 68 | META_ADD => 'HASH', |
| 69 | META_MERGE => 'HASH', |
| 70 | PL_FILES => 'HASH', |
| 71 | PM => 'HASH', |
| 72 | PMLIBDIRS => 'ARRAY', |
| 73 | PMLIBPARENTDIRS => 'ARRAY', |
| 74 | PREREQ_PM => 'HASH', |
| 75 | CONFIGURE_REQUIRES => 'HASH', |
| 76 | SKIP => 'ARRAY', |
| 77 | TYPEMAPS => 'ARRAY', |
| 78 | XS => 'HASH', |
| 79 | # VERSION => ['version',''], # ignore |
| 80 | # _KEEP_AFTER_FLUSH => '', |
| 81 | |
| 82 | clean => 'HASH', |
| 83 | depend => 'HASH', |
| 84 | dist => 'HASH', |
| 85 | dynamic_lib=> 'HASH', |
| 86 | linkext => 'HASH', |
| 87 | macro => 'HASH', |
| 88 | postamble => 'HASH', |
| 89 | realclean => 'HASH', |
| 90 | test => 'HASH', |
| 91 | tool_autosplit => 'HASH', |
| 92 | |
| 93 | # special cases where you can use makemaker_append |
| 94 | CCFLAGS => 'APPENDABLE', |
| 95 | DEFINE => 'APPENDABLE', |
| 96 | INC => 'APPENDABLE', |
| 97 | LDDLFLAGS => 'APPENDABLE', |
| 98 | LDFROM => 'APPENDABLE', |
| 99 | ); |
| 100 | |
| 101 | sub makemaker_argsscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/makemaker_args(). { |
| 102 | my ($self, %new_args) = @_scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/`@_`.; |
| 103 | my $args = ( $self->{makemaker_args} ||= {} ); |
| 104 | foreach my $key (keysscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/keys(). %new_args) { |
| 105 | if ($makemaker_argtype{$key}) { |
| 106 | if ($makemaker_argtype{$key} eq 'ARRAY') { |
| 107 | $args->{$key} = [] unless definedscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/defined(). $args->{$key}; |
| 108 | unless (refscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/ref(). $args->{$key} eq 'ARRAY') { |
| 109 | $args->{$key} = [$args->{$key}] |
| 110 | } |
| 111 | pushscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/push(). @{$args->{$key}}, |
| 112 | refscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/ref(). $new_args{$key} eq 'ARRAY' |
| 113 | ? @{$new_args{$key}} |
| 114 | : $new_args{$key}; |
| 115 | } |
| 116 | elsif ($makemaker_argtype{$key} eq 'HASH') { |
| 117 | $args->{$key} = {} unless definedscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/defined(). $args->{$key}; |
| 118 | foreach my $skey (keysscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/keys(). %{ $new_args{$key} }) { |
| 119 | $args->{$key}{$skey} = $new_args{$key}{$skey}; |
| 120 | } |
| 121 | } |
| 122 | elsif ($makemaker_argtype{$key} eq 'APPENDABLE') { |
| 123 | $self->makemaker_appendscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/makemaker_append().($key => $new_args{$key}); |
| 124 | } |
| 125 | } |
| 126 | else { |
| 127 | if (definedscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/defined(). $args->{$key}) { |
| 128 | warnscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/warn(). qq{MakeMaker attribute "$key" is overriden; use "makemaker_append" to append values\n}; |
| 129 | } |
| 130 | $args->{$key} = $new_args{$key}; |
| 131 | } |
| 132 | } |
| 133 | return $args; |
| 134 | } |
| 135 | |
| 136 | # For mm args that take multiple space-seperated args, |
| 137 | # append an argument to the current list. |
| 138 | sub makemaker_appendscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/makemaker_append(). { |
| 139 | my $self = shiftscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/shift().; |
| 140 | my $name = shiftscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/shift().; |
| 141 | my $args = $self->makemaker_argsscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/makemaker_args().; |
| 142 | $args->{$name} = definedscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/defined(). $args->{$name} |
| 143 | ? joinscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/join().( ' ', $args->{$name}, @_scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/`@_`. ) |
| 144 | : joinscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/join().( ' ', @_scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/`@_`. ); |
| 145 | } |
| 146 | |
| 147 | sub build_subdirsscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/build_subdirs(). { |
| 148 | my $self = shiftscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/shift().; |
| 149 | my $subdirs = $self->makemaker_argsscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/makemaker_args().->{DIR} ||= []; |
| 150 | for my $subdir (@_scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/`@_`.) { |
| 151 | pushscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/push(). @$subdirs, $subdir; |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | sub clean_filesscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/clean_files(). { |
| 156 | my $self = shiftscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/shift().; |
| 157 | my $clean = $self->makemaker_argsscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/makemaker_args().->{clean} ||= {}; |
| 158 | %$clean = ( |
| 159 | %$clean, |
| 160 | FILES => joinscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/join(). ' ', grepscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/grep(). { lengthscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/length(). $_scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/$_. } ($clean->{FILES} || (), @_scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/`@_`.), |
| 161 | ); |
| 162 | } |
| 163 | |
| 164 | sub realclean_filesscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/realclean_files(). { |
| 165 | my $self = shiftscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/shift().; |
| 166 | my $realclean = $self->makemaker_argsscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/makemaker_args().->{realclean} ||= {}; |
| 167 | %$realclean = ( |
| 168 | %$realclean, |
| 169 | FILES => joinscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/join(). ' ', grepscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/grep(). { lengthscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/length(). $_scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/$_. } ($realclean->{FILES} || (), @_scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/`@_`.), |
| 170 | ); |
| 171 | } |
| 172 | |
| 173 | sub libsscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/libs(). { |
| 174 | my $self = shiftscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/shift().; |
| 175 | my $libs = refscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/ref(). $_scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/`@_`.[0] ? shiftscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/shift(). : [ shiftscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/shift(). ]; |
| 176 | $self->makemaker_argsscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/makemaker_args().( LIBS => $libs ); |
| 177 | } |
| 178 | |
| 179 | sub incscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/inc(). { |
| 180 | my $self = shiftscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/shift().; |
| 181 | $self->makemaker_argsscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/makemaker_args().( INC => shiftscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/shift(). ); |
| 182 | } |
| 183 | |
| 184 | sub _wanted_tscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/_wanted_t(). { |
| 185 | } |
| 186 | |
| 187 | sub tests_recursivescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/tests_recursive(). { |
| 188 | my $self = shiftscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/shift().; |
| 189 | my $dir = shiftscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/shift(). || 't'; |
| 190 | unless ( -d $dir ) { |
| 191 | diescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/die(). "tests_recursive dir '$dir' does not exist"; |
| 192 | } |
| 193 | my %tests = mapscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/map(). { $_scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/$_. => 1 } splitscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/split(). / /, ($self->testsscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/tests(). || ''); |
| 194 | requirescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/require(). File::Find; |
| 195 | File::Find::findscip-perl cpan Icon-FamFamFam-Silk 0.002001003 File/Find/find().( |
| 196 | sub { /\.t$/ and -f $_scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/$_. and $tests{"$File::Find::dir/*.t"} = 1 }, |
| 197 | $dir |
| 198 | ); |
| 199 | $self->testsscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/tests().( joinscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/join(). ' ', sortscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/sort(). keysscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/keys(). %tests ); |
| 200 | } |
| 201 | |
| 202 | sub writescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/write(). { |
| 203 | my $self = shiftscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/shift().; |
| 204 | diescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/die(). "&Makefile->write() takes no arguments\n" if @_scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/`@_`.; |
| 205 | |
| 206 | # Check the current Perl version |
| 207 | my $perl_version = $self->perl_versionscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/perl_version().; |
| 208 | if ( $perl_version ) { |
| 209 | eval "use $perl_version; 1" |
| 210 | or diescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/die(). "ERROR: perl: Version $] is installed, " |
| 211 | . "but we need version >= $perl_version"; |
| 212 | } |
| 213 | |
| 214 | # Make sure we have a new enough MakeMaker |
| 215 | requirescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/require(). ExtUtils::MakeMaker; |
| 216 | |
| 217 | if ( $perl_version and $self->_cmpscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/_cmp().($perl_version, '5.006') >= 0 ) { |
| 218 | # MakeMaker can complain about module versions that include |
| 219 | # an underscore, even though its own version may contain one! |
| 220 | # Hence the funny regexp to get rid of it. See RT #35800 |
| 221 | # for details. |
| 222 | my $v = $ExtUtils::MakeMaker::VERSIONscip-perl cpan Icon-FamFamFam-Silk 0.002001003 ExtUtils/MakeMaker/$VERSION. =~ /^(\d+\.\d+)/; |
| 223 | $self->build_requiresscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/build_requires().( 'ExtUtils::MakeMaker' => $v ); |
| 224 | $self->configure_requiresscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/configure_requires().( 'ExtUtils::MakeMaker' => $v ); |
| 225 | } else { |
| 226 | # Allow legacy-compatibility with 5.005 by depending on the |
| 227 | # most recent EU:MM that supported 5.005. |
| 228 | $self->build_requiresscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/build_requires().( 'ExtUtils::MakeMaker' => 6.42 ); |
| 229 | $self->configure_requiresscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/configure_requires().( 'ExtUtils::MakeMaker' => 6.42 ); |
| 230 | } |
| 231 | |
| 232 | # Generate the MakeMaker params |
| 233 | my $args = $self->makemaker_argsscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/makemaker_args().; |
| 234 | $args->{DISTNAME} = $self->namescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/name().; |
| 235 | $args->{NAME} = $self->module_namescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/module_name(). || $self->namescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/name().; |
| 236 | $args->{NAME} =~ s/-/::/g; |
| 237 | $args->{VERSION} = $self->versionscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/version(). or diescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/die(). <<'EOT'; |
| 238 | ERROR: Can't determine distribution version. Please specify it |
| 239 | explicitly via 'version' in Makefile.PL, or set a valid $VERSION |
| 240 | in a module, and provide its file path via 'version_from' (or |
| 241 | 'all_from' if you prefer) in Makefile.PL. |
| 242 | EOT |
| 243 | |
| 244 | $DB::singlescip-perl cpan Icon-FamFamFam-Silk 0.002001003 DB/$single. = 1; |
| 245 | if ( $self->testsscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/tests(). ) { |
| 246 | my @tests = splitscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/split(). ' ', $self->testsscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/tests().; |
| 247 | my %seen; |
| 248 | $args->{test} = { |
| 249 | TESTS => (joinscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/join(). ' ', grepscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/grep(). {!$seen{$_scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/$_.}++} @tests), |
| 250 | }; |
| 251 | } elsif ( $Module::Install::ExtraTests::use_extratestsscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/ExtraTests/$use_extratests. ) { |
| 252 | # Module::Install::ExtraTests doesn't set $self->tests and does its own tests via harness. |
| 253 | # So, just ignore our xt tests here. |
| 254 | } elsif ( -d 'xt' and ($Module::Install::AUTHORscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/$AUTHOR. or $ENVscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/`%ENV`.{RELEASE_TESTING}) ) { |
| 255 | $args->{test} = { |
| 256 | TESTS => joinscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/join().( ' ', mapscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/map(). { "$_/*.t" } grepscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/grep(). { -d $_scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/$_. } qw{ t xt } ), |
| 257 | }; |
| 258 | } |
| 259 | if ( $]scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/`$]`. >= 5.005 ) { |
| 260 | $args->{ABSTRACT} = $self->abstractscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/abstract().; |
| 261 | $args->{AUTHOR} = joinscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/join(). ', ', @{$self->authorscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/author(). || []}; |
| 262 | } |
| 263 | if ( $self->makemakerscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/makemaker().(6.10) ) { |
| 264 | $args->{NO_META} = 1; |
| 265 | #$args->{NO_MYMETA} = 1; |
| 266 | } |
| 267 | if ( $self->makemakerscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/makemaker().(6.17) and $self->signscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/sign(). ) { |
| 268 | $args->{SIGN} = 1; |
| 269 | } |
| 270 | unless ( $self->is_adminscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/is_admin(). ) { |
| 271 | deletescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/delete(). $args->{SIGN}; |
| 272 | } |
| 273 | if ( $self->makemakerscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/makemaker().(6.31) and $self->licensescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/license(). ) { |
| 274 | $args->{LICENSE} = $self->licensescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/license().; |
| 275 | } |
| 276 | |
| 277 | my $prereq = ($args->{PREREQ_PM} ||= {}); |
| 278 | %$prereq = ( %$prereq, |
| 279 | mapscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/map(). { @$_scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/$_. } # flatten [module => version] |
| 280 | mapscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/map(). { @$_scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/$_. } |
| 281 | grepscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/grep(). $_scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/$_., |
| 282 | ($self->requiresscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/requires().) |
| 283 | ); |
| 284 | |
| 285 | # Remove any reference to perl, PREREQ_PM doesn't support it |
| 286 | deletescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/delete(). $args->{PREREQ_PM}->{perl}; |
| 287 | |
| 288 | # Merge both kinds of requires into BUILD_REQUIRES |
| 289 | my $build_prereq = ($args->{BUILD_REQUIRES} ||= {}); |
| 290 | %$build_prereq = ( %$build_prereq, |
| 291 | mapscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/map(). { @$_scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/$_. } # flatten [module => version] |
| 292 | mapscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/map(). { @$_scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/$_. } |
| 293 | grepscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/grep(). $_scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/$_., |
| 294 | ($self->configure_requiresscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/configure_requires()., $self->build_requiresscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/build_requires().) |
| 295 | ); |
| 296 | |
| 297 | # Remove any reference to perl, BUILD_REQUIRES doesn't support it |
| 298 | deletescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/delete(). $args->{BUILD_REQUIRES}->{perl}; |
| 299 | |
| 300 | # Delete bundled dists from prereq_pm, add it to Makefile DIR |
| 301 | my $subdirs = ($args->{DIR} || []); |
| 302 | if ($self->bundlesscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/bundles().) { |
| 303 | my %processed; |
| 304 | foreach my $bundle (@{ $self->bundlesscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/bundles(). }) { |
| 305 | my ($mod_name, $dist_dir) = @$bundle; |
| 306 | deletescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/delete(). $prereq->{$mod_name}; |
| 307 | $dist_dir = File::Basename::basenamescip-perl cpan Icon-FamFamFam-Silk 0.002001003 File/Basename/basename().($dist_dir); # dir for building this module |
| 308 | if (not existsscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/exists(). $processed{$dist_dir}) { |
| 309 | if (-d $dist_dir) { |
| 310 | # List as sub-directory to be processed by make |
| 311 | pushscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/push(). @$subdirs, $dist_dir; |
| 312 | } |
| 313 | # Else do nothing: the module is already present on the system |
| 314 | $processed{$dist_dir} = undef; |
| 315 | } |
| 316 | } |
| 317 | } |
| 318 | |
| 319 | unless ( $self->makemakerscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/makemaker().('6.55_03') ) { |
| 320 | %$prereq = (%$prereq,%$build_prereq); |
| 321 | deletescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/delete(). $args->{BUILD_REQUIRES}; |
| 322 | } |
| 323 | |
| 324 | if ( my $perl_version = $self->perl_versionscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/perl_version(). ) { |
| 325 | eval "use $perl_version; 1" |
| 326 | or diescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/die(). "ERROR: perl: Version $] is installed, " |
| 327 | . "but we need version >= $perl_version"; |
| 328 | |
| 329 | if ( $self->makemakerscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/makemaker().(6.48) ) { |
| 330 | $args->{MIN_PERL_VERSION} = $perl_version; |
| 331 | } |
| 332 | } |
| 333 | |
| 334 | if ($self->installdirsscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/installdirs().) { |
| 335 | warnscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/warn(). qq{old INSTALLDIRS (probably set by makemaker_args) is overriden by installdirs\n} if $args->{INSTALLDIRS}; |
| 336 | $args->{INSTALLDIRS} = $self->installdirsscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/installdirs().; |
| 337 | } |
| 338 | |
| 339 | my %args = mapscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/map(). { |
| 340 | ( $_scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/$_. => $args->{$_scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/$_.} ) } grepscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/grep(). {definedscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/defined().($args->{$_scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/$_.} ) |
| 341 | } keysscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/keys(). %$args; |
| 342 | |
| 343 | my $user_preop = deletescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/delete(). $args{dist}->{PREOP}; |
| 344 | if ( my $preop = $self->adminscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/admin().->preopscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/preop().($user_preop) ) { |
| 345 | foreach my $key ( keysscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/keys(). %$preop ) { |
| 346 | $args{dist}->{$key} = $preop->{$key}; |
| 347 | } |
| 348 | } |
| 349 | |
| 350 | my $mm = ExtUtils::MakeMaker::WriteMakefilescip-perl cpan Icon-FamFamFam-Silk 0.002001003 ExtUtils/MakeMaker/WriteMakefile().(%args); |
| 351 | $self->fix_up_makefilescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/fix_up_makefile().($mm->{FIRST_MAKEFILE} || 'Makefile'); |
| 352 | } |
| 353 | |
| 354 | sub fix_up_makefilescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/fix_up_makefile(). { |
| 355 | my $self = shiftscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/shift().; |
| 356 | my $makefile_name = shiftscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/shift().; |
| 357 | my $top_class = refscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/ref().($self->_topscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/_top().) || ''; |
| 358 | my $top_version = $self->_topscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/_top().->VERSIONscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/VERSION(). || ''; |
| 359 | |
| 360 | my $preamble = $self->preamblescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/preamble(). |
| 361 | ? "# Preamble by $top_class $top_version\n" |
| 362 | . $self->preamblescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/preamble(). |
| 363 | : ''; |
| 364 | my $postamble = "# Postamble by $top_class $top_version\n" |
| 365 | . ($self->postamblescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/postamble(). || ''); |
| 366 | |
| 367 | local *MAKEFILE; |
| 368 | openscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/open(). MAKEFILE, "+< $makefile_name" or diescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/die(). "fix_up_makefile: Couldn't open $makefile_name: $!"; |
| 369 | eval { flockscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/flock(). MAKEFILE, LOCK_EX }; |
| 370 | my $makefile = do { local $/scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/`$/`.; <MAKEFILE> }; |
| 371 | |
| 372 | $makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /; |
| 373 | $makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g; |
| 374 | $makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g; |
| 375 | $makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m; |
| 376 | $makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m; |
| 377 | |
| 378 | # Module::Install will never be used to build the Core Perl |
| 379 | # Sometimes PERL_LIB and PERL_ARCHLIB get written anyway, which breaks |
| 380 | # PREFIX/PERL5LIB, and thus, install_share. Blank them if they exist |
| 381 | $makefile =~ s/^PERL_LIB = .+/PERL_LIB =/m; |
| 382 | #$makefile =~ s/^PERL_ARCHLIB = .+/PERL_ARCHLIB =/m; |
| 383 | |
| 384 | # Perl 5.005 mentions PERL_LIB explicitly, so we have to remove that as well. |
| 385 | $makefile =~ s/(\"?)-I\$\(PERL_LIB\)\1//g; |
| 386 | |
| 387 | # XXX - This is currently unused; not sure if it breaks other MM-users |
| 388 | # $makefile =~ s/^pm_to_blib\s+:\s+/pm_to_blib :: /mg; |
| 389 | |
| 390 | seekscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/seek(). MAKEFILE, 0, SEEK_SET; |
| 391 | truncatescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/truncate(). MAKEFILE, 0; |
| 392 | print MAKEFILE "$preamble$makefile$postamble" or diescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/die(). $!scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/`$!`.; |
| 393 | close MAKEFILE or diescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/die(). $!scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/`$!`.; |
| 394 | |
| 395 | 1; |
| 396 | } |
| 397 | |
| 398 | sub preamblescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/preamble(). { |
| 399 | my ($self, $text) = @_scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/`@_`.; |
| 400 | $self->{preamble} = $text . $self->{preamble} if definedscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/defined(). $text; |
| 401 | $self->{preamble}; |
| 402 | } |
| 403 | |
| 404 | sub postamblescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/postamble(). { |
| 405 | my ($self, $text) = @_scip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/`@_`.; |
| 406 | $self->{postamble} ||= $self->adminscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/admin().->postamblescip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/postamble().; |
| 407 | $self->{postamble} .= $text if definedscip-perl cpan Icon-FamFamFam-Silk 0.002001003 Module/Install/Makefile/defined(). $text; |
| 408 | $self->{postamble} |
| 409 | } |
| 410 | |
| 411 | 1; |
| 412 | |
| 413 | __END__ |
| 414 | |
| 415 | #line 541 |