commit:     4a53b08273b86eed76a989e647aecccfb485b2d4
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 14 08:22:09 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Dec 14 08:22:26 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a53b082

dev-util/clazy: fix build with LLVM < 12

Upstream commit: 0ee1ed9ff1bd4cf2a49e1232696747f1898e2987
Closes: https://bugs.gentoo.org/829134
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/clazy/clazy-1.10-r2.ebuild                  |  1 +
 .../files/clazy-1.10-llvm-earlier-than-12.patch      | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/dev-util/clazy/clazy-1.10-r2.ebuild 
b/dev-util/clazy/clazy-1.10-r2.ebuild
index f482a18606ed..bcb85e9d4148 100644
--- a/dev-util/clazy/clazy-1.10-r2.ebuild
+++ b/dev-util/clazy/clazy-1.10-r2.ebuild
@@ -24,6 +24,7 @@ BDEPEND="test? ( ${PYTHON_DEPS} )"
 PATCHES=(
        "${FILESDIR}"/${P}-gcc-build.patch
        "${FILESDIR}"/${P}-use-c++17.patch
+       "${FILESDIR}"/${P}-llvm-earlier-than-12.patch
 )
 
 llvm_check_deps() {

diff --git a/dev-util/clazy/files/clazy-1.10-llvm-earlier-than-12.patch 
b/dev-util/clazy/files/clazy-1.10-llvm-earlier-than-12.patch
new file mode 100644
index 000000000000..714d196b5fd9
--- /dev/null
+++ b/dev-util/clazy/files/clazy-1.10-llvm-earlier-than-12.patch
@@ -0,0 +1,20 @@
+https://bugs.gentoo.org/829134
+https://invent.kde.org/sdk/clazy/-/commit/0ee1ed9ff1bd4cf2a49e1232696747f1898e2987.patch
+
+From: Allen Winter <[email protected]>
+Date: Sat, 11 Dec 2021 14:57:52 -0500
+Subject: [PATCH] src/SourceCompatibilityHelpers.h - fix compile with LLVM<12
+
+fix the GET_LEXER macro for LLVM versions less than 12
+--- a/src/SourceCompatibilityHelpers.h
++++ b/src/SourceCompatibilityHelpers.h
+@@ -123,7 +123,7 @@ clang::Lexer(id, inputFile.getValue(), sm, lo)
+ 
+ #else
+ #define GET_LEXER(id, inputFile, sm, lo) \
+-clang::Lexer(id, inputFile.getValue(), sm, lo)
++clang::Lexer(id, inputFile, sm, lo)
+ #endif
+ 
+ inline bool isFinal(const clang::CXXRecordDecl *record)
+GitLab

Reply via email to