summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <patrick.mclean@sony.com>2019-10-03 10:42:24 -0700
committerPatrick McLean <chutzpah@gentoo.org>2019-10-03 11:54:15 -0700
commitff1c6139f946163fd6a90174961d4a2a928dcddc (patch)
tree720cbf4958efcb9dcaaee5d04f1d5011b84d976f /dev-libs/libbpf
parentdev-lang/gnat-gpl: fix MissingTestRestrict (diff)
downloadgentoo-ff1c6139f946163fd6a90174961d4a2a928dcddc.tar.gz
gentoo-ff1c6139f946163fd6a90174961d4a2a928dcddc.tar.bz2
gentoo-ff1c6139f946163fd6a90174961d4a2a928dcddc.zip
dev-libs/libbpf: Version bump to 0.0.5
Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-2.3.76, Repoman-2.3.17 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.5-paths.patch38
-rw-r--r--dev-libs/libbpf/libbpf-0.0.5.ebuild47
3 files changed, 86 insertions, 0 deletions
diff --git a/dev-libs/libbpf/Manifest b/dev-libs/libbpf/Manifest
index d427e0ba7cea..46e19fabe804 100644
--- a/dev-libs/libbpf/Manifest
+++ b/dev-libs/libbpf/Manifest
@@ -1,2 +1,3 @@
DIST libbpf-0.0.3.tar.gz 127328 BLAKE2B eaa1be54f0a7fcc6fd41eb2adaad2f405f76db3bd7c7466a5484ead1cca5a9fe775e331838cd5645d7399cb5b1a5b2fcb3814fb45643660fd3f7d84b9986bae6 SHA512 ee489d968cd9a20a1f091dcd2696d3807ab0db2a001613684402de2c696391eea033f3bd961eaf1d0df95c1e15f4f0ccfb7003ff98c3f08f24a7e9a8db22cdad
DIST libbpf-0.0.4.tar.gz 148625 BLAKE2B d8c2343441258a01ca54b0046b0f1d54cb2e0e7a09c99e489409b25d3f2486bc7d8a175b4a3e793b56ba72462d34b9a55c53e86eaf446c64f2c30d673e7f23bd SHA512 1e4a16ed0f3e378aa9d7080e4b54cb3a9542975105b09977d1ddecf3ae4dabb3b5edf80b92b61644b1f0cbda7ee7e135ee0f736e71c1d201a97b1b3dd573b543
+DIST libbpf-0.0.5.tar.gz 160335 BLAKE2B 2cf4a3e6edc002b3a32f9d08bb22a07863d8f6f90472e9593a9e9a93b08a00f0557d5a59fa841325b947e6f7b129232e7cd1fdc906f45de57b0dbe594548f1c2 SHA512 e42f6cc8f834f2d3cf9138d655bd3727ffffb2693850f7f6409ec4d536336bc5fa479a64eefc802a5915e333677eca843f8f1bd0132589bba10bdc89064eee0c
diff --git a/dev-libs/libbpf/files/libbpf-0.0.5-paths.patch b/dev-libs/libbpf/files/libbpf-0.0.5-paths.patch
new file mode 100644
index 000000000000..e9eda9c2dced
--- /dev/null
+++ b/dev-libs/libbpf/files/libbpf-0.0.5-paths.patch
@@ -0,0 +1,38 @@
+diff --git a/Makefile b/Makefile
+index 6992fbf..cefc77a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -64,7 +64,7 @@ endif
+ PREFIX ?= /usr
+ LIBDIR ?= $(PREFIX)/$(LIBSUBDIR)
+ INCLUDEDIR ?= $(PREFIX)/include
+-UAPIDIR ?= $(PREFIX)/include
++UAPIDIR ?= $(PREFIX)/include/bpf/uapi
+
+ all: $(STATIC_LIBS) $(SHARED_LIBS) $(PC_FILE)
+
+@@ -85,6 +85,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 ac17fce..6d385d9 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
+-Cflags: -I${includedir}
++Cflags: -I${includedir} -I${uapidir}
diff --git a/dev-libs/libbpf/libbpf-0.0.5.ebuild b/dev-libs/libbpf/libbpf-0.0.5.ebuild
new file mode 100644
index 000000000000..7e265723db96
--- /dev/null
+++ b/dev-libs/libbpf/libbpf-0.0.5.ebuild
@@ -0,0 +1,47 @@
+# Copyright 2019 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.5-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
+}