summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakov Smolić <jsmolic@gentoo.org>2022-02-11 20:41:37 +0100
committerJakov Smolić <jsmolic@gentoo.org>2022-02-11 20:42:33 +0100
commitbfcf00fb434fa5ad2c4c88ef57800d5782763319 (patch)
tree60f75a3eb95466c0d69e9bccb0fa6969492c36b0 /dev-libs/libbpf
parentnet-irc/hexchat: Stabilize 2.16.0 ppc64, #831283 (diff)
downloadgentoo-bfcf00fb434fa5ad2c4c88ef57800d5782763319.tar.gz
gentoo-bfcf00fb434fa5ad2c4c88ef57800d5782763319.tar.bz2
gentoo-bfcf00fb434fa5ad2c4c88ef57800d5782763319.zip
dev-libs/libbpf: add 0.7.0
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-0.7.0.ebuild51
2 files changed, 52 insertions, 0 deletions
diff --git a/dev-libs/libbpf/Manifest b/dev-libs/libbpf/Manifest
index f7baf5561cb2..62d2fd3eeb0d 100644
--- a/dev-libs/libbpf/Manifest
+++ b/dev-libs/libbpf/Manifest
@@ -1 +1,2 @@
DIST libbpf-0.6.1.tar.gz 858232 BLAKE2B 239e7bf47c24d09eb8e177e61d00bd834a0155c8773918246514858fe27688911f79dc4a22d02ab256c7c137010875f8d39d4fec9cecfd7a2b77e6b4df7610ea SHA512 5a8ca70c571fb306dd280f0526db48b78b13b57b4012f7bd3933d6e07d5e41e9370b2db6ed9bbc283c6dcbb21036810bf3093f462906b66557ce0d850c89083a
+DIST libbpf-0.7.0.tar.gz 900120 BLAKE2B a67d83f52fde8a6d7771b0d31fbfabbc7d81013aacd733b1a71724a30eef47a085884f28687cb9e5a103a08a3bd9dde6eeb93f13fa4f1a04a386fe6887f126eb SHA512 8f1b13d60fc61176567f780a6c34314e5bdf1d2d3a8187c31b83eef74250729612a4333a9f739cd75887a8b7bd94446d6a1e0c8424565366051be9d24aa286b4
diff --git a/dev-libs/libbpf/libbpf-0.7.0.ebuild b/dev-libs/libbpf/libbpf-0.7.0.ebuild
new file mode 100644
index 000000000000..fea088060eb7
--- /dev/null
+++ b/dev-libs/libbpf/libbpf-0.7.0.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 ~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
+}