From 30aed667c4b52ee2f3675dccc80024a281d825af Mon Sep 17 00:00:00 2001 From: Ed J Date: Thu, 3 Oct 2024 03:01:17 +0000 Subject: [PATCH] fix some perl-in-space problems --- lib/Alien/Build/Plugin/Build/Autoconf.pm | 7 ++++--- t/alien_build_plugin_build_autoconf.t | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/Alien/Build/Plugin/Build/Autoconf.pm b/lib/Alien/Build/Plugin/Build/Autoconf.pm index f87d5a15..bbf84339 100644 --- a/lib/Alien/Build/Plugin/Build/Autoconf.pm +++ b/lib/Alien/Build/Plugin/Build/Autoconf.pm @@ -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', ] @@ -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; } diff --git a/t/alien_build_plugin_build_autoconf.t b/t/alien_build_plugin_build_autoconf.t index e6fa9311..83843c34 100644 --- a/t/alien_build_plugin_build_autoconf.t +++ b/t/alien_build_plugin_build_autoconf.t @@ -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)