commit: 3c2db9d3ac92d8abd608684b6102fe1e639be369 Author: Holger Hoffstätte <holger <AT> applied-asynchrony <DOT> com> AuthorDate: Wed Feb 4 08:35:48 2026 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Wed Feb 4 11:14:55 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c2db9d3
dev-libs/libbpf: add 1.6.3 Two compilation warnings fixes to make libbpf build more GCC and C23 compatible. Signed-off-by: Holger Hoffstätte <holger <AT> applied-asynchrony.com> Part-of: https://github.com/gentoo/gentoo/pull/45633 Signed-off-by: Sam James <sam <AT> gentoo.org> dev-libs/libbpf/Manifest | 1 + dev-libs/libbpf/libbpf-1.6.3.ebuild | 62 +++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) diff --git a/dev-libs/libbpf/Manifest b/dev-libs/libbpf/Manifest index 7919b8c37699..d5ee95232081 100644 --- a/dev-libs/libbpf/Manifest +++ b/dev-libs/libbpf/Manifest @@ -1,2 +1,3 @@ DIST libbpf-1.5.1.tar.gz 1036566 BLAKE2B e7ae61ce536d17d6f137c0d095e4fe32995ff717dc9ee9fb2f9fff1dc36cb37d4645a81af363cb66264548eecccabc586bbecfc6db37547aba15e6fc152ceaf8 SHA512 d24c4ef9c0b09a1252320bde54270aedd41211f4359c72a02ee4960b63782a6e8f3de3e3a535720ed468a491397860154f9d1ffc312755f9595a44d22ea23f3b DIST libbpf-1.6.2.tar.gz 1045487 BLAKE2B 452264a0710a9bb1fb63966ef9d9b8cfe11c8332d6d3c041f91676c87034acb0bba82942d49242728a3f1a0acbaf6f7e13162e0052abaa659f731db647e73370 SHA512 aa7511771858f2a58b283edb94595c986d1e9f25e1d8a439484e2ded85b75f87426d417aa7dd162d680f23f416abcfb195902cc13e48e444b99b6a24a179a9b6 +DIST libbpf-1.6.3.tar.gz 1045483 BLAKE2B 80f134f58eb9135c3cf859b6fc8e9172ed5a4855f6875e5b75603453891d13de14bba2999a74b8cb528fbd8acef42aa84461e3f19c65e2a1f564bb0f1efec553 SHA512 e7b1e42c21de0fc17e768e076314951bc305391985b64388bebf4c7049868cc430fb0f17dde7bb64aacd84762f6bf4d6da3bcc7ce98581e033791ace90676cc1 diff --git a/dev-libs/libbpf/libbpf-1.6.3.ebuild b/dev-libs/libbpf/libbpf-1.6.3.ebuild new file mode 100644 index 000000000000..fe82495c465f --- /dev/null +++ b/dev-libs/libbpf/libbpf-1.6.3.ebuild @@ -0,0 +1,62 @@ +# Copyright 2019-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit dot-a flag-o-matic toolchain-funcs + +DESCRIPTION="Stand-alone build of libbpf from the Linux kernel" +HOMEPAGE="https://github.com/libbpf/libbpf" + +if [[ ${PV} =~ [9]{4,} ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/libbpf/libbpf.git" +else + SRC_URI="https://github.com/libbpf/libbpf/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi +S="${WORKDIR}/${P}/src" + +LICENSE="GPL-2 LGPL-2.1 BSD-2" +SLOT="0/$(ver_cut 1-2)" +IUSE="static-libs" + +# libbpf headers referenece linux-headers, so we keep it in RDEPEND +DEPEND=" + sys-kernel/linux-headers + >=virtual/libelf-3:= +" +RDEPEND=" + ${DEPEND} +" +BDEPEND=" + virtual/pkgconfig +" + +DOCS=( + ../{README,SYNC}.md +) + +src_configure() { + append-cflags -fPIC + tc-export CC AR PKG_CONFIG + use static-libs && lto-guarantee-fat + export PREFIX="${EPREFIX}/usr" + export LIBDIR="\$(PREFIX)/$(get_libdir)" + export V=1 +} + +src_install() { + emake DESTDIR="${D}" install + + if ! use static-libs; then + find "${ED}" -name '*.a' -delete || die + fi + + strip-lto-bytecode + + dodoc "${DOCS[@]}" + + insinto /usr/$(get_libdir)/pkgconfig + doins ${PN}.pc +}
