Skip to content

Conversation

jeanbaptistelab
Copy link
Contributor

I think I have at last cleaned up my previous PR (which is gone, but hey, trial and error).

Let me know if there's more I need to do...

Thanks

JB

…> and massage them if they appear to already be ready for direct use with the compiler.

This change allows using pkg-config within dub with .pc files that were written for use with the compiler directly, which can prove troublesome in some cases (for instance, when using the GtkD debian packages as mentioned in issue dlang#7
82).
Basically, we analyze the output of pkg-config and fix up arguments so that they are suitable for the D compiler invokations through dub.

Arguments handled include:
- double "-L" flags (from gtkd3.pc for example) -> passed as single "-L" flags
- "-defaultlib" flags (from phobos2.pc for example) -> passed as-is (previous dub code used to pass them as "-Ldefaultlib")
- "-pthread" flags (from libavcode.pc for example) -> passed as "-L-l-pthread" (previous dub code used to pass them as-is)

The test case tests for these arguments explicitly, is currently only applicable to DMD frontend versions >= 2.068 as other frontends/versions seems to have some issues with shared libraries.
@s-ludwig
Copy link
Member

Thanks a lot! Looks good to merge.

Just curious, did the git push --force-with-lease not work for overwriting the existing branch?

s-ludwig added a commit that referenced this pull request Mar 17, 2016
@s-ludwig s-ludwig merged commit b9054b3 into dlang:master Mar 17, 2016
@jeanbaptistelab
Copy link
Contributor Author

Not quite, I ended up doing a hard rest of my forks head, branch, commit
from a patch of the changes I had (I'm an old guy ;)) , rebase my branch
and submit a PR...
On 17 Mar 2016 22:12, "Sönke Ludwig" notifications@github.com wrote:

Thanks a lot! Looks good to merge.

Just curious, did the git push --force-with-lease not work for
overwriting the existing branch?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#794 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants