1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 python3_6 )
8 inherit cmake-utils flag-o-matic llvm python-single-r1
10 DESCRIPTION="Find unused include directives in C/C++ programs"
11 HOMEPAGE="https://include-what-you-use.org/"
12 SRC_URI="https://github.com/${PN}/${PN}/archive/clang_${PV}.tar.gz -> ${P}.src.tar.gz"
16 KEYWORDS="~amd64 ~x86"
20 RDEPEND="sys-devel/llvm:${LLVM_MAX_SLOT}
21 sys-devel/clang:${LLVM_MAX_SLOT}
26 REQUIRED_USE=${PYTHON_REQUIRED_USE}
28 S=${WORKDIR}/${PN}-clang_${PV}
32 python-single-r1_pkg_setup
36 cmake-utils_src_prepare
42 # Note [llvm install path]
43 # Unfortunately all binaries using clang driver
44 # have to reside at the same path depth as
45 # 'clang' binary itself. See bug #625972
46 # Thus as a hack we install it to the same directory
47 # as llvm/clang itself.
48 -DCMAKE_INSTALL_PREFIX="$(get_llvm_prefix "${LLVM_MAX_SLOT}")"
50 cmake-utils_src_configure
54 "${EPYTHON}" run_iwyu_tests.py