version 1.96, 2023/06/08 08:55:27 |
version 1.97, 2023/09/22 07:28:31 |
|
|
exit $rc; |
exit $rc; |
|
|
########################################################################### |
########################################################################### |
|
sub set_variables_from_env($file) |
|
{ |
|
state (%done, @l); |
|
|
|
if (!defined $done{$file}) { |
|
my $pkg = $file; |
|
|
|
$pkg =~ s/(^.*\/)?(.*?)\.pc$/$2/g; |
|
$pkg = uc($pkg); |
|
if (!@l) { |
|
@l = grep {/PKG_CONFIG_/} keys %ENV; |
|
} |
|
for my $k (@l) { |
|
next unless $k =~ m/PKG_CONFIG_${pkg}_(\w+)/; |
|
$variables->{lc($1)} = $ENV{$k}; |
|
} |
|
$done{$file} = 1; |
|
} |
|
|
|
} |
|
|
sub handle_config($p, $op, $v, $list) |
sub handle_config($p, $op, $v, $list) |
{ |
{ |
my $cfg = cache_find_config($p); |
my $cfg = cache_find_config($p); |
|
|
} |
} |
|
|
my $get_props = sub($property) { |
my $get_props = sub($property) { |
my $pkg; |
set_variables_from_env($p); |
|
|
# See if there's anything in the environment that we need to |
|
# take into account. |
|
($pkg = $p) =~ s/(^.*\/)?(.*?)\.pc$/$2/g; |
|
$pkg = uc($pkg); |
|
|
|
if (grep {/PKG_CONFIG_${pkg}.*/} keys %ENV) { |
|
# Now that we know we have something to look for, do |
|
# the inefficient iteration. |
|
while (my ($k, $v) = each %ENV) { |
|
if ($k =~ /^PKG_CONFIG_${pkg}_(\w+)/) { |
|
$variables->{lc($1)} = $v; |
|
} |
|
} |
|
} |
|
|
|
my $deps = $cfg->get_property($property, $variables); |
my $deps = $cfg->get_property($property, $variables); |
return unless defined $deps; |
return unless defined $deps; |