commit:     ea65ccccdd15905c34840b9ac4f91cfbc2e68e51
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Wed May  4 02:10:29 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Wed May  4 02:10:29 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ea65cccc

dev-util/annobin: add 10.67

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 dev-util/annobin/Manifest             |  1 +
 dev-util/annobin/annobin-10.67.ebuild | 88 +++++++++++++++++++++++++++++++++++
 2 files changed, 89 insertions(+)

diff --git a/dev-util/annobin/Manifest b/dev-util/annobin/Manifest
index 7649141a1..cc64ada05 100644
--- a/dev-util/annobin/Manifest
+++ b/dev-util/annobin/Manifest
@@ -1 +1,2 @@
 DIST annobin-10.65.tar.xz 849952 BLAKE2B 
6f6124f6470d3f6fe37ce766dc65af43b3020d0ea745cbaf501c3757a83c500f590276cde98048bd5c47602b8ca954d43039060779cec3d8d2abdd5f1695fac8
 SHA512 
c7191fc88072431f3c62ae2abe405b88c78b3d703353810aef6bb6bf0c3fa16ad2db84d5e5e940864518474119393454aadc40fdca84bdbba18d686face59ce1
+DIST annobin-10.67.tar.xz 850052 BLAKE2B 
d21e85243f729f352fb45e7bb9876507db7cee89bc345cf1b1ff09116d83080aab41a01a787a502bf110c09dc413307463ee58c5ea89bf5c6d976b15289f3c23
 SHA512 
dde856e327aeef376ab2dc67178fbd8e6a055904c8a24da5bc5d69fc52587bb0673c276ffe68ce6cd424c65d3a1653b8ae1e32a90504378fc9291f039160b413

diff --git a/dev-util/annobin/annobin-10.67.ebuild 
b/dev-util/annobin/annobin-10.67.ebuild
new file mode 100644
index 000000000..763da0ecd
--- /dev/null
+++ b/dev-util/annobin/annobin-10.67.ebuild
@@ -0,0 +1,88 @@
+# 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:12
+                       sys-devel/llvm:13
+                       sys-devel/llvm:${LLVM_MAX_SLOT}
+               )
+       )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-10.65-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[@]}"
+}

Reply via email to