Alien-SDL

 view release on metacpan or  search on metacpan

inc/My/Builder.pm  view on Meta::CPAN

  # as we want to wipe 'sharedir' during 'Build clean' we has
  # to recreate 'sharedir' at this point if it does not exist

  my $bp = $self->notes('build_params');
  die "###ERROR### Cannot continue build_params not defined" unless defined($bp);

  printf("Build option used:\n\t%s\n", $bp->{title} || 'n.a.');

  mkdir 'sharedir' unless(-d 'sharedir');
  $self->add_to_cleanup('sharedir');
  $self->SUPER::ACTION_build;
}


sub ACTION_install
{
 my $self = shift;
 my $sharedir = '';

 $sharedir = eval {File::ShareDir::dist_dir('Alien-SDL')} || '';

 if ( -d $sharedir )
 {
   print "Removing the old $sharedir \n";
   remove_tree($sharedir);
   make_path($sharedir);
 }

 $self->SUPER::ACTION_install;
}

sub ACTION_code {
  my $self = shift;

  my $bp = $self->notes('build_params');
  die "###ERROR### Cannot continue build_params not defined" unless defined($bp);

  # check marker
  if (! $self->check_build_done_marker) {

inc/My/Builder.pm  view on Meta::CPAN

      $self->clean_dir($build_out);
      $self->build_binaries($build_out, $build_src);
      $self->set_config_data($build_out);
      $self->set_ld_config($build_out);
    }

    # mark sucessfully finished build
    $self->touch_build_done_marker;
  }

  $self->SUPER::ACTION_code;
}

sub fetch_file {
  my ($self, $url, $sha1sum, $download) = @_;
  die "###ERROR### _fetch_file undefined url\n"     unless @{$url}[0];
  die "###ERROR### _fetch_file undefined sha1sum\n" unless $sha1sum;

  # setting http_proxy environment var if we are within CPAN and this information is available
  if(!$ENV{http_proxy} && $ENV{PERL5_CPAN_IS_RUNNING}) {
    if(eval('require CPAN::Config; 1') && $CPAN::Config->{http_proxy}) {



( run in 1.155 second using v1.01-cache-2.11-cpan-49f99fa48dc )