zdharma-continuum / zinit

🌻 Flexible and fast ZSH plugin manager
MIT License
2.74k stars 122 forks source link

[maint]: append "${ZPFX}/lib/pkg-config" to $PKG_CONFIG_PATH plus others #547

Closed psprint closed 5 months ago

psprint commented 11 months ago

Description

I think that this PR is important so I'm refreshing it (old: #333). I think that to be able to easily compile things under $ZPFX is an important feature. When building with zinit's configure''/make'' ices the environment should point the build systems to $ZPFX directory as the location of headers and libraries.

Motivation and Context

I've once installed a library (pcre2-8) to $ZPFX and then tried to also install a dependent program (universal,-ctags) and I've noticed that the library wasn't found. After investigation it was pkg-config to blame, with a solution of prepending $ZPFX library dir to $PKG_CONFIG_PATH.

How Has This Been Tested?

A few builds of a few apps, like libpcre2, universal-ctags, weechat.

Types of changes

Checklist:

psprint commented 11 months ago

@vladdoster @pschmitt @alichtman ping

psprint commented 10 months ago

@vladdoster: ping. The build frameworks integration is needed and expected one, so it should be merged.

alichtman commented 10 months ago

I don't understand the purpose of $ZPFX. A code search of the repo shows no explanation: https://github.com/search?q=repo%3Azdharma-continuum%2Fzinit%20ZPFX&type=code, and the name polaris is nondescript.

I think that to be able to easily compile things under $ZPFX is an important feature.

Why?

psprint commented 10 months ago

The purpose of $ZPFX is to have a prefix-dir similar to ~/.local, where users of zinit install their software. One can, of course, set it to: $HOME/.local.

I think that to be able to easily compile things under $ZPFX is an important feature.

Why?

Why? Because it's obvious…

alichtman commented 10 months ago

I think it'd be really helpful if this stuff was documented somewhere in the README or website, instead of assuming that people will expand $ZPFX to "Zinit Prefix".

I wouldn't have made that jump on my own, especially given that the default directory name is polaris.

psprint commented 10 months ago

Very true, $ZPFX isn't documented.