public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Patrick McLean" <chutzpah@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libbpf/, dev-libs/libbpf/files/
Date: Thu,  4 Apr 2019 22:27:23 +0000 (UTC)	[thread overview]
Message-ID: <1554416835.389ef0393e966b8367e6d0dfd8404ce35352a37e.chutzpah@gentoo> (raw)

commit:     389ef0393e966b8367e6d0dfd8404ce35352a37e
Author:     Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Thu Apr  4 22:26:51 2019 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Thu Apr  4 22:27:15 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=389ef039

dev-libs/libbpf: Version bump to 0.20190404

Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 dev-libs/libbpf/Manifest                           |  1 +
 .../libbpf/files/libbpf-0.20190404-makefile.patch  | 16 +++++
 dev-libs/libbpf/libbpf-0.20190404.ebuild           | 68 ++++++++++++++++++++++
 3 files changed, 85 insertions(+)

diff --git a/dev-libs/libbpf/Manifest b/dev-libs/libbpf/Manifest
index 27e7e9bf4c9..eed781dd6e0 100644
--- a/dev-libs/libbpf/Manifest
+++ b/dev-libs/libbpf/Manifest
@@ -1 +1,2 @@
 DIST libbpf-0.20190311.tar.gz 110782 BLAKE2B b660b2677abd3068aa37f390e817c755ee06cf683e357cad6a9537d8e509d53f24ac66e472148f5b66cbcdca7849db10fc34ff8e6f85bd54a0570a52846ff933 SHA512 dbac8efce3b4c6d4faf40b22de6f71bee630fc8b71aa96e13692ffff0474ed7aa5f66a3c1f5871ec1c27dc71b87bec3ce5138096590fb9238d4d696a722f358d
+DIST libbpf-0.20190404.tar.gz 115495 BLAKE2B a159d75163cee051e7784c20018020e650d88e3b011928b1a748199f88b22de713000d3557d083cbbfc3450b6ded9b891d0afb487611044cf2af93fd5691ff8c SHA512 724fe12c9a028a9b6d5a05ee679a3c7f687a32f403bbee3c90730005dac20e0a5e9e6c21df02780d329a88acf4ec525411e448f537b49ce2767de8eae6012661

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 00000000000..7bfe5eb6335
--- /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 00000000000..2ffb199b195
--- /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
+}


             reply	other threads:[~2019-04-04 22:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-04 22:27 Patrick McLean [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-06-14 21:03 [gentoo-commits] repo/gentoo:master commit in: dev-libs/libbpf/, dev-libs/libbpf/files/ Patrick McLean
2020-02-20 19:02 Patrick McLean
2020-02-20 19:02 Patrick McLean
2020-04-03 17:22 Patrick McLean
2021-01-04 21:36 Patrick McLean
2021-09-21  0:37 Patrick McLean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1554416835.389ef0393e966b8367e6d0dfd8404ce35352a37e.chutzpah@gentoo \
    --to=chutzpah@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox