[gentoo-commits] repo/gentoo:master commit in: dev-util/clazy/files/, dev-util/clazy/
commit: f1c92c1d6530aeb22382ab74c9a2113da5617024 Author: Andreas Sturmlechner gentoo org> AuthorDate: Wed Jan 19 13:53:34 2022 + Commit: Andreas Sturmlechner gentoo org> CommitDate: Wed Jan 19 13:53:45 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1c92c1d dev-util/clazy: Drop 1.9 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner gentoo.org> dev-util/clazy/Manifest | 1 - dev-util/clazy/clazy-1.9.ebuild | 40 - dev-util/clazy/files/clazy-1.9-llvm12.patch | 88 - dev-util/clazy/files/clazy-1.9-llvm13.patch | 31 -- 4 files changed, 160 deletions(-) diff --git a/dev-util/clazy/Manifest b/dev-util/clazy/Manifest index 1a0031b71ddc..eae6b70fd4c9 100644 --- a/dev-util/clazy/Manifest +++ b/dev-util/clazy/Manifest @@ -1,2 +1 @@ DIST clazy-1.10.tar.xz 398920 BLAKE2B 1cdc160de21363c7dc9c93ea7e780412a4971b18e97c7ec6e06f1c7450c56e0fbbdb7592d6b92ae53e4c161f6d9abca205984f83b68646f04ea11d63e3c45fa6 SHA512 59dd8c6903bcc239dfc356804cab265597a771de3858a6add4877149e0e7875b3c9ddae9aeec889c9102fb9ec6b0125bb8a786344e47872b01ba87425ba021eb -DIST clazy-1.9.tar.xz 394856 BLAKE2B 641ca46a31475cf7bd03ba921e390cb2712362dc97b960a519e05c47049927f805d3ef6f1c756b96d3483e8f4b75e2dc41a2419a462ed2e45cbd08c88c07f933 SHA512 2e8bec44a027366263de23c50d14192e310fd38fa2b369afb21413da9cb78da9882b2153daf1784c4c9076cc62e2867b5211c75ff9a1eabcb583e405f20f5912 diff --git a/dev-util/clazy/clazy-1.9.ebuild b/dev-util/clazy/clazy-1.9.ebuild deleted file mode 100644 index 781b51040559.. --- a/dev-util/clazy/clazy-1.9.ebuild +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit cmake - -DESCRIPTION="Compiler plugin which allows clang to understand Qt semantics" -HOMEPAGE="https://apps.kde.org/en/clazy; -SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz" - -LICENSE="LGPL-2+" -SLOT="0" -KEYWORDS="amd64 arm64 x86" -IUSE="" - -RDEPEND=" - >=sys-devel/clang-5.0:= - >=sys-devel/llvm-5.0:= -" -DEPEND="${RDEPEND}" - -PATCHES=( "${FILESDIR}"/${P}-llvm{12,13}.patch ) # bug 786525 - -src_prepare() { - cmake_src_prepare - - sed -e '/install(FILES README.md COPYING-LGPL2.txt checks.json DESTINATION/d' \ - -i CMakeLists.txt || die -} - -src_configure() { - # this package requires both llvm and clang of the same version. - # clang pulls in the equivalent llvm version, but not vice versa. - # so, we must find llvm based on the installed clang version. - # bug #681568 - local clang_version=$(best_version "sys-devel/clang") - export LLVM_ROOT="/usr/lib/llvm/$(ver_cut 1 ${clang_version##sys-devel/clang-})" - cmake_src_configure -} diff --git a/dev-util/clazy/files/clazy-1.9-llvm12.patch b/dev-util/clazy/files/clazy-1.9-llvm12.patch deleted file mode 100644 index 3862f40ad981.. --- a/dev-util/clazy/files/clazy-1.9-llvm12.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 2592a6e3393ebc75e16c91e606ad2015a16295c3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Christian=20Sch=C3=A4rf?= -Date: Sat, 23 Jan 2021 15:34:10 +0100 -Subject: [PATCH] Fix build with Clang 12 - -Required due to Clang changes https://github.com/llvm/llvm-project/commit/b3eff6b7bb31e7ef059a3d238de138849839fbbd and https://github.com/llvm/llvm-project/commit/d758f79e5d381bd4f5122193a9538d89c907c812 - src/SourceCompatibilityHelpers.h | 26 ++ - src/SuppressionManager.cpp | 5 ++--- - 2 files changed, 28 insertions(+), 3 deletions(-) - -diff --git a/src/SourceCompatibilityHelpers.h b/src/SourceCompatibilityHelpers.h -index 4db141ab..1737d5a5 100644 a/src/SourceCompatibilityHelpers.h -+++ b/src/SourceCompatibilityHelpers.h -@@ -29,6 +29,7 @@ - #include - #include - #include -+#include - #include - - #if defined(CLAZY_USES_BOOST_REGEX) -@@ -103,6 +104,31 @@ inline clang::tooling::Replacements& DiagnosticFix(clang::tooling::Diagnostic - #endif - } - -+inline auto getBuffer(const clang::SourceManager , clang::FileID id, bool *invalid) -+{ -+#if LLVM_VERSION_MAJOR >= 12 -+auto buffer = sm.getBufferOrNone(id); -+*invalid = !buffer.hasValue(); -+return buffer; -+#else -+return sm.getBuffer(id, invalid); -+#endif -+} -+ -+#if LLVM_VERSION_MAJOR >= 12 -+inline clang::Lexer getLexer(clang::FileID id, llvm::Optional inputFile, -+ const clang::SourceManager , const clang::LangOptions ) -+{ -+return clang::Lexer(id, inputFile.getValue(), sm, lo); -+} -+#else -+inline clang::Lexer getLexer(clang::FileID id, const llvm::MemoryBuffer *inputFile, -+ const clang::SourceManager , const clang::LangOptions ) -+{ -+return clang::Lexer(id, inputFile, sm, lo); -+} -+#endif -+ - } - - #endif -diff --git
[gentoo-commits] repo/gentoo:master commit in: dev-util/clazy/files/, dev-util/clazy/
commit: 10d7a5b482f6282eaefdb28ceda51f2ec99056f8 Author: Andreas Sturmlechner gentoo org> AuthorDate: Sat May 1 20:18:02 2021 + Commit: Andreas Sturmlechner gentoo org> CommitDate: Sat May 1 21:21:56 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10d7a5b4 dev-util/clazy: Fix build with LLVM-12/13 Closes: https://bugs.gentoo.org/786525 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner gentoo.org> dev-util/clazy/clazy-1.9.ebuild | 2 + dev-util/clazy/files/clazy-1.9-llvm12.patch | 88 + dev-util/clazy/files/clazy-1.9-llvm13.patch | 31 ++ 3 files changed, 121 insertions(+) diff --git a/dev-util/clazy/clazy-1.9.ebuild b/dev-util/clazy/clazy-1.9.ebuild index 9062383103c..781b5104055 100644 --- a/dev-util/clazy/clazy-1.9.ebuild +++ b/dev-util/clazy/clazy-1.9.ebuild @@ -20,6 +20,8 @@ RDEPEND=" " DEPEND="${RDEPEND}" +PATCHES=( "${FILESDIR}"/${P}-llvm{12,13}.patch ) # bug 786525 + src_prepare() { cmake_src_prepare diff --git a/dev-util/clazy/files/clazy-1.9-llvm12.patch b/dev-util/clazy/files/clazy-1.9-llvm12.patch new file mode 100644 index 000..3862f40ad98 --- /dev/null +++ b/dev-util/clazy/files/clazy-1.9-llvm12.patch @@ -0,0 +1,88 @@ +From 2592a6e3393ebc75e16c91e606ad2015a16295c3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Christian=20Sch=C3=A4rf?= +Date: Sat, 23 Jan 2021 15:34:10 +0100 +Subject: [PATCH] Fix build with Clang 12 + +Required due to Clang changes https://github.com/llvm/llvm-project/commit/b3eff6b7bb31e7ef059a3d238de138849839fbbd and https://github.com/llvm/llvm-project/commit/d758f79e5d381bd4f5122193a9538d89c907c812 +--- + src/SourceCompatibilityHelpers.h | 26 ++ + src/SuppressionManager.cpp | 5 ++--- + 2 files changed, 28 insertions(+), 3 deletions(-) + +diff --git a/src/SourceCompatibilityHelpers.h b/src/SourceCompatibilityHelpers.h +index 4db141ab..1737d5a5 100644 +--- a/src/SourceCompatibilityHelpers.h b/src/SourceCompatibilityHelpers.h +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + #include + + #if defined(CLAZY_USES_BOOST_REGEX) +@@ -103,6 +104,31 @@ inline clang::tooling::Replacements& DiagnosticFix(clang::tooling::Diagnostic + #endif + } + ++inline auto getBuffer(const clang::SourceManager , clang::FileID id, bool *invalid) ++{ ++#if LLVM_VERSION_MAJOR >= 12 ++auto buffer = sm.getBufferOrNone(id); ++*invalid = !buffer.hasValue(); ++return buffer; ++#else ++return sm.getBuffer(id, invalid); ++#endif ++} ++ ++#if LLVM_VERSION_MAJOR >= 12 ++inline clang::Lexer getLexer(clang::FileID id, llvm::Optional inputFile, ++ const clang::SourceManager , const clang::LangOptions ) ++{ ++return clang::Lexer(id, inputFile.getValue(), sm, lo); ++} ++#else ++inline clang::Lexer getLexer(clang::FileID id, const llvm::MemoryBuffer *inputFile, ++ const clang::SourceManager , const clang::LangOptions ) ++{ ++return clang::Lexer(id, inputFile, sm, lo); ++} ++#endif ++ + } + + #endif +diff --git a/src/SuppressionManager.cpp b/src/SuppressionManager.cpp +index 9d774ea6..9881388d 100644 +--- a/src/SuppressionManager.cpp b/src/SuppressionManager.cpp +@@ -24,7 +24,6 @@ + #include "clazy_stl.h" + + #include +-#include + #include + #include + #include +@@ -84,7 +83,7 @@ void SuppressionManager::parseFile(FileID id, const SourceManager , const cla + Suppressions = (*it).second; + + bool invalid = false; +-auto buffer = sm.getBuffer(id, ); ++auto buffer = clazy::getBuffer(sm, id, ); + if (invalid) { + llvm::errs() << "SuppressionManager::parseFile: Invalid buffer "; + if (buffer) +@@ -92,7 +91,7 @@ void SuppressionManager::parseFile(FileID id, const SourceManager , const cla + return; + } + +-Lexer lexer(id, buffer, sm, lo); ++auto lexer = clazy::getLexer(id, buffer, sm, lo); + lexer.SetCommentRetentionState(true); + + Token token; +-- +GitLab + diff --git a/dev-util/clazy/files/clazy-1.9-llvm13.patch b/dev-util/clazy/files/clazy-1.9-llvm13.patch new file mode 100644 index 000..9bbac8f7624 --- /dev/null +++ b/dev-util/clazy/files/clazy-1.9-llvm13.patch @@ -0,0 +1,31 @@ +From 0bf4e428c76270f4534a0a8df3cf6912157f22ab Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B6rn=20Sch=C3=A4pers?= +Date: Sat, 17 Apr 2021 20:57:10 +0200 +Subject: [PATCH] Fix build with LLVM 13 + +--- + src/ClazyStandaloneMain.cpp | 8 +++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/ClazyStandaloneMain.cpp b/src/ClazyStandaloneMain.cpp +index 41c4fcf9..7b4cf5d3 100644 +--- a/src/ClazyStandaloneMain.cpp b/src/ClazyStandaloneMain.cpp +@@ -158,7 +158,13 @@ llvm::IntrusiveRefCntPtr getVfsFromFile(const std::string + + int main(int argc, const char **argv) + { +-CommonOptionsParser optionsParser(argc, argv,
[gentoo-commits] repo/gentoo:master commit in: dev-util/clazy/files/, dev-util/clazy/
commit: 3cf0b312d76f313c80a28d1c7d112e03e303d3a2 Author: Andreas Sturmlechner gentoo org> AuthorDate: Mon Oct 26 10:21:23 2020 + Commit: Andreas Sturmlechner gentoo org> CommitDate: Mon Oct 26 13:55:45 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3cf0b312 dev-util/clazy: Fix build with LLVM-11 Fix HOMEPAGE Closes: https://bugs.gentoo.org/749876 Package-Manager: Portage-3.0.8, Repoman-3.0.2 Signed-off-by: Andreas Sturmlechner gentoo.org> .../{clazy-1.7.ebuild => clazy-1.7-r1.ebuild} | 9 +- dev-util/clazy/clazy-1.7.ebuild| 2 +- dev-util/clazy/files/clazy-1.7-llvm11-1.patch | 343 + dev-util/clazy/files/clazy-1.7-llvm11-2.patch | 28 ++ 4 files changed, 378 insertions(+), 4 deletions(-) diff --git a/dev-util/clazy/clazy-1.7.ebuild b/dev-util/clazy/clazy-1.7-r1.ebuild similarity index 85% copy from dev-util/clazy/clazy-1.7.ebuild copy to dev-util/clazy/clazy-1.7-r1.ebuild index 14f32246c9c..cc5ae5d8eb1 100644 --- a/dev-util/clazy/clazy-1.7.ebuild +++ b/dev-util/clazy/clazy-1.7-r1.ebuild @@ -6,12 +6,12 @@ EAPI=7 inherit cmake DESCRIPTION="Compiler plugin which allows clang to understand Qt semantics" -HOMEPAGE="https://kde.org/applications/development/org.kde.clazy; +HOMEPAGE="https://apps.kde.org/en/clazy; SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz" LICENSE="LGPL-2+" SLOT="0" -KEYWORDS="amd64" +KEYWORDS="~amd64" IUSE="" RDEPEND=" @@ -20,7 +20,10 @@ RDEPEND=" " DEPEND="${RDEPEND}" -PATCHES=( "${FILESDIR}/${P}-gnuinstalldirs.patch" ) +PATCHES=( + "${FILESDIR}"/${P}-gnuinstalldirs.patch + "${FILESDIR}"/${P}-llvm11-{1,2}.patch +) src_prepare() { cmake_src_prepare diff --git a/dev-util/clazy/clazy-1.7.ebuild b/dev-util/clazy/clazy-1.7.ebuild index 14f32246c9c..a364a426b70 100644 --- a/dev-util/clazy/clazy-1.7.ebuild +++ b/dev-util/clazy/clazy-1.7.ebuild @@ -6,7 +6,7 @@ EAPI=7 inherit cmake DESCRIPTION="Compiler plugin which allows clang to understand Qt semantics" -HOMEPAGE="https://kde.org/applications/development/org.kde.clazy; +HOMEPAGE="https://apps.kde.org/en/clazy; SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz" LICENSE="LGPL-2+" diff --git a/dev-util/clazy/files/clazy-1.7-llvm11-1.patch b/dev-util/clazy/files/clazy-1.7-llvm11-1.patch new file mode 100644 index 000..7b25b340a5c --- /dev/null +++ b/dev-util/clazy/files/clazy-1.7-llvm11-1.patch @@ -0,0 +1,343 @@ +From 30d6a2b64f5a05722fdc5d8e3754dbf13425cd62 Mon Sep 17 00:00:00 2001 +From: Egor Gabov +Date: Thu, 4 Jun 2020 17:10:21 +0300 +Subject: [PATCH] updated for compatibility with LLVM 10 + +In LLVM 10 llvm::StringRef operator std::string() is marked as explicit. +In this commit all implicit conversion from llvm::StringRef to +std::string are changed by explicit. +Also included header file clang/Basic/FileManager.h in src/MiniDumper +because without this header, class clang::FileEntry in incomplete class +--- + src/FixItExporter.cpp | 5 +++-- + src/MiniAstDumper.cpp | 1 + + src/Utils.cpp | 2 +- + src/checkbase.cpp | 2 +- + src/checks/detachingbase.cpp | 2 +- + src/checks/level0/qenums.cpp | 2 +- + src/checks/level0/qt-macros.cpp | 4 ++-- + src/checks/level0/unused-non-trivial-variable.cpp | 2 +- + src/checks/level1/detaching-temporary.cpp | 2 +- + src/checks/level1/non-pod-global-static.cpp | 2 +- + src/checks/level1/qproperty-without-notify.cpp| 2 +- + src/checks/level2/missing-typeinfo.cpp| 2 +- + src/checks/level2/old-style-connect.cpp | 6 +++--- + src/checks/level2/rule-of-three.cpp | 2 +- + src/checks/manuallevel/ifndef-define-typo.cpp | 6 +++--- + src/checks/manuallevel/qproperty-type-mismatch.cpp| 2 +- + src/checks/manuallevel/qrequiredresult-candidates.cpp | 2 +- + src/checks/manuallevel/qt-keywords.cpp| 4 ++-- + src/checks/manuallevel/reserve-candidates.cpp | 3 ++- + 19 files changed, 28 insertions(+), 25 deletions(-) + +diff --git a/src/FixItExporter.cpp b/src/FixItExporter.cpp +index f3af2e5..44240cf 100644 +--- a/src/FixItExporter.cpp b/src/FixItExporter.cpp +@@ -68,7 +68,7 @@ void FixItExporter::BeginSourceFile(const LangOptions , const Preproces + + const auto id = SourceMgr.getMainFileID(); + const auto entry = SourceMgr.getFileEntryForID(id); +-getTuDiag().MainSourceFile = entry->getName(); ++getTuDiag().MainSourceFile = static_cast(entry->getName()); + } + + bool FixItExporter::IncludeInDiagnosticCounts() const +@@ -89,7 +89,8 @@ tooling::Diagnostic FixItExporter::ConvertDiagnostic(const Diagnostic ) + // TODO: This returns an empty string:
[gentoo-commits] repo/gentoo:master commit in: dev-util/clazy/files/, dev-util/clazy/
commit: ea47abb8ad9f6e4df7b0f30baa4b00760355841e Author: Andreas Sturmlechner gentoo org> AuthorDate: Fri Aug 21 19:56:55 2020 + Commit: Andreas Sturmlechner gentoo org> CommitDate: Sat Aug 22 16:05:48 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ea47abb8 dev-util/clazy: Drop 1.6-r1 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Andreas Sturmlechner gentoo.org> dev-util/clazy/Manifest| 1 - dev-util/clazy/clazy-1.6-r1.ebuild | 53 -- dev-util/clazy/files/clazy-1.6-clang-cpp.patch | 60 - dev-util/clazy/files/clazy-1.6-llvm-10.patch | 75 -- 4 files changed, 189 deletions(-) diff --git a/dev-util/clazy/Manifest b/dev-util/clazy/Manifest index f5bcd93ff3b..286b8ca39df 100644 --- a/dev-util/clazy/Manifest +++ b/dev-util/clazy/Manifest @@ -1,2 +1 @@ -DIST clazy-1.6.tar.xz 364292 BLAKE2B 01da58e34d5a7cb1e812d10264cebe15e90369589535e07f2c9f4520971f2e95b2c70494e99e34f7077957ec1bf01352fa6a72a64f0572e8a5db422267ab727a SHA512 dc7cb9590bbc40a2ac51abe305b6520ebc1ff7128ff21b4f6111d18f14eb8c2ab66d907636a18c7508143b708e70ba69f9d6fad88ffce12dec981a9bdd0edcc0 DIST clazy-1.7.tar.xz 371788 BLAKE2B 281acd0164cf76510e46883fff7269aa77e4b815d6d0ca5a54307165ff8f4355e095b82e0c41cdb0af391f4a15048a8d64b2a2a7b9dabc042b36ba1a380405cc SHA512 3dba993140f3d69aac8d9cf3fa49db990185928647193220b689773bbca70f9fd9ee7fc52022e6029b3c0c81800301a593bd79edee7e1fa6c5884782d390ced6 diff --git a/dev-util/clazy/clazy-1.6-r1.ebuild b/dev-util/clazy/clazy-1.6-r1.ebuild deleted file mode 100644 index 7db5c3d6366..000 --- a/dev-util/clazy/clazy-1.6-r1.ebuild +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit cmake - -DESCRIPTION="Compiler plugin which allows clang to understand Qt semantics" -HOMEPAGE="https://kde.org/applications/development/org.kde.clazy; -SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz" - -LICENSE="LGPL-2+" -SLOT="0" -KEYWORDS="amd64" -IUSE="" - -RDEPEND=" - >=sys-devel/llvm-3.8:= -" -DEPEND="${RDEPEND}" - -DOCS=( README.md ) - -PATCHES=( - "${FILESDIR}/${P}-llvm-10.patch" - "${FILESDIR}/${P}-clang-cpp.patch" -) - -src_prepare() { - cmake_src_prepare - - sed -e '/install(FILES README.md COPYING-LGPL2.txt checks.json DESTINATION/d' \ - -i CMakeLists.txt || die - - sed -e 's|${MAN_INSTALL_DIR}|share/man/man1|' \ - -i docs/man/CMakeLists.txt || die -} - -src_configure() { - # this package requires both llvm and clang of the same version. - # clang pulls in the equivalent llvm version, but not vice versa. - # so, we must find llvm based on the installed clang version. - # bug #681568 - local clang_version=$(best_version "sys-devel/clang") - export LLVM_ROOT="/usr/lib/llvm/$(ver_cut 1 ${clang_version##sys-devel/clang-})" - cmake_src_configure -} - -src_install() { - cmake_src_install - mv "${D}"/usr/share/doc/clazy/* "${D}"/usr/share/doc/${PF} || die - rmdir "${D}"/usr/share/doc/clazy || die -} diff --git a/dev-util/clazy/files/clazy-1.6-clang-cpp.patch b/dev-util/clazy/files/clazy-1.6-clang-cpp.patch deleted file mode 100644 index 16b9af00ce3..000 --- a/dev-util/clazy/files/clazy-1.6-clang-cpp.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 0e295e5a926496f5a5d46ea4feb1b285b084f5e0 Mon Sep 17 00:00:00 2001 -From: Christophe Giboudeaux -Date: Mon, 11 Nov 2019 10:31:49 +0100 -Subject: Check if clazy should be linked to clang-cpp - -Summary: -According to [1], clang can now provide a single shared library instead of split -ones. - -We have to check if this library exists and link to it if available. - -[1] https://releases.llvm.org/9.0.0/tools/clang/docs/ReleaseNotes.html#build-system-changes - -Reviewers: smartins, kde-buildsystem - -Reviewed By: smartins - -Differential Revision: https://phabricator.kde.org/D25163 - CMakeLists.txt| 11 --- - cmake/FindClang.cmake | 1 + - 2 files changed, 9 insertions(+), 3 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b7301ed..ce1f887 100644 a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -125,9 +125,14 @@ macro(link_to_llvm name is_standalone) - if(WIN32) - target_link_libraries(${name} version.lib) - endif() --target_link_libraries(${name} clangTooling) --target_link_libraries(${name} clangToolingCore) --target_link_libraries(${name} ${clang_tooling_refactoring_lib}) -+# clang >= 9.0 can provide a single shared library instead of split ones -+if(CLANG_CLANG-CPP_LIB) -+target_link_libraries(${name} clang-cpp) -+else() -+target_link_libraries(${name} clangTooling) -+target_link_libraries(${name} clangToolingCore) -+target_link_libraries(${name}
[gentoo-commits] repo/gentoo:master commit in: dev-util/clazy/files/, dev-util/clazy/
commit: 014cfb8ff4491f6122312b8f2ba11eda28427af5 Author: Andreas Sturmlechner gentoo org> AuthorDate: Thu Apr 9 15:58:13 2020 + Commit: Andreas Sturmlechner gentoo org> CommitDate: Thu Apr 9 21:36:24 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=014cfb8f dev-util/clazy: Fix build with >=sys-devel/clang-10 Closes: https://bugs.gentoo.org/711642 Package-Manager: Portage-2.3.98, Repoman-2.3.22 Signed-off-by: Andreas Sturmlechner gentoo.org> dev-util/clazy/clazy-1.6-r1.ebuild | 50 +++ dev-util/clazy/files/clazy-1.6-llvm-10.patch | 75 2 files changed, 125 insertions(+) diff --git a/dev-util/clazy/clazy-1.6-r1.ebuild b/dev-util/clazy/clazy-1.6-r1.ebuild new file mode 100644 index 000..075782027ed --- /dev/null +++ b/dev-util/clazy/clazy-1.6-r1.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake + +DESCRIPTION="Compiler plugin which allows clang to understand Qt semantics" +HOMEPAGE="https://cgit.kde.org/clazy.git/tree/README.md; +SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz" + +LICENSE="LGPL-2+" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +RDEPEND=" + >=sys-devel/llvm-3.8:= +" +DEPEND="${RDEPEND}" + +DOCS=( README.md ) + +PATCHES=( "${FILESDIR}/${P}-llvm-10.patch" ) + +src_prepare() { + cmake_src_prepare + + sed -e '/install(FILES README.md COPYING-LGPL2.txt checks.json DESTINATION/d' \ + -i CMakeLists.txt || die + + sed -e 's|${MAN_INSTALL_DIR}|share/man/man1|' \ + -i docs/man/CMakeLists.txt || die +} + +src_configure() { + # this package requires both llvm and clang of the same version. + # clang pulls in the equivalent llvm version, but not vice versa. + # so, we must find llvm based on the installed clang version. + # bug #681568 + local clang_version=$(best_version "sys-devel/clang") + export LLVM_ROOT="/usr/lib/llvm/$(ver_cut 1 ${clang_version##sys-devel/clang-})" + cmake_src_configure +} + +src_install() { + cmake_src_install + mv "${D}"/usr/share/doc/clazy/* "${D}"/usr/share/doc/${PF} || die + rmdir "${D}"/usr/share/doc/clazy || die +} diff --git a/dev-util/clazy/files/clazy-1.6-llvm-10.patch b/dev-util/clazy/files/clazy-1.6-llvm-10.patch new file mode 100644 index 000..f00695f5211 --- /dev/null +++ b/dev-util/clazy/files/clazy-1.6-llvm-10.patch @@ -0,0 +1,75 @@ +From df41bd29433937111edca3654a7beb11ec765029 Mon Sep 17 00:00:00 2001 +From: Johannes Ziegenbalg +Date: Fri, 27 Mar 2020 14:18:32 +0100 +Subject: Fix build issues using llvm 10.0.0 + +--- + CMakeLists.txt| 2 +- + src/ClazyStandaloneMain.cpp | 10 ++ + src/checks/level0/qstring-ref.cpp | 4 + 3 files changed, 15 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f1463cf..a30813f 100644 +--- a/CMakeLists.txt b/CMakeLists.txt +@@ -53,7 +53,7 @@ if(MSVC) + # disable trigger-happy warnings from Clang/LLVM headers + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267 /wd4244 /wd4291 /wd4800 /wd4141 /wd4146 /wd4251") + elseif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -fno-exceptions -fno-rtti") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -fno-exceptions -fno-rtti") + endif() + + set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-flat_namespace -Wl,-undefined -Wl,suppress") +diff --git a/src/ClazyStandaloneMain.cpp b/src/ClazyStandaloneMain.cpp +index aada189..6baae32 100644 +--- a/src/ClazyStandaloneMain.cpp b/src/ClazyStandaloneMain.cpp +@@ -93,7 +93,11 @@ public: + { + } + ++#if LLVM_VERSION_MAJOR >= 10 ++std::unique_ptr create() override ++#else + FrontendAction *create() override ++#endif + { + ClazyContext::ClazyOptions options = ClazyContext::ClazyOption_None; + +@@ -116,9 +120,15 @@ public: + options |= ClazyContext::ClazyOption_IgnoreIncludedFiles; + + // TODO: We need to agregate the fixes with previous run ++#if LLVM_VERSION_MAJOR >= 10 ++return std::make_unique(s_checks.getValue(), s_headerFilter.getValue(), ++ s_ignoreDirs.getValue(), s_exportFixes.getValue(), ++ m_paths, options); ++#else + return new ClazyStandaloneASTAction(s_checks.getValue(), s_headerFilter.getValue(), +