pkg-config: make prefix overridable again
authorJan Tojnar <jtojnar@gmail.com>
Sat, 2 Jan 2021 01:46:33 +0000 (02:46 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 12 Mar 2021 16:37:40 +0000 (17:37 +0100)
commitbc4e6e27922a2873985ab9367d79fb099f70b505
tree53858efdff1840fc31ad822b79b1bef0b3eb9a53
parent3727a1ea39fbe0f9201bc12904a5efe17412cf01
pkg-config: make prefix overridable again

While we don't support prefix being != /usr, and this is hardcoded
all over the place, variables in pkg-config file are expected
to have overridable base directory.

This is important for at least the following two use cases:

- Installing projects to non-FHS package-specific prefixes for Nix-style
  package managers. Of course, it is then their responsibility
  to ensure systemd can find the service files.
- Installing to local path for development purposes.
  This is a compromise between running a program from a build directory,
  and running it fully installed to system prefix.

You will not want to write to system prefix in either case.

For more information, see also
https://www.bassi.io/articles/2018/03/15/pkg-config-and-paths/

Fixes https://github.com/systemd/systemd/issues/18082

Partially reverts 6e65df89c348242dbd10036abc7dd5e8181cf733

(cherry picked from commit 60bce7c6d9606185114df1bdcd5ea100407688b8)

Fixes https://github.com/systemd/systemd-stable/issues/88
src/core/systemd.pc.in