summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <patrick.mclean@sony.com>2020-02-20 11:02:03 -0800
committerPatrick McLean <chutzpah@gentoo.org>2020-02-20 11:02:03 -0800
commit757cf886fa28d35010bb3400670ca11ac6e6447a (patch)
treed0a2476e9a5e30618bd59bad4389db4a2045e84b /dev-libs/libbpf
parentdev-util/bcc: Remove old versions (diff)
downloadgentoo-757cf886fa28d35010bb3400670ca11ac6e6447a.tar.gz
gentoo-757cf886fa28d35010bb3400670ca11ac6e6447a.tar.bz2
gentoo-757cf886fa28d35010bb3400670ca11ac6e6447a.zip
dev-libs/libbpf-0.0.7: Version bump
Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-2.3.89, Repoman-2.3.20 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.0.7-paths.patch38
-rw-r--r--dev-libs/libbpf/libbpf-0.0.7.ebuild47
3 files changed, 86 insertions, 0 deletions
diff --git a/dev-libs/libbpf/Manifest b/dev-libs/libbpf/Manifest
index 8548bb3b47ff..e5d105fc3a0c 100644
--- a/dev-libs/libbpf/Manifest
+++ b/dev-libs/libbpf/Manifest
@@ -2,3 +2,4 @@ DIST libbpf-0.0.3.tar.gz 127328 BLAKE2B eaa1be54f0a7fcc6fd41eb2adaad2f405f76db3b
DIST libbpf-0.0.4.tar.gz 148625 BLAKE2B d8c2343441258a01ca54b0046b0f1d54cb2e0e7a09c99e489409b25d3f2486bc7d8a175b4a3e793b56ba72462d34b9a55c53e86eaf446c64f2c30d673e7f23bd SHA512 1e4a16ed0f3e378aa9d7080e4b54cb3a9542975105b09977d1ddecf3ae4dabb3b5edf80b92b61644b1f0cbda7ee7e135ee0f736e71c1d201a97b1b3dd573b543
DIST libbpf-0.0.5.tar.gz 160335 BLAKE2B 2cf4a3e6edc002b3a32f9d08bb22a07863d8f6f90472e9593a9e9a93b08a00f0557d5a59fa841325b947e6f7b129232e7cd1fdc906f45de57b0dbe594548f1c2 SHA512 e42f6cc8f834f2d3cf9138d655bd3727ffffb2693850f7f6409ec4d536336bc5fa479a64eefc802a5915e333677eca843f8f1bd0132589bba10bdc89064eee0c
DIST libbpf-0.0.6.tar.gz 213791 BLAKE2B 9f0a08cc7bae41f7fa93d5ba2f535f76ce47fe691efb6bac6257b88a5607deb62fa53f59984d83b6070ccd573c902899f7528b376d9acbfd77317659de6ab061 SHA512 1678133d9a2bd1cf13d4d1f9b83bb3f0642de91e3e3c8d785e2993257035573aff39b9a1a457e73d9c4c1c66b6a52544a8ad06ac560766d335428bb3fc421e71
+DIST libbpf-0.0.7.tar.gz 262068 BLAKE2B e77ff25449274881ddb9d32f25cd6ad8988e4524102bd109049ee6cfce3e2753fd99ebe2a080f809a4c5422dbf6b17633e4b0cea156f289bf95b92f8375a273c SHA512 c2cbc869b7e11339deab3152a6e2d0b3bba25da513d18d77fb0a698cbe61d6bd48175a58e7dd7a3695fbf27faf48b4f517ac5d3a3c66c086df2e5d1b73a2595d
diff --git a/dev-libs/libbpf/files/libbpf-0.0.7-paths.patch b/dev-libs/libbpf/files/libbpf-0.0.7-paths.patch
new file mode 100644
index 000000000000..cbc267b64a38
--- /dev/null
+++ b/dev-libs/libbpf/files/libbpf-0.0.7-paths.patch
@@ -0,0 +1,38 @@
+diff --git a/Makefile b/Makefile
+index bc25aba..e1db3d6 100644
+--- a/Makefile
++++ b/Makefile
+@@ -66,7 +66,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)
+
+@@ -89,6 +89,7 @@ $(OBJDIR)/libbpf.so.$(LIBBPF_VERSION): $(SHARED_OBJS)
+ $(OBJDIR)/libbpf.pc:
+ sed -e "s|@PREFIX@|$(PREFIX)|" \
+ -e "s|@LIBDIR@|$(LIBDIR)|" \
++ -e "s|@UAPIDIR@|$(UAPIDIR)|" \
+ -e "s|@VERSION@|$(LIBBPF_VERSION)|" \
+ < libbpf.pc.template > $@
+
+diff --git a/libbpf.pc.template b/libbpf.pc.template
+index b45ed53..5ec63c2 100644
+--- 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.0.7.ebuild b/dev-libs/libbpf/libbpf-0.0.7.ebuild
new file mode 100644
index 000000000000..6ba1ae96c610
--- /dev/null
+++ b/dev-libs/libbpf/libbpf-0.0.7.ebuild
@@ -0,0 +1,47 @@
+# Copyright 2019-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+HOMEPAGE="https://github.com/libbpf/libbpf"
+DESCRIPTION="Stand-alone build of libbpf from the Linux kernel"
+SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1 BSD-2"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="+static-libs"
+
+COMMON_DEPEND="virtual/libelf
+ !<=dev-util/bcc-0.7.0"
+DEPEND="${COMMON_DEPEND}
+ sys-kernel/linux-headers"
+RDEPEND="${COMMON_DEPEND}"
+
+S="${WORKDIR}/${P}/src"
+
+PATCHES=(
+ "${FILESDIR}/libbpf-0.0.7-paths.patch"
+)
+
+src_compile() {
+ 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
+}