From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyril Roelandt Subject: [PATCH 1/6] gnu: gobject-introspection: look for 'gcc' when no compiler seems available. Date: Sat, 30 Nov 2013 02:13:31 +0100 Message-ID: <1385774016-1418-2-git-send-email-tipecaml@gmail.com> References: <1385774016-1418-1-git-send-email-tipecaml@gmail.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:32823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmZ7D-0005lp-26 for guix-devel@gnu.org; Fri, 29 Nov 2013 20:13:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VmZ78-0003Uf-7g for guix-devel@gnu.org; Fri, 29 Nov 2013 20:12:58 -0500 Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]:34055) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmZ78-0003Ub-0j for guix-devel@gnu.org; Fri, 29 Nov 2013 20:12:54 -0500 Received: by mail-wi0-f180.google.com with SMTP id hm4so2686173wib.1 for ; Fri, 29 Nov 2013 17:12:53 -0800 (PST) In-Reply-To: <1385774016-1418-1-git-send-email-tipecaml@gmail.com> 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: guix-devel@gnu.org * gnu/packages/patches/gobject-introspection.patch: New file. --- gnu-system.am | 1 + gnu/packages/glib.scm | 7 ++++--- gnu/packages/patches/gobject-introspection-cc.patch | 15 +++++++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/gobject-introspection-cc.patch diff --git a/gnu-system.am b/gnu-system.am index 2a0a88f..5533143 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -239,6 +239,7 @@ dist_patch_DATA = \ gnu/packages/patches/glibc-bootstrap-system.patch \ gnu/packages/patches/glibc-ldd-x86_64.patch \ gnu/packages/patches/glibc-make-4.0.patch \ + gnu/packages/patches/gobject-introspection-cc.patch \ gnu/packages/patches/grub-gets-undeclared.patch \ gnu/packages/patches/gstreamer-0.10-bison3.patch \ gnu/packages/patches/gstreamer-0.10-silly-test.patch \ diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index fc65f30..1ff873d 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -176,7 +176,8 @@ dynamic loading, and an object system.") "/gobject-introspection-" version ".tar.xz")) (sha256 - (base32 "0wvxyvgajmms2bb6k3pf1rdpnd79xdxamykzvxzmcyn1ag9yax9m")))) + (base32 "0wvxyvgajmms2bb6k3pf1rdpnd79xdxamykzvxzmcyn1ag9yax9m")) + (patches (list (search-patch "gobject-introspection-cc.patch"))))) (build-system gnu-build-system) (inputs `(("bison" ,bison) @@ -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 here. - (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/packages/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 = ['__GI_SCANNER__'] + undefs = [] + cpp_args = os.environ.get('CC', 'cc').split() # support CC="ccache gcc" ++ if (cpp_args == ['cc'] and ++ not any(map(lambda x: os.access(os.path.join(x, 'cc'), os.X_OK), ++ os.environ.get('PATH')))): ++ cpp_args = ['GUIX_GCC_PATH'] ++ + if 'cl' in cpp_args: + # The Microsoft compiler/preprocessor (cl) does not accept + # source input from stdin (the '-' flag), so we need -- 1.8.4.rc3