Alien-IUP
view release on metacpan or search on metacpan
inc/My/Builder.pm view on Meta::CPAN
sub ACTION_install {
my $self = shift;
my $sharedir = eval {File::ShareDir::dist_dir('Alien-IUP')} || '';
if ( -d $sharedir ) {
print STDERR "Removing the old '$sharedir'\n";
File::Path::rmtree($sharedir);
File::Path::mkpath($sharedir);
}
return $self->SUPER::ACTION_install(@_);
}
sub ACTION_code {
my $self = shift;
if ( ! -e 'build_done' ) {
my $inst = $self->notes('already_installed_lib');
if (defined $inst) {
$self->config_data('config', { LIBS => $inst->{lflags},
INC => $inst->{cflags},
inc/My/Builder.pm view on Meta::CPAN
LIBS => '-L' . $self->quote_literal('@PrEfIx@/lib') .
' -l' . join(' -l', @{$self->config_data('linker_libs')}) .
' ' . $self->config_data('extra_lflags'),
INC => '-I' . $self->quote_literal('@PrEfIx@/include') .
' ' . $self->config_data('extra_cflags'),
});
}
# mark sucessfully finished build
$self->touchfile('build_done');
}
$self->SUPER::ACTION_code;
}
sub prepare_sources {
my ($self, $url, $sha1, $download, $build_src) = @_;
my $archive = $self->fetch_file( url=>$url, sha1=>$sha1, localdir=>$download );
#XXX hack
if ($archive !~ /\.(tar.gz|tgz|tar|zip|tbz|tar.bz2)$/) {
rename($archive, "$archive.$$.tgz");
$archive = "$archive.$$.tgz";
}
( run in 1.008 second using v1.01-cache-2.11-cpan-49f99fa48dc )