HomeClusterLabs Projects

Build: pkg-config: update pkg-config files for all libraries

Description

Build: pkg-config: update pkg-config files for all libraries

We weren't using them ideally or consistently.

  • All now define ${sub} as the base library name, "Name" as lib${sub}, and include -l${sub} in "Libs"
  • The "Description" is now library-specific
  • The files avoid defining unnecessary variables. Variables that aren't used in the file but may provide useful information in user queries are now defined only in the single most relevant file.
  • Dependencies are now set up correctly (hopefully).

The border between Requires and Requires.private is fuzzy. On the one hand, "it
is usually only appropriate to add modules from the same package in Requires,"
but on the other, that is justified by "If the program will not be using the
symbols of the required library, it should not be linking directly to that
library."

One site puts it as: "Does the current library augment the dependency, or wrap
around it? If the consumers of the current library still need to use interfaces
from the former, the dependency should be visible directly to the consumers, so
declare it as Requires or Libs. If, on the other hand, the dependency's
interface is wrapped and hidden from the consumers, it should be declared in
Requires.private or Libs.private."

That's still not entirely clear, for example if a client needs to use abstract
type definitions (such as xmlNode) but nothing else from the dependency, or if
the bulk of the library can be used without any external APIs but some small
optional part of it would require external APIs to be used.

The approach here is to put dependencies in Requires.private unless significant
parts of the library could not be effectively used without calling functions
from the dependency.

This commit leaves handling optional dependencies for later.

Details

Provenance
kgaillotAuthored on Jun 10 2019, 8:45 PM
Parents
rP829a37ea14ea: Build: libpe_status,libpe_rules: make sure pkg-config files are built
Branches
Unknown
Tags
Unknown

Event Timeline