commit:     1120e868e4510c1a5c50d9dc905a5f69574a1745
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 15 14:02:59 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Jun 16 21:46:47 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1120e868

dev-util/clazy: add 1.15

Upstream commit 7faf58a545990d08478a81f123fd23363d3edf6a

See also:
https://mail.kde.org/pipermail/kde-announce-apps/2025-June/005866.html

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 dev-util/clazy/Manifest                            |  1 +
 dev-util/clazy/clazy-1.15.ebuild                   | 84 ++++++++++++++++++++++
 .../clazy/files/clazy-1.15-fix-build-w-o-pch.patch | 25 +++++++
 3 files changed, 110 insertions(+)

diff --git a/dev-util/clazy/Manifest b/dev-util/clazy/Manifest
index 7c29a2245784..f6ddf622988d 100644
--- a/dev-util/clazy/Manifest
+++ b/dev-util/clazy/Manifest
@@ -1 +1,2 @@
 DIST clazy-1.14.tar.xz 436764 BLAKE2B 
e4123df71591368017fec428095fa573aa74903861716dbe92386e948f7845453aac5fb8fe1fa2431ef42120363cf07935e155fdecbf3621b61e359a79c295ae
 SHA512 
2732e22d56d3121de3639e24759cf47648fc3f5550cf232cbaf97c7efc92e0aacb01c8921326fb15beca3679907aa26a900147b2d3f318792c767e7237604e98
+DIST clazy-1.15.tar.xz 439636 BLAKE2B 
bf79ab2cc1651d08c09408f8d1ae571e72c9a633e792ca7a4df0712964abbc0eb21068e2e287f62605e6841d834c826749659b1aec572223d2a701307f51573b
 SHA512 
9b3885dfa8889cf042a7d232a574ba27898eb81df0bd4863b2a97ef51b647bf95da068df842e5f66ae5ee5d14517db645cd100aa70f7bcd60cde3ebf65ec4ba0

diff --git a/dev-util/clazy/clazy-1.15.ebuild b/dev-util/clazy/clazy-1.15.ebuild
new file mode 100644
index 000000000000..10ffb2b846bf
--- /dev/null
+++ b/dev-util/clazy/clazy-1.15.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LLVM_COMPAT=( {19..20} )
+PYTHON_COMPAT=( python3_{11..14} )
+inherit cmake llvm-r1 python-any-r1
+
+DESCRIPTION="Compiler plugin which allows clang to understand Qt semantics"
+HOMEPAGE="https://apps.kde.org/clazy";
+SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz"
+
+LICENSE="LGPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       $(llvm_gen_dep 'llvm-core/clang:${LLVM_SLOT}')
+       $(llvm_gen_dep 'llvm-core/llvm:${LLVM_SLOT}')
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       test? (
+               ${PYTHON_DEPS}
+               dev-qt/qtbase:6[network,xml]
+               dev-qt/qtmultimedia:6
+               dev-qt/qtnetworkauth:6
+               dev-qt/qtscxml:6[qml]
+               dev-qt/qtsvg:6
+       )
+"
+
+PATCHES=(
+       # downstream patches
+       "${FILESDIR}"/${PN}-1.12-LIBRARY_DIRS.patch
+       "${FILESDIR}"/${PN}-1.12-INCLUDE_DIRS.patch
+       "${FILESDIR}"/${PN}-1.12-standalone-install-location.patch
+       "${FILESDIR}"/${PN}-1.12-clazy-install-location.patch
+       "${FILESDIR}"/${P}-fix-build-w-o-pch.patch # fixed in 1.16
+)
+
+pkg_setup() {
+       use test && python-any-r1_pkg_setup
+       llvm-r1_pkg_setup
+}
+
+src_prepare() {
+       cmake_src_prepare
+
+       sed -e '/install(FILES README.md COPYING-LGPL2.txt checks.json 
DESTINATION/d' \
+               -i CMakeLists.txt || die
+}
+
+src_configure() {
+       local -x LLVM_ROOT="$(get_llvm_prefix -d)"
+
+       export CI_JOB_NAME_SLUG="qt6"
+
+       cmake_src_configure
+}
+
+src_test() {
+       # clazy-standalone wants to be installed in the directory of the clang 
binary,
+       # so it can find the llvm/clang via relative paths.
+       # Requires the standalone-install-location.patch.
+       # Setup the directories and symlink the system include dir for that.
+       local -x LLVM_ROOT="$(get_llvm_prefix -d)"
+       local -x CLANG_ROOT="${LLVM_ROOT//llvm/clang}"
+       mkdir -p "${BUILD_DIR}${CLANG_ROOT}" || die
+
+       ln -s "${CLANG_ROOT}/include" "${BUILD_DIR}${CLANG_ROOT}/include" || die
+
+       # Run tests against built copy, not installed
+       # bug #811723
+       local -x PATH="${BUILD_DIR}/${LLVM_ROOT}/bin:${BUILD_DIR}/bin:${PATH}"
+       local -x LD_LIBRARY_PATH="${BUILD_DIR}/lib"
+
+       chmod +x "${BUILD_DIR}/bin/clazy" || die
+
+       cmake_src_test
+}

diff --git a/dev-util/clazy/files/clazy-1.15-fix-build-w-o-pch.patch 
b/dev-util/clazy/files/clazy-1.15-fix-build-w-o-pch.patch
new file mode 100644
index 000000000000..609bbbed243e
--- /dev/null
+++ b/dev-util/clazy/files/clazy-1.15-fix-build-w-o-pch.patch
@@ -0,0 +1,25 @@
+From cb6d241665a0ba7009129fcbdf877ac2246c2de8 Mon Sep 17 00:00:00 2001
+From: Luc Schrijvers <[email protected]>
+Date: Mon, 16 Jun 2025 10:39:25 +0200
+Subject: [PATCH] Add missing header
+
+Fixes: error: 'Lexer' is not a member of 'clang'
+---
+ src/SuppressionManager.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/SuppressionManager.cpp b/src/SuppressionManager.cpp
+index 112025ec..b94f1aa8 100644
+--- a/src/SuppressionManager.cpp
++++ b/src/SuppressionManager.cpp
+@@ -11,6 +11,7 @@
+ #include <clang/Basic/SourceLocation.h>
+ #include <clang/Basic/SourceManager.h>
+ #include <clang/Basic/TokenKinds.h>
++#include <clang/Lex/Lexer.h>
+ #include <clang/Lex/Token.h>
+ #include <llvm/Support/MemoryBuffer.h>
+ #include <llvm/Support/raw_ostream.h>
+-- 
+GitLab
+

Reply via email to