Fix some issues with generated pkg-config file - #3569
Conversation
There was a problem hiding this comment.
I'm not 100% sure about this line here. I think it's wrong to specify this here, but maybe someone else knows better. 😄
There was a problem hiding this comment.
Seems reasonable to me since you're updating all the other variables here.
There was a problem hiding this comment.
I dropped this line again. the winhttp stub is only generated because mingw is missing an import library for winhttp, and the generated file/path will only be available during the compile phase of libgit2
7eec1db to
b41b134
Compare
|
@jacquesg But the perl bindings link dynamically, not statically. |
|
It definitely links libssh2 statically into the perl extension (which itself is a DLL/so) and uses the winhttp import library. Here's a link to the Windows build: https://ci.appveyor.com/project/jacquesg/p5-git-raw |
|
|
There was a problem hiding this comment.
This might cause the user to link to a different libssh2 than the we one libgit2 was provided with. I think we have this form as a reaction to an issue which was reported. Why change this to require?
There was a problem hiding this comment.
This allows pkg-config to automatically identify the linker flags needed for libssh2 when statically linking against a libgit2 which was built with ssh support.
There was a problem hiding this comment.
I found the commit explaining why we do this: 790cabf. If we put them in requires, pkg-config will put their private libs in the linker args as well, which we don't want. We want to give tell whoever is embedding libgit2 which options we would have used, were we to create the shared library.
There was a problem hiding this comment.
Mh, yeah, that sounds reasonable. Why do we do this for openssl and zlib then?
There was a problem hiding this comment.
I think it just comes down to them not having any extra dependencies. zlib doesn't have dependencies, and OpenSSL only has zlib, which we depend on anyway.
I added another commit to fix this. |
7662b9a to
3d57408
Compare
3d57408 to
768e185
Compare
|
@carlosmn Okay, I changed the issues with this and cleaned up the history. |
Fix some issues with generated pkg-config file
This is related to some issues we're running into when building rugged on windows with SSH support, but is relevant for other platforms as well.
See libgit2/rugged#559 and libgit2/rugged#558 for some further information.