Skip to content

Commit

Permalink
fix some perl-in-space problems
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Oct 3, 2024
1 parent 5b2324f commit 30aed66
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions lib/Alien/Build/Plugin/Build/Autoconf.pm
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ sub init
$meta->add_requires('configure', 'Alien::Build::Plugin::Build::Autoconf' => '0.41');
$meta->default_hook(
build_ffi => [
'%{configure} --enable-shared --disable-static --libdir=%{.install.autoconf_prefix}/dynamic',
'%{configure} --enable-shared --disable-static "--libdir=%{.install.autoconf_prefix}/dynamic"',
'%{make}',
'%{make} install',
]
Expand Down Expand Up @@ -174,13 +174,14 @@ sub init
if($build->meta_prop->{out_of_source})
{
my $extract = $build->install_prop->{extract};
$configure = _win ? "sh $extract/configure" : "$extract/configure";
$configure = _win ? qq{sh "$extract/configure"} : "$extract/configure";
}
else
{
$configure = _win ? 'sh ./configure' : './configure';
}
$configure .= ' --prefix=' . $prefix;
$configure .= qq{ "--prefix=$prefix"};
$configure .= ' --disable-dependency-tracking';
$configure .= ' --with-pic' if $self->with_pic;
$configure;
}
Expand Down
2 changes: 1 addition & 1 deletion t/alien_build_plugin_build_autoconf.t
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ subtest 'out-of-source' => sub {
my $configure = $build->meta->interpolator->interpolate('%{configure}');
note "%{configure} = $configure";

my $regex = $^O eq 'MSWin32' ? qr/^sh (.*?)\s/ : qr/^(.*)\s/;
my $regex = $^O eq 'MSWin32' ? qr/^sh "(.*?)"\s/ : qr/^(.*?)\s/;
like $configure, $regex, 'matches';

if($configure =~ $regex)
Expand Down

0 comments on commit 30aed66

Please sign in to comment.