dev-util/annobin: add 10.62

Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2022-04-08 00:35:53 +02:00
parent 836551fdec
commit 99eee09845
2 changed files with 90 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST annobin-10.60.tar.xz 848432 BLAKE2B df7dafd25af009bf0cbe779088892bd11120cf99f587293f7730083007586d84c452737d4e3b32e2b73586ab51958ba8f16d358cef9041ccb493198e72bc1b37 SHA512 7d5158da6a59000d686fb837b0ac1a86351898c00a93e29c2cb599ec6eccb325b66fbd775855bd3661d2d9541e3d2cb2493b087b6670fca137f9992f33c68082
DIST annobin-10.62.tar.xz 849684 BLAKE2B 363cc54f56199e210edb82549b7743f9d70e62f481faab7363f715ce3ab2f127e9025f04cf92ccbd0402804df4fe8ff1c92259639b32b6c76f47eb82de0c022b SHA512 60f65d80158dc074f9293ae4d35e312a8b2129b20e10eb3268d335be215e8eee9f6bb0efc341bcaae7169a32a5fbdbf8d81fd372e6b3c793d7380682e1baf595

View File

@@ -0,0 +1,89 @@
# Copyright 2018-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
LLVM_MAX_SLOT=14
inherit autotools llvm toolchain-funcs
DESCRIPTION="Binary annotation compiler plugin and tools"
HOMEPAGE="https://nickc.fedorapeople.org"
SRC_URI="https://nickc.fedorapeople.org/${P}.tar.xz"
KEYWORDS="~amd64"
LICENSE="GPL-3"
SLOT="0"
IUSE="clang doc llvm test"
RDEPEND="
app-arch/rpm
dev-libs/elfutils
sys-libs/binutils-libs
clang? ( <sys-devel/clang-${LLVM_MAX_SLOT}:= )
!clang? ( llvm? ( <sys-devel/llvm-${LLVM_MAX_SLOT}:= ) )
llvm? (
|| (
sys-devel/llvm:11
sys-devel/llvm:12
sys-devel/llvm:13
sys-devel/llvm:${LLVM_MAX_SLOT}
)
)
"
DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}/${PN}-10.58-fix-bashism.patch"
"${FILESDIR}/${PN}-10.58-demangle.h-path.patch"
)
REQUIRED_USE="
clang? ( llvm )
"
RESTRICT="!test? ( test )"
pkg_pretend() {
if [[ ${MERGE_TYPE} != binary ]]; then
if ! tc-is-gcc ; then
eerror "${PN} is a gcc plugin. Please emerge using gcc as CC"
die "use gcc"
fi
fi
}
src_prepare() {
default
sed -i 's|2.69|2.71|g' config/override.m4 || die
if use llvm; then
local llvmdir="$(get_llvm_prefix -d)" || die
local llvm_plugindir
llvm_plugindir="$(
clang --print-search-dirs | gawk -e\
'BEGIN { FS = ":" } /libraries/ { print gensub(" =","",1,$2) } END { }'
)" || die
einfo $llvm_plugindir
sed -i "/^INCDIR.*/ s|$| -I${llvmdir}/include|" {llvm,clang}-plugin/Makefile.in || die
sed -i "/^CLANG_LIBS.*/ s|$| -L${llvmdir}/$(get_libdir)|" clang-plugin/Makefile.in || die
sed -i "s|^PLUGIN_INSTALL_DIR =.*|PLUGIN_INSTALL_DIR = \$\{DESTDIR\}/$(realpath ${llvm_plugindir})|" {llvm,clang}-plugin/Makefile.in || die
fi
eautoreconf
}
src_configure() {
local plugdir="$($(tc-getCC) -print-file-name=plugin)" || die
local myconf=(
--with-gcc-plugin-dir="${plugdir}"
--with-libelf
--without-debuginfod # we don't have it enabled, comes with elfutils
$(use_with clang)
$(use_with doc docs)
$(use_with llvm)
$(use_with test tests)
)
econf "${myconf[@]}"
}