summary refs log tree commit diff
path: root/gnu/packages/qt.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-04-21 19:07:09 +0200
committerMarius Bakke <mbakke@fastmail.com>2020-04-22 00:08:26 +0200
commite5109374d89713268079dff9c0c6a154e2068f8f (patch)
treec950101517b874c9c62fd7f421375c1318ea6f5f /gnu/packages/qt.scm
parent3994b55cd64831b36f52025192580d50028448f7 (diff)
downloadguix-e5109374d89713268079dff9c0c6a154e2068f8f.tar.gz
gnu: qt@4: Hide the default GCC from CPLUS_INCLUDE_PATH.
* gnu/packages/qt.scm (qt-4)[native-inputs]: Distinguish GCC-5.
[arguments]: Add phase to hide the default GCC from CPLUS_INCLUDE_PATH to fix
conflicting headers.
Diffstat (limited to 'gnu/packages/qt.scm')
-rw-r--r--gnu/packages/qt.scm13
1 files changed, 12 insertions, 1 deletions
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 238caa117d..8338e5fcfc 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -223,7 +223,7 @@ system, and the core design of Django is reused in Grantlee.")
      `(;; XXX: The JavaScriptCore engine does not build with the C++11 standard.
        ;; We could build it with -std=gnu++98, but then we'll get in trouble with
        ;; ICU later.  Just keep using GCC 5 for now.
-       ("gcc" ,gcc-5)
+       ("gcc@5" ,gcc-5)
        ("bison" ,bison)
        ("flex" ,flex)
        ("gperf" ,gperf)
@@ -240,6 +240,17 @@ system, and the core design of Django is reused in Grantlee.")
     (arguments
      `(#:phases
        (modify-phases %standard-phases
+         (add-after 'set-paths 'hide-default-gcc
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((gcc (assoc-ref inputs "gcc")))
+               ;; Remove the default GCC from CPLUS_INCLUDE_PATH to prevent
+               ;; conflicts with the GCC 5 input.
+               (setenv "CPLUS_INCLUDE_PATH"
+                       (string-join
+                        (delete (string-append gcc "/include/c++")
+                                (string-split (getenv "CPLUS_INCLUDE_PATH") #\:))
+                        ":"))
+               #t)))
          (replace
           'configure
           (lambda* (#:key outputs #:allow-other-keys)