Re: pkg-config and share/

From: Baptiste Daroussin <bapt_at_FreeBSD.org>
Date: Mon, 25 Jul 2022 09:08:24 UTC
On Mon, Jul 25, 2022 at 10:54:57AM +0200, Alex Dupre wrote:
> On 25/07/22 10:15, Baptiste Daroussin wrote:
> > When pkg-config came out, (before my time) the .pc files were naturally added to
> > libdata which is where most people hacking on freebsd would have expected it.
> > 
> > So when we switched to pkgconf we preserved that.
> > 
> > Note that the ports tree on freebsd does not need patching as it automatically
> > moves the .pc files from the "linux" location to libdata.
> > 
> > I do hope that this answers your question!
> 
> I'm not sure this fully answers Andrea's question. It explains why we use
> `libdata` instead of `lib`, but not exactly why we don't use `share` at all.
> Is it desired or simply it was added in pkg-config in a second time and
> never added to the FreeBSD port?

Not really except if someone comes with a strong argument, we can manipulate
where pkgconf does look at, via environment variable if needed.

The reason we don't look elsewhere by default it to ensure we keep the room
"clean" and people carefully store things where they are expected to be, if they
don't, they do it on purpose and we offer mechanism to help them, (the env
variable).
> 
> As a side note, Andrea, do you know we have `USES=pathfix` in ports to
> transparently handle these path differences?

pathfix is not necessary anymore for this case, as I state in my previous email,
this is now all automatic.

best regards,
Bapt