Skip to content

Add prefix to pkgconfig root - #14051

Merged
franramirez688 merged 3 commits into
conan-io:release/2.0from
bruchar1:add-prefix-to-pkgconfig-root
Jun 15, 2023
Merged

franramirez688 merged 3 commits into
conan-io:release/2.0from
bruchar1:add-prefix-to-pkgconfig-root

Conversation

@bruchar1

@bruchar1 bruchar1 commented Jun 8, 2023

Copy link
Copy Markdown
Contributor

Changelog: Bugfix: Add prefix var and any custom content (through the pkg_config_custom_content property) to already generated pkg-config root .pc files by PkgConfigDeps.
Docs: omit

Fixes #14049

bruchar1 added 2 commits June 8, 2023 15:17
This is useful for meson, to get the path of the installed package
@bruchar1
bruchar1 force-pushed the add-prefix-to-pkgconfig-root branch from f49561f to 0610516 Compare June 8, 2023 19:18

@memsharded memsharded left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!
Assigning @franramirez688 for final review

Comment thread conan/tools/gnu/pkgconfigdeps.py
@memsharded memsharded added this to the 2.0.7 milestone Jun 14, 2023
@franramirez688

Copy link
Copy Markdown
Contributor

Thanks for the contribution @bruchar1

I'm wondering why this is needed. Which is the use case? Was it actually a bug?

@bruchar1

Copy link
Copy Markdown
Contributor Author

I'm wondering why this is needed. Which is the use case? Was it actually a bug?

This is detailed in the linked issue.

The fact the prefix variable is not in the .pc file is not really a bug, but having it solves issues with meson integration, especially because meson needs this variable to know where the package is installed.

The fact pkg_custom_content does not work with the root .pc file from a package with components could be considered as a bug.

@franramirez688

franramirez688 commented Jun 15, 2023

Copy link
Copy Markdown
Contributor

This is detailed in the linked issue.

Oh, so sorry, my fault, I did not realize about the issue. Let me have a look at it. Perhaps, it makes sense to add a dedicated test for this change.

# Custom PC content

datadir=${{prefix}}/share
schemasdir=${{datadir}}/mylib/schemas

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this extra check to ensure that the custom content is being added only to the root .pc file.

@franramirez688
franramirez688 merged commit 302d079 into conan-io:release/2.0 Jun 15, 2023
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.

[feature] add prefix var to pkg-config alias

3 participants