From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AC17B158087 for ; Mon, 13 Dec 2021 00:11:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 068132BC02F; Mon, 13 Dec 2021 00:11:44 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D7EF42BC02F for ; Mon, 13 Dec 2021 00:11:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 11C6B343363 for ; Mon, 13 Dec 2021 00:11:43 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A5FF91D5 for ; Mon, 13 Dec 2021 00:11:41 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1639354289.af5f598a4e43dd87b224e4281b167773c3a5d74e.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/clazy/, dev-util/clazy/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/clazy/clazy-1.10-r1.ebuild dev-util/clazy/clazy-1.10.ebuild dev-util/clazy/files/clazy-1.10-gcc-build.patch dev-util/clazy/files/clazy-1.10-use-c++17.patch X-VCS-Directories: dev-util/clazy/ dev-util/clazy/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: af5f598a4e43dd87b224e4281b167773c3a5d74e X-VCS-Branch: master Date: Mon, 13 Dec 2021 00:11:41 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5c35e362-0cef-439b-97a9-ae72c1644923 X-Archives-Hash: bb4c41442ae1c6bf47fc539260dae692 commit: af5f598a4e43dd87b224e4281b167773c3a5d74e Author: Sam James gentoo org> AuthorDate: Fri Dec 10 23:24:37 2021 +0000 Commit: Sam James gentoo org> CommitDate: Mon Dec 13 00:11:29 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af5f598a dev-util/clazy: use llvm.eclass to declare compatibility and build patch - We need to use llvm.eclass to ensure we don't use too new of a version of LLVM and Clang. We're now using the llvm.eclass mechanisms to enforce the same versions of Clang and LLVM. - Throw in a build patch from upstream (upstream commit b74c8729b7b71528c1528579435cda7fdb5d31b4) which was necessary for me. Bug: https://bugs.gentoo.org/811723 Bug: https://bugs.gentoo.org/823726 Closes: https://bugs.gentoo.org/824986 Signed-off-by: Sam James gentoo.org> .../{clazy-1.10.ebuild => clazy-1.10-r1.ebuild} | 25 ++++++------ dev-util/clazy/files/clazy-1.10-gcc-build.patch | 44 ++++++++++++++++++++++ dev-util/clazy/files/clazy-1.10-use-c++17.patch | 20 ++++++++++ 3 files changed, 78 insertions(+), 11 deletions(-) diff --git a/dev-util/clazy/clazy-1.10.ebuild b/dev-util/clazy/clazy-1.10-r1.ebuild similarity index 63% rename from dev-util/clazy/clazy-1.10.ebuild rename to dev-util/clazy/clazy-1.10-r1.ebuild index 160c50c5c641..d8369600c480 100644 --- a/dev-util/clazy/clazy-1.10.ebuild +++ b/dev-util/clazy/clazy-1.10-r1.ebuild @@ -3,7 +3,8 @@ EAPI=7 -inherit cmake +LLVM_MAX_SLOT=12 +inherit cmake llvm DESCRIPTION="Compiler plugin which allows clang to understand Qt semantics" HOMEPAGE="https://apps.kde.org/clazy" @@ -14,12 +15,18 @@ SLOT="0" KEYWORDS="~amd64 arm64 ~x86" IUSE="" -RDEPEND=" - >=sys-devel/clang-8.0:= - >=sys-devel/llvm-8.0:= -" +RDEPEND=" +Date: Thu, 2 Dec 2021 11:05:51 +0000 +Subject: [PATCH] Fix build with some newer gcc complaining about deleted Lexer + +--- a/src/SourceCompatibilityHelpers.h ++++ b/src/SourceCompatibilityHelpers.h +@@ -117,17 +117,13 @@ inline auto getBuffer(const clang::SourceManager &sm, clang::FileID id, bool *in + } + + #if LLVM_VERSION_MAJOR >= 12 +-inline clang::Lexer getLexer(clang::FileID id, llvm::Optional inputFile, +- const clang::SourceManager &sm, const clang::LangOptions &lo) +-{ +- return clang::Lexer(id, inputFile.getValue(), sm, lo); +-} ++ ++#define GET_LEXER(id, inputFile, sm, lo) \ ++clang::Lexer(id, inputFile.getValue(), sm, lo) ++ + #else +-inline clang::Lexer getLexer(clang::FileID id, const llvm::MemoryBuffer *inputFile, +- const clang::SourceManager &sm, const clang::LangOptions &lo) +-{ +- return clang::Lexer(id, inputFile, sm, lo); +-} ++#define GET_LEXER(id, inputFile, sm, lo) \ ++clang::Lexer(id, inputFile.getValue(), sm, lo) + #endif + + inline bool isFinal(const clang::CXXRecordDecl *record) +--- a/src/SuppressionManager.cpp ++++ b/src/SuppressionManager.cpp +@@ -91,7 +91,7 @@ void SuppressionManager::parseFile(FileID id, const SourceManager &sm, const cla + return; + } + +- auto lexer = clazy::getLexer(id, buffer, sm, lo); ++ auto lexer = GET_LEXER(id, buffer, sm, lo); + lexer.SetCommentRetentionState(true); + + Token token; +GitLab diff --git a/dev-util/clazy/files/clazy-1.10-use-c++17.patch b/dev-util/clazy/files/clazy-1.10-use-c++17.patch new file mode 100644 index 000000000000..73bd52aef0e4 --- /dev/null +++ b/dev-util/clazy/files/clazy-1.10-use-c++17.patch @@ -0,0 +1,20 @@ +https://invent.kde.org/sdk/clazy/-/commit/b0d831a6716229d18f2677c5d356b37f36d4dfd6 + +From: Sergio Martins +Date: Thu, 2 Dec 2021 11:31:58 +0000 +Subject: [PATCH] cmake: Require c++17 + +Fixes build with newer compiler which were nagging about not +finding std::filesystem +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -69,7 +69,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++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") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -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") +GitLab