summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakov Smolic <jakov.smolic@sartura.hr>2020-09-28 12:08:05 +0200
committerPatrick McLean <chutzpah@gentoo.org>2020-10-02 11:49:03 -0700
commitf4de0f1f06807bcb6a0506c58c355bda9340582f (patch)
treef8fb720dd28e885de12ed061ce02d82a54eb54b0 /dev-libs/libbpf/libbpf-0.1.1.ebuild
parentapp-admin/ansible: use env var to allow upgrading of ansible (diff)
downloadgentoo-f4de0f1f06807bcb6a0506c58c355bda9340582f.tar.gz
gentoo-f4de0f1f06807bcb6a0506c58c355bda9340582f.tar.bz2
gentoo-f4de0f1f06807bcb6a0506c58c355bda9340582f.zip
dev-libs/libbpf: bump to 0.1.1
Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr> Closes: https://github.com/gentoo/gentoo/pull/17696 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'dev-libs/libbpf/libbpf-0.1.1.ebuild')
-rw-r--r--dev-libs/libbpf/libbpf-0.1.1.ebuild53
1 files changed, 53 insertions, 0 deletions
diff --git a/dev-libs/libbpf/libbpf-0.1.1.ebuild b/dev-libs/libbpf/libbpf-0.1.1.ebuild
new file mode 100644
index 000000000000..1c2508425132
--- /dev/null
+++ b/dev-libs/libbpf/libbpf-0.1.1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 2019-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+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="~amd64 ~arm64 ~x86"
+fi
+S="${WORKDIR}/${P}/src"
+
+HOMEPAGE="https://github.com/libbpf/libbpf"
+DESCRIPTION="Stand-alone build of libbpf from the Linux kernel"
+
+LICENSE="GPL-2 LGPL-2.1 BSD-2"
+SLOT="0/${PV}"
+IUSE="+static-libs"
+
+COMMON_DEPEND="virtual/libelf
+ !<=dev-util/bcc-0.7.0"
+DEPEND="${COMMON_DEPEND}
+ sys-kernel/linux-headers"
+RDEPEND="${COMMON_DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/libbpf-0.0.7-paths.patch"
+)
+
+src_compile() {
+ append-cflags -fPIC
+ emake \
+ BUILD_SHARED=y \
+ LIBSUBDIR="$(get_libdir)" \
+ $(usex static-libs 'BUILD_STATIC=y' '' '' '') \
+ CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake \
+ BUILD_SHARED=y \
+ LIBSUBDIR="$(get_libdir)" \
+ DESTDIR="${D}" \
+ $(usex static-libs 'BUILD_STATIC=y' '' '' '') \
+ install install_uapi_headers
+
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins ${PN}.pc
+}