summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakov Smolić <jsmolic@gentoo.org>2022-10-04 17:42:00 +0200
committerJakov Smolić <jsmolic@gentoo.org>2022-10-04 17:42:26 +0200
commit2629b257e09b1ae0f125245a5c420a9581192062 (patch)
treefdc5206ca439ab235893cdead0afe2b6072972e4 /dev-libs/libbpf
parentdev-util/bpftool: add 5.19.12 (diff)
downloadgentoo-2629b257e09b1ae0f125245a5c420a9581192062.tar.gz
gentoo-2629b257e09b1ae0f125245a5c420a9581192062.tar.bz2
gentoo-2629b257e09b1ae0f125245a5c420a9581192062.zip
dev-libs/libbpf: add 1.0.1
Signed-off-by: Jakov Smolić <jsmolic@gentoo.org>
Diffstat (limited to 'dev-libs/libbpf')
-rw-r--r--dev-libs/libbpf/Manifest1
-rw-r--r--dev-libs/libbpf/libbpf-1.0.1.ebuild52
2 files changed, 53 insertions, 0 deletions
diff --git a/dev-libs/libbpf/Manifest b/dev-libs/libbpf/Manifest
index 5b6a9968ec19..b85f89ec35a3 100644
--- a/dev-libs/libbpf/Manifest
+++ b/dev-libs/libbpf/Manifest
@@ -1,2 +1,3 @@
DIST libbpf-0.8.1.tar.gz 942702 BLAKE2B 084be7d4258500fa894560ed2e52821addcc5d150dcd77fd646271b614d788b7931271be9c3e46fdbc4ed93d053ea3e09023158a8e4a31f9452d10dcb0677b58 SHA512 e3bb602f55215a4f030e564af7321ba6338937c426fcaee478b607f88b0c773c40a0c3f59a2b345bda951a19e79061733f8a3fdc10a6292e92782e65754b584a
DIST libbpf-1.0.0.tar.gz 917108 BLAKE2B 5bde5a9147330f11dcf1e37aace971624293aae3914459a6b8be327530fa2c2774edaf1b798225ade2771edd88bddc2a74d7f523791f83558417b759eb417f7a SHA512 e99aea1ff477114549b41c272a975169a79ffc1daf4bcaba586cd13d0fc0b23c336cb406fd8e64b73350fe16e2d423fa68a29601d15e2477955c7a92358fb7f8
+DIST libbpf-1.0.1.tar.gz 917269 BLAKE2B 24e43f9a2b20e6f708b74ff50c8ce243546681201b1d72d6b35a95dd85b59032069814792739d3b2a6adaa007958a142a687e901e36a193fd02cdca69926d08f SHA512 2ee6d85c0a33f723e5b93ddddf97118e67754c9e44ca0449ceb49126820f89fea9ddc282a5add764dc4da090af6164cc6641b497489253d192ed01bc397df9be
diff --git a/dev-libs/libbpf/libbpf-1.0.1.ebuild b/dev-libs/libbpf/libbpf-1.0.1.ebuild
new file mode 100644
index 000000000000..d106d0c7a863
--- /dev/null
+++ b/dev-libs/libbpf/libbpf-1.0.1.ebuild
@@ -0,0 +1,52 @@
+# 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)"
+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)"
+ export LIBDIR="${EPREFIX}/usr/$(get_libdir)"
+ export 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
+}