pkgconfig

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package pkgconfig provides a wrapper around the pkg-config binary.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataDirs added in v0.3.0

func DataDirs(pkgs ...string) (map[string]string, error)

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

func DataRootDirs(pkgs ...string) (map[string]string, error)

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

func GIRDirs(pkgs ...string) (map[string]string, error)

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

func Prefixes(pkgs ...string) (map[string]string, error)

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

func VarValues(varname string, pkgs ...string) (map[string]string, error)

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

func VarValuesOrElse(varname string, elseFn ValueSource, pkgs ...string) (map[string]string, error)

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

type ValueSource func(pkgs ...string) (map[string]string, error)

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)`.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL