diff options
author | Patrick McLean <chutzpah@gentoo.org> | 2020-08-24 17:05:31 -0700 |
---|---|---|
committer | Patrick McLean <chutzpah@gentoo.org> | 2020-08-24 17:11:34 -0700 |
commit | 571c8878fb584ec49f1e22f064cb3e94f7123226 (patch) | |
tree | c382f8fee1b64f704ce6c49d07aef2922d713e96 | |
parent | dev-libs/libbpf: Sync 9999 (diff) | |
download | gentoo-571c8878fb584ec49f1e22f064cb3e94f7123226.tar.gz gentoo-571c8878fb584ec49f1e22f064cb3e94f7123226.tar.bz2 gentoo-571c8878fb584ec49f1e22f064cb3e94f7123226.zip |
dev-libs/libbpf-0.1.0-r1: Compile static lib with -fPIC (needed for bcc)
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
-rw-r--r-- | dev-libs/libbpf/libbpf-0.1.0-r1.ebuild (renamed from dev-libs/libbpf/libbpf-0.1.0.ebuild) | 15 | ||||
-rw-r--r-- | dev-libs/libbpf/libbpf-9999.ebuild | 8 |
2 files changed, 15 insertions, 8 deletions
diff --git a/dev-libs/libbpf/libbpf-0.1.0.ebuild b/dev-libs/libbpf/libbpf-0.1.0-r1.ebuild index 5ba31a42fe54..1c2508425132 100644 --- a/dev-libs/libbpf/libbpf-0.1.0.ebuild +++ b/dev-libs/libbpf/libbpf-0.1.0-r1.ebuild @@ -3,16 +3,22 @@ EAPI=7 -inherit toolchain-funcs +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" -SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" -S="${WORKDIR}/${P}/src" LICENSE="GPL-2 LGPL-2.1 BSD-2" SLOT="0/${PV}" -KEYWORDS="~amd64 ~arm64 ~x86" IUSE="+static-libs" COMMON_DEPEND="virtual/libelf @@ -26,6 +32,7 @@ PATCHES=( ) src_compile() { + append-cflags -fPIC emake \ BUILD_SHARED=y \ LIBSUBDIR="$(get_libdir)" \ diff --git a/dev-libs/libbpf/libbpf-9999.ebuild b/dev-libs/libbpf/libbpf-9999.ebuild index f363b55ec975..6697b1c3a061 100644 --- a/dev-libs/libbpf/libbpf-9999.ebuild +++ b/dev-libs/libbpf/libbpf-9999.ebuild @@ -3,7 +3,8 @@ EAPI=7 -inherit toolchain-funcs +inherit flag-o-matic toolchain-funcs + if [[ ${PV} =~ [9]{4,} ]]; then inherit git-r3 EGIT_REPO_URI="https://github.com/libbpf/libbpf.git" @@ -13,7 +14,7 @@ else fi S="${WORKDIR}/${P}/src" -HOMEPAGE="https://www.kernel.org/doc/html/latest/bpf/bpf_devel_QA.html" +HOMEPAGE="https://github.com/libbpf/libbpf" DESCRIPTION="Stand-alone build of libbpf from the Linux kernel" LICENSE="GPL-2 LGPL-2.1 BSD-2" @@ -26,13 +27,12 @@ DEPEND="${COMMON_DEPEND} sys-kernel/linux-headers" RDEPEND="${COMMON_DEPEND}" -S="${WORKDIR}/${P}/src" - PATCHES=( "${FILESDIR}/libbpf-9999-paths.patch" ) src_compile() { + append-cflags -fPIC emake \ BUILD_SHARED=y \ LIBSUBDIR="$(get_libdir)" \ |