1
0
Fork 0
mirror of https://github.com/pkgconf/pkgconf.git synced 2026-12-03 14:24:45 +00:00
package compiler and linker metadata toolkit
  • C 91.2%
  • Makefile 3.7%
  • M4 2.4%
  • Meson 2.3%
  • Shell 0.2%
  • Other 0.2%
Find a file
Tuukka Pasanen 6cbc9ddb8b man/sbomtool.1: Add missing '.'-chars and fix parameter name
In man page there where missing couple '.'-chars at the of line and
there is no parameter named: sbom-uri. Correct on is: use-uri.

Sponsored by: FreeBSD Foundation

Signed-off-by: Tuukka Pasanen <tuukka.pasanen@ilmi.fi>
2026-12-02 10:31:21 -08:00
.github ci: Update omnios to r151058 2026-09-10 09:08:24 -07:00
cli sbomtool: Move copyright escaping to util 2026-12-02 10:30:46 -08:00
cmake cmake: reformat C tests 2026-07-13 17:11:12 -07:00
doc Fix it's -> its 2023-11-29 12:02:44 -08:00
fuzzer fuzzer/meson.build: Fix fuzzer to work against new libpkgconfcli 2026-10-30 10:08:39 -07:00
libpkgconf libpkgconf: reduce dequote buffer allocation 2026-12-02 10:27:42 -08:00
man man/sbomtool.1: Add missing '.'-chars and fix parameter name 2026-12-02 10:31:21 -08:00
t tests: Add tests for sbomtool CycloneDX 2026-11-24 14:42:02 -08:00
tests tests: Add OOM test for new sbomtool util functio 2026-12-02 10:30:46 -08:00
.gitattributes tests: force LF for single-package expected output 2026-08-23 12:25:39 -07:00
.gitignore build: remove autotools support 2026-07-13 17:53:49 -07:00
.mailmap AUTHORS: update mailmap and authors list 2026-06-10 10:46:32 -07:00
AUTHORS AUTHORS: update mailmap and authors list 2026-06-10 10:46:32 -07:00
CODE_OF_CONDUCT.md coc: remove akrites reference, does not provide any value 2026-08-01 15:16:03 -07:00
codecov.yml codecov: exempt fuzzer from coverage analysis 2026-06-25 12:22:22 -07:00
CONTRIBUTING.md Fix typos discovered by codespell - https://pypi.org/project/codespell 2026-07-14 13:57:19 -07:00
COPYING COPYING: update copyright years here to 2026 2026-05-21 19:14:07 -07:00
DCO add DCO 2026-02-18 10:07:33 -08:00
Makefile.lite Makefile.lite: Correct path for getopt_long 2026-10-30 10:08:39 -07:00
meson.build tests: Add tests for sbomtool util 2026-12-02 10:30:46 -08:00
meson_options.txt meson: allow explicit configuration of PKG_DEFAULT_PATH 2026-06-28 14:00:37 -07:00
NEWS pkg.m4: Bump serial and update NEWS for pkg.m4 changes 2026-11-23 10:13:06 -08:00
pkg.m4 pkg.m4: Bump serial and update NEWS for pkg.m4 changes 2026-11-23 10:13:06 -08:00
pkgconf.manifest.in pkgconf.manifest.in: Use asmv3 namespace for application settings 2026-12-02 10:28:54 -08:00
pkgconf.rc.in Fix build when the project is used as a subproject 2026-06-10 17:26:29 -07:00
pkgconf.wxs.in pkgconf.wxs.in: Add sbomtool 2026-11-24 14:42:02 -08:00
README.md README: update custom prefix instructions 2026-10-26 15:53:01 -07:00
txt2rtf.py meson: add MSI build target 2025-05-29 15:50:14 -07:00

pkgconf test Coverage

pkgconf is a program which helps to configure compiler and linker flags for development libraries. It is a superset of the functionality provided by pkg-config from freedesktop.org, but does not provide bug-compatibility with the original pkg-config.

