From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: [PATCH] gnu: dub: Patch pkg-config name. Date: Fri, 3 Feb 2017 18:38:05 +0100 Message-ID: <20170203183805.30a5fb1f@scratchpost.org> References: <20170131160017.7991-1-dannym@scratchpost.org> <87bmula6vr.fsf@gnu.org> <20170202203629.14521773@scratchpost.org> <87vasr9q3h.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZhoO-0004HR-Od for guix-devel@gnu.org; Fri, 03 Feb 2017 12:38:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZhoJ-0006eG-Oo for guix-devel@gnu.org; Fri, 03 Feb 2017 12:38:16 -0500 In-Reply-To: <87vasr9q3h.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?ISO-8859-1?Q?Court=E8s?= Cc: guix-devel@gnu.org Hi Ludo, On Fri, 03 Feb 2017 17:49:38 +0100 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > I think =E2=80=98dub-build-system=E2=80=99 could add it as an implicit in= put, much like > =E2=80=98gnu-build-system=E2=80=99 adds binutils as an implicit input. Okay, but it's directly used only by dub (it its function of building D pac= kages). 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 h= ow to invoke gdc (which we didn't package) and rdmd (rdmd source itself doe= sn't mention pkg-config either) - both are in shell expressions like gdc Co= reGL.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 packag= es 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=E2=80=99s > necessary, just like we do for =E2=80=98gnu-build-system=E2=80=99 package= s. 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 u= se pkg-config and so it didn't pick up the Unicode codepoint "-D" option an= d it broke some stuff silently at runtime. That's exactly what can happen w= hen programs guess the library import flags.