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

pkg-config integration for plan-build #972

Closed
stevendanna opened this issue Jun 23, 2016 · 1 comment
Closed

pkg-config integration for plan-build #972

stevendanna opened this issue Jun 23, 2016 · 1 comment
Labels
Type: Feature Issues that describe a new desired feature

Comments

@stevendanna
Copy link
Contributor

Opening this for discussion since I'm not sure it is a good idea.

Some packages have configuration scripts that use pkg-config extensively to find require dependencies. While core/pkg-config exists, it usually also requires setting up PKG_CONFIG_PATH manually. For example:

    PKG_CONFIG_PATH="$(pkg_path_for libpng)/lib/pkgconfig"
    PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:$(pkg_path_for zlib)/lib/pkgconfig"
    PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:$(pkg_path_for libpng)/lib/pkgconfig"
    PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:$(pkg_path_for pixman)/lib/pkgconfig"
    export PKG_CONFIG_PATH

It would be nice for a plan to indicate that it exports pkg-config configuration and then use that to populate PKG_CONFIG_PATH automatically.

Is this too far over the "too much magic" line? An advantage is that more software packages will "just work" without overriding do_build(). On the other hand, it is more magic that the user doesn't become aware of until it bites them somehow.

@adamhjk
Copy link
Contributor

adamhjk commented Jun 23, 2016

I could go either way on this. On the one hand, it's nice to let the configure magic do its thing. On the other, the current system of exporting CFLAGS, LDFLAGS, etc. cover most of this ground, and where they don't, you often have options to take care of things.

I would take a patch to hab-plan-build.sh that implements dropping a PKG_CONFIG_PATH metadata from a configuration setting akin to pkg_pconfig_dirs=(lib/pkgconfig).

Closing this issue, but feel free to write the patch.

@adamhjk adamhjk closed this as completed Jun 23, 2016
@eeyun eeyun added C-feature and removed Feature labels Jun 6, 2017
@christophermaier christophermaier added Type: Feature Issues that describe a new desired feature and removed C-feature labels Jul 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Issues that describe a new desired feature
Projects
None yet
Development

No branches or pull requests

4 participants