summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <patrick.mclean@sony.com>2021-01-04 13:32:57 -0800
committerPatrick McLean <chutzpah@gentoo.org>2021-01-04 13:36:02 -0800
commita300e08630dbb4e81d9cdaf4f8ded90d693ffb02 (patch)
treeee424d0551798ac3b763a9d073552e4c4fe97c1f /dev-libs/libbpf
parentdev-tcltk/blt: Add subslot (diff)
downloadgentoo-a300e08630dbb4e81d9cdaf4f8ded90d693ffb02.tar.gz
gentoo-a300e08630dbb4e81d9cdaf4f8ded90d693ffb02.tar.bz2
gentoo-a300e08630dbb4e81d9cdaf4f8ded90d693ffb02.zip
dev-libs/libbpf-0.3: Version bump
Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-3.0.12, Repoman-3.0.2 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/files/libbpf-0.3.0-paths.patch34
-rw-r--r--dev-libs/libbpf/libbpf-0.3.ebuild55
3 files changed, 90 insertions, 0 deletions
diff --git a/dev-libs/libbpf/Manifest b/dev-libs/libbpf/Manifest
index fbde9fd13778..af3a412b5cd9 100644
--- a/dev-libs/libbpf/Manifest
+++ b/dev-libs/libbpf/Manifest
@@ -5,3 +5,4 @@ DIST libbpf-0.0.9.tar.gz 273726 BLAKE2B 1277ce5b9dab9037e287910c43a71ee33cd6607d
DIST libbpf-0.1.0.tar.gz 666896 BLAKE2B 5923b4c8fb915722f8cc2015ab8f07773a83c4252a59aef784983e46db7cd784e8ff5cc2284d3f5ded6bb92957f8d73b367a35fa1b5693e0cacaaef414a2f410 SHA512 3a5d823e4751408fd9e3bafe0be0a6a78de7dea0114bbd1166d8b3887938eef4e355ba6221b4bded9fc8a8280edede606c8c8078fd40aebdeaebbbb38f4221fe
DIST libbpf-0.1.1.tar.gz 666908 BLAKE2B 0efb044b1dc02230d14a6e92c40d66f7cb28c7efbecc3d97d084a52dde581dbd02b02fb7fbbe8b4ca051f2f64497c6240c5dd9c992e6fe4629a1332311b7833c SHA512 b9f68323a8f53b0fb0bf418b8a37685e7d74b6f5ad7aa2f266f65cd57199b3b9b5865bc4579758e5adcfbb027ced83e12ee87f3ff3bf159c7b54cbdcd50fd62f
DIST libbpf-0.2.tar.gz 699136 BLAKE2B d3c7005e5c27f805a33b444267ee28c3fb143c809a8a3ac733d51c56e7ee310e089964844cd4f1f7519b20dea1f4e4d6b0e6acd7bbdd173c99af54fad3635771 SHA512 22fed87cd4da1765465d812979b39ee3126b444fd6b460472a0a7e2f4fb496d278c9d7d672c3fb15005a58d361fd87c5173c18dcf55664dfbb8e6cadb2eed33a
+DIST libbpf-0.3.tar.gz 979131 BLAKE2B 523040600cb08ed1ad301899f85fd7af8bc498ff8d1fd41783aeab223feb795d074072aba048d7e38af045bb3fbfe478bb2cb0ac34f4c22e4dea4ac5f0d34a4c SHA512 91c3368626e731b5868fd1bb6d16bd049b2ed0d5cbf966647fa1069cf8c912d91f3d734f05353a0c16c8ff03790ca8e1e6515fff66e4a76d70ffdf2dbac6d8e3
diff --git a/dev-libs/libbpf/files/libbpf-0.3.0-paths.patch b/dev-libs/libbpf/files/libbpf-0.3.0-paths.patch
new file mode 100644
index 000000000000..ff087bb38712
--- /dev/null
+++ b/dev-libs/libbpf/files/libbpf-0.3.0-paths.patch
@@ -0,0 +1,34 @@
+--- a/Makefile
++++ b/Makefile
+@@ -76,7 +76,7 @@ endif
+ PREFIX ?= /usr
+ LIBDIR ?= $(PREFIX)/$(LIBSUBDIR)
+ INCLUDEDIR ?= $(PREFIX)/include
+-UAPIDIR ?= $(PREFIX)/include
++UAPIDIR ?= $(PREFIX)/include/bpf/uapi
+
+ TAGS_PROG := $(if $(shell which etags 2>/dev/null),etags,ctags)
+
+@@ -101,6 +101,7 @@ $(OBJDIR)/libbpf.so.$(LIBBPF_VERSION): $(SHARED_OBJS)
+ $(OBJDIR)/libbpf.pc:
+ $(Q)sed -e "s|@PREFIX@|$(PREFIX)|" \
+ -e "s|@LIBDIR@|$(LIBDIR_PC)|" \
++ -e "s|@UAPIDIR@|$(UAPIDIR)|" \
+ -e "s|@VERSION@|$(LIBBPF_VERSION)|" \
+ < libbpf.pc.template > $@
+
+--- a/libbpf.pc.template
++++ b/libbpf.pc.template
+@@ -3,10 +3,11 @@
+ prefix=@PREFIX@
+ libdir=@LIBDIR@
+ includedir=${prefix}/include
++uapidir=@UAPIDIR@
+
+ Name: libbpf
+ Description: BPF library
+ Version: @VERSION@
+ Libs: -L${libdir} -lbpf
+ Requires.private: libelf zlib
+-Cflags: -I${includedir}
++Cflags: -I${includedir} -I${uapidir}
diff --git a/dev-libs/libbpf/libbpf-0.3.ebuild b/dev-libs/libbpf/libbpf-0.3.ebuild
new file mode 100644
index 000000000000..b74596abd7bf
--- /dev/null
+++ b/dev-libs/libbpf/libbpf-0.3.ebuild
@@ -0,0 +1,55 @@
+# Copyright 2019-2021 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.3.0-paths.patch"
+)
+
+src_compile() {
+ append-cflags -fPIC
+ emake \
+ BUILD_SHARED=y \
+ LIBSUBDIR="$(get_libdir)" \
+ $(usex static-libs 'BUILD_STATIC=y' '' '' '') \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ V=1
+}
+
+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
+}