summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2022-08-22 13:37:17 -0700
committerPatrick McLean <chutzpah@gentoo.org>2022-08-22 13:37:17 -0700
commitfb479680735ae4de569c9214edbb7e242b9496de (patch)
treefe7fac5cfe1283c9d82aa48e5293eab0f8cbeafb /dev-libs/libbpf
parentsys-cluster/ceph: gcc12 (bug #866039), boost dep (bug #865509) (diff)
downloadgentoo-fb479680735ae4de569c9214edbb7e242b9496de.tar.gz
gentoo-fb479680735ae4de569c9214edbb7e242b9496de.tar.bz2
gentoo-fb479680735ae4de569c9214edbb7e242b9496de.zip
dev-libs/libbpf: add 1.0.0
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'dev-libs/libbpf')
-rw-r--r--dev-libs/libbpf/Manifest1
-rw-r--r--dev-libs/libbpf/libbpf-1.0.0.ebuild51
2 files changed, 52 insertions, 0 deletions
diff --git a/dev-libs/libbpf/Manifest b/dev-libs/libbpf/Manifest
index 9c91566fbc25..5b6a9968ec19 100644
--- a/dev-libs/libbpf/Manifest
+++ b/dev-libs/libbpf/Manifest
@@ -1 +1,2 @@
DIST libbpf-0.8.1.tar.gz 942702 BLAKE2B 084be7d4258500fa894560ed2e52821addcc5d150dcd77fd646271b614d788b7931271be9c3e46fdbc4ed93d053ea3e09023158a8e4a31f9452d10dcb0677b58 SHA512 e3bb602f55215a4f030e564af7321ba6338937c426fcaee478b607f88b0c773c40a0c3f59a2b345bda951a19e79061733f8a3fdc10a6292e92782e65754b584a
+DIST libbpf-1.0.0.tar.gz 917108 BLAKE2B 5bde5a9147330f11dcf1e37aace971624293aae3914459a6b8be327530fa2c2774edaf1b798225ade2771edd88bddc2a74d7f523791f83558417b759eb417f7a SHA512 e99aea1ff477114549b41c272a975169a79ffc1daf4bcaba586cd13d0fc0b23c336cb406fd8e64b73350fe16e2d423fa68a29601d15e2477955c7a92358fb7f8
diff --git a/dev-libs/libbpf/libbpf-1.0.0.ebuild b/dev-libs/libbpf/libbpf-1.0.0.ebuild
new file mode 100644
index 000000000000..b2c18cdba4be
--- /dev/null
+++ b/dev-libs/libbpf/libbpf-1.0.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 ~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 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
+}