[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] gnu: dub: Patch pkg-config name.
From: |
Danny Milosavljevic |
Subject: |
Re: [PATCH] gnu: dub: Patch pkg-config name. |
Date: |
Fri, 3 Feb 2017 18:38:05 +0100 |
Hi Ludo,
On Fri, 03 Feb 2017 17:49:38 +0100
address@hidden (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.
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.
> 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!).
I've just had to fix a problem (in another non-D package) where it didn't use
pkg-config and so it didn't pick up the Unicode codepoint "-D" option and it
broke some stuff silently at runtime. That's exactly what can happen when
programs guess the library import flags.