~kaniini/pkgconf

pkgconf 2.0 will handle ${prefix} and hardcoded uses of ${prefix} differently

Details
Message ID
<CAAOiGNwYCx=DVmFRczCAW2HyGNTo2so-oj9=eSnTAaU=_o0f7Q@mail.gmail.com>
DKIM signature
missing
Download raw message
Hello all,

We have observed in #pkgconf that, in the year 2019, almost a decade
after we started talking about how to improve cross-compilation
support in .pc files, that for whatever reason, many .pc files still
have cross-compilation hostile practices, such as hardcoding ${prefix}
in other variables.

For reference, this is a bad practice:

   prefix=/usr
   includedir=/usr/include
   libdir=/usr/lib

The reason why it is bad is because it makes it harder to relocate the
package.  pkgconf already goes to some effort to make these packages
relocatable *anyway*.

The correct way is:

   prefix=/usr
   includedir=${prefix}/include
   libdir=${prefix}/lib

In pkgconf 2.0, files which do the wrong thing will generate a visible
diagnostic.  We will also silently rewrite `/usr/include` type
variables to be `${prefix}/include` in these cases.  We already do
this in many cases, so I doubt it will be that disruptive.

Ariadne
Reply to thread Export thread (mbox)