Hi Danny, Danny Milosavljevic <dan...@scratchpost.org> skribis:
> On Fri, 03 Feb 2017 17:49:38 +0100 > l...@gnu.org (Ludovic Courtès) wrote: > >> I think ‘dub-build-system’ could add it as an implicit input, much like >> ‘gnu-build-system’ adds binutils as an implicit input. > > Okay, but it's directly used only by dub (it its function of building D > packages). > > I don't think D packages themselves even know what pkg-config is. > > The ldc 1.1.0 sources don't even mention "pkg-config" once - neither do any > of the D packages I tried except gtk-d. That one mentions it in comments how > to invoke gdc (which we didn't package) and rdmd (rdmd source itself doesn't > mention pkg-config either) - both are in shell expressions like gdc CoreGL.d > `pkg-config gtkd-3 gl --cflags --libs` and rdmd `pkg-config gtkd-3 --cflags` > -L-lGL -L-ldl CoreGL.d). No non-comment reference at all. OK. > That said, we could add pkg-config as an implicit input so that if D packages > decided to directly use it in the future they'd pick up the same one. Yeah. >> Or we could simply let people add pkg-config as an input when it’s >> necessary, just like we do for ‘gnu-build-system’ packages. > > dub itself does automatically use pkg-config. > It's as if make always used pkg-config (whether you write "pkg-config" into a > Makefile or not). > > Also, if pkg-config is not available dub will silently fallback to guessing. > It will not fail (and that's bad!). OK. Well I think the conclusion is that (1) we really need to make sure DUB has pkg-config around one way or another, and (2) of all the solutions we discussed, I don’t see one that is significantly “better” than the other (it was worth discussing them though, because in many cases there’s a solution that “looks better”). So I’d say proceed as you prefer. Thanks for taking the time to explain! Ludo’.