diff options
author | Jason A. Donenfeld <zx2c4@gentoo.org> | 2021-10-29 13:53:31 +0200 |
---|---|---|
committer | Jason A. Donenfeld <zx2c4@gentoo.org> | 2021-10-29 13:54:09 +0200 |
commit | bd569b9a6ef8d9e1e34a97116999e2345a16408b (patch) | |
tree | 32e7bdd05e3e8c3e0dc504fe72b638850d3506ed /net-libs/xdp-tools | |
parent | dev-python/packaging: Require pyparsing < 3 (diff) | |
download | gentoo-bd569b9a6ef8d9e1e34a97116999e2345a16408b.tar.gz gentoo-bd569b9a6ef8d9e1e34a97116999e2345a16408b.tar.bz2 gentoo-bd569b9a6ef8d9e1e34a97116999e2345a16408b.zip |
net-libs/xdp-tools: add version 0.0.3
A bit rough around the edges, given the bespoke build system of
xdp-tools is a little bit immature, and there's a bit of weirdness
around installing BPF ELF objects. But hopefully this is a solid start.
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Jason A. Donenfeld <zx2c4@gentoo.org>
Diffstat (limited to 'net-libs/xdp-tools')
-rw-r--r-- | net-libs/xdp-tools/Manifest | 1 | ||||
-rw-r--r-- | net-libs/xdp-tools/metadata.xml | 14 | ||||
-rw-r--r-- | net-libs/xdp-tools/xdp-tools-0.0.3.ebuild | 52 |
3 files changed, 67 insertions, 0 deletions
diff --git a/net-libs/xdp-tools/Manifest b/net-libs/xdp-tools/Manifest new file mode 100644 index 000000000000..1ce4a87a70a7 --- /dev/null +++ b/net-libs/xdp-tools/Manifest @@ -0,0 +1 @@ +DIST xdp-tools-0.0.3.tar.gz 381386 BLAKE2B 1160d9a7cc2b6cf7b49e7223acdbeba72046c00ec710c21140da0607cac1e8a1231992a8967b2f8f2a964da593dfe0af08b28abbc3b13818ddafebbc2c3961a7 SHA512 c2a4278db41af020cf42b1139c93786a49ad2a071b2002177ac39e8d6b74203d251bd7823399d9e156c969d2ae741b0ecd4178edf446fe5c7270e53295458fce diff --git a/net-libs/xdp-tools/metadata.xml b/net-libs/xdp-tools/metadata.xml new file mode 100644 index 000000000000..51fa02b96aef --- /dev/null +++ b/net-libs/xdp-tools/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>Jason@zx2c4.com</email> + <name>Jason A. Donenfeld</name> + </maintainer> + <upstream> + <remote-id type="github">xdp-project/xdp-tools</remote-id> + </upstream> + <use> + <flag name="tools">Install various helper tools rather than just libxdp.</flag> + </use> +</pkgmetadata> diff --git a/net-libs/xdp-tools/xdp-tools-0.0.3.ebuild b/net-libs/xdp-tools/xdp-tools-0.0.3.ebuild new file mode 100644 index 000000000000..0966087d398a --- /dev/null +++ b/net-libs/xdp-tools/xdp-tools-0.0.3.ebuild @@ -0,0 +1,52 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="The libxdp library and various tools for use with XDP" +HOMEPAGE="https://github.com/xdp-project/xdp-tools" +SRC_URI="https://github.com/xdp-project/${PN}/releases/download/v${PV}/${P}.tar.gz" + +LICENSE="GPL-2 LGPL-2.1 BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="+doc +tools static-libs" + +DEPEND="dev-libs/libbpf + sys-libs/zlib + net-libs/libpcap + virtual/libelf" +RDEPEND="${DEPEND}" +BDEPEND=">=sys-devel/clang-10.0.0 + doc? ( app-editors/emacs )" + +# Not prebuilt -- we build them -- but they're not ordinary ELF objects either. +QA_PREBUILT="usr/lib/bpf/*.o" + +MAKEOPTS+=" V=1" + +src_prepare() { + # A form of this kludge is upstream but hasn't yet been released: + sed -i 's/install -m 0755 \$(SHARED_LIBS)/cp -fpR \$(SHARED_LIBS)/' lib/libxdp/Makefile || die + default +} + +src_configure() { + export PRODUCTION=1 + export DYNAMIC_LIBXDP=1 + export FORCE_EMACS=$(usex doc 1 0) + default + { + echo "PREFIX := ${EPREFIX}/usr" + echo "LIBDIR := \$(PREFIX)/$(get_libdir)" + echo "BPF_OBJECT_DIR := \$(PREFIX)/lib/bpf" + } >> config.mk +} + +src_install() { + default + use static-libs || rm -f "${D}/${EPREFIX}/usr/$(get_libdir)/libxdp.a" + use tools || rm -f "${D}/${EPREFIX}/usr/"{sbin,bin}/* + dostrip -x /usr/lib/bpf +} |