libshit

Just some random shit
git clone https://git.neptards.moe/neptards/libshit.git
Log | Files | Refs | Submodules | README | LICENSE

include-what-you-use-0.16.ebuild (1233B)


      1 # Copyright 1999-2021 Gentoo Authors
      2 # Distributed under the terms of the GNU General Public License v2
      3 
      4 EAPI=7
      5 
      6 PYTHON_COMPAT=( python3_{8..11} )
      7 
      8 inherit cmake flag-o-matic llvm python-single-r1
      9 
     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/${PV}.tar.gz -> ${P}.tar.gz"
     13 
     14 LICENSE="GPL-2"
     15 SLOT="0"
     16 KEYWORDS="~amd64 ~x86"
     17 
     18 LLVM_MAX_SLOT=8
     19 
     20 RDEPEND="
     21 	sys-devel/clang:${LLVM_MAX_SLOT}=
     22 	${PYTHON_DEPS}
     23 "
     24 DEPEND="${RDEPEND}"
     25 
     26 REQUIRED_USE=${PYTHON_REQUIRED_USE}
     27 
     28 PATCHES=(
     29 	"${FILESDIR}/iwyu-${PV}-u3.patch"
     30 )
     31 
     32 llvm_check_deps() {
     33 	has_version "sys-devel/clang:${LLVM_SLOT}"
     34 }
     35 
     36 pkg_setup() {
     37 	llvm_pkg_setup
     38 	python-single-r1_pkg_setup
     39 }
     40 
     41 src_prepare() {
     42 	cmake_src_prepare
     43 	python_fix_shebang .
     44 }
     45 
     46 src_configure() {
     47 	local mycmakeargs=(
     48 		# Note [llvm install path]
     49 		# Unfortunately all binaries using clang driver
     50 		# have to reside at the same path depth as
     51 		# 'clang' binary itself. See bug #625972
     52 		# Thus as a hack we install it to the same directory
     53 		# as llvm/clang itself.
     54 		-DCMAKE_INSTALL_PREFIX="$(get_llvm_prefix "${LLVM_MAX_SLOT}")"
     55 	)
     56 	cmake_src_configure
     57 }
     58 
     59 src_test() {
     60 	"${EPYTHON}" run_iwyu_tests.py
     61 }