Skip to content
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

Add prefix to pkgconfig root #14051

Merged

Conversation

bruchar1
Copy link
Contributor

@bruchar1 bruchar1 commented Jun 8, 2023

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 bruchar1 force-pushed the add-prefix-to-pkgconfig-root branch from f49561f to 0610516 Compare June 8, 2023 19:18
Copy link
Member

@memsharded memsharded left a comment

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

conan/tools/gnu/pkgconfigdeps.py Show resolved Hide resolved
@memsharded memsharded added this to the 2.0.7 milestone Jun 14, 2023
@franramirez688
Copy link
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
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
Copy link
Contributor

franramirez688 commented Jun 15, 2023

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
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
2 checks passed
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