summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakov Smolić <jsmolic@gentoo.org>2021-09-14 21:12:54 +0200
committerPatrick McLean <chutzpah@gentoo.org>2021-09-20 17:37:07 -0700
commit5d22ff4feb4aef6552ba0f27521e01001b7a849d (patch)
tree239d5693bdb837ba7863c7116af467f230de96ec /dev-libs/libbpf
parentgames-board/pysolfc: add 2.14.0 (diff)
downloadgentoo-5d22ff4feb4aef6552ba0f27521e01001b7a849d.tar.gz
gentoo-5d22ff4feb4aef6552ba0f27521e01001b7a849d.tar.bz2
gentoo-5d22ff4feb4aef6552ba0f27521e01001b7a849d.zip
dev-libs/libbpf: Port to EAPI 8
- Reorder variables per skel.ebuild - Drop redundant COMMON_DEPEND - Export CC, AR and other variables instead of passing them directly to emake - Drop USE=static-libs, since the build-system doesn't offer a way to build only shared library, so let's just install both libraries unconditionally Signed-off-by: Jakov Smolić <jsmolic@gentoo.org> Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'dev-libs/libbpf')
-rw-r--r--dev-libs/libbpf/libbpf-9999.ebuild38
1 files changed, 17 insertions, 21 deletions
diff --git a/dev-libs/libbpf/libbpf-9999.ebuild b/dev-libs/libbpf/libbpf-9999.ebuild
index a122d56cb683..2b8fd07a6a92 100644
--- a/dev-libs/libbpf/libbpf-9999.ebuild
+++ b/dev-libs/libbpf/libbpf-9999.ebuild
@@ -1,7 +1,7 @@
# Copyright 2019-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit flag-o-matic toolchain-funcs
@@ -10,46 +10,42 @@ if [[ ${PV} =~ [9]{4,} ]]; then
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"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
S="${WORKDIR}/${P}/src"
-HOMEPAGE="https://github.com/libbpf/libbpf"
DESCRIPTION="Stand-alone build of libbpf from the Linux kernel"
+HOMEPAGE="https://github.com/libbpf/libbpf"
LICENSE="GPL-2 LGPL-2.1 BSD-2"
SLOT="0/${PV}"
-IUSE="+static-libs"
+IUSE="static-libs"
-COMMON_DEPEND="virtual/libelf
- !<=dev-util/bcc-0.7.0"
-DEPEND="${COMMON_DEPEND}
- sys-kernel/linux-headers"
-RDEPEND="${COMMON_DEPEND}"
+DEPEND="
+ sys-kernel/linux-headers
+ virtual/libelf"
+RDEPEND="${DEPEND}"
PATCHES=(
- "${FILESDIR}/libbpf-9999-paths.patch"
+ "${FILESDIR}"/libbpf-9999-paths.patch
)
-src_compile() {
+src_configure() {
append-cflags -fPIC
- emake \
- BUILD_SHARED=y \
- LIBSUBDIR="$(get_libdir)" \
- $(usex static-libs 'BUILD_STATIC=y' '' '' '') \
- CC="$(tc-getCC)" \
- AR="$(tc-getAR)" \
- V=1
+ tc-export CC AR
+ export LIBSUBDIR="$(get_libdir)"
+ export V=1
}
src_install() {
emake \
- BUILD_SHARED=y \
- LIBSUBDIR="$(get_libdir)" \
DESTDIR="${D}" \
- $(usex static-libs 'BUILD_STATIC=y' '' '' '') \
install install_uapi_headers
+ if ! use static-libs; then
+ find "${ED}" -name '*.a' -delete || die
+ fi
+
insinto /usr/$(get_libdir)/pkgconfig
doins ${PN}.pc
}