Documentation ¶
Overview ¶
Package pkgconfig provides a wrapper around the pkg-config binary.
Index ¶
- func DataDirs(pkgs ...string) (map[string]string, error)
- func DataRootDirs(pkgs ...string) (map[string]string, error)
- func GIRDirs(pkgs ...string) (map[string]string, error)
- func Prefixes(pkgs ...string) (map[string]string, error)
- func VarValues(varname string, pkgs ...string) (map[string]string, error)
- func VarValuesOrElse(varname string, elseFn ValueSource, pkgs ...string) (map[string]string, error)
- type ValueSource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DataDirs ¶ added in v0.3.0
DataDirs returns a map of package-name to the base directory for package-idiosyncratic read-only architecture-independent data files for each requested package, or an error if this cannot be determined for any of the packages. The usual value is "${datarootdir}", i.e. "/usr/share" or "/usr/local/share"; this is *not* a per-package directory, packages usually install their data to "${datadir}/${package_name}/".
DataDirs is a ValueSource.
func DataRootDirs ¶ added in v0.3.0
DataRootDirs returns a map of package-name to the directory for read-only architecture-independent data files for each requested package, or an error if this cannot be determined for any of the packages. The usual value is "${prefix}/share", i.e. "/usr/share" or "/usr/local/share".
DataRootDirs is a ValueSource.
func GIRDirs ¶ added in v0.3.0
GIRDirs returns a map of package-name to the directory for GObject Introspection Repository XML files for each requested package, or an error if this cannot be determined for any of the packages. The usual value is "${datadir}/gir-1.0", i.e. "/usr/share/gir-1.0" or "/usr/local/share/gir-1.0".
GIRDirs is a ValueSource.
func Prefixes ¶ added in v0.3.0
Prefixes returns a map of package-name to the install prefix for each requested package, or an error if this cannot be determined for any of the packages. Common values are "/", "/usr", or "/usr/local".
Prefixes is a ValueSource.
func VarValues ¶ added in v0.3.0
VarValues returns a map of package-name to variable-value of the given variable name for each requested package. It is not an error for a variable to be unset or empty; ret[pkgname] is an empty string if that package does not have the variable set.
func VarValuesOrElse ¶ added in v0.3.0
VarValuesOrElse is like VarValues, but if a package has an empty/unset value, then that empty value is replaced with the value that is returned from the elseFn function.
Types ¶
type ValueSource ¶ added in v0.3.0
A ValueSource is a function that takes a list of package names and returns a map of package-name to some value.
func AddPathSuffix ¶ added in v0.3.0
func AddPathSuffix(inner ValueSource, suffix ...string) ValueSource
AddPathSuffix takes a ValueSource that returns a map of package-name to directory, and wraps it so that each `dir` is set to `filepath.Join(dir, ...suffix)`.