12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- # Copyright 1999-2022 Gentoo Authors
- # Distributed under the terms of the GNU General Public License v2
- EAPI=7
- if [[ ${PV} == 9999 ]]; then
- EGIT_REPO_URI="https://github.com/clang-musl-overlay/llvm-conf.git"
- inherit git-r3
- else
- SRC_URI="https://github.com/clang-musl-overlay/llvm-conf/archive/refs/tags/v${PV}.tar.gz"
- KEYWORDS="amd64"
- fi
- DESCRIPTION="Utility to manage llvm profiles"
- HOMEPAGE="https://github.com/clang-musl-overlay/llvm-conf.git"
- LICENSE="GPL-2"
- SLOT="0"
- IUSE="+binutils-wrappers +clang-wrappers +native-symlinks"
- RDEPEND="
- >=sys-apps/gentoo-functions-0.10
- "
- _emake() {
- emake \
- PV="${PVR}" \
- SUBLIBDIR="$(get_libdir)" \
- USE_CLANG_WRAPPERS="$(usex clang-wrappers)" \
- USE_BINUTILS_WRAPPERS="$(usex binutils-wrappers)" \
- USE_NATIVE_LINKS="$(usex native-symlinks)" \
- TOOLCHAIN_PREFIX="${CHOST}-" \
- "$@"
- }
- src_compile() {
- _emake
- }
- src_install() {
- _emake DESTDIR="${D}" install
- }
- pkg_postinst() {
- # Do we have a valid setup ?
- if ! llvm-conf -C -c >/dev/null 2>&1 ; then
- llvm-conf latest
- fi
- }
- pkg_postrm() {
- # remove /etc/env.d/60llvm
- test -f /etc/env.d/60llvm && rm -f /etc/env.d/60llvm
- }
|