text-icu icon indicating copy to clipboard operation
text-icu copied to clipboard

Make `pkg-config` dependency more robust

Open andreasabel opened this issue 3 years ago • 0 comments

Lifted from https://github.com/haskell/cabal/pull/8496#issuecomment-1270566590. @gbaz writes:

I note btw that text-icu with its current cabal file will always fail if there is no pkg-config present on the system, or if icu-uc, or icu-i18n are not registered in it.

It would be better to have an auto flag that switches between a build using pkgconfig-depends and a build explicitly enumerating extra-libraries. This is what the pr that started this all was intended to enable :-) https://github.com/haskell/cabal/pull/7621

In such a case if the CI busted on pkgconfig-depends, then it will fallback to the explicit extra-libraries etc.

This also makes the package somewhat more resilient for end-users.

My 2 cents to this: One would have to investigate whether such an auto flag also works with stack which has a different flag semantics.

andreasabel avatar Oct 06 '22 20:10 andreasabel