Gentoo Archives: gentoo-commits

From: Florian Schmaus <flow@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/include-what-you-use/
Date: Mon, 06 Dec 2021 08:32:22
Message-Id: 1638779535.06e036ef8f04afe4eac842b7fae63204fe68b47b.flow@gentoo
1 commit: 06e036ef8f04afe4eac842b7fae63204fe68b47b
2 Author: Florian Schmaus <flow <AT> gentoo <DOT> org>
3 AuthorDate: Mon Dec 6 08:31:56 2021 +0000
4 Commit: Florian Schmaus <flow <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 6 08:32:15 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06e036ef
7
8 dev-util/include-what-you-use: add 0.17
9
10 Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>
11
12 dev-util/include-what-you-use/Manifest | 1 +
13 .../include-what-you-use-0.17.ebuild | 57 ++++++++++++++++++++++
14 2 files changed, 58 insertions(+)
15
16 diff --git a/dev-util/include-what-you-use/Manifest b/dev-util/include-what-you-use/Manifest
17 index e569aeb6e6bd..c5487da81efb 100644
18 --- a/dev-util/include-what-you-use/Manifest
19 +++ b/dev-util/include-what-you-use/Manifest
20 @@ -1 +1,2 @@
21 DIST include-what-you-use-0.16.tar.gz 742573 BLAKE2B b8cd90db490d13f140126df8955d0968a9248480da09ca29b82fe1178c779ca75e6f29239bc6fb1556200c7d7c498f2340839e8500455ecaed9e6199fd3d55f7 SHA512 2923e18c40ddc5c03458b896d991adde03d489c6645ecc3cc4f69a508e323534afdef3233943e99533ffc21c64a10a8a5c635dc4797a61edf09d0a7a918a3cd5
22 +DIST include-what-you-use-0.17.tar.gz 747385 BLAKE2B 0f584521b070eec6448d65d6dc4c4fe09110e85099d2696da82be800ee82522185f378c849559d899424a85864878d5b7b4790b900c438ef1f008262d6de6e28 SHA512 2439e3dd37163d3953fc1e45614fb4325be093a162f25d0f45fa8126b2313942a7c8d45ed12454dfbfeb4cb4fcf2f4e3eebdc0ec5da14dad23533f7a0bf58290
23
24 diff --git a/dev-util/include-what-you-use/include-what-you-use-0.17.ebuild b/dev-util/include-what-you-use/include-what-you-use-0.17.ebuild
25 new file mode 100644
26 index 000000000000..ab4c265670d8
27 --- /dev/null
28 +++ b/dev-util/include-what-you-use/include-what-you-use-0.17.ebuild
29 @@ -0,0 +1,57 @@
30 +# Copyright 1999-2021 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=7
34 +
35 +PYTHON_COMPAT=( python3_{7..10} )
36 +
37 +inherit cmake llvm python-single-r1
38 +
39 +DESCRIPTION="Find unused include directives in C/C++ programs"
40 +HOMEPAGE="https://include-what-you-use.org/"
41 +SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
42 +
43 +LICENSE="GPL-2"
44 +SLOT="0"
45 +KEYWORDS="~amd64 ~x86"
46 +
47 +LLVM_MAX_SLOT=13
48 +
49 +RDEPEND="
50 + sys-devel/clang:${LLVM_MAX_SLOT}=
51 + ${PYTHON_DEPS}
52 +"
53 +DEPEND="${RDEPEND}"
54 +
55 +REQUIRED_USE=${PYTHON_REQUIRED_USE}
56 +
57 +llvm_check_deps() {
58 + has_version "sys-devel/clang:${LLVM_SLOT}"
59 +}
60 +
61 +pkg_setup() {
62 + llvm_pkg_setup
63 + python-single-r1_pkg_setup
64 +}
65 +
66 +src_prepare() {
67 + cmake_src_prepare
68 + python_fix_shebang .
69 +}
70 +
71 +src_configure() {
72 + local mycmakeargs=(
73 + # Note [llvm install path]
74 + # Unfortunately all binaries using clang driver
75 + # have to reside at the same path depth as
76 + # 'clang' binary itself. See bug #625972
77 + # Thus as a hack we install it to the same directory
78 + # as llvm/clang itself.
79 + -DCMAKE_INSTALL_PREFIX="$(get_llvm_prefix "${LLVM_MAX_SLOT}")"
80 + )
81 + cmake_src_configure
82 +}
83 +
84 +src_test() {
85 + "${EPYTHON}" run_iwyu_tests.py
86 +}