public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Thomas Zimmermann <thomas.zimmermann@voestalpine.com>
To: git-commits@fedoraproject.org
Subject: [rpms/clazy] epel8: Use clang for compilation
Date: Fri, 14 Aug 2026 07:36:05 GMT	[thread overview]
Message-ID: <178669296552.1.11905318577606675387.rpms-clazy-35021e96d600@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/clazy
Branch : epel8
Commit : 35021e96d600373b658117ad2544a0a81fc10222
Author : Thomas Zimmermann <thomas.zimmermann@voestalpine.com>
Date   : 2026-08-14T09:35:49+02:00
Stats  : +132/-362 in 7 file(s)
URL    : https://src.fedoraproject.org/rpms/clazy/c/35021e96d600373b658117ad2544a0a81fc10222?branch=epel8

Log:
Use clang for compilation

---
diff --git a/.gitignore b/.gitignore
index f837a6a..b767067 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,11 @@
 /clazy-1.7.tar.xz
 /clazy-1.9.tar.xz
 /clazy-1.11.tar.xz
+/clazy-b205b52c0efbee044fd9377e077cb73e8772c8f8.tar.gz
+/clazy-69fedb41f3c41b3c81ba7707c606ce3010a3e445.tar.gz
+/clazy-560bdc17e7079c1b834dc9728a5ff9e4e0ca1420.tar.gz
+/clazy-1.13.tar.xz
+/clazy-1.14.tar.xz
+/clazy-1.15.tar.xz
+/clazy-v1.16.tar.xz
+/clazy-1.17.tar.xz

