[neon/qt/pyside2/Neon/release] debian: Backport upstream patch to adapt for LLVM 12.01.

Dmitry Shachnev null at kde.org
Wed Oct 19 14:56:29 BST 2022


Git commit 76667a75b468c05fae70beba9b466ef7946414dc by Dmitry Shachnev, on behalf of Dmitry Shachnev.
Committed on 15/11/2021 at 12:41.
Pushed by jriddell into branch 'Neon/release'.

Backport upstream patch to adapt for LLVM 12.01.

M  +1    -0    debian/changelog
M  +1    -0    debian/patches/series
A  +28   -0    debian/patches/shiboken6-Adapt-to-LLVM-12.01.patch

https://invent.kde.org/neon/qt/pyside2/commit/76667a75b468c05fae70beba9b466ef7946414dc

diff --git a/debian/changelog b/debian/changelog
index 43eb8fd9..db5b4277 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ pyside2 (5.15.2-2) UNRELEASED; urgency=medium
 
   [ Dmitry Shachnev ]
   * Backport upstream patches for Python 3.10 support (closes: #999369).
+  * Backport upstream patch to adapt for LLVM 12.01.
 
  -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Mon, 15 Nov 2021 15:40:37 +0300
 
diff --git a/debian/patches/series b/debian/patches/series
index d32aaca9..a84d82eb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@ py3.10-prep-reset-the-type-cache-after-feature-switching.patch
 py3.10-prep-Fix-parser.py-for-changed-typing-module.patch
 py3.10-prep-Finally-support-Python-3.10.patch
 py3.10-prep-Fix-a-very-old-refcounting-error-in-time_test.patch
+shiboken6-Adapt-to-LLVM-12.01.patch
diff --git a/debian/patches/shiboken6-Adapt-to-LLVM-12.01.patch b/debian/patches/shiboken6-Adapt-to-LLVM-12.01.patch
new file mode 100644
index 00000000..8b2f593b
--- /dev/null
+++ b/debian/patches/shiboken6-Adapt-to-LLVM-12.01.patch
@@ -0,0 +1,28 @@
+From: Friedemann Kleint <Friedemann.Kleint at qt.io>
+Date: Tue, 12 Oct 2021 09:33:53 +0200
+Subject: shiboken6: Adapt to LLVM 12.01
+
+The identifier for anonymous enums has been changed, causing
+shiboken to no longer recognize them.
+
+(cherry picked from commit 1948a1b6f9a3547ba9fba9b8c525eb6e1c6b4f13)
+---
+ sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp b/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp
+index 73b1aca..c6f3bb8 100644
+--- a/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp
++++ b/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp
+@@ -887,8 +887,10 @@ static QString enumType(const CXCursor &cursor)
+         // PYSIDE-1228: For "typedef enum { v1, v2 } Foo;", type will return
+         // "Foo" as expected. Care must be taken to exclude real anonymous enums.
+         name = getTypeName(clang_getCursorType(cursor));
+-        if (name.contains(QLatin1String("(anonymous")))
++        if (name.contains(u"(unnamed") // Clang 12.0.1
++            || name.contains(u"(anonymous")) { // earlier
+             name.clear();
++        }
+     }
+     return name;
+ }



More information about the Neon-commits mailing list