summaryrefslogtreecommitdiff
path: root/net-libs/xdp-tools
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-10-30 19:43:03 +0100
committerV3n3RiX <venerix@koprulu.sector>2021-10-30 19:43:03 +0100
commit162945d2a91899b637bbb9e163b406350de12906 (patch)
tree49cc2cc66f724a7c6f033f93aaba4ae3be1f2259 /net-libs/xdp-tools
parentf660c6de84558324d784218831d8f0782ee41e2e (diff)
gentoo resync : 30.10.2021
Diffstat (limited to 'net-libs/xdp-tools')
-rw-r--r--net-libs/xdp-tools/Manifest3
-rw-r--r--net-libs/xdp-tools/metadata.xml14
-rw-r--r--net-libs/xdp-tools/xdp-tools-1.2.0.ebuild49
3 files changed, 66 insertions, 0 deletions
diff --git a/net-libs/xdp-tools/Manifest b/net-libs/xdp-tools/Manifest
new file mode 100644
index 000000000000..28d03ef05307
--- /dev/null
+++ b/net-libs/xdp-tools/Manifest
@@ -0,0 +1,3 @@
+DIST xdp-tools-1.2.0.tar.gz 233676 BLAKE2B 488bd24c5b0c25cb90cc434c0d7cecaf0cf2818d949008fabf4a1245f773e1a1e7a6520c4155df5a6364b0cc8ce2ae49b7b428209b762ecd11f9d6adc10cc57b SHA512 484e5aed6d695665e9e7edec8033b6034281fb215c758a8a8600b5b2215c7decb538efbafa4204306497197a329c3ad7c51beb33717fbe0296a345a1aca8c0a9
+EBUILD xdp-tools-1.2.0.ebuild 1200 BLAKE2B a081ef45114c1adec1397b67a5ec18a54df31767bf1a595ad4b666e3f630df7c7e5b0957898a959b939ff57b08757b7e9653c29a67746ce1e1157f79c44b20af SHA512 4543181307809e11a6447a661a54cebf8f38ad8d6ee377ae32c2b4347907e86a06b104bf6bd9dad82dc4dd587673133afca1f671e589f3671f6ccaddf18af1ff
+MISC metadata.xml 448 BLAKE2B 5e76000a49c2578dc872010907deab803bf25d58e5383b81f8953f3ac8549f017895c7afa39a2b8c3eb47efb66c5c322177032542cdffec41de733502da41ce4 SHA512 4010fb44ad655a9c58e3328623652d2f6c10aee934daeaaa2c5738c44b086cc2674e011e5de0b6e6a058c24131a16be679e971a692800458492cf3addbd761c2
diff --git a/net-libs/xdp-tools/metadata.xml b/net-libs/xdp-tools/metadata.xml
new file mode 100644
index 000000000000..878714e41628
--- /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>zx2c4@gentoo.org</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-1.2.0.ebuild b/net-libs/xdp-tools/xdp-tools-1.2.0.ebuild
new file mode 100644
index 000000000000..1c7f80eb7c0d
--- /dev/null
+++ b/net-libs/xdp-tools/xdp-tools-1.2.0.ebuild
@@ -0,0 +1,49 @@
+# 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}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1 BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="+doc +tools"
+
+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_configure() {
+ export PRODUCTION=1
+ export DYNAMIC_LIBXDP=1
+ export FORCE_EMACS=$(usex doc 1 0)
+ use doc || export EMACS=false
+ export FORCE_SYSTEM_LIBBPF=1
+ default
+ {
+ echo "PREFIX := ${EPREFIX}/usr"
+ echo "LIBDIR := \$(PREFIX)/$(get_libdir)"
+ echo "BPF_OBJECT_DIR := \$(PREFIX)/lib/bpf"
+ } >> config.mk
+}
+
+src_install() {
+ default
+ rm -r "${ED}/usr/share/xdp-tools" || die
+ rm "${ED}/usr/$(get_libdir)/libxdp.a" || die
+ use tools || { rm "${ED}/usr/sbin"/* || die; }
+ dostrip -x /usr/lib/bpf
+}