From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 1/6] gnu: gobject-introspection: look for 'gcc' when no compiler seems available. Date: Sat, 30 Nov 2013 22:59:40 +0100 Message-ID: <87iov9y2ib.fsf@gnu.org> References: <1385774016-1418-1-git-send-email-tipecaml@gmail.com> <1385774016-1418-2-git-send-email-tipecaml@gmail.com> 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]:45155) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmsZp-0005zs-Na for guix-devel@gnu.org; Sat, 30 Nov 2013 16:59:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VmsZj-0006rq-0N for guix-devel@gnu.org; Sat, 30 Nov 2013 16:59:49 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:46847) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmsZi-0006rf-QP for guix-devel@gnu.org; Sat, 30 Nov 2013 16:59:42 -0500 In-Reply-To: <1385774016-1418-2-git-send-email-tipecaml@gmail.com> (Cyril Roelandt's message of "Sat, 30 Nov 2013 02:13:31 +0100") 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Cyril Roelandt Cc: guix-devel@gnu.org Hello! Thanks for looking into this! Cyril Roelandt skribis: > @@ -192,8 +193,8 @@ dynamic loading, and an object system.") > 'configure > (lambda* (#:key #:allow-other-keys #:rest args) > (let ((configure (assoc-ref %standard-phases 'configure))) > - ;; giscanner/sourcescanner.py looks for 'CC', let's set it he= re. > - (setenv "CC" "gcc") > + (substitute* "giscanner/sourcescanner.py" > + (("GUIX_GCC_PATH") (which "gcc"))) > (apply configure args))) > %standard-phases))) > (home-page "https://wiki.gnome.org/GObjectIntrospection") > diff --git a/gnu/packages/patches/gobject-introspection-cc.patch b/gnu/pa= ckages/patches/gobject-introspection-cc.patch > new file mode 100644 > index 0000000..280c5d3 > --- /dev/null > +++ b/gnu/packages/patches/gobject-introspection-cc.patch > @@ -0,0 +1,15 @@ > +Try $CC, 'cc', and finally 'gcc'. > +--- a/giscanner/sourcescanner.py.orig 2013-10-16 03:41:25.381719000 +0200 > ++++ b/giscanner/sourcescanner.py 2013-10-16 03:43:35.533719000 +0200 > +@@ -277,6 +277,11 @@ > + defines =3D ['__GI_SCANNER__'] > + undefs =3D [] > + cpp_args =3D os.environ.get('CC', 'cc').split() # support CC= =3D"ccache gcc" > ++ if (cpp_args =3D=3D ['cc'] and > ++ not any(map(lambda x: os.access(os.path.join(x, 'cc'), os.X= _OK), > ++ os.environ.get('PATH')))): > ++ cpp_args =3D ['GUIX_GCC_PATH'] Wouldn=E2=80=99t it work to just do: (substitute* "giscanner/sourcescanner.py" (("'cc'") (which "gcc"))) That way the patch wouldn=E2=80=99t even be needed. WDYT? Ludo=E2=80=99.