[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/6] gnu: gobject-introspection: look for 'gcc' when no compi
From: |
Ludovic Courtès |
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 |
User-agent: |
Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) |
Hello!
Thanks for looking into this!
Cyril Roelandt <address@hidden> 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 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']
Wouldn’t it work to just do:
(substitute* "giscanner/sourcescanner.py"
(("'cc'") (which "gcc")))
That way the patch wouldn’t even be needed.
WDYT?
Ludo’.