Alien-Build
view release on metacpan or search on metacpan
lib/Alien/Build/Plugin/Build/Autoconf.pm view on Meta::CPAN
my @pkgconf_dirs;
push @pkgconf_dirs, Path::Tiny->new($ENV{DESTDIR})->child($prefix)->child("$_/pkgconfig") for qw(lib share);
# for any pkg-config style .pc files that are dropped, we need
# to convert the MSYS /C/Foo style paths to C:/Foo
for my $pkgconf_dir (@pkgconf_dirs) {
if(-d $pkgconf_dir)
{
foreach my $pc_file ($pkgconf_dir->children)
{
$pc_file->edit(sub {s/\Q$prefix\E/$real_prefix->stringify/eg;});
}
}
}
}
$ret;
},
);
lib/Alien/Build/Plugin/PkgConfig/MakeStatic.pm view on Meta::CPAN
$h{Cflags} = '' unless defined $h{Cflags};
$h{Libs} = '' unless defined $h{Libs};
$h{Cflags} .= ' ' . $h{"Cflags.private"} if defined $h{"Cflags.private"};
$h{Libs} .= ' ' . $h{"Libs.private"} if defined $h{"Libs.private"};
$h{"Cflags.private"} = '';
$h{"Libs.private"} = '';
$path->edit_lines(sub {
if(/^(.*?):/)
{
my $key = $1;
if(defined $h{$key})
{
s/^(.*?):.*$/$1: $h{$key} /;
delete $h{$key};
}
}
lib/Test/Alien.pm view on Meta::CPAN
ok $module->version;
};
done_testing;
__DATA__
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include <editline/readline.h>
const char *
version(const char *class)
{
return rl_library_version;
}
MODULE = TA_MODULE PACKAGE = TA_MODULE
const char *version(class);
t/alien_build.t view on Meta::CPAN
use alienfile;
plugin 'Test::Mock',
probe => 'share',
download => 1,
extract => {
file1 => 'The quick brown dog jumps over the lazy dog',
file2 => 'text2',
};
share {
patch sub {
Path::Tiny->new('file1')->edit(sub { s/dog/fox/ });
};
build sub {
my($build) = @_;
Path::Tiny->new('file1')->copy(Path::Tiny->new($build->install_prop->{stage})->child('file3'));
};
};
};
alien_install_type_is 'share';
alien_download_ok;
t/alien_build.t view on Meta::CPAN
plugin 'Test::Mock',
probe => 'share',
download => 1,
extract => {
file1 => 'The quick brown dog jumps over the lazy dog',
file2 => 'The quick brown fox jumps over the lazy fox',
};
share {
patch sub {
# fix the saying in file1
Path::Tiny->new('file1')->edit(sub { s/dog/fox/ });
};
patch sub {
# fix the saying in file 2
Path::Tiny->new('file2')->edit(sub { s/fox$/dog/ });
};
build sub {
my($build) = @_;
Path::Tiny->new('file1')->copy(Path::Tiny->new($build->install_prop->{stage})->child('file3'));
Path::Tiny->new('file2')->copy(Path::Tiny->new($build->install_prop->{stage})->child('file4'));
};
};
};
alien_install_type_is 'share';
( run in 0.460 second using v1.01-cache-2.11-cpan-de7293f3b23 )