commit:     1d467d89c1b285527ea1404135d76d681dd7895a
Author:     Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Fri Oct 30 18:25:53 2020 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Fri Oct 30 21:13:05 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d467d89

dev-libs/libbpf-0.2: Version bump

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

 dev-libs/libbpf/Manifest          |  1 +
 dev-libs/libbpf/libbpf-0.2.ebuild | 53 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+)

diff --git a/dev-libs/libbpf/Manifest b/dev-libs/libbpf/Manifest
index c7be82c7c2e..fbde9fd1377 100644
--- a/dev-libs/libbpf/Manifest
+++ b/dev-libs/libbpf/Manifest
@@ -4,3 +4,4 @@ DIST libbpf-0.0.8.tar.gz 262519 BLAKE2B 
2a3620c97834cc23e716476b6966c1c65c1c8206
 DIST libbpf-0.0.9.tar.gz 273726 BLAKE2B 
1277ce5b9dab9037e287910c43a71ee33cd6607d7cbe59d40c6930bf49407e04fcdfa6f4795f98202930fd564c1569c2feef0bca73294334f00abd601a288ed0
 SHA512 
d54bbdee6f7ea83ffef3fd0abe07f71644bcf83e5cf4a307fb4e03d885503617f1af2d324cc869f0f01a92bcb58836780a4802ac4db83b9f037ea196edc1131a
 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

diff --git a/dev-libs/libbpf/libbpf-0.2.ebuild 
b/dev-libs/libbpf/libbpf-0.2.ebuild
new file mode 100644
index 00000000000..1c250842513
--- /dev/null
+++ b/dev-libs/libbpf/libbpf-0.2.ebuild
@@ -0,0 +1,53 @@
+# Copyright 2019-2020 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.0.7-paths.patch"
+)
+
+src_compile() {
+       append-cflags -fPIC
+       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
+}

Reply via email to