summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/clazy/clazy-1.10-r1.ebuild')
-rw-r--r--dev-util/clazy/clazy-1.10-r1.ebuild46
1 files changed, 46 insertions, 0 deletions
diff --git a/dev-util/clazy/clazy-1.10-r1.ebuild b/dev-util/clazy/clazy-1.10-r1.ebuild
new file mode 100644
index 000000000000..d8be54c089d8
--- /dev/null
+++ b/dev-util/clazy/clazy-1.10-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LLVM_MAX_SLOT=12
+inherit cmake llvm
+
+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=""
+
+RDEPEND=">=sys-devel/clang-$((${LLVM_MAX_SLOT} + 1)):="
+DEPEND="${RDEPEND}"
+
+llvm_check_deps() {
+ has_version "sys-devel/clang:${LLVM_SLOT}" && has_version "sys-devel/llvm:${LLVM_SLOT}"
+}
+
+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
+}
+
+src_test() {
+ # Run tests against built copy, not installed
+ # bug #811723
+ PATH="${BUILD_DIR}/bin:${PATH}" LD_LIBRARY_PATH="${BUILD_DIR}/lib" cmake_src_test
+}