diff options
author | Patrick McLean <chutzpah@gentoo.org> | 2022-07-14 16:02:17 -0700 |
---|---|---|
committer | Patrick McLean <chutzpah@gentoo.org> | 2022-07-14 16:02:17 -0700 |
commit | 4962b738fcc3f57130bd9d2d9874822b77a338e8 (patch) | |
tree | 5e51838407187c5451378609af268b3667eee478 /dev-libs/libbpf/libbpf-0.8.1.ebuild | |
parent | dev-libs/angelscript: Drop old 2.35.0 (diff) | |
download | gentoo-4962b738fcc3f57130bd9d2d9874822b77a338e8.tar.gz gentoo-4962b738fcc3f57130bd9d2d9874822b77a338e8.tar.bz2 gentoo-4962b738fcc3f57130bd9d2d9874822b77a338e8.zip |
dev-libs/libbpf: add 0.8.1
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'dev-libs/libbpf/libbpf-0.8.1.ebuild')
-rw-r--r-- | dev-libs/libbpf/libbpf-0.8.1.ebuild | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/dev-libs/libbpf/libbpf-0.8.1.ebuild b/dev-libs/libbpf/libbpf-0.8.1.ebuild new file mode 100644 index 000000000000..2ebd8eeef0c6 --- /dev/null +++ b/dev-libs/libbpf/libbpf-0.8.1.ebuild @@ -0,0 +1,51 @@ +# Copyright 2019-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic toolchain-funcs + +if [[ ${PV} =~ [9]{4,} ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/libbpf/libbpf.git" +else + SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi +S="${WORKDIR}/${P}/src" + +DESCRIPTION="Stand-alone build of libbpf from the Linux kernel" +HOMEPAGE="https://github.com/libbpf/libbpf" + +LICENSE="GPL-2 LGPL-2.1 BSD-2" +SLOT="0/$(ver_cut 1-2 ${PV})" +IUSE="static-libs" + +DEPEND=" + sys-kernel/linux-headers + virtual/libelf +" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/libbpf-9999-paths.patch +) + +src_configure() { + append-cflags -fPIC + tc-export CC AR + export LIBSUBDIR="$(get_libdir)" V=1 +} + +src_install() { + emake \ + DESTDIR="${D}" \ + install install_uapi_headers + + if ! use static-libs; then + find "${ED}" -name '*.a' -delete || die + fi + + insinto /usr/$(get_libdir)/pkgconfig + doins ${PN}.pc +} |