summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Palimaka <kensington@gentoo.org>2019-03-31 20:49:14 +1100
committerMichael Palimaka <kensington@gentoo.org>2019-03-31 20:49:30 +1100
commitbd4ac0dc54146264f00d132707fac794340a5e2d (patch)
tree6b249b719b84f89c091f066113bcb725ffaabec4
parentx11-libs/gnome-pty-helper: remove old (diff)
downloadgentoo-bd4ac0dc.tar.gz
gentoo-bd4ac0dc.tar.bz2
gentoo-bd4ac0dc.zip
dev-util/clazy: fix build with mismatched clang/llvm versions
Closes: https://bugs.gentoo.org/681568 Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Michael Palimaka <kensington@gentoo.org>
-rw-r--r--dev-util/clazy/clazy-1.5-r1.ebuild49
1 files changed, 49 insertions, 0 deletions
diff --git a/dev-util/clazy/clazy-1.5-r1.ebuild b/dev-util/clazy/clazy-1.5-r1.ebuild
new file mode 100644
index 000000000000..47e98ab9709b
--- /dev/null
+++ b/dev-util/clazy/clazy-1.5-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-utils
+
+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/clang:=
+ >=sys-devel/llvm-3.8:=
+"
+DEPEND="${RDEPEND}"
+
+DOCS=( README.md )
+
+src_prepare() {
+ cmake-utils_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-})s"
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ mv "${D}"/usr/share/doc/clazy/* "${D}"/usr/share/doc/${PF} || die
+ rmdir "${D}"/usr/share/doc/clazy || die
+}