libpkgconf is a library which provides access to most of pkgconf's functionality, to allow other tooling such as compilers and IDEs to discover and use libraries configured by pkgconf.

bomtool and spdxtool are programs generating software bill of materials (SBOM) for a given set of pkg-config modules, in the SPDX 2.0 and SPDX Lite 3.0.1 format, respectively. The output of these tools can then be translated into other SBOM formats as necessary.

release tarballs

Release tarballs are available on distfiles.ariadne.space.

build system setup

pkgconf uses Meson as its build system.

If you would like to use the git sources directly, or a snapshot of the sources from GitHub, Meson can be used directly without any additional bootstrap step.

pkgconf-lite

If you only need the original pkg-config functionality, there is also pkgconf-lite, which builds the pkgconf frontend and relevant portions of libpkgconf functionality into a single binary:

$ make -f Makefile.lite

why pkgconf over original pkg-config?

pkgconf builds a flattened directed dependency graph, which allows for more insight into relationships between dependencies, allowing for some link-time dependency optimization, which allows for the user to more conservatively link their binaries, which may be helpful in some environments, such as when prelink(1) is being used.

The solver is also optimized to handle large dependency graphs with hundreds of thousands of edges, which can be seen in any project using the Abseil frameworks for example.

In addition, pkgconf has full support for virtual packages, while the original pkg-config does not, as well as fully supporting Conflicts at dependency resolution time, which is more efficient than checking for Conflicts while walking the dependency graph.

linker flags optimization

pkgconf, when used effectively, can make optimizations to avoid overlinking binaries.

This functionality depends on the pkg-config module properly declaring its dependency tree instead of using Libs and Cflags fields to directly link against other modules which have pkg-config metadata files installed.

The practice of using Libs and Cflags to describe unrelated dependencies is not recommended in Dan Nicholson's pkg-config tutorial for this reason.

bug compatibility with original pkg-config

In general, we do not provide bug-level compatibility with pkg-config.

What that means is, if you feel that there is a legitimate regression versus pkg-config, do let us know, but also make sure that the .pc files are valid and follow the rules of the pkg-config tutorial, as most likely fixing them to follow the specified rules will solve the problem.

debug output

Please use only the stable interfaces to query pkg-config. Do not screen-scrape the output from --debug: this is sent to stderr for a reason, it is not intended to be scraped. The --debug output is not a stable interface, and should never be depended on as a source of information. If you need a stable interface to query pkg-config which is not covered, please get in touch.

compiling pkgconf and libpkgconf

pkgconf is compiled using Meson:

$ meson setup build
$ meson compile -C build
$ meson install -C build

If you are installing pkgconf into a custom prefix, such as /opt/pkgconf, you will likely want to define the default system includedir and libdir for your toolchain. To do this, use the with-system-libdir and with-system-includedir Meson options like so:

$ meson setup build \
     --prefix=/opt/pkgconf \
     -Dwith-system-libdir=/lib:/usr/lib \
     -Dwith-system-includedir=/usr/include
$ meson compile -C build
$ meson install -C build

There are a few additional defines such as PKGCONFIGDIR. On Windows, the default PKGCONFIGDIR value is usually overridden at runtime based on path relocation.

bootstrapping with Muon

In bootstrap environments where Python is not yet available, pkgconf can also be built with Muon, a C implementation of the Meson build description language. The same meson.build files are used; no separate configuration is needed. Both Meson and Muon are tested in CI.

$ muon setup build
$ samu -C build
$ muon install -C build

For non-bootstrap builds, Meson is recommended.

If you want pkgconf to be used when you invoke pkg-config, you should install a symlink for this. We do not do this for you, as we believe it is better for vendors to make this determination themselves.

$ ln -sf pkgconf /usr/bin/pkg-config

contacts

You can report bugs at https://github.com/pkgconf/pkgconf/issues.

There is a mailing list at https://lists.sr.ht/~kaniini/pkgconf.

You can contact us via IRC at #pkgconf at irc.oftc.net.