[perl-extutils-depends/use-words] quote directories with spaces
- From: Ed J <edj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-extutils-depends/use-words] quote directories with spaces
- Date: Fri, 8 Mar 2019 21:13:18 +0000 (UTC)
commit 4e4c8a971d064e782dcb2a8c9edfe10781b98162
Author: Ed J <mohawk2 users noreply github com>
Date: Fri Mar 8 21:13:00 2019 +0000
quote directories with spaces
lib/ExtUtils/Depends.pm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/lib/ExtUtils/Depends.pm b/lib/ExtUtils/Depends.pm
index e3644fd..943df2a 100644
--- a/lib/ExtUtils/Depends.pm
+++ b/lib/ExtUtils/Depends.pm
@@ -219,12 +219,14 @@ sub load {
{
instpath => $instpath,
typemaps => \@typemaps,
- inc => "-I$instpath $inc",
+ inc => "-I". _quote_if_space($instpath) ." $inc",
libs => $libs,
deps => \@deps,
}
}
+sub _quote_if_space { $_[0] =~ / / ? qq{"$_[0]"} : $_[0] }
+
sub load_deps {
my $self = shift;
my @load = grep { not $self->{deps}{$_} } keys %{ $self->{deps} };
@@ -362,7 +364,9 @@ sub find_extra_libs {
}, map { -d $_ ? ($_) : () } @INC); # only extant dirs
if ($matching_file && -f $matching_file) {
- push @found_libs, ('-L' . $matching_dir, '-l' . $stem);
+ push @found_libs,
+ '-L' . _quote_if_space($matching_dir),
+ '-l' . $stem;
# Android's linker ignores the RTLD_GLOBAL flag
# and loads everything as if under RTLD_LOCAL.
# What this means in practice is that modules need
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]