diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-04-05 21:17:31 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-04-05 21:17:31 +0100 |
commit | dc7cbdfa65fd814b3b9aa3c56257da201109e807 (patch) | |
tree | c85d72f6f31f21f178069c9d41d41a7c1ff4b362 /dev-libs/libbpf | |
parent | 0706fc6986773f4e4d391deff4ad5143c464ea4e (diff) |
gentoo resync : 05.04.2019
Diffstat (limited to 'dev-libs/libbpf')
-rw-r--r-- | dev-libs/libbpf/Manifest | 3 | ||||
-rw-r--r-- | dev-libs/libbpf/files/libbpf-0.20190404-makefile.patch | 16 | ||||
-rw-r--r-- | dev-libs/libbpf/libbpf-0.20190404.ebuild | 68 |
3 files changed, 87 insertions, 0 deletions
diff --git a/dev-libs/libbpf/Manifest b/dev-libs/libbpf/Manifest index 86644c2c2241..a3218419636c 100644 --- a/dev-libs/libbpf/Manifest +++ b/dev-libs/libbpf/Manifest @@ -1,4 +1,7 @@ +AUX libbpf-0.20190404-makefile.patch 452 BLAKE2B 2cd303b251a88153c3d4b16f9a6f9431dc865df1399106bf0471584007c85e2e3f25407229fe85841f31a6070c53f4bf465c616ee92627f6ba811f7c1e9c0420 SHA512 dff622c9e8fff722d1f715588a9647f083fcddd6f872adcd8ca6bf16c68aef7a0c8caa973932649680517c2f87420462afec6e97734e36779fc15ea7c9842986 AUX libbpf-makefile.patch 655 BLAKE2B c601e3c6de94a21569e7ca8def5e798484e8a1f945cd2e30beff1086bf835cd21c37472a9d6483514f251901eab38aebd588a89f59a7eafce2e74e7bf640dd56 SHA512 30e1368b6da2fca87b72d0479652a8c154d17a08bad005312306e14d80b831b4c088e88cabf9fc190b2e83ff27c68abb22b2b17a63fb869fa98d4056787f1ef2 DIST libbpf-0.20190311.tar.gz 110782 BLAKE2B b660b2677abd3068aa37f390e817c755ee06cf683e357cad6a9537d8e509d53f24ac66e472148f5b66cbcdca7849db10fc34ff8e6f85bd54a0570a52846ff933 SHA512 dbac8efce3b4c6d4faf40b22de6f71bee630fc8b71aa96e13692ffff0474ed7aa5f66a3c1f5871ec1c27dc71b87bec3ce5138096590fb9238d4d696a722f358d +DIST libbpf-0.20190404.tar.gz 115495 BLAKE2B a159d75163cee051e7784c20018020e650d88e3b011928b1a748199f88b22de713000d3557d083cbbfc3450b6ded9b891d0afb487611044cf2af93fd5691ff8c SHA512 724fe12c9a028a9b6d5a05ee679a3c7f687a32f403bbee3c90730005dac20e0a5e9e6c21df02780d329a88acf4ec525411e448f537b49ce2767de8eae6012661 EBUILD libbpf-0.20190311.ebuild 1505 BLAKE2B 18e4884b9b82382eb00535941150a09d34ea2c0d7dca8119336f4149cab42eb0dc2cad35dadc8cf93090febde32d966e5392fef9644fc80e76ec79d7e9554f28 SHA512 4b68c327b79792445a8f4c11d8422a07b04394bb1a99d9b822f758aa4e26e39b558b2492ff0f6b9ba2c73dbbdf938fb33d1beccb99c5d82f994c7a6502df0507 +EBUILD libbpf-0.20190404.ebuild 1495 BLAKE2B 5ca8a9a8ec7830d60db8b3fa1f6870fb9d70f335bb226b2fbdee0fe424b6879c5e062d82931c0b19576152f613baee25e016d9762fae48e97599d587f7be4a45 SHA512 7394a76b1e54ba01bcc743e933a2920bba9347babdcdfe76e8a3d80250e2cb859feaa797ca5e81f4ec9efb7d79bec63d26edf685bc184c6aba28c84e7e85f690 MISC metadata.xml 305 BLAKE2B d5a605019f99aa1bb75e405bface00e9006038c60d280bdab31ac9a42e3bcf75e2884b3efc8be4e2a88f7e35769b610f0480ccfba291444e8d4ddaecf73a57f9 SHA512 38df62cf50255dcd59c3ab6961643379e549eb568f2c0d010cd8bf73a93fceb0dbdbb32af7b07f21475b4146f99e684aad6928963e56ea8d6777b8f63f8d8a41 diff --git a/dev-libs/libbpf/files/libbpf-0.20190404-makefile.patch b/dev-libs/libbpf/files/libbpf-0.20190404-makefile.patch new file mode 100644 index 000000000000..7bfe5eb6335f --- /dev/null +++ b/dev-libs/libbpf/files/libbpf-0.20190404-makefile.patch @@ -0,0 +1,16 @@ +diff --git a/Makefile b/src/Makefile +index 35b4818..c034531 100644 +--- a/Makefile ++++ b/Makefile +@@ -36,7 +36,10 @@ OBJDIR ?= . + OBJS := $(addprefix $(OBJDIR)/,bpf.o btf.o libbpf.o libbpf_errno.o netlink.o \ + nlattr.o str_error.o libbpf_probes.o bpf_prog_linfo.o xsk.o) + +-LIBS := $(OBJDIR)/libbpf.a ++ifdef BUILD_STATIC ++ LIBS := $(OBJDIR)/libbpf.a ++endif ++ + ifndef BUILD_STATIC_ONLY + LIBS += $(OBJDIR)/libbpf.so \ + $(OBJDIR)/libbpf.so.$(VERSION) \ diff --git a/dev-libs/libbpf/libbpf-0.20190404.ebuild b/dev-libs/libbpf/libbpf-0.20190404.ebuild new file mode 100644 index 000000000000..2ffb199b195b --- /dev/null +++ b/dev-libs/libbpf/libbpf-0.20190404.ebuild @@ -0,0 +1,68 @@ +# Copyright 2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +EGIT_COMMIT="7c27c6306160f630c3c4f4b4971deb657126d681" + +HOMEPAGE="https://github.com/libbpf/libbpf" +DESCRIPTION="Stand-alone build of libbpf from the Linux kernel" +SRC_URI="https://github.com/${PN}/${PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2 LGPL-2.1 BSD-2" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~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}/${PN}-${EGIT_COMMIT}/src" + +PATCHES=( + "${FILESDIR}/libbpf-0.20190404-makefile.patch" +) + +src_prepare() { + # upstream doesn't provide a pkgconfig file, so + # let's make one + printf 'prefix=/usr\nexec_prefix=${prefix}\nlibdir=%s\n' \ + "/usr/$(get_libdir)" \ + > ${PN}.pc + printf 'includedir=${prefix}/include\n\n' \ + >> ${PN}.pc + + printf 'Name: %s\nDescription: %s\nVersion: %s\nLibs: -lbpf %s\n' \ + "${PN}" \ + "${DESCRIPTION}" \ + "${PV}" \ + "$($(tc-getPKG_CONFIG) --libs libelf)" \ + >> ${PN}.pc + + default +} + +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 + + insinto /usr/$(get_libdir)/pkgconfig + doins ${PN}.pc +} |