text
stringlengths
0
834k
[
# .pc search paths, defaults to PKG_CONFIG_PATH in environment
'search_path' => '@',
# whether to also spit out static dependencies
'static' => '$',
# whether we replace references to -L and friends with -Wl,-rpath, etc.
'rpath' => '$',
# build rpath-search,
# no recursion. set if we just want a version, or to see if the
# package exists.
'no_recurse' => '$',
#list of cflags and ldflags to exclude
'exclude_ldflags' => '@',
'exclude_cflags' => '@',
# what level of recursion we're at
'recursion' => '$',
# hash of libraries, keyed by recursion levels. Lower recursion numbers
# will be listed first
'libs_deplist' => '*%',
# cumulative cflags and ldflags
'ldflags' => '*@',
'cflags' => '*@',
# whether we print the c/ldflags
'print_cflags' => '$',
'print_ldflags' => '$',
# information about our top-level package
'pkg' => '$',
'pkg_exists' => '$',
'pkg_version' => '$',
'pkg_url', => '$',
'pkg_description' => '$',
'errmsg' => '$',
# classes used for storing persistent data
'varclass' => '$',
'udefclass' => '$',
'filevars' => '*%',
'uservars' => '*%',
# options for printing variables
'print_variables' => '$',
'print_variable' => '$',
'print_values' => '$',
'defined_variables' => '*%',
# for creating PkgConfig objects with identical
# settings
'original' => '$',
]
);
################################################################################
################################################################################
### Variable Storage ###
################################################################################
################################################################################
sub _get_pc_varname {
my ($self,$vname_base) = @_;
$self->varclass . ""::"" . $vname_base;
}
sub _get_pc_udefname {
my ($self,$vname_base) = @_;
$self->udefclass . ""::"" . $vname_base;
}
sub _pc_var {
my ($self,$vname) = @_;
$vname =~ s,\.,DOT,g;
no strict 'refs';
$vname = $self->_get_pc_varname($vname);
no warnings qw(once);
my $glob = *{$vname};
$glob ? $$glob : ();
}
sub _quote_cvt($) {
join ' ', map { s/(\s|""|')/\\$1/g; $_ } shellwords(shift)
}
sub assign_var {
my ($self,$field,$value) = @_;
no strict 'refs';
# if the user has provided a definition, use that.
if(exists ${$self->udefclass.""::""}{$field}) {
log_debug(""Prefix already defined by user"");
return;
}