New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relocatable pkgconfig #6061
Relocatable pkgconfig #6061
Conversation
This seems to not work on the msys mingw builds. Example |
It supposed when people specify the libdir/includedir they do it to change where under prefix/exec_prefix it should be, not to make it independent of prefix/exec_prefix.
9d634c9
to
fd25df1
Compare
I know next to nothing about Windows. But PKG_INSTALLDIR was added in pkg-config 0.27, I guess msys1 uses something older than that. I'm surprised anybody still uses pkg-config < 0.27 (2012-07-11), but not using that macro fixes the issue. |
I don't understand the commit message description of why this change is needed or what improvements it gives. Can you describe what use case this improves? |
There is a typo in the description (which I'm not fixing right now to save CI builds, in case there is any further feedback). It should be "supposes", not "supposed". It refers to the fact libdir and includedir are described relative to prefix/exec_prefix. So, if for example you run pkg-config with The use case this improves is:
Since the libcurl.pc in the staging directory says the libraries are in /usr/lib, not in $STAGING_DIRECTORY/usr/lib, things break. There is PKG_CONFIG_SYSROOT_DIR, but that isn't always enough. You can end up with situations where stuff is installed in more than one single "sysroot" directory and whatever. The result is that people end up creating pkg-config wrapper scripts (e.g. https://github.com/openwrt/openwrt/blob/master/tools/pkgconf/files/pkg-config) and other hacks. Once everything is relative to the libcurl.pc file path the problem goes away. |
For my standard build, this PR breaks libcurl.pc. I run configure like this:
and without this PR, the resulting libcurl.pc two top variables look like this:
but with this PR applied, I instead get the two lines to look like this:
Is |
What do you mean? Supposedly the file will have been installed in Isn't |
I had no idea. Do you know if this |
I don't know the details. But at least since 2013 (https://cgit.freedesktop.org/pkg-config/commit/pkg-config.1?id=925119ce512a05f4c64049526aa19b1296b55e3e). The http://pkgconf.org/ man pages don't document the variable. But it works in my computer. |
Thanks! |
It supposes when people specify the libdir/includedir they do it to change where under prefix/exec_prefix it should be, not to make it independent of prefix/exec_prefix. Closes curl#6061
It supposes when people specify the libdir/includedir they do it to change where under prefix/exec_prefix it should be, not to make it independent of prefix/exec_prefix. Closes curl#6061
No description provided.