diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-05-02 23:23:40 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-05-02 23:23:40 +0100 |
commit | f20958f66a5e97c92cc44354e07e3e3089dfc23d (patch) | |
tree | fbf2993fb14c0f373d35922030b711e3fda4f864 /dev-libs/libbpf/libbpf-1.2.0.ebuild | |
parent | e805507c58bab294dddb75f6fc9b551d9d92de86 (diff) |
gentoo auto-resync : 02:05:2023 - 23:23:39
Diffstat (limited to 'dev-libs/libbpf/libbpf-1.2.0.ebuild')
-rw-r--r-- | dev-libs/libbpf/libbpf-1.2.0.ebuild | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/dev-libs/libbpf/libbpf-1.2.0.ebuild b/dev-libs/libbpf/libbpf-1.2.0.ebuild new file mode 100644 index 000000000000..c444170afb0c --- /dev/null +++ b/dev-libs/libbpf/libbpf-1.2.0.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 +} |