aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/python-modules/shiboken2/nix_compile_cflags.patch
blob: c3c63dc67ba9aba10e5ff8d174ad7efada204e45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--- pyside-setup-everywhere-src-5.12.6/sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp~	2020-07-08 14:37:13.022476435 -0700
+++ pyside-setup-everywhere-src-5.12.6/sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp	2020-07-08 14:37:18.271484269 -0700
@@ -330,17 +330,15 @@
     }
 #endif // NEED_CLANG_BUILTIN_INCLUDES
 
-    // Append the c++ include paths since Clang is unable to find <list> etc
-    // on RHEL 7 with g++ 6.3 or CentOS 7.2.
-    // A fix for this has been added to Clang 5.0, so, the code can be removed
-    // once Clang 5.0 is the minimum version.
-    if (needsGppInternalHeaders()) {
-        const HeaderPaths gppPaths = gppInternalIncludePaths(compilerFromCMake(QStringLiteral("g++")));
-        for (const HeaderPath &h : gppPaths) {
-            if (h.path.contains("c++")
-                || h.path.contains("sysroot")) { // centOS
-                headerPaths.append(h);
-            }
+    const HeaderPaths gppPaths = gppInternalIncludePaths(QStringLiteral("g++"));
+    for (const HeaderPath &h : gppPaths) {
+        // PySide2 requires that Qt headers are not -isystem
+        // https://bugreports.qt.io/browse/PYSIDE-787
+        if (!h.path.contains("-qt")) {
+            // add using -isystem
+            headerPaths.append(h);
+        } else {
+            headerPaths.append({h.path, HeaderType::Standard});
         }
     }
 #else