Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/llvm-toolchain-symlinks/
Date: Tue, 20 Sep 2022 16:55:43
Message-Id: 1663692924.eadd62daeb499184f038e77e5091999560554a06.mgorny@gentoo
1 commit: eadd62daeb499184f038e77e5091999560554a06
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 20 15:04:11 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 20 16:55:24 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eadd62da
7
8 sys-devel/llvm-toolchain-symlinks: Add for LLVM 14.x
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 .../llvm-toolchain-symlinks-14.ebuild | 42 ++++++++++++++++++++++
13 1 file changed, 42 insertions(+)
14
15 diff --git a/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-14.ebuild b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-14.ebuild
16 new file mode 100644
17 index 000000000000..9cc42ef77e31
18 --- /dev/null
19 +++ b/sys-devel/llvm-toolchain-symlinks/llvm-toolchain-symlinks-14.ebuild
20 @@ -0,0 +1,42 @@
21 +# Copyright 2022 Gentoo Authors
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=8
25 +
26 +inherit multilib
27 +
28 +DESCRIPTION="Symlinks to use LLVM on binutils-free system"
29 +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:LLVM"
30 +SRC_URI=""
31 +S=${WORKDIR}
32 +
33 +LICENSE="public-domain"
34 +SLOT="${PV}"
35 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
36 +IUSE="+native-symlinks"
37 +
38 +RDEPEND="
39 + sys-devel/llvm:${SLOT}
40 +"
41 +
42 +src_install() {
43 + use native-symlinks || return
44 +
45 + local tools=(
46 + addr2line ar dlltool nm objcopy objdump ranlib readelf size
47 + strings strip windres
48 + )
49 +
50 + local abi t
51 + local dest=/usr/lib/llvm/${SLOT}/bin
52 + dodir "${dest}"
53 + for t in "${tools[@]}"; do
54 + dosym "llvm-${t}" "${dest}/${t}"
55 + done
56 + for abi in $(get_all_abis); do
57 + local abi_chost=$(get_abi_CHOST "${abi}")
58 + for t in "${tools[@]}"; do
59 + dosym "llvm-${t}" "${dest}/${abi_chost}-${t}"
60 + done
61 + done
62 +}