summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2023-07-10 15:26:56 -0700
committerPatrick McLean <chutzpah@gentoo.org>2023-07-10 15:26:56 -0700
commit9de20cd3e8a4d06de1076da1a739167f36e6effc (patch)
tree9cfea1afb0be5a31f215df326722945f01471985 /dev-libs/libbpf
parentdev-util/gitlab-runner: drop 15.10.1 (diff)
downloadgentoo-9de20cd3e8a4d06de1076da1a739167f36e6effc.tar.gz
gentoo-9de20cd3e8a4d06de1076da1a739167f36e6effc.tar.bz2
gentoo-9de20cd3e8a4d06de1076da1a739167f36e6effc.zip
dev-libs/libbpf: add 1.2.1
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.2.1.ebuild54
2 files changed, 55 insertions, 0 deletions
diff --git a/dev-libs/libbpf/Manifest b/dev-libs/libbpf/Manifest
index a3a2ed98c25d..1e5f8dc08b58 100644
--- a/dev-libs/libbpf/Manifest
+++ b/dev-libs/libbpf/Manifest
@@ -1,3 +1,4 @@
DIST libbpf-0.8.1.tar.gz 942702 BLAKE2B 084be7d4258500fa894560ed2e52821addcc5d150dcd77fd646271b614d788b7931271be9c3e46fdbc4ed93d053ea3e09023158a8e4a31f9452d10dcb0677b58 SHA512 e3bb602f55215a4f030e564af7321ba6338937c426fcaee478b607f88b0c773c40a0c3f59a2b345bda951a19e79061733f8a3fdc10a6292e92782e65754b584a
DIST libbpf-1.1.0.tar.gz 2337951 BLAKE2B 70bee4e94c3b372501e1697cec6573fb3292e61236ed210bde4c3a838494cc951571d7c47720c28a47b8e038331775d66d3f4ad24423f5102e1ee708d1981f88 SHA512 751126893883c68e5472724988327e03f7f52becd472f7d6239fa838762f857e54a0347f8f824b8c32ca93b8f419310a86e1d75e3646dae72c2d2992d093b828
DIST libbpf-1.2.0.tar.gz 999623 BLAKE2B cd10fd9133f01d3f8dbd5ed4585e5605c3b9fb0d9f6ee76a49dcb61a0555edfeb85e333f7b8eb069f47a65d0ab24dcdc33502bd660378cd662a366f10de627a4 SHA512 b5291e807a3c83cb80a47e3518a3ab5ad0b0e6157842117c0684c32e525dce0cca199c3c9028390b94a73ff968391aa023312d3b8bd7472aff1c9ee5206c424e
+DIST libbpf-1.2.1.tar.gz 999804 BLAKE2B fa384675be2d24f284d8384d23a395e9106d9f0456a9c34608bcc57b990addc85708b1aa17102044c03a0458949e494865316babc0d7e496d8ce902abf64a072 SHA512 080103800808a16cab99c445add50af2656584776b360d90a8d3abbf44bcde55b64f8ff36a2577a13918375b578ca474740f333c860962fb98957d67f0ae83d9
diff --git a/dev-libs/libbpf/libbpf-1.2.1.ebuild b/dev-libs/libbpf/libbpf-1.2.1.ebuild
new file mode 100644
index 000000000000..c444170afb0c
--- /dev/null
+++ b/dev-libs/libbpf/libbpf-1.2.1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 2019-2023 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}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/libbpf-9999-paths.patch
+)
+
+src_configure() {
+ append-cflags -fPIC
+ tc-export CC AR PKG_CONFIG
+ export LIBSUBDIR="$(get_libdir)"
+ export PREFIX="${EPREFIX}/usr"
+ export V=1
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ LIBSUBDIR="${LIBSUBDIR}" \
+ install install_uapi_headers
+
+ if ! use static-libs; then
+ find "${ED}" -name '*.a' -delete || die
+ fi
+
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins ${PN}.pc
+}