You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lots of packages generate pkg-config files at build time, usually written to ${prefix}/lib/pkgconfig. These pkg-config files basically always seem to have a variable called prefix, which is set to the build-time prefix and is used as a base path for the rest of the variables in the pkg-config file.
Here's an example from the Curl build, under lib/pkgconfig/curl.pc (as of commit 45d2638):
You can actually use the ${pcfiledir} variable to get the directory containing the .pc file itself, so it's possible to tweak a pkg-config file to work with portable dirs. For example, we could patch the first line of Curl like this:
prefix=${pcfiledir}/../../
We already have a few packages that manually patch their pkg-config files with a script:
We should provide a utility in std to handle this directly. The current scripts to patch these files are pretty minimal sed scripts, so it should be pretty easy to just move one of the existing functions into std directly. This might also be a good opportunity to figure out if we can make a more robust implementation that's a little less fragile
The text was updated successfully, but these errors were encountered:
Lots of packages generate pkg-config files at build time, usually written to
${prefix}/lib/pkgconfig
. These pkg-config files basically always seem to have a variable calledprefix
, which is set to the build-time prefix and is used as a base path for the rest of the variables in the pkg-config file.Here's an example from the Curl build, under
lib/pkgconfig/curl.pc
(as of commit45d2638
):You can actually use the
${pcfiledir}
variable to get the directory containing the.pc
file itself, so it's possible to tweak a pkg-config file to work with portable dirs. For example, we could patch the first line of Curl like this:We already have a few packages that manually patch their pkg-config files with a script:
std.toolchain()
sqlite
python
libxml2
libxslt
We should provide a utility in
std
to handle this directly. The current scripts to patch these files are pretty minimalsed
scripts, so it should be pretty easy to just move one of the existing functions intostd
directly. This might also be a good opportunity to figure out if we can make a more robust implementation that's a little less fragileThe text was updated successfully, but these errors were encountered: