summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pyside2/nix_compile_cflags.patch
blob: 02f17c09a8883a847f9004329d436143259cf357 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
diff --git a/sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp b/sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp
index add278a..2626eb6 100644
--- a/sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp
+++ b/sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp
@@ -349,11 +349,15 @@ QByteArrayList emulatedCompilerOptions()
 
     // Append the c++ include paths since Clang is unable to find
     // <type_traits> etc (g++ 11.3).
-    const HeaderPaths gppPaths = gppInternalIncludePaths(compilerFromCMake(QStringLiteral("g++")));
+    const HeaderPaths gppPaths = gppInternalIncludePaths(QStringLiteral("g++"));
     for (const HeaderPath &h : gppPaths) {
-        if (h.path.contains("c++")
-            || h.path.contains("sysroot")) { // centOS
+        // 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