aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/glib.scm7
-rw-r--r--gnu/packages/patches/gobject-introspection-cc.patch14
2 files changed, 18 insertions, 3 deletions
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 097a5d0f49..2ba1460444 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 0000000000..38b919a746
--- /dev/null
+++ b/gnu/packages/patches/gobject-introspection-cc.patch
@@ -0,0 +1,14 @@
+--- a/giscanner/sourcescanner.py 2013-12-15 23:03:54.002937000 +0100
++++ b/giscanner/sourcescanner.py 2013-12-15 23:04:50.322937000 +0100
+@@ -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').split(':')))):
++ 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