Changeset 81609
- Timestamp:
- 08/02/11 17:21:12 (4 years ago)
- File:
-
- 1 edited
-
contrib/cpan2port/cpan2port (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
contrib/cpan2port/cpan2port
r81457 r81609 119 119 my $dist = find_dist( $info->{dist_dir}, $info->{module}->get ) 120 120 or die "can't find dist"; 121 $$info{has_makefile_pl} = (-e "$dist/Makefile.PL"); 122 $$info{has_build_pl} = (-e "$dist/Build.PL"); 121 123 $$info{depends} = ( 122 124 -e "$dist/META.yml" … … 219 221 my $depends = ''; 220 222 my $build_depends = ''; 223 my $use_module_build = ''; 224 221 225 if ( exists $$info{depends} ) { 222 226 if ( my $check = $$info{checksums} ) { 223 227 my @hashes; 224 228 foreach my $key (keys %{ $check }) { push @hashes, "$key ".$$check{$key}; } 225 $checksums = 'checksums '.join(" \\\n".(' 'x12),@hashes);229 $checksums = 'checksums '.join(" \\\n".(' 'x20),@hashes); 226 230 } 227 231 … … 234 238 $depends = 'depends_lib-append '.join(" \\\n".(' 'x20),@depends); 235 239 } 236 237 240 } 241 if ( my $dep_ref = Huggy::depends_on($info, during=>"build_requires") ) { 242 my @depends = map { 243 MSG::warn "$$info{name} build_requires $_"; 244 'port:'.Huggy::from_port $_ 245 } keys %{ $dep_ref }; 246 if (@depends) { 247 $build_depends = 'depends_build-append '.join(" \\\n".(' 'x21),@depends); 248 } 249 250 } 251 } 252 253 # If no Makefile.PL is present, maybe we need use_module_build? 254 if (!($$info{has_makefile_pl})) { 255 if ($$info{has_build_pl}) { 256 $use_module_build = "perl5.use_module_build"; 257 } else { 258 MSG::warn "Didn't find either Makefile.PL or Build.PL"; 259 } 238 260 } 239 261 … … 274 296 $depends 275 297 $build_depends 298 $use_module_build 276 299 STOP 277 300
Note: See TracChangeset
for help on using the changeset viewer.