diff --git a/clazy-clang-15-support.patch b/clazy-clang-15-support.patch
deleted file mode 100644
index 54adac3..0000000
--- a/clazy-clang-15-support.patch
+++ /dev/null
@@ -1,220 +0,0 @@
-From 20fca52da739ebefa47e35f6b338bb99a0da3cfe Mon Sep 17 00:00:00 2001
-From: Cristian Adam <cristian.adam@qt.io>
-Date: Tue, 6 Sep 2022 16:30:02 +0200
-Subject: [PATCH] Build fixes for LLVM/Clang 15.0.0
-
-Change-Id: Icc39a0b1acffb5a6a4798b1259d8ad4e7dd47bc5
----
- CMakeLists.txt                              |  6 ++++++
- src/PreProcessorVisitor.cpp                 |  2 +-
- src/PreProcessorVisitor.h                   |  2 +-
- src/SourceCompatibilityHelpers.h            | 15 +++++++++++++++
- src/Utils.cpp                               |  3 ++-
- src/checkbase.cpp                           |  4 ++--
- src/checkbase.h                             |  4 ++--
- src/checks/manuallevel/qt6-fwd-fixes.cpp    |  2 +-
- src/checks/manuallevel/qt6-fwd-fixes.h      |  2 +-
- src/checks/manuallevel/qt6-header-fixes.cpp |  2 +-
- src/checks/manuallevel/qt6-header-fixes.h   |  2 +-
- 11 files changed, 33 insertions(+), 11 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index f8459c5..d89325e 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -114,6 +114,10 @@ else()
-     set(clang_tooling_refactoring_lib clangToolingRefactor)
- endif()
-
-+if (${LLVM_VERSION} VERSION_GREATER_EQUAL "15.0.0")
-+  set(clang_support_lib clangSupport)
-+endif()
-+
- macro(link_to_llvm name is_standalone)
-   if (CLAZY_LINK_CLANG_DYLIB)
-     target_link_libraries(${name} clang-cpp)
-@@ -131,6 +135,7 @@ macro(link_to_llvm name is_standalone)
-
-       target_link_libraries(${name} ${clang_lib})
-     endforeach()
-+    target_link_libraries(${name} ${clang_support_lib})
-     target_link_libraries(${name} clangTooling)
-     target_link_libraries(${name} clangToolingCore)
-     target_link_libraries(${name} ${clang_tooling_refactoring_lib})
-@@ -302,6 +307,7 @@ else()
-     clangFrontendTool
-     clangRewrite
-     clangSerialization
-+    ${clang_support_lib}
-     clangTooling
-     clangStaticAnalyzerCheckers
-     clangStaticAnalyzerCore
-diff --git a/src/PreProcessorVisitor.cpp b/src/PreProcessorVisitor.cpp
-index 5e63a13..5fdfe5f 100644
---- a/src/PreProcessorVisitor.cpp
-+++ b/src/PreProcessorVisitor.cpp
-@@ -185,7 +185,7 @@ void PreProcessorVisitor::MacroExpands(const Token &MacroNameTok, const MacroDef
-
- void PreProcessorVisitor::InclusionDirective (clang::SourceLocation, const clang::Token &,
-                                               clang::StringRef FileName, bool IsAngled, clang::CharSourceRange FilenameRange,
--                                              const clang::FileEntry *, clang::StringRef, clang::StringRef,
-+                                              clazy::OptionalFileEntryRef, clang::StringRef, clang::StringRef,
-                                               const clang::Module *, clang::SrcMgr::CharacteristicKind)
- {
-    if (m_ci.getPreprocessor().isInPrimaryFile() && !clazy::endsWith(FileName.str(), ".moc")) {
-diff --git a/src/PreProcessorVisitor.h b/src/PreProcessorVisitor.h
-index dc80ff3..1bb17a5 100644
---- a/src/PreProcessorVisitor.h
-+++ b/src/PreProcessorVisitor.h
-@@ -71,7 +71,7 @@ protected:
-                       clang::SourceRange range, const clang::MacroArgs *) override;
-     void InclusionDirective (clang::SourceLocation HashLoc, const clang::Token &IncludeTok,
-                              clang::StringRef FileName, bool IsAngled, clang::CharSourceRange FilenameRange,
--                             const clang::FileEntry *File, clang::StringRef SearchPath, clang::StringRef RelativePath,
-+                             clazy::OptionalFileEntryRef File, clang::StringRef SearchPath, clang::StringRef RelativePath,
-                              const clang::Module *Imported, clang::SrcMgr::CharacteristicKind FileType) override;
- private:
-     std::string getTokenSpelling(const clang::MacroDefinition &) const;
-diff --git a/src/SourceCompatibilityHelpers.h b/src/SourceCompatibilityHelpers.h
-index 4ea923a..c1a23a4 100644
---- a/src/SourceCompatibilityHelpers.h
-+++ b/src/SourceCompatibilityHelpers.h
-@@ -144,6 +144,21 @@ inline bool contains_lower(clang::StringRef haystack, clang::StringRef needle)
- #endif
- }
-
-+#if LLVM_VERSION_MAJOR >= 15
-+using OptionalFileEntryRef = clang::Optional<clang::FileEntryRef>;
-+#else
-+using OptionalFileEntryRef = const clang::FileEntry*;
-+#endif
-+
-+inline bool isAscii(clang::StringLiteral *lt)
-+{
-+#if LLVM_VERSION_MAJOR >= 15
-+    return lt->isOrdinary();
-+#else
-+    return lt->isAscii();
-+#endif
-+}
-+
- }
-
- #endif
-diff --git a/src/Utils.cpp b/src/Utils.cpp
-index 3cdf787..70e0577 100644
---- a/src/Utils.cpp
-+++ b/src/Utils.cpp
-@@ -25,6 +25,7 @@
- #include "Utils.h"
- #include "StringUtils.h"
- #include "HierarchyUtils.h"
-+#include "SourceCompatibilityHelpers.h"
- #include "StmtBodyRange.h"
- #include "clazy_stl.h"
-
-@@ -670,7 +671,7 @@ const CXXRecordDecl *Utils::recordForMemberCall(CXXMemberCallExpr *call, string
- bool Utils::isAscii(StringLiteral *lt)
- {
-     // 'é' for some reason has isAscii() == true, so also call containsNonAsciiOrNull
--    return lt && lt->isAscii() && !lt->containsNonAsciiOrNull();
-+    return lt && clazy::isAscii(lt) && !lt->containsNonAsciiOrNull();
- }
-
- bool Utils::isInDerefExpression(Stmt *s, ParentMap *map)
-diff --git a/src/checkbase.cpp b/src/checkbase.cpp
-index f5936df..dcc7c99 100644
---- a/src/checkbase.cpp
-+++ b/src/checkbase.cpp
-@@ -105,7 +105,7 @@ void ClazyPreprocessorCallbacks::MacroDefined(const Token &macroNameTok, const M
- }
-
- void ClazyPreprocessorCallbacks::InclusionDirective(clang::SourceLocation HashLoc, const clang::Token &IncludeTok, clang::StringRef FileName, bool IsAngled,
--                                                    clang::CharSourceRange FilenameRange, const clang::FileEntry *File, clang::StringRef SearchPath,
-+                                                    clang::CharSourceRange FilenameRange, clazy::OptionalFileEntryRef File, clang::StringRef SearchPath,
-                                                     clang::StringRef RelativePath, const clang::Module *Imported, clang::SrcMgr::CharacteristicKind FileType)
- {
-     check->VisitInclusionDirective(HashLoc, IncludeTok, FileName, IsAngled, FilenameRange, File, SearchPath, RelativePath, Imported, FileType);
-@@ -182,7 +182,7 @@ void CheckBase::VisitEndif(SourceLocation, SourceLocation)
- }
-
- void CheckBase::VisitInclusionDirective(clang::SourceLocation , const clang::Token &, clang::StringRef , bool ,
--                        clang::CharSourceRange , const clang::FileEntry *, clang::StringRef ,
-+                        clang::CharSourceRange , clazy::OptionalFileEntryRef, clang::StringRef ,
-                         clang::StringRef , const clang::Module *, clang::SrcMgr::CharacteristicKind )
- {
-     // Overriden in derived classes
-diff --git a/src/checkbase.h b/src/checkbase.h
-index c5db2da..02f6a6b 100644
---- a/src/checkbase.h
-+++ b/src/checkbase.h
-@@ -91,7 +91,7 @@ public:
-     void Else(clang::SourceLocation loc, clang::SourceLocation ifLoc) override;
-     void Endif(clang::SourceLocation loc, clang::SourceLocation ifLoc) override;
-     void InclusionDirective(clang::SourceLocation HashLoc, const clang::Token &IncludeTok, clang::StringRef FileName, bool IsAngled,
--                            clang::CharSourceRange FilenameRange, const clang::FileEntry *File, clang::StringRef SearchPath,
-+                            clang::CharSourceRange FilenameRange, clazy::OptionalFileEntryRef File, clang::StringRef SearchPath,
-                             clang::StringRef RelativePath, const clang::Module *Imported, clang::SrcMgr::CharacteristicKind FileType) override;
- private:
-     CheckBase *const check;
-@@ -151,7 +151,7 @@ protected:
-     virtual void VisitElse(clang::SourceLocation loc, clang::SourceLocation ifLoc);
-     virtual void VisitEndif(clang::SourceLocation loc, clang::SourceLocation ifLoc);
-     virtual void VisitInclusionDirective(clang::SourceLocation HashLoc, const clang::Token &IncludeTok, clang::StringRef FileName, bool IsAngled,
--                            clang::CharSourceRange FilenameRange, const clang::FileEntry *File, clang::StringRef SearchPath,
-+                            clang::CharSourceRange FilenameRange, clazy::OptionalFileEntryRef File, clang::StringRef SearchPath,
-                             clang::StringRef RelativePath, const clang::Module *Imported, clang::SrcMgr::CharacteristicKind FileType);
-
-     void enablePreProcessorCallbacks();
-diff --git a/src/checks/manuallevel/qt6-fwd-fixes.cpp b/src/checks/manuallevel/qt6-fwd-fixes.cpp
-index 83bf81e..c87d9ca 100644
---- a/src/checks/manuallevel/qt6-fwd-fixes.cpp
-+++ b/src/checks/manuallevel/qt6-fwd-fixes.cpp
-@@ -166,7 +166,7 @@ void Qt6FwdFixes::VisitDecl(clang::Decl *decl)
- }
-
- void Qt6FwdFixes::VisitInclusionDirective(clang::SourceLocation HashLoc, const clang::Token &IncludeTok, clang::StringRef FileName, bool IsAngled,
--                        clang::CharSourceRange FilenameRange, const clang::FileEntry *File, clang::StringRef SearchPath,
-+                        clang::CharSourceRange FilenameRange, clazy::OptionalFileEntryRef File, clang::StringRef SearchPath,
-                         clang::StringRef RelativePath, const clang::Module *Imported, clang::SrcMgr::CharacteristicKind FileType)
- {
-     auto current_file = m_sm.getFilename(HashLoc);
-diff --git a/src/checks/manuallevel/qt6-fwd-fixes.h b/src/checks/manuallevel/qt6-fwd-fixes.h
-index 37b59d9..bb928ba 100644
---- a/src/checks/manuallevel/qt6-fwd-fixes.h
-+++ b/src/checks/manuallevel/qt6-fwd-fixes.h
-@@ -47,7 +47,7 @@ public:
-     explicit Qt6FwdFixes(const std::string &name, ClazyContext *context);
-     void VisitDecl(clang::Decl *decl) override;
-     void VisitInclusionDirective(clang::SourceLocation HashLoc, const clang::Token &IncludeTok, clang::StringRef FileName, bool IsAngled,
--                            clang::CharSourceRange FilenameRange, const clang::FileEntry *File, clang::StringRef SearchPath,
-+                            clang::CharSourceRange FilenameRange, clazy::OptionalFileEntryRef File, clang::StringRef SearchPath,
-                             clang::StringRef RelativePath, const clang::Module *Imported, clang::SrcMgr::CharacteristicKind FileType) override;
-     bool m_including_qcontainerfwd = false;
-     std::set<clang::StringRef> m_qcontainerfwd_included_in_files;
-diff --git a/src/checks/manuallevel/qt6-header-fixes.cpp b/src/checks/manuallevel/qt6-header-fixes.cpp
-index d458b77..aaa2809 100644
---- a/src/checks/manuallevel/qt6-header-fixes.cpp
-+++ b/src/checks/manuallevel/qt6-header-fixes.cpp
-@@ -270,7 +270,7 @@ Qt6HeaderFixes::Qt6HeaderFixes(const std::string &name, ClazyContext *context)
- }
-
- void Qt6HeaderFixes::VisitInclusionDirective(clang::SourceLocation HashLoc, const clang::Token &IncludeTok, clang::StringRef FileName, bool IsAngled,
--                        clang::CharSourceRange FilenameRange, const clang::FileEntry *File, clang::StringRef SearchPath,
-+                        clang::CharSourceRange FilenameRange, clazy::OptionalFileEntryRef File, clang::StringRef SearchPath,
-                         clang::StringRef RelativePath, const clang::Module *Imported, clang::SrcMgr::CharacteristicKind FileType)
- {
-     if (shouldIgnoreFile(HashLoc))
-diff --git a/src/checks/manuallevel/qt6-header-fixes.h b/src/checks/manuallevel/qt6-header-fixes.h
-index ae09f7a..8ffbb10 100644
---- a/src/checks/manuallevel/qt6-header-fixes.h
-+++ b/src/checks/manuallevel/qt6-header-fixes.h
-@@ -46,7 +46,7 @@ class Qt6HeaderFixes
- public:
-     explicit Qt6HeaderFixes(const std::string &name, ClazyContext *context);
-     void VisitInclusionDirective(clang::SourceLocation HashLoc, const clang::Token &IncludeTok, clang::StringRef FileName, bool IsAngled,
--                            clang::CharSourceRange FilenameRange, const clang::FileEntry *File, clang::StringRef SearchPath,
-+                            clang::CharSourceRange FilenameRange, clazy::OptionalFileEntryRef File, clang::StringRef SearchPath,
-                             clang::StringRef RelativePath, const clang::Module *Imported, clang::SrcMgr::CharacteristicKind FileType) override;
-
- };

diff --git a/clazy-clang-16-support.patch b/clazy-clang-16-support.patch
deleted file mode 100644
index 7e3fd70..0000000
--- a/clazy-clang-16-support.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From a05ac7eb6f6198c3f478bd7b5b4bfc062a8d63cc Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ivan=20=C4=8Cuki=C4=87?= <ivan.cukic@kdab.com>
-Date: Tue, 7 Feb 2023 11:06:19 +0100
-Subject: [PATCH] Adapt to API changes in clang/llvm 16
-
----
- src/SourceCompatibilityHelpers.h        | 17 ++++++++++++-----
- src/checkbase.h                         |  1 +
- src/checks/level0/lambda-in-connect.cpp |  2 +-
- 3 files changed, 14 insertions(+), 6 deletions(-)
-
-diff --git a/src/SourceCompatibilityHelpers.h b/src/SourceCompatibilityHelpers.h
-index c1a23a4b..5e2dc606 100644
---- a/src/SourceCompatibilityHelpers.h
-+++ b/src/SourceCompatibilityHelpers.h
-@@ -107,7 +107,11 @@ inline clang::tooling::Replacements& DiagnosticFix(clang::tooling::Diagnostic &d
-
- inline auto getBuffer(const clang::SourceManager &sm, clang::FileID id, bool *invalid)
- {
--#if LLVM_VERSION_MAJOR >= 12
-+#if LLVM_VERSION_MAJOR >= 16
-+    auto buffer = sm.getBufferOrNone(id);
-+    *invalid = !buffer.has_value();
-+    return buffer;
-+#elif LLVM_VERSION_MAJOR >= 12
-     auto buffer = sm.getBufferOrNone(id);
-     *invalid = !buffer.hasValue();
-     return buffer;
-@@ -116,11 +120,12 @@ inline auto getBuffer(const clang::SourceManager &sm, clang::FileID id, bool *in
- #endif
- }
-
--#if LLVM_VERSION_MAJOR >= 12
--
-+#if LLVM_VERSION_MAJOR >= 16
-+#define GET_LEXER(id, inputFile, sm, lo) \
-+clang::Lexer(id, inputFile.value(), sm, lo)
-+#elif LLVM_VERSION_MAJOR >= 12
- #define GET_LEXER(id, inputFile, sm, lo) \
- clang::Lexer(id, inputFile.getValue(), sm, lo)
--
- #else
- #define GET_LEXER(id, inputFile, sm, lo) \
- clang::Lexer(id, inputFile, sm, lo)
-@@ -144,7 +149,9 @@ inline bool contains_lower(clang::StringRef haystack, clang::StringRef needle)
- #endif
- }
-
--#if LLVM_VERSION_MAJOR >= 15
-+#if LLVM_VERSION_MAJOR >= 16
-+using OptionalFileEntryRef = clang::CustomizableOptional<clang::FileEntryRef>;
-+#elif LLVM_VERSION_MAJOR >= 15
- using OptionalFileEntryRef = clang::Optional<clang::FileEntryRef>;
- #else
- using OptionalFileEntryRef = const clang::FileEntry*;
-diff --git a/src/checkbase.h b/src/checkbase.h
-index 02f6a6bf..6a8c634b 100644
---- a/src/checkbase.h
-+++ b/src/checkbase.h
-@@ -93,6 +93,7 @@ class ClazyPreprocessorCallbacks
-     void InclusionDirective(clang::SourceLocation HashLoc, const clang::Token &IncludeTok, clang::StringRef FileName, bool IsAngled,
-                             clang::CharSourceRange FilenameRange, clazy::OptionalFileEntryRef File, clang::StringRef SearchPath,
-                             clang::StringRef RelativePath, const clang::Module *Imported, clang::SrcMgr::CharacteristicKind FileType) override;
-+
- private:
-     CheckBase *const check;
- };
-diff --git a/src/checks/level0/lambda-in-connect.cpp b/src/checks/level0/lambda-in-connect.cpp
-index b0da926f..1ba1126f 100644
---- a/src/checks/level0/lambda-in-connect.cpp
-+++ b/src/checks/level0/lambda-in-connect.cpp
-@@ -71,7 +71,7 @@ void LambdaInConnect::VisitStmt(clang::Stmt *stmt)
-
-     for (auto capture : captures) {
-         if (capture.getCaptureKind() == clang::LCK_ByRef) {
--            VarDecl *declForCapture = capture.getCapturedVar();
-+            auto *declForCapture = capture.getCapturedVar();
-             if (declForCapture && declForCapture != receiverDecl && clazy::isValueDeclInFunctionContext(declForCapture))
-                 emitWarning(capture.getLocation(), "captured local variable by reference might go out of scope before lambda is called");
-         }

diff --git a/clazy-clang-17-support.patch b/clazy-clang-17-support.patch
deleted file mode 100644
index 8da1b28..0000000
--- a/clazy-clang-17-support.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From a9aabd821d8be7932c954e1cdd8d4e10f38f8785 Mon Sep 17 00:00:00 2001
-From: Cristian Adam <cristian.adam@gmail.com>
-Date: Mon, 14 Aug 2023 18:16:01 +0200
-Subject: [PATCH] Fix compilation with LLVM 17.0.0 (rc2)
-
-Change-Id: I9d3fc86185c1e7c86145da043e1982d2979b36e9
----
- .../manuallevel/unexpected-flag-enumerator-value.cpp   | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/src/checks/manuallevel/unexpected-flag-enumerator-value.cpp b/src/checks/manuallevel/unexpected-flag-enumerator-value.cpp
-index ae1e607..4390fb1 100644
---- a/src/checks/manuallevel/unexpected-flag-enumerator-value.cpp
-+++ b/src/checks/manuallevel/unexpected-flag-enumerator-value.cpp
-@@ -61,8 +61,13 @@ static bool isIntentionallyNotPowerOf2(EnumConstantDecl *en) {
-     if (val.isMask() && val.countTrailingOnes() >= MinOnesToQualifyAsMask)
-         return true;
-
-+#if LLVM_VERSION_MAJOR >= 17
-+    if (val.isShiftedMask() && val.popcount() >= MinOnesToQualifyAsMask)
-+        return true;
-+#else
-     if (val.isShiftedMask() && val.countPopulation() >= MinOnesToQualifyAsMask)
-         return true;
-+#endif
-
-     if (clazy::contains_lower(en->getName(), "mask"))
-         return true;
-@@ -158,7 +163,11 @@ void UnexpectedFlagEnumeratorValue::VisitDecl(clang::Decl *decl)
-
-     for (EnumConstantDecl* enumerator : enumerators) {
-         const auto &initVal = enumerator->getInitVal();
-+#if LLVM_VERSION_MAJOR >= 17
-+        if (!initVal.isPowerOf2() && !initVal.isZero() && !initVal.isNegative()) {
-+#else
-         if (!initVal.isPowerOf2() && !initVal.isNullValue() && !initVal.isNegative()) {
-+#endif
-             if (isIntentionallyNotPowerOf2(enumerator))
-                 continue;
-             const auto value = enumerator->getInitVal().getLimitedValue();

diff --git a/clazy.spec b/clazy.spec
index e374dba..7e6c718 100644
--- a/clazy.spec
+++ b/clazy.spec
@@ -1,24 +1,27 @@
-
 Name:           clazy
 Summary:        Qt oriented code checker based on clang framework
-Version:        1.11
-Release:        11%{?dist}
+Version:        1.17
+Release:        4%{?dist}
 License:        LGPL-2.0-or-later
-URL:            https://invent.kde.org/sdk/%{name}/
+URL:            https://invent.kde.org/sdk/%{name}
+
+%if 0%{?commitdate}
+Source0:        %{url}/-/archive/%{commit}/%{name}-%{commit}.tar.gz
+%else
 Source0:        https://download.kde.org/stable/%{name}/%{version}/src/%{name}-%{version}.tar.xz
+%endif
 
 Patch0:         clazy-no-rpath.patch
-Patch1:         clazy-clang-15-support.patch
-Patch2:         clazy-clang-16-support.patch
-Patch3:         clazy-clang-17-support.patch
-Patch4:         clazy-stdfs.patch
 
 BuildRequires: cmake
-BuildRequires: gcc-c++
-BuildRequires: clang-devel llvm-devel
+BuildRequires: clang
+BuildRequires: clang-devel
+BuildRequires: clang-tools-extra-devel
+BuildRequires: llvm-devel
 BuildRequires: perl-podlators
 
 Requires: clang(major) = %{clang_major_version}
+Requires: clang-tools-extra
 
 %description
 clazy is a compiler plugin which allows clang to understand Qt semantics.
@@ -28,13 +31,10 @@ refactoring.
 
 
 %prep
-%autosetup -p1
+%autosetup -p1 -n %{name}-%{?commitdate:%{commit}}%{!?commitdate:v%{version}}
 
 %build
-%{cmake} \
-    -DCMAKE_CXX_STANDARD=17 \
-    -DCMAKE_CXX_STANDARD_REQUIRED=1
-
+%cmake -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++
 %cmake_build
 
 %install
@@ -43,24 +43,91 @@ refactoring.
 %ldconfig_scriptlets
 
 %files
-%doc HOWTO
-%license COPYING*
+%doc HOWTO.md README.md
+%license LICENSES/*
 %{_bindir}/clazy
 %{_bindir}/clazy-standalone
 %dir %{_docdir}/clazy
 %{_docdir}/clazy/*
 %{_mandir}/man1/clazy.1.gz
 %{_libdir}/ClazyPlugin.so
+%{_libdir}/ClazyClangTidy.so
 %{_datadir}/metainfo/org.kde.clazy.metainfo.xml
 
 
 %changelog
+* Fri Aug 14 2026 Thomas Zimmermann <thomas.zimmermann@voestalpine.com> - 1.17-4
+- Use clang for compilation
+
+* Wed Jul 15 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.17-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
+
+* Fri Feb 27 2026 Jan Grulich <jgrulich@redhat.com> - 1.17-2
+- Rebuild (LLVM-22)
+
+* Thu Feb 26 2026 Jan Grulich <jgrulich@redhat.com> - 1.17-1
+- 1.17
+
+* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.16-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
+
+* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.16-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
+
+* Wed Oct 29 2025 Jan Grulich <jgrulich@redhat.com> - 1.16-2
+- Rebuild (LLVM-21)
+
+* Mon Sep 08 2025 Jan Grulich <jgrulich@redhat.com> - 1.16-1
+- 1.16
+
+* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.15-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
+
+* Thu Jun 19 2025 Steve Cossette <farchord@gmail.com> - 1.15-1
+- Update to 1.15
+
+* Tue Apr 29 2025 Steve Cossette <farchord@gmail.com> - 1.14-1
+- 1.14
+
+* Wed Apr 09 2025 Jan Grulich <jgrulich@redhat.com> - 1.13-3
+- Fix build against Clang/LLVM 20
+
+* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.13-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
+
+* Mon Dec 30 2024 Steve Cossette <farchord@gmail.com> - 1.13-1
+- 1.13
+
+* Wed Nov 20 2024 Jan Grulich <jgrulich@redhat.com> - 1.12^git20241119.560bdc1-1
+- Update to latest snapshot with LLVM-19 support
+
+* Mon Oct 21 2024 Jan Grulich <jgrulich@redhat.com> - 1.11^git20240128.69fedb4-7
+- Rebuild (LLVM-19)
+
+* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.11^git20240128.69fedb4-6
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
+
 * Fri May 24 2024 Thomas Zimmermann <thomas.zimmermann@voestalpine.com> - 1.11-11
 - Rebuild for RHEL 8.10
 
+* Sat Mar 02 2024 Tom Stellard <tstellar@redhat.com> - 1.11^git20240128.69fedb4-5
+- Rebuild for clang 18
+
+* Mon Jan 29 2024 Jan Grulich <jgrulich@redhat.com> - 1.11^git20230618.69fedb4-4
+- Update to latest git snapshot
+
+* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.11^git20230618.b205b52-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
+
+* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.11^git20230618.b205b52-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
+
 * Tue Nov 28 2023 Thomas Zimmermann <thomas.zimmermann@voestalpine.com> - 1.11-10
 - Fix build with GCC 8 for EPEL 8
 
+* Tue Sep 19 2023 Alessandro Astone <ales.astone@gmail.com> - 1.11^git20230618.b205b52-1
+- Build from git snapshot to fix crash with LLVM17
+
 * Wed Sep 06 2023 Jan Grulich <jgrulich@redhat.com> - 1.11-9
 - Rebuild (clang-17)
 

diff --git a/sources b/sources
index d486f04..272134d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (clazy-1.11.tar.xz) = 6a7c162392dd30aea29669275cea814d6daccf7931b8cdb20997f9bbff5619832d5461a6d0f854ecbc4726e52b6937c4f9cb8651087ffe73676c04239a38ca2b
+SHA512 (clazy-1.17.tar.xz) = afd5f5517108120fb83342d6ee7302f0fbb5472d5bcb58961b7dc9542c95baf5b6e6e130962e71bd528b98c9b9ffdeeaabfa40701fea030f4ebc7beb193cd73a

diff --git a/clazy-stdfs.patch b/clazy-stdfs.patch
new file mode 100644
index 0000000..54fe2bf
--- /dev/null
+++ b/clazy-stdfs.patch
@@ -0,0 +1,27 @@
+diff -Nurd clazy-1.10/CMakeLists.txt clazy-1.10.new/CMakeLists.txt
+--- clazy-1.10/CMakeLists.txt	2021-07-20 16:54:58.000000000 +0200
++++ clazy-1.10.new/CMakeLists.txt	2021-12-03 11:34:38.807231991 +0100
+@@ -128,6 +128,23 @@
+     target_link_libraries(${name} ${clang_tooling_refactoring_lib})
+   endif()
+ 
++  # g++ versions less than 9.1 need to link against libstdc++fs
++  # if std::filesystem is used
++  if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
++    AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.1)
++    target_link_libraries(${name} stdc++fs)
++  endif()
++  # the same applies to clang versions less than 9.0: they need to link
++  # against libstdc++fs or libc++fs if std::filesystem is used
++  if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang"
++    AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
++    if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
++      target_link_libraries(${name} stdc++fs)
++    else()
++      target_link_libraries(${name} c++fs)
++    endif()
++  endif()
++
+   foreach(llvm_lib ${LLVM_LIBS})
+     if(NOT ${is_standalone} AND NOT APPLE AND NOT MINGW AND NOT MSVC)
+         ## Don't link against LLVMSupport, causes: CommandLine Error: Option 'view-background' registered more than once!

diff --git a/clazy.spec b/clazy.spec
index cb1a04a..7e6c718 100644
--- a/clazy.spec
+++ b/clazy.spec
@@ -1,7 +1,7 @@
 Name:           clazy
 Summary:        Qt oriented code checker based on clang framework
 Version:        1.17
-Release:        3%{?dist}
+Release:        4%{?dist}
 License:        LGPL-2.0-or-later
 URL:            https://invent.kde.org/sdk/%{name}
 
@@ -13,9 +13,8 @@ Source0:        https://download.kde.org/stable/%{name}/%{version}/src/%{name}-%
 
 Patch0:         clazy-no-rpath.patch
 
-
 BuildRequires: cmake
-BuildRequires: gcc-c++
+BuildRequires: clang
 BuildRequires: clang-devel
 BuildRequires: clang-tools-extra-devel
 BuildRequires: llvm-devel
@@ -35,7 +34,7 @@ refactoring.
 %autosetup -p1 -n %{name}-%{?commitdate:%{commit}}%{!?commitdate:v%{version}}
 
 %build
-%cmake
+%cmake -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++
 %cmake_build
 
 %install
@@ -57,6 +56,9 @@ refactoring.
 
 
 %changelog
+* Fri Aug 14 2026 Thomas Zimmermann <thomas.zimmermann@voestalpine.com> - 1.17-4
+- Use clang for compilation
+
 * Wed Jul 15 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.17-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
 
@@ -105,6 +107,9 @@ refactoring.
 * Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.11^git20240128.69fedb4-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
 
+* Fri May 24 2024 Thomas Zimmermann <thomas.zimmermann@voestalpine.com> - 1.11-11
+- Rebuild for RHEL 8.10
+
 * Sat Mar 02 2024 Tom Stellard <tstellar@redhat.com> - 1.11^git20240128.69fedb4-5
 - Rebuild for clang 18
 
@@ -117,6 +122,9 @@ refactoring.
 * Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.11^git20230618.b205b52-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
 
+* Tue Nov 28 2023 Thomas Zimmermann <thomas.zimmermann@voestalpine.com> - 1.11-10
+- Fix build with GCC 8 for EPEL 8
+
 * Tue Sep 19 2023 Alessandro Astone <ales.astone@gmail.com> - 1.11^git20230618.b205b52-1
 - Build from git snapshot to fix crash with LLVM17
 

                 reply	other threads:[~2026-08-14  7:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178669296552.1.11905318577606675387.rpms-clazy-35021e96d600@fedoraproject.org \
    --to=thomas.zimmermann@voestalpine.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